/* Plarime — shared styles (index + brand pages) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Layout: dark industrial single-theme page — full-bleed bands, hairline grids, red as the one signal colour */
:root {
  color-scheme: dark;
  /* colour */
  --red:      #D0021B;   /* brand red: fills, large display type */
  --red-dark: #a30116;
  --red-ink:  #EF3340;   /* brand red lifted for small text on black (≥4.5:1) */
  --black:    #0c0c0c;
  --dark:     #141414;
  --surface:  #1c1c1c;
  --border:   #2e2e2e;
  --dim:      #6b6762;   /* inactive step numbers, placeholders */
  --text:     #f2f0ec;
  --muted:    #a8a49e;
  --white:    #f7f5f2;
  --ok:       #4caf7d;
  --scrim:    rgba(12,12,12,0.95);
  /* type */
  --f-display: 'Barlow Condensed', 'Roboto Condensed', 'Arial Narrow', sans-serif;  /* DIN-derived; has lowercase for units */
  --disp-w:    700;      /* headings */
  --num-w:     600;      /* figures */
  --f-body:    'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-mono:    'DM Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  /* layout */
  --gx: 5rem;            /* side gutter, overridden per breakpoint */
  --nav-h: 76px;
}
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body { background: var(--black); color: var(--text); font-family: var(--f-body); font-weight: 400; line-height: 1.6; overflow-x: hidden; }
body::after { content: ''; position: fixed; inset: 0; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E"); pointer-events: none; z-index: 9999; }
img { max-width: 100%; }
h1, h2, h3, .cap-title, .mkt-name, .step-title { text-wrap: balance; }
/* Display face is set in capitals; units (m, m², yrs) keep their real lowercase form */
h1, .sh-title, .proj-title, .mkt-name, .contact-title, .cap-card-hover-label span, .s-val, .m-val, .step-n { text-transform: uppercase; }
.u { text-transform: none; letter-spacing: 0; }

/* Gutter: one rule for every full-width band */
nav, section, footer {
  padding-left:  max(var(--gx), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gx), env(safe-area-inset-right, 0px));
}

/* Focus & a11y */
:focus-visible { outline: 2px solid var(--red-ink); outline-offset: 3px; }
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 400; background: var(--red); color: #fff; font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; padding: 0.7rem 1.2rem; }
.skip-link:focus { top: calc(0.8rem + env(safe-area-inset-top, 0px)); }

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; justify-content: space-between; align-items: center; gap: 1.5rem;
  padding-top: calc(0.9rem + env(safe-area-inset-top, 0px)); padding-bottom: 0.9rem;
  background: var(--scrim);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-brand { display: flex; align-items: center; text-decoration: none; flex-shrink: 0; }
.nav-logo { height: 46px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 2.5rem; list-style: none; }
.nav-links > li > a { font-family: var(--f-mono); font-size: 0.8rem; letter-spacing: 0.12em; color: var(--muted); text-decoration: none; text-transform: uppercase; transition: color 0.2s; }
.nav-links > li > a:hover, .nav-links > li > a.active { color: var(--red-ink); }
.nav-contact { display: flex; align-items: center; gap: 1.5rem; }
.nav-phone { font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.06em; color: var(--muted); text-decoration: none; transition: color 0.2s; white-space: nowrap; font-variant-numeric: tabular-nums; }
.nav-phone:hover { color: var(--white); }
.nav-btn { font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.12em; color: #fff; background: var(--red); text-decoration: none; text-transform: uppercase; padding: 0.65rem 1.4rem; transition: background 0.2s; white-space: nowrap; }
.nav-btn:hover { background: var(--red-dark); }

.hamburger { display: none; flex-direction: column; justify-content: center; gap: 5px; background: none; border: none; cursor: pointer; padding: 10px; margin-right: -10px; z-index: 300; flex-shrink: 0; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--white); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── HERO ── */
#hero {
  display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;
  align-items: center;
  padding-top: calc(var(--nav-h) + 6rem); padding-bottom: 6rem;
  position: relative; overflow: hidden;
  background-color: var(--black);
  background-image: url('hero-bg.jpg');
  background-image: image-set(url('hero-bg.webp') type('image/webp'), url('hero-bg.jpg') type('image/jpeg'));
  background-size: cover; background-position: center 40%;
}
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(105deg, rgba(12,12,12,0.93) 0%, rgba(12,12,12,0.78) 55%, rgba(12,12,12,0.6) 100%); z-index: 1; pointer-events: none; }
.hero-bg-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(208,2,27,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(208,2,27,0.04) 1px, transparent 1px); background-size: 56px 56px; pointer-events: none; z-index: 1; }
.hero-bg-glow { position: absolute; top: 10%; right: 0; width: 50vw; height: 80vh; background: radial-gradient(ellipse at right, rgba(208,2,27,0.06) 0%, transparent 65%); pointer-events: none; z-index: 1; }
.hero-left { position: relative; z-index: 2; min-width: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 0.9rem; font-family: var(--f-mono); font-size: 0.8rem; letter-spacing: 0.2em; color: var(--red-ink); text-transform: uppercase; margin-bottom: 1.8rem; animation: fadeUp 0.7s 0.15s both; }
.eyebrow::before { content: ''; display: block; width: 28px; height: 1px; background: var(--red); flex-shrink: 0; }
h1 { font-family: var(--f-display); font-weight: var(--disp-w); font-size: clamp(3.4rem, 6.8vw, 8.2rem); line-height: 0.9; letter-spacing: 0.005em; color: var(--white); margin-bottom: 2rem; animation: fadeUp 0.7s 0.3s both; }
h1 .red { color: var(--red); display: block; }
h1 .outline { -webkit-text-stroke: 1.5px rgba(255,255,255,0.35); color: transparent; display: block; }
.hero-p { font-size: 1rem; color: var(--muted); max-width: 470px; line-height: 1.82; margin-bottom: 2.5rem; animation: fadeUp 0.7s 0.45s both; }
.hero-p strong { color: var(--text); font-weight: 500; }
.hero-btns { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; animation: fadeUp 0.7s 0.6s both; }
.btn-red { background: var(--red); color: #fff; font-family: var(--f-mono); font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; padding: 0.9rem 1.8rem; transition: background 0.2s, transform 0.2s; }
.btn-red:hover { background: var(--red-dark); transform: translateY(-2px); }
.btn-line { color: var(--muted); font-family: var(--f-mono); font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 2px; transition: color 0.2s, border-color 0.2s; }
.btn-line:hover { color: var(--white); border-color: var(--white); }
.hero-right { position: relative; z-index: 2; padding-left: 4rem; min-width: 0; animation: fadeIn 1s 0.85s both; }
.stat-panel { border: 1px solid rgba(255,255,255,0.1); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); background: rgba(12,12,12,0.6); }
.stat-panel-top { background: var(--red); padding: 0.85rem 1.6rem; font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.18em; color: rgba(255,255,255,0.95); text-transform: uppercase; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; background: rgba(255,255,255,0.08); gap: 1px; }
.s-cell { background: rgba(20,20,20,0.85); padding: 1.6rem 1.4rem; transition: background 0.2s; }
.s-cell:hover { background: rgba(30,30,30,0.95); }
.s-val { font-family: var(--f-display); font-weight: var(--num-w); font-size: 2.6rem; color: var(--white); line-height: 1; margin-bottom: 0.35rem; font-variant-numeric: tabular-nums; }
.s-val em { color: var(--red); font-style: normal; font-size: 1.7rem; }
.s-lbl { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; line-height: 1.4; }

/* ── TICKER ── */
.ticker { overflow: hidden; background: var(--red); padding: 0.7rem 0; }
.ticker-track { display: flex; width: max-content; white-space: nowrap; animation: ticker 34s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.t-item { font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.16em; color: rgba(255,255,255,0.92); text-transform: uppercase; padding: 0 2rem; white-space: nowrap; }
.t-item::before { content: '◆ '; opacity: 0.6; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── SHARED ── */
section { padding-block: 7rem; }
.sh { display: flex; align-items: baseline; gap: 1.2rem; margin-bottom: 3.5rem; flex-wrap: wrap; }
.sh-stack { flex-direction: column; align-items: flex-start; gap: 0.5rem; margin-bottom: 1.5rem; }
.sh-tag { font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.2em; color: var(--red-ink); text-transform: uppercase; }
.sh-line { width: 48px; height: 1px; background: var(--border); flex-shrink: 0; align-self: center; }
.sh-title { font-family: var(--f-display); font-weight: var(--disp-w); font-size: clamp(2.2rem, 3.8vw, 3.8rem); color: var(--white); letter-spacing: 0.02em; line-height: 1; }

/* ── CAPABILITIES ── */
#capabilities { background: var(--dark); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.cap-card { background: var(--dark); position: relative; overflow: hidden; min-height: 280px; display: flex; flex-direction: column; transition: background 0.25s; }
.cap-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform 0.3s; z-index: 4; }
.cap-card.highlight { background: linear-gradient(135deg, var(--dark) 60%, rgba(208,2,27,0.06)); box-shadow: inset 0 0 0 1px rgba(208,2,27,0.22); }
.cap-card-content { position: relative; z-index: 2; flex: 1; padding: 2.2rem 1.8rem; transition: opacity 0.35s ease; }
.cap-icon { display: block; width: 32px; height: 32px; margin-bottom: 1.2rem; color: var(--red-ink); }
.cap-icon svg { width: 100%; height: 100%; display: block; }
.cap-title { font-family: var(--f-body); font-size: 1.05rem; font-weight: 500; color: var(--white); margin-bottom: 0.7rem; line-height: 1.3; }
.cap-desc { font-size: 0.92rem; color: var(--muted); line-height: 1.75; max-width: 62ch; }
.parts-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }
.parts-tag { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.09em; color: var(--red-ink); text-transform: uppercase; border: 1px solid rgba(208,2,27,0.35); padding: 0.28rem 0.6rem; }
.parts-tag.muted { color: var(--muted); border-color: var(--border); }

/* Hover reveal: photo replaces text — only on devices with a real pointer, so touch users always see the copy */
.cap-card-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 0.45s ease; z-index: 0; }
.cap-card-bg::after { content: ''; position: absolute; inset: 0; background: rgba(12,12,12,0.55); }
.cap-card-hover-label { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.6rem; opacity: 0; transition: opacity 0.35s ease; padding: 1.5rem; text-align: center; pointer-events: none; }
.cap-card-hover-label span { font-family: var(--f-display); font-weight: var(--disp-w); font-size: 1.6rem; color: var(--white); letter-spacing: 0.03em; line-height: 1.1; text-shadow: 0 2px 8px rgba(0,0,0,0.6); }
.cap-card-hover-label em { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.16em; color: rgba(255,255,255,0.8); text-transform: uppercase; font-style: normal; }
@media (hover: hover) and (pointer: fine) {
  .cap-card:hover { background: var(--surface); }
  .cap-card:hover::before { transform: scaleX(1); }
  .cap-card:hover .cap-card-bg { opacity: 1; }
  .cap-card:hover .cap-card-content { opacity: 0; }
  .cap-card:hover .cap-card-hover-label { opacity: 1; }
}

/* Brand link bar at the foot of a card (stays visible over the hover photo) */
.cap-brand-footer { display: flex; align-items: center; gap: 1rem; padding: 0.9rem 1.8rem; border-top: 1px solid var(--border); background: rgba(0,0,0,0.3); text-decoration: none; position: relative; z-index: 10; transition: background 0.2s; flex-shrink: 0; }
.cap-brand-footer:hover { background: rgba(208,2,27,0.12); }
.cap-brand-logo { height: 32px; width: auto; max-width: 120px; display: block; object-fit: contain; flex-shrink: 0; }
.cap-brand-cta { font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; transition: color 0.2s; }
.cap-brand-footer:hover .cap-brand-cta { color: var(--red-ink); }

/* ── PROJECTS ── */
#projects { background: var(--black); }
.proj-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); }
.proj { background: var(--black); position: relative; transition: background 0.25s; overflow: hidden; min-width: 0; }
.proj:hover { background: var(--surface); }
.proj-content { padding: 2.5rem; min-width: 0; }
.proj picture { display: contents; }

.proj.wide { grid-column: span 2; display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: stretch; }
.proj.wide .proj-content { padding: 3rem; }
.proj.wide .proj-img-wrap { position: relative; overflow: hidden; min-height: 360px; }
.proj.wide .proj-img-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(15%); transition: filter 0.4s, transform 0.4s; }
.proj.wide:hover .proj-img-wrap img { filter: grayscale(0%); transform: scale(1.03); }
.proj.wide .proj-img-wrap::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to right, rgba(12,12,12,0.25) 0%, transparent 40%); }

.proj-photo-wrap { position: relative; overflow: hidden; height: 220px; }
.proj-photo-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; filter: grayscale(20%); transition: filter 0.4s, transform 0.4s; }
.proj:hover .proj-photo-wrap img { filter: grayscale(0%); transform: scale(1.04); }
.proj-photo-wrap::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 50%, rgba(12,12,12,0.65) 100%); }

.proj-metal { grid-column: span 2; display: grid; grid-template-columns: 0.65fr 1.35fr; align-items: stretch; }
.proj-metal .proj-photo-wrap { height: auto; min-height: 260px; }
.proj-metal .proj-photo-wrap img { position: absolute; inset: 0; }

.proj-tag { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.16em; color: var(--red-ink); text-transform: uppercase; margin-bottom: 0.8rem; }
.proj-title { font-family: var(--f-display); font-weight: var(--disp-w); font-size: 2rem; color: var(--white); letter-spacing: 0.01em; line-height: 1.05; margin-bottom: 0.9rem; }
.proj.wide .proj-title { font-size: 2.8rem; }
.proj-desc { font-size: 0.95rem; color: var(--muted); line-height: 1.78; margin-bottom: 1.4rem; max-width: 65ch; }
.metrics { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.m-item { display: flex; flex-direction: column; gap: 0.2rem; }
.m-val { font-family: var(--f-display); font-weight: var(--num-w); font-size: 1.9rem; color: var(--red); line-height: 1; font-variant-numeric: tabular-nums; }
.m-val em { font-style: normal; }
.m-lbl { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; }

/* ── APPROACH ── */
#approach { background: var(--dark); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.approach-inner { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 6rem; align-items: start; }
.approach-inner > * { min-width: 0; }
.approach-summary { font-size: 1rem; color: var(--muted); line-height: 1.82; margin-bottom: 2rem; max-width: 60ch; }
.kw-list { display: flex; flex-direction: column; gap: 0.5rem; list-style: none; }
.kw { font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; padding: 0.65rem 1rem; border: 1px solid var(--border); transition: border-color 0.2s, color 0.2s; }
.kw:hover { border-color: var(--red); color: var(--red-ink); }
.steps { display: flex; flex-direction: column; list-style: none; }
.step { display: grid; grid-template-columns: 52px 1fr; gap: 1.6rem; padding: 1.6rem 0; border-bottom: 1px solid var(--border); align-items: start; }
.step:first-child { padding-top: 0; }
.step:last-child { border-bottom: none; }
.step-n { font-family: var(--f-display); font-weight: var(--num-w); font-size: 2.2rem; color: var(--dim); line-height: 1; transition: color 0.2s; font-variant-numeric: tabular-nums; }
.step:hover .step-n { color: var(--red); }
.step-title { font-size: 1rem; font-weight: 500; color: var(--white); margin-bottom: 0.4rem; }
.step-desc { font-size: 0.94rem; color: var(--muted); line-height: 1.72; max-width: 65ch; }

/* ── MARKETS ── */
#markets { background: var(--black); }
.markets-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.mkt { background: var(--black); padding: 2.5rem 2rem; transition: background 0.2s; min-width: 0; }
.mkt:hover { background: var(--surface); }
.mkt-region { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.16em; color: var(--muted); text-transform: uppercase; margin-bottom: 0.6rem; }
.mkt-name { font-family: var(--f-display); font-weight: var(--disp-w); font-size: 1.9rem; color: var(--white); letter-spacing: 0.02em; line-height: 1.05; margin-bottom: 0.9rem; }
.mkt-bar { width: 28px; height: 2px; background: var(--red); margin-bottom: 0.9rem; }
.mkt-desc { font-size: 0.92rem; color: var(--muted); line-height: 1.72; max-width: 60ch; }

/* ── CONTACT ── */
#contact { background: var(--dark); border-top: 1px solid var(--border); }
.contact-inner { display: grid; grid-template-columns: 1fr 1.1fr; gap: 6rem; align-items: start; }
.contact-inner > * { min-width: 0; }
.contact-title { font-family: var(--f-display); font-weight: var(--disp-w); font-size: clamp(2.8rem, 4.6vw, 5rem); color: var(--white); line-height: 0.93; margin-bottom: 1.5rem; }
.contact-title .red { color: var(--red); }
.contact-sub { font-size: 1rem; color: var(--muted); line-height: 1.8; max-width: 380px; margin-bottom: 1.8rem; }
.contact-direct { display: flex; flex-direction: column; gap: 0.8rem; margin-bottom: 2rem; }
.contact-direct a { display: flex; align-items: center; gap: 0.8rem; font-family: var(--f-mono); font-size: 0.8rem; letter-spacing: 0.08em; color: var(--text); text-decoration: none; text-transform: uppercase; transition: color 0.2s; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.contact-direct a:hover { color: var(--red-ink); }
.contact-direct a::before { content: ''; display: block; width: 6px; height: 6px; min-width: 6px; background: var(--red); }
.contact-form { display: flex; flex-direction: column; gap: 0.9rem; }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.f-field { display: flex; flex-direction: column; gap: 0.4rem; min-width: 0; }
.f-field label { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase; }
.f-field input, .f-field textarea, .f-field select { background: var(--surface); border: 1px solid var(--border); color: var(--text); font-family: var(--f-body); font-size: 1rem; padding: 0.9rem 1rem; outline: none; resize: vertical; transition: border-color 0.2s, box-shadow 0.2s; -webkit-appearance: none; appearance: none; border-radius: 0; width: 100%; }
.f-field textarea { min-height: 8.5rem; }
.f-field input::placeholder, .f-field textarea::placeholder { color: var(--dim); }
.f-field select { cursor: pointer; padding-right: 2.6rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a8a49e' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; }
.f-field select:has(option[value=""]:checked) { color: var(--dim); }
.f-field select option { background: var(--surface); color: var(--text); }
.f-field input:focus, .f-field textarea:focus, .f-field select:focus { border-color: var(--red); }
.f-field input:focus-visible, .f-field textarea:focus-visible, .f-field select:focus-visible { outline: none; box-shadow: 0 0 0 1px var(--red); }
.f-field [aria-invalid="true"] { border-color: var(--red); }
.form-status { display: none; padding: 1rem 1.2rem; font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 0.5rem; }
.form-status.success { display: block; background: rgba(0,180,80,0.1); border: 1px solid rgba(0,180,80,0.3); color: var(--ok); }
.form-status.error { display: block; background: rgba(208,2,27,0.1); border: 1px solid rgba(208,2,27,0.35); color: var(--red-ink); }
.f-submit { background: var(--red); color: #fff; border: none; font-family: var(--f-mono); font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; padding: 1.1rem 2rem; align-self: flex-start; margin-top: 0.4rem; transition: background 0.2s, transform 0.2s; }
.f-submit:hover { background: var(--red-dark); transform: translateY(-2px); }
.f-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ── FOOTER ── */
footer { background: var(--black); border-top: 1px solid var(--border); padding-block: 2rem calc(2rem + env(safe-area-inset-bottom, 0px)); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.2rem; flex-wrap: wrap; gap: 1rem; }
.footer-brand { display: flex; align-items: center; }
.footer-logo { height: 34px; width: auto; }
.footer-links { display: flex; gap: 2rem; flex-wrap: wrap; }
.footer-link { font-family: var(--f-mono); font-size: 0.74rem; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; text-decoration: none; transition: color 0.2s; }
.footer-link:hover { color: var(--red-ink); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.2rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; }
.footer-copy { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; font-variant-numeric: tabular-nums; }

/* ── REVEAL (only hides when JS is running; content is visible without it) ── */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.visible { opacity: 1; transform: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ══════════════════════════════════
   RESPONSIVE — TABLET (max 1024px)
══════════════════════════════════ */
@media (max-width: 1024px) {
  :root { --gx: 2.5rem; --nav-h: 70px; }
  .nav-phone { display: none; }
  .nav-logo { height: 40px; }
  .nav-links { gap: 1.8rem; }

  section { padding-block: 5rem; }

  #hero { grid-template-columns: 1fr; gap: 0; padding-top: calc(var(--nav-h) + 4rem); padding-bottom: 4rem; }
  .hero-right { padding-left: 0; margin-top: 2.5rem; max-width: 560px; }

  .cap-grid { grid-template-columns: repeat(2, 1fr); }

  .proj-grid { grid-template-columns: 1fr; }
  .proj.wide { grid-column: span 1; grid-template-columns: 1fr; }
  .proj.wide .proj-img-wrap { min-height: 300px; order: -1; }
  .proj-metal { grid-column: span 1; grid-template-columns: 1fr; }
  .proj-metal .proj-photo-wrap { min-height: 260px; }

  .approach-inner { grid-template-columns: 1fr; gap: 3rem; }

  .markets-grid { grid-template-columns: 1fr; }

  .contact-inner { grid-template-columns: 1fr; gap: 3rem; }

  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ══════════════════════════════════
   NAV MENU — collapses before links collide (max 900px)
══════════════════════════════════ */
@media (max-width: 900px) {
  .hamburger { display: flex; order: 3; }
  .nav-contact { margin-left: auto; }
  .nav-links { position: fixed; top: 0; left: 0; right: 0; padding-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px)); background: rgba(12,12,12,0.99); flex-direction: column; gap: 0; border-bottom: 1px solid var(--border); transform: translateY(-100%); transition: transform 0.32s ease, visibility 0s 0.32s; z-index: 150; visibility: hidden; }
  .nav-links.open { transform: translateY(0); visibility: visible; transition: transform 0.32s ease; }
  .nav-links li { border-top: 1px solid var(--border); }
  .nav-links > li > a { display: block; padding: 1rem max(var(--gx), env(safe-area-inset-left, 0px)); font-size: 0.85rem; letter-spacing: 0.12em; color: var(--text); }
  .nav-links > li > a:hover { background: var(--surface); }
  nav > .nav-brand, nav > .nav-contact, nav > .hamburger { position: relative; z-index: 200; }
}

/* ══════════════════════════════════
   RESPONSIVE — MOBILE (max 640px)
══════════════════════════════════ */
@media (max-width: 640px) {
  :root { --gx: 1.4rem; --nav-h: 62px; }
  nav { padding-top: calc(0.8rem + env(safe-area-inset-top, 0px)); padding-bottom: 0.8rem; gap: 1rem; }
  .nav-logo { height: 34px; }
  .nav-btn { font-size: 0.7rem; padding: 0.55rem 1rem; letter-spacing: 0.08em; }

  section { padding-block: 4rem; }

  #hero { padding-top: calc(var(--nav-h) + 3rem); padding-bottom: 3rem; background-position: 60% center; background-image: image-set(url('hero-bg-960.webp') type('image/webp'), url('hero-bg.jpg') type('image/jpeg')); }
  .hero-overlay { background: linear-gradient(180deg, rgba(12,12,12,0.92) 0%, rgba(12,12,12,0.85) 100%); }
  h1 { font-size: clamp(2.7rem, 11vw, 4.1rem); margin-bottom: 1.4rem; }
  .eyebrow { font-size: 0.7rem; letter-spacing: 0.14em; margin-bottom: 1.2rem; flex-wrap: wrap; gap: 0.5rem; }
  .eyebrow::before { display: none; }
  .hero-p { font-size: 0.95rem; margin-bottom: 2rem; max-width: 100%; }
  .hero-btns { gap: 1rem 1.4rem; }
  .btn-red { font-size: 0.75rem; padding: 0.85rem 1.4rem; }
  .btn-line { font-size: 0.75rem; }
  .stat-panel-top { font-size: 0.7rem; padding: 0.65rem 1.2rem; }
  .s-val { font-size: 2.2rem; }
  .s-val em { font-size: 1.4rem; }
  .s-lbl { font-size: 0.7rem; }
  .s-cell { padding: 1.2rem 1rem; }

  .t-item { font-size: 0.7rem; padding: 0 1.4rem; }

  .sh { gap: 0.8rem; margin-bottom: 2.5rem; }
  .sh-tag { font-size: 0.7rem; }
  .sh-title { font-size: clamp(2rem, 8vw, 2.8rem); }

  .cap-grid { grid-template-columns: 1fr; }
  .cap-card { min-height: 0; }
  .cap-card-content { padding: 1.8rem 1.4rem; }
  .cap-brand-footer { padding: 0.9rem 1.4rem; }
  .cap-title { font-size: 1rem; }
  .cap-desc { font-size: 0.9rem; }
  .parts-tag { font-size: 0.7rem; }

  .proj.wide .proj-img-wrap { min-height: 220px; }
  .proj.wide .proj-img-wrap::after { background: linear-gradient(to bottom, transparent 40%, rgba(12,12,12,0.7) 100%); }
  .proj-photo-wrap, .proj-metal .proj-photo-wrap { height: 200px; min-height: 200px; }
  .proj-content, .proj.wide .proj-content { padding: 1.8rem 1.4rem; }
  .proj-tag { font-size: 0.7rem; }
  .proj-title { font-size: 1.8rem; }
  .proj.wide .proj-title { font-size: 2.2rem; }
  .proj-desc { font-size: 0.9rem; }
  .m-val { font-size: 1.6rem; }
  .m-lbl { font-size: 0.7rem; }
  .metrics { gap: 1.2rem; }

  .approach-inner { gap: 2.5rem; }
  .approach-summary { font-size: 0.95rem; }
  .kw { font-size: 0.72rem; padding: 0.6rem 0.9rem; }
  .step { grid-template-columns: 40px 1fr; gap: 1.2rem; padding: 1.4rem 0; }
  .step-n { font-size: 1.8rem; }
  .step-title { font-size: 0.95rem; }
  .step-desc { font-size: 0.88rem; }

  .mkt { padding: 2rem 1.4rem; }
  .mkt-name { font-size: 1.7rem; }
  .mkt-desc { font-size: 0.9rem; }

  .contact-inner { gap: 2.5rem; }
  .contact-title { font-size: clamp(2.8rem, 10vw, 4rem); }
  .contact-sub { font-size: 0.95rem; }
  .contact-direct a { font-size: 0.75rem; }
  .f-row { grid-template-columns: 1fr; }
  .f-field label { font-size: 0.7rem; }
  .f-field input, .f-field textarea, .f-field select { font-size: 1rem; padding: 0.8rem 0.9rem; }
  .f-submit { font-size: 0.78rem; padding: 1rem 1.6rem; width: 100%; text-align: center; align-self: stretch; }

  .footer-inner { gap: 1.2rem; }
  .footer-links { gap: 1.2rem; }
  .footer-link { font-size: 0.7rem; }
  .footer-bottom { flex-direction: column; gap: 0.4rem; }
  .footer-copy { font-size: 0.7rem; }
  .footer-logo { height: 28px; }
}

/* ══════════════════════════════════
   RESPONSIVE — SMALL (max 380px)
══════════════════════════════════ */
@media (max-width: 380px) {
  :root { --gx: 1rem; }
  h1 { font-size: 2.55rem; }
  .s-val { font-size: 1.9rem; }
  .s-lbl { font-size: 0.66rem; }
  .nav-logo { height: 30px; }
  .nav-btn { font-size: 0.68rem; padding: 0.5rem 0.8rem; }
}

/* ── REDUCED MOTION ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
  .ticker-track { animation: none !important; flex-wrap: wrap; justify-content: center; width: auto; row-gap: 0.3rem; }
  .t-item[aria-hidden="true"] { display: none; }
}


/* ══════════════════════════════════
   BRANDS — menu, logo marks, card link, footer strip
══════════════════════════════════ */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Welpiz: official colours (#1e308a / #2541cc); wordmark grey lifted from #6d6e71 so it reads on black */
.logo-welpiz { display: block; height: 30px; width: auto; aspect-ratio: 290 / 150; --wz-outer: #1e308a; --wz-inner: #2541cc; --wz-text: #b4b5b9; }
.logo-corventa { display: inline-flex; align-items: center; gap: 0.5em; height: 30px; font-family: 'Archivo', var(--f-body); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; color: #f4f4f3; white-space: nowrap; }
.logo-corventa svg { height: 100%; width: auto; aspect-ratio: 267 / 254; display: block; }

/* Nav dropdown */
.nav-brands { position: relative; }
.brands-toggle { display: inline-flex; align-items: center; gap: 0.45rem; background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--f-mono); font-size: 0.8rem; letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase; transition: color 0.2s; }
.brands-toggle svg { width: 10px; height: 6px; transition: transform 0.2s; }
.brands-toggle:hover, .brands-toggle.active, .nav-brands.open .brands-toggle { color: var(--red-ink); }
.nav-brands.open .brands-toggle svg { transform: rotate(180deg); }
.brands-menu { display: none; position: absolute; top: calc(100% + 1.5rem); left: 50%; transform: translateX(-50%); width: 380px; background: var(--dark); border: 1px solid var(--border); border-top: 2px solid var(--red); box-shadow: 0 20px 48px rgba(0,0,0,0.55); padding-bottom: 0.4rem; z-index: 210; }
.brands-menu::before { content: ''; position: absolute; left: 0; right: 0; top: -1.6rem; height: 1.6rem; } /* hover bridge across the gap */
.nav-brands.open .brands-menu { display: block; }
@media (hover: hover) and (pointer: fine) and (min-width: 901px) {
  .nav-brands:hover .brands-menu { display: block; }
  .nav-brands:hover .brands-toggle { color: var(--red-ink); }
}
.brands-label { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); padding: 0.9rem 1.2rem 0.5rem; }
.brand-item { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 1rem; padding: 0.8rem 1.2rem; text-decoration: none; border-left: 2px solid transparent; transition: background 0.2s, border-color 0.2s; }
.brand-item:hover, .brand-item:focus-visible, .brand-item[aria-current="page"] { background: var(--surface); border-left-color: var(--red); }
.brand-logo { height: 30px; display: flex; align-items: center; }
.brand-logo img { height: 100%; width: auto; max-width: 112px; object-fit: contain; display: block; }
.brand-text { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.brand-desc { font-family: var(--f-body); font-size: 0.88rem; color: var(--text); line-height: 1.3; }
.brand-go { font-family: var(--f-mono); font-size: 0.7rem; letter-spacing: 0.06em; color: var(--muted); transition: color 0.2s; }
.brand-item:hover .brand-go { color: var(--red-ink); }

/* Link from a project card to its brand page */
.proj-brand-link { display: inline-flex; align-items: center; gap: 1rem; margin-top: 1.6rem; padding: 0.65rem 1.1rem 0.65rem 0.9rem; border: 1px solid var(--border); text-decoration: none; transition: border-color 0.2s, background 0.2s; }
.proj-brand-link span { font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); transition: color 0.2s; }
.proj-brand-link:hover { border-color: var(--red); background: rgba(208,2,27,0.08); }
.proj-brand-link:hover span { color: var(--red-ink); }

/* Footer brand strip */
.footer-brands { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; padding: 1.2rem 0; border-top: 1px solid var(--border); margin-bottom: 0; }
.footer-brands-label { font-family: var(--f-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.footer-brands-list { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2.2rem; list-style: none; }
.footer-brands-list a { display: flex; align-items: center; height: 30px; opacity: 0.78; transition: opacity 0.2s; text-decoration: none; }
.footer-brands-list a:hover { opacity: 1; }
.footer-brands-list img { height: 100%; width: auto; display: block; }

/* Phone number makes the bar too wide once a fifth menu item is in */
@media (max-width: 1200px) { .nav-phone { display: none; } }

@media (max-width: 900px) {
  .brands-toggle { width: 100%; justify-content: space-between; padding: 1rem max(var(--gx), env(safe-area-inset-left, 0px)); font-size: 0.85rem; color: var(--text); }
  .brands-menu { position: static; transform: none; width: auto; border: 0; box-shadow: none; background: var(--black); padding: 0 0 0.5rem; }
  .brands-menu::before, .brands-label { display: none; }
  .nav-links { align-items: stretch; }
  .brand-item { grid-template-columns: 116px minmax(0, 1fr); gap: 0.9rem; padding-left: calc(max(var(--gx), env(safe-area-inset-left, 0px)) + 0.4rem); }
  .brand-logo img { max-width: 104px; }
  .brand-logo .logo-corventa { font-size: 15px; }
}
@media (max-width: 640px) {
  .footer-brands { flex-direction: column; align-items: flex-start; }
  .footer-brands-list { gap: 1rem 1.6rem; }
  .footer-brands-list a { height: 26px; }
}
/* Welpiz mark is square-ish with a small wordmark: give it more height so it reads at the size of the other logos */
.brand-logo .logo-welpiz, .footer-brands-list .logo-welpiz, .proj-brand-link .logo-welpiz { height: 40px; margin-block: -5px; }
