/* ============================================
   FONTS — self-hosted (latin + latin-ext). Jost and Inter are
   variable files: one rule covers 400-700. IBM Plex Mono is static.
   Licences (OFL) sit next to the files in fonts/.
   ============================================ */

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/ibm-plex-mono-400-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/ibm-plex-mono-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/ibm-plex-mono-500-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/ibm-plex-mono-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/jost-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/jost-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* ============================================
   SECRETART — design system
   Binding authority: _docs/art-direction-2026-07-24.md
   "Arta și simțul ingineresc" — two poles, one line.
   Light-first: warm cream field, brown ink, one deep
   turquoise accent. Heritage turquoise survives as a
   DECORATIVE mark only (never text).
   Pattern follows the exemplar project:
   1 field + 1 ink + 1 accent, ink opacity steps,
   section-scale field inversions (no toggle).
   ============================================ */

/* ============================================
   VARIABLES
   ============================================ */

:root {
  /* Palette — raw tokens (art-direction names). Max 1 field + 1 ink + 1 accent visible. */
  --color-paper: #F3EFE7;            /* warm cream page field (light-first) */
  --color-brown: #412522;            /* THE ink — headings, body, logo */
  --color-field-dark: #2B1A16;       /* deep brown — authored dark sections */
  --color-accent: #177688;           /* deep turquoise — links, hover, small accents */
  --color-turquoise-brand: #41D2E5;  /* heritage turquoise — DECORATIVE moments only, never text */

  /* Roles (light field) — components reference these, never the raw hex. */
  --color-bg: var(--color-paper);
  --color-ink: var(--color-brown);
  /* --color-accent doubles as the light-field accent role. */

  /* Typography — THE TWO VOICES.
     Jost display (echoes the logo) = the expressive voice (art).
     IBM Plex Mono = the precise voice (engineering) — drawing
     annotations, register numbers, title-blocks.
     Inter = neutral body prose between them. */
  --font-display: 'Jost', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* Compressed scale */
  --text-body: 1rem;
  --text-small: 0.8125rem;

  /* Layout — the container breathes with the viewport: wide screens get
     a wide grid (text elements carry their own max measures), and the
     page gutter grows fluidly instead of leaving dead cream margins. */
  --container-max: 1560px;
  --pad: clamp(1.5rem, 4vw, 4.5rem);
  --header-h: 4.625rem;   /* full-size header height (5rem from 768, below) —
                             the page reserves it and the hero subtracts it */

  /* Plan-grid texture — fine drafting grid, drawn in ZONES only */
  --grid-cell: 2rem;

  /* Slash motif — the angle of the logo's "A" legs, measured off the
     artwork: 20.3° from vertical → 70° from horizontal, tan ≈ 0.364.
     Used ONCE, on the hero, which clips its render on this angle via
     --slash-tan. --slash-angle is kept as the source of that number
     (it is where 0.364 comes from), not because a rule reads it. */
  --slash-angle: 70deg;
  --slash-tan: 0.364;

  /* One shared corner radius; buttons get their own, softer one */
  --radius: 3px;
  --radius-btn: 8px;

  /* Shadows — brown-tinted, soft and low (values from issue #7) */
  --shadow-header: 0 2px 16px rgba(0, 0, 0, 0.18);
  --shadow-btn: 0 1px 2px rgba(43, 26, 22, 0.12), 0 8px 18px -8px rgba(43, 26, 22, 0.28);
  --shadow-btn-lift: 0 2px 4px rgba(43, 26, 22, 0.14), 0 14px 26px -10px rgba(43, 26, 22, 0.36);
  --shadow-sheet: 0 30px 50px -28px rgba(43, 26, 22, 0.5);

  /* Paper steps — light text on the brown header */
  --paper-85: color-mix(in srgb, var(--color-paper) 85%, transparent);

  /* Z-index scale */
  --z-under: 0;
  --z-base: 1;
  --z-sticky: 100;
  --z-overlay: 500;

  /* Motion: 150–250ms micro, ease-out */
  --t-fast: 160ms ease-out;
  --t-med: 220ms ease-out;
  /* The header's one clock: size, ground and shadow move together */
  --t-header: 0.35s ease;
  /* "The line that draws itself" — rules, underlines, sweeps */
  --ease-draw: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* The header grows with the logo at 768, so does the slot reserved for it */
@media (min-width: 768px) {
  :root { --header-h: 5rem; }
}

/* Derived steps re-resolve per field (custom properties compute where
   they are declared, so the formulas must exist in both scopes). */
:root,
.section--dark,
.section--turquoise {
  /* Ink opacity steps (no separate gray ramp) */
  --ink-75: color-mix(in srgb, var(--color-ink) 75%, transparent);
  /* --ink-70: smallest step that clears WCAG AA (4.5:1) for text on paper */
  --ink-70: color-mix(in srgb, var(--color-ink) 70%, transparent);
  --ink-55: color-mix(in srgb, var(--color-ink) 55%, transparent);
  --ink-38: color-mix(in srgb, var(--color-ink) 38%, transparent);
  --ink-16: color-mix(in srgb, var(--color-ink) 16%, transparent);
  --ink-8: color-mix(in srgb, var(--color-ink) 8%, transparent);

  /* Accent steps — interactive states / small accents only */
  --accent-55: color-mix(in srgb, var(--color-accent) 55%, transparent);
  --accent-25: color-mix(in srgb, var(--color-accent) 25%, transparent);

  /* Plan-grid texture. Declared here (not once on :root) for the same
     reason as the steps above: the var() inside resolves in the scope
     where the property is DECLARED, so each field needs its own copy. */
  --plan-grid:
    repeating-linear-gradient(to right, var(--ink-8) 0 1px, transparent 1px var(--grid-cell)),
    repeating-linear-gradient(to bottom, var(--ink-8) 0 1px, transparent 1px var(--grid-cell));
}

/* ============================================
   DARK FIELD — roles swapped
   Authored, section-scale inversions. No toggle.
   The accent is lifted from the heritage turquoise
   (mixed toward paper) so links read on deep brown.
   Referencing --color-turquoise-brand here (not
   --color-accent) avoids a custom-property cycle.
   ============================================ */

.section--dark {
  --color-bg: var(--color-field-dark);
  --color-ink: var(--color-paper);
  --color-accent: color-mix(in srgb, var(--color-turquoise-brand) 78%, var(--color-paper));

  background-color: var(--color-bg);
  color: var(--color-ink);
}

/* ============================================
   TURQUOISE FIELD — the 2013 business card at
   architectural scale. Raw heritage turquoise as the
   field, brown ink on top (7.65:1 — clears AA *and*
   AAA, so the field is NOT darkened).
   The deep-turquoise accent would only reach 2.91:1
   here, so on this field the ACCENT ROLE flips to the
   ink — which keeps :focus-visible and ::selection
   (both global, both accent-driven) legible.
   Exactly ONE section on the page may carry this.
   ============================================ */

.section--turquoise {
  --color-bg: var(--color-turquoise-brand);
  --color-ink: var(--color-brown);
  --color-accent: var(--color-brown);

  /* ink-8 disappears on this saturated field — step the grid up */
  --plan-grid:
    repeating-linear-gradient(to right, var(--ink-16) 0 1px, transparent 1px var(--grid-cell)),
    repeating-linear-gradient(to bottom, var(--ink-16) 0 1px, transparent 1px var(--grid-cell));

  background-color: var(--color-bg);
  color: var(--color-ink);
}

/* ============================================
   RESET
   ============================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-body);
  line-height: 1.65;
  color: var(--color-ink);
  background-color: var(--color-bg);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Main is an opaque layer: it slides up over the sticky footer (the
   footer reveal) while the header stays above both. Sections that
   invert the field (turquoise, dark) paint over it normally. */
/* The header is fixed (out of flow); main reserves its FULL-size height.
   The slot never changes, so the header can shrink on scroll without
   moving a pixel of the page. */
main {
  position: relative;
  z-index: var(--z-base);
  padding-top: var(--header-h);
  background-color: var(--color-bg);
}

/* 1px marker at the very top of the page, watched by initHeaderShrink.
   Absolute, so it sits at y=0 whatever the header does. */
.scroll-sentinel {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

img, video, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast);
}

ul, ol {
  list-style: none;
}

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

::selection {
  background-color: var(--color-accent);
  color: var(--color-paper);
}

:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Honeypot: off-canvas, not display:none, so naive bots still fill it */
.u-honeypot {
  position: absolute;
  left: -9999px;
  width: 0;
  height: 0;
  opacity: 0;
  overflow: hidden;
}

/* Inlined logo sprite — hidden <symbol> defs + recolour classes.
   "Art" letters take full ink; "secre" letters take ink at 55%.
   currentColor lets both inherit --color-ink (flips on dark fields). */
.svg-sprite-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.logo-mark__path {
  fill: currentColor;
  fill-rule: nonzero;
}

.logo-mark__path--dim {
  fill: currentColor;
  fill-opacity: 0.55;
}

/* Shared eyebrow / heading grammar — every section opens the same way.
   THE TWO VOICES:
   .section__eyebrow = the precise voice (engineering) — tracked caps in
   the accent, trailed by a thin rule that runs to the container edge,
   the way a drawing annotation runs to its leader line.
   .section__heading = the expressive voice (art) — Jost at scale. */
.section__eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--text-small);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-accent);
}

/* The rule draws itself in, left to right, once — when the eyebrow's
   scroll reveal lands (.is-visible from initScrollReveals). */
.section__eyebrow::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background-color: var(--accent-55);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.9s var(--ease-draw);
}

.section__eyebrow.is-visible::after {
  transform: scaleX(1);
}

.section__heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2rem;
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin-top: 1rem;
  max-width: 18ch;
}

@media (min-width: 768px) {
  .section__heading { font-size: 2.75rem; }
}

@media (min-width: 1280px) {
  .section__heading { font-size: clamp(2.25rem, 4.5vw, 3.5rem); }
}

/* ============================================
   LAYOUT
   ============================================ */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--pad);
}

.section {
  padding: 4.5rem 0;
  scroll-margin-top: 5.5rem; /* clears the fixed header on anchor jumps */
}

@media (min-width: 768px) {
  .section { padding: 6.5rem 0; }
}

@media (min-width: 1280px) {
  .section { padding: clamp(6.5rem, 8vw, 9rem) 0; }
}

/* ============================================
   HEADER — a brown field with paper ink, in two
   states (the owner's reference: avisio.es). At the
   top: full size, solid brown, no shadow. Once the
   page scrolls (.is-scrolled, set by initHeaderShrink
   from a sentinel): a lower bar, a smaller logo, a
   see-through frosted ground and a soft shadow — all
   on ONE clock, --t-header.
   Fixed, over a slot main reserves at full size, so
   the shrink never moves the page.
   ============================================ */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  color: var(--color-paper);

  /* Brown field: the accent role lifts to the dark-field turquoise (as
     .section--dark does), so focus rings stay visible on the bar and in
     the open mobile menu. */
  --color-accent: color-mix(in srgb, var(--color-turquoise-brand) 78%, var(--color-paper));

  /* Full size: the padding is derived from --header-h so the bar is
     exactly the slot main reserves (14.5px / 14.8px a side). */
  --logo-w: 150px;
  --bar-pad: calc((var(--header-h) - var(--logo-w) * 840 / 2800) / 2);
}

.header.is-scrolled {
  --logo-w: 124px;
  --bar-pad: 0.4rem;
}

@media (min-width: 768px) {
  .header { --logo-w: 168px; }
  .header.is-scrolled { --logo-w: 132px; }
}

/* The ground lives on a pseudo, NOT on .header: backdrop-filter would
   make .header the containing block of the fixed mobile menu and trap
   the full-screen panel inside the bar (the exemplar does the same).
   The blur is always on; at the top the solid brown hides it. */
.header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-color: var(--color-brown);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  transition: background-color var(--t-header), box-shadow var(--t-header);
}

/* Scrolled ground: brand brown at 95% — near solid, so the bar reads
   brown over every section (at 78% it went grey-blue over the
   turquoise band); the blur still softens what passes beneath. Over
   cream, the band and the hero image (worst case: a white light) the
   paper-85% links hold ≥ 8:1 and the logo's 55% «secre» ≥ 4.3:1. */
.header.is-scrolled::before {
  background-color: color-mix(in srgb, var(--color-brown) 95%, transparent);
  box-shadow: var(--shadow-header);
}

/* No backdrop blur: a see-through bar would show sharp content, so the
   scrolled ground stays solid (Safari < 18 has only the -webkit- form). */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .header.is-scrolled::before { background-color: var(--color-brown); }
}

.header__container {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--bar-pad) var(--pad);
  transition: padding var(--t-header);
}

.header__logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-right: auto;
}

.header__logo-svg {
  width: var(--logo-w);
  height: auto;
  aspect-ratio: 2800 / 840;
  color: var(--color-paper);
  transition: width var(--t-header), color var(--t-fast);
}

.header__logo:hover .header__logo-svg {
  color: var(--color-turquoise-brand);
}

/* Desktop nav — hidden below 768 (mobile menu takes over) */
.header__nav {
  display: none;
}

@media (min-width: 768px) {
  .header__nav {
    display: flex;
    align-items: center;
    gap: 2rem;
  }
}

.header__nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--paper-85);
  padding: 0.5rem 0;
}

/* The underline draws itself: heritage turquoise (a decorative mark,
   never text) scaling in from the left. The active link keeps it. */
.header__nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.375rem;
  height: 2px;
  background-color: var(--color-turquoise-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 240ms var(--ease-draw);
}

.header__nav a:hover,
.header__nav a:focus-visible,
.header__nav a.is-active {
  color: var(--color-paper);
}

.header__nav a:hover::after,
.header__nav a:focus-visible::after,
.header__nav a.is-active::after {
  transform: scaleX(1);
}

.header__lang {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Hamburger — sits ABOVE the open panel so the close (X) stays reachable */
.header__hamburger {
  position: relative;
  z-index: calc(var(--z-overlay) + 1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
}

.header__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--color-paper);
  transition: transform var(--t-med), opacity var(--t-med);
}

.header__hamburger.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.header__hamburger.is-active span:nth-child(2) {
  opacity: 0;
}

.header__hamburger.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 768px) {
  .header__hamburger { display: none; }
}

/* Mobile menu — a solid brown full-screen field, so opening it continues
   the bar instead of flipping it back to cream */
.header__mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  background-color: var(--color-brown);
  padding: 5.5rem var(--pad) 2rem;
  flex-direction: column;
  gap: 1.5rem;
  overflow-y: auto;
}

.header__mobile-menu.is-open {
  display: flex;
}

.header__mobile-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.header__mobile-link {
  display: flex;
  align-items: center;
  min-height: 52px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.75rem;
  color: var(--color-paper);
}

.header__mobile-link:hover,
.header__mobile-link.is-active {
  color: var(--color-accent);
}

.header__mobile-link--lang {
  font-family: var(--font-body);
  font-size: 1.125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--paper-85);
  margin-top: 1rem;
}

/* Crossing into desktop must never leave the overlay open alongside the
   desktop nav (e.g. rotate/resize with the menu open). */
@media (min-width: 768px) {
  .header__mobile-menu.is-open { display: none; }
}

/* ============================================
   HERO — THE SIGNATURE: "din planșă în clădire".
   The first screen is split on the logo-A slash angle:
   cream + monumental type on the left, the lead render
   on the right, clipped by the slash. The render enters
   as a technical drawing — grayscale over a plan grid —
   and resolves into the built
   thing when the page loads (body.is-loaded).
   Entrance is CSS-only so the headline (LCP) always
   paints, independent of the scroll-reveal observer.
   ============================================ */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - var(--header-h));   /* fallback */
  min-height: calc(100svh - var(--header-h));  /* survives mobile browser chrome */
  padding-top: 2rem;
  overflow: hidden;
}

/* The drawing-becomes-building panel. Mobile: a full-width block below
   the type, cut by the slash on its top edge. Desktop: the right side of
   the split screen, cut on its left edge. */
.hero__panel {
  position: relative;
  order: 2;
  width: 100%;
  height: 46svh;
  margin-top: 1.5rem;
  /* slash cut across the top-left corner; --run = horizontal travel of
     the A-leg over this panel's height */
  --run: calc(46svh * var(--slash-tan));
  clip-path: polygon(0 0, 100% 0, 100% 100%, var(--run) 100%);
}

.hero__panel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* The lit glass wall sits left of the image centre; 30% keeps it clear
     of the slash cut and inside the right edge from 1280 to 2560 wide */
  object-position: 30% 50%;
  /* plan-mode: the unbuilt state */
  filter: grayscale(1) contrast(0.88) brightness(1.06);
  transform: scale(1.04);
  transition: filter 1.1s ease 0.45s, transform 1.3s cubic-bezier(0.22, 0.61, 0.36, 1) 0.45s;
}

/* The drawing layer: accent-tinted plan grid over the render */
.hero__panel-grid {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(to right, var(--accent-25) 0 1px, transparent 1px var(--grid-cell)),
    repeating-linear-gradient(to bottom, var(--accent-25) 0 1px, transparent 1px var(--grid-cell));
  mix-blend-mode: multiply;
  transition: opacity 1.1s ease 0.45s;
  pointer-events: none;
}

/* Resolve: drawing → building */
body.is-loaded .hero__panel-img {
  filter: grayscale(0) contrast(1) brightness(1);
  transform: scale(1);
}

body.is-loaded .hero__panel-grid {
  opacity: 0.35;
}

/* Type block */
.hero__inner {
  position: relative;
  z-index: var(--z-base);
  order: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 1rem;
}

/* The precise voice as a drawing title-block: tracked caps cells in
   quiet ink (nothing in the type column reads as a link), standing on a
   rule that runs the column width. The rule draws itself in with the
   block's entrance — a pseudo, because a border cannot scale. */
.hero__titleblock {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-bottom: 0.75rem;
}

.hero__titleblock::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background-color: var(--ink-16);
  transform: scaleX(0);
  transform-origin: left;
  animation: rule-draw 0.9s var(--ease-draw) 0.05s forwards;
}

@keyframes rule-draw {
  to { transform: scaleX(1); }
}

/* copy.md authors this line as "… · Alba Iulia". At >=1280 the block is a
   row, so the separator reads exactly as written; stacked below that the
   cells are their own rows, where a mid-line "·" would be wrong. (The v4
   first cell is too long to share a row with "Alba Iulia" in the 768–1279
   type column: the row squeezed both cells into two lines each.) */
.hero__titleblock-sep {
  display: none;
  color: var(--ink-38);
}

.hero__titleblock-cell {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--text-small);
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-75);
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3.25rem;
  /* The comma under ș/ț must clear the line below (the i-dot of
     «ingineresc», the ascenders of «simțul» where the title wraps at
     320px). Measured as an ink gap: 1.05 touched (−1.5px at 768,
     −4.5px at 320); 1.18 leaves 2.5px at 320 and 8.5–17.5px from 768
     to 2000. */
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin-top: 1.25rem;
}

/* Inline on mobile so Romanian diacritics wrap naturally; the authored
   two-line break only kicks in once there is room for it. */
.hero__title-line {
  display: inline;
}

/* The subtitle and the tagline share one size at every tier. */
.hero__subtitle,
.hero__tagline {
  font-size: 1.0625rem;
}

.hero__subtitle {
  margin-top: 1.25rem;
  max-width: 46ch;
  color: var(--ink-75);
}

/* The two-poles line: the paragraph's voice, set bold and in full ink,
   both sentences on one line. Each sentence is nowrap, so a narrow
   column breaks BETWEEN them and nowhere else. */
.hero__tagline {
  margin-top: 0.75rem;
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--color-ink);
}

.hero__tagline > span {
  white-space: nowrap;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

/* Staggered CSS entrance — forwards holds the settled state, so reduced
   motion (duration:0) simply snaps each element visible. */
.hero__titleblock,
.hero__title,
.hero__subtitle,
.hero__tagline,
.hero__actions {
  opacity: 0;
  animation: hero-in 0.7s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.hero__titleblock { animation-delay: 0.05s; }
.hero__title      { animation-delay: 0.14s; }
.hero__subtitle   { animation-delay: 0.24s; }
.hero__tagline    { animation-delay: 0.29s; }
.hero__actions    { animation-delay: 0.34s; }

@keyframes hero-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* Desktop: the split screen. Panel leaves the flow and takes the right
   side full-height; the type column owns the left ~52%. The cut edge
   carries the slash on its LEFT side now. */
@media (min-width: 768px) {
  .hero {
    padding-top: 0;
    flex-direction: row;
    align-items: stretch;
  }

  .hero__panel {
    position: absolute;
    order: 0;
    top: 0;
    right: 0;
    bottom: 0;
    width: 46%;
    height: auto;
    margin-top: 0;
    --run: calc((100svh - var(--header-h)) * var(--slash-tan));
    clip-path: polygon(var(--run) 0, 100% 0, 100% 100%, 0 100%);
  }

  /* The type column composes against the VIEWPORT, not a centered
     container: pinned to the page gutter on the left, reserving the
     panel's share on the right. (Percent padding resolves against the
     containing block — .hero, i.e. the viewport — which is exactly what
     we want here.) */
  .hero__inner {
    order: 0;
    width: 100%;
    max-width: none;
    margin: 0;
    padding-left: var(--pad);
    padding-right: calc(46% + 3rem);
    padding-bottom: 2rem;
  }

  .hero__title {
    font-size: 4.75rem;
    margin-top: 1.75rem;
  }
  .hero__title-line { display: block; }
  .hero__subtitle,
  .hero__tagline { font-size: 1.25rem; }
  .hero__subtitle { margin-top: 1.5rem; }
  .hero__actions { margin-top: 2.5rem; }
}

@media (min-width: 1280px) {
  .hero__title { font-size: clamp(4.75rem, 7vw, 9.5rem); }
  .hero__subtitle,
  .hero__tagline { font-size: clamp(1.25rem, 1.4vw, 1.5rem); }
  .hero__inner { padding-right: calc(44% + 3rem); }
  .hero__titleblock {
    flex-direction: row;
    align-items: baseline;
    gap: 0.85rem;
  }
  .hero__titleblock-sep { display: inline; }
}

/* ============================================
   BUTTONS — one grammar, two weights
   ============================================ */

.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate; /* the sweep sits under the label, inside the button */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-body);
  letter-spacing: 0.01em;
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  box-shadow: var(--shadow-btn);
  transition: transform 320ms var(--ease-draw), box-shadow 320ms var(--ease-draw),
              color 320ms var(--ease-draw), border-color 320ms var(--ease-draw);
}

/* The colour sweeps in along the slash: a layer skewed to the logo-A
   angle slides in from the left. It reaches 1.5em past each side so the
   skewed edges leave no corner unfilled once it has arrived. */
.btn::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: -1.5em;
  right: -1.5em;
  background-color: var(--btn-sweep);
  transform: translateX(-100%) skewX(-20.3deg);
  transition: transform 320ms var(--ease-draw);
}

.btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-btn-lift);
}

.btn:focus-visible::before {
  transform: translateX(0) skewX(-20.3deg);
}

/* Pointer devices only: on touch, :hover sticks after a tap and would
   leave the button lifted and swept. Before :active, so a press wins. */
@media (hover: hover) {
  .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-btn-lift);
  }

  .btn:hover::before {
    transform: translateX(0) skewX(-20.3deg);
  }

  .btn--primary:hover {
    border-color: var(--btn-sweep);
  }
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-btn);
}

.btn--primary {
  --btn-sweep: color-mix(in srgb, var(--color-accent) 80%, var(--color-ink));
  background-color: var(--color-accent);
  color: var(--color-paper);
  border-color: var(--color-accent);
}

.btn--primary:focus-visible {
  border-color: var(--btn-sweep);
}

/* Paper body, so the resting shadow has something to sit under. Its
   sweep is a light brown tint; the label keeps the ink. */
.btn--ghost {
  --btn-sweep: color-mix(in srgb, var(--color-brown) 12%, var(--color-paper));
  background-color: var(--color-paper);
  color: var(--color-ink);
  border-color: var(--ink-55);
}

/* ============================================
   STUDIO — two poles in two paragraphs and a closing
   line, watched over by the founding year as an
   OUTLINED numeral: drawn, not built — the signature
   concept restated in one glyph.
   ============================================ */

/* The year never meets the label's rule:
   - below 768 it is small enough to sit in the section's top padding,
     wholly above the rule (and inside the right half of the screen);
   - from 768 it grows down past the rule, so the rule becomes a leader
     line that stops 1.5rem short of the year's first digit. */
.studio {
  position: relative;
  overflow: hidden;
  --year-size: 4.5rem;
}

@media (min-width: 768px) {
  .studio { --year-size: clamp(7rem, 18vw, 16rem); }

  /* "2005" in Jost 700 spans 2.645em from its first digit's ink to the
     year's right edge (measured), and that edge bleeds 0.5rem past the
     section. The rule ends at the container's content edge; pull it back
     to 1.5rem before the ink. Above --container-max the container is
     centred, so the margin it gains is subtracted. Fallback fonts set
     narrower digits, which only widens the gap. */
  .studio .section__eyebrow::after {
    margin-right: max(0px, calc(var(--year-size) * 2.645 - 0.5rem + 1.5rem - var(--pad)
      - max(0px, (100vw - var(--container-max)) / 2)));
  }
}

.studio__year {
  position: absolute;
  z-index: var(--z-under);
  top: 0.5rem;
  right: -0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--year-size);
  line-height: 0.85;
  letter-spacing: 0.01em;
  color: transparent;
  -webkit-text-stroke: 1px var(--ink-16);
  paint-order: stroke;
  pointer-events: none;
  user-select: none;
}

.studio > .container {
  position: relative;
  z-index: var(--z-base);
}

.studio__body {
  margin-top: 1.5rem;
  max-width: 46ch;
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--color-ink);
}

/* The second paragraph follows closely: one statement in two beats. */
.studio__body + .studio__body {
  margin-top: 1rem;
}

/* The section ends on this line — the display voice, at a size between
   the body and the heading. Fixed rem on mobile and tablet; the fluid
   clamp only from 1280 (where 3vw already exceeds the 1.75rem floor). */
.studio__closing {
  margin-top: 2rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--color-ink);
}

@media (min-width: 768px) {
  .studio__body { font-size: 1.25rem; }
  .studio__closing { font-size: 2rem; }
}

@media (min-width: 1280px) {
  .studio__body { font-size: clamp(1.25rem, 1.5vw, 1.5rem); }
  .studio__closing { font-size: clamp(1.75rem, 3vw, 2.75rem); }
}

/* The two portraits: two equal columns at every width, left-aligned with
   the text, capped so each portrait is at most 320px (2 x 320 + gap). */
.studio__team {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  max-width: calc(2 * 320px + 1.5rem);
  margin-top: 3rem;
}

.studio__person { margin: 0; }

.studio__person img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
}

.studio__name {
  display: block;
  margin-top: 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.2;
  color: var(--color-ink);
}

/* --ink-70: the lowest ink step that clears 4.5:1 on paper (4.99:1);
   --ink-55 measures 3.29:1 and fails. */
.studio__role {
  display: block;
  margin-top: 0.25rem;
  font-family: var(--font-mono);
  font-size: var(--text-small);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-70);
}

@media (min-width: 768px) {
  .studio__team {
    gap: 2.5rem;
    max-width: calc(2 * 320px + 2.5rem);
  }
  .studio__name { font-size: 1.25rem; }
}

/* Desktop: the portraits move out from under the text into the empty
   right column, starting level with the first paragraph. The trailing
   1fr row absorbs the portraits' height, so the text rows keep their
   natural spacing instead of being stretched apart by the taller
   column. The eyebrow and its rule still run the full width. */
@media (min-width: 1280px) {
  .studio > .container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(5, auto) 1fr;
    column-gap: clamp(2.5rem, 5vw, 6rem);
  }
  .studio > .container > * { grid-column: 1; }
  .studio .section__eyebrow { grid-column: 1 / -1; }
  .studio .studio__team {
    grid-column: 2;
    grid-row: 3 / 7;
    align-self: start;
    width: 100%;
    margin-top: 1.5rem;
  }
}

/* ============================================
   PROJECT REGISTER — the portfolio as a drawing
   register. Numbered rows like plan sheets; the sticky
   preview panel shows the hovered/focused sheet's render.
   On mobile the preview disappears and each row carries
   its own image inline.
   ============================================ */

.register {
  margin-top: 2.5rem;
}

.register__list {
  display: flex;
  flex-direction: column;
}

.register__row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 1.25rem;
  padding: 1.35rem 0;
  border-top: 1px solid var(--ink-16);
  cursor: pointer;
  transition: border-color var(--t-med);
}

.register__row:last-child {
  border-bottom: 1px solid var(--ink-16);
}

/* Sheet number — the precise voice */
.register__num {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: 0.06em;
  color: var(--ink-38);
  transition: color var(--t-med);
}

.register__body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  transition: transform var(--t-med);
}

.register__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.register__meta {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-55);
}

.register__row:hover,
.register__row.is-active {
  border-top-color: var(--color-accent);
}

.register__row:hover .register__num,
.register__row.is-active .register__num {
  color: var(--color-accent);
}

@media (prefers-reduced-motion: no-preference) {
  .register__row:hover .register__body,
  .register__row.is-active .register__body {
    transform: translateX(0.85rem);
  }
}

/* Mobile: the row's own render, inline under the text */
.register__rowimg {
  grid-column: 1 / -1;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  margin-top: 1rem;
  box-shadow: var(--shadow-sheet);
}

/* Preview panel — desktop only */
.register__preview {
  display: none;
}

@media (min-width: 768px) {
  .register {
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: 3rem;
    align-items: start;
  }

  .register__rowimg { display: none; }

  .register__row { padding: 1.6rem 0; }

  /* The preview is a sheet on a stack: a drawn outline of the next
     sheet sits 14px right and down behind it (inside the container's
     gutter, so it never adds scroll), and the sheet casts a soft shadow.
     The sheet itself clips the images; the frame stays outside it. */
  .register__preview {
    display: block;
    position: sticky;
    top: calc(var(--header-h) + 2.5rem);
    aspect-ratio: 4 / 3;
  }

  .register__preview::before {
    content: "";
    position: absolute;
    inset: 14px -14px -14px 14px;
    border: 1px solid var(--ink-38);
    pointer-events: none;
  }

  .register__preview-sheet {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background-color: var(--ink-8);
    box-shadow: var(--shadow-sheet);
  }

  /* Image change as a wipe on the slash: the incoming layer is revealed
     by a clip whose leading edge leans at the logo-A angle. --run is the
     edge's horizontal travel over the sheet's height (height × tan); at
     4:3 the height is 75% of the width, so in x-percentages it is
     tan × 75%. Hidden = the edge parked left of the sheet; shown = parked
     past its right side. Layer roles are set by initRegisterPreview:
     .is-front (shown, underneath) and .is-incoming (on top, wiping in). */
  .register__preview-img {
    --run: calc(var(--slash-tan) * 75%);
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    clip-path: polygon(0 0, calc(100% + var(--run)) 0, 100% 100%, 0 100%);
  }

  .register__preview-img.is-front {
    z-index: var(--z-base);
  }

  .register__preview-img.is-incoming {
    z-index: calc(var(--z-base) + 1);
    clip-path: polygon(0 0, 0 0, calc(-1 * var(--run)) 100%, 0 100%);
    transform: scale(1.03);
  }

  .register__preview-img.is-incoming.is-wiping {
    clip-path: polygon(0 0, calc(100% + var(--run)) 0, 100% 100%, 0 100%);
    transform: scale(1);
    transition: clip-path var(--wipe-duration, 0.55s) var(--ease-draw),
                transform var(--wipe-duration, 0.55s) var(--ease-draw);
  }

  .register__name { font-size: 1.75rem; }
}

@media (min-width: 1280px) {
  .register { gap: 4rem; }
  .register__name { font-size: clamp(1.75rem, 2vw, 2.25rem); }
  .register__row { padding: 1.85rem 0; }
}

/* ============================================
   SERVICES — the turquoise band (see .section--turquoise).
   Three typographic columns, brown ink on heritage turquoise:
   1 column on mobile, 2 from 768 (the third wraps under the
   first), 3 from 1024.
   ============================================ */

.services {
  position: relative;
  overflow: hidden; /* contains the plan-grid zone */
}

/* Plan-grid zone #2 — inside the turquoise band, lower right */
.services::before {
  content: "";
  position: absolute;
  z-index: var(--z-under);
  right: 0;
  bottom: 0;
  width: 58%;
  height: 60%;
  background-image: var(--plan-grid);
  -webkit-mask-image: linear-gradient(to top left, var(--color-ink) 0%, transparent 65%);
  mask-image: linear-gradient(to top left, var(--color-ink) 0%, transparent 65%);
  pointer-events: none;
}

.services > .container {
  position: relative;
  z-index: var(--z-base);
}

.services__columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-top: 3rem;
}

/* Column icons — Phosphor Icons, regular (MIT), inlined in their own
   256 box: the 16-unit stroke renders at 2.5px at 40px. They draw
   themselves in with their column's reveal: every stroke carries
   pathLength="1", so one dash covers it. The dash array leaves a gap
   longer than the path, so the hidden state paints nothing (no round-cap
   dot at either end). Filled dots (the calculator's keys) are not drawn;
   they simply arrive with the column's fade. The delay is inherited from
   the column, so each icon follows its column's stagger. */
.services__icon {
  width: 40px;
  height: 40px;
  margin-bottom: 0.75rem;
  color: var(--color-ink);
  transition-delay: inherit;
}

.services__icon > :not(.services__icon-dot) {
  stroke-dasharray: 1 1.1;
  stroke-dashoffset: 1.05;
  transition: stroke-dashoffset 1s var(--ease-draw);
  transition-delay: inherit;
}

.reveal-stagger.is-visible > .reveal-child .services__icon > :not(.services__icon-dot) {
  stroke-dashoffset: 0;
}

.services__icon-dot {
  fill: currentColor;
  stroke: none;
}

.services__column-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.005em;
  margin-bottom: 1.25rem;
}

.services__list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

/* Full ink, not a step: brown on raw turquoise is 7.65:1, and the band
   is meant to read with conviction. */
.services__list li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--color-ink);
}

/* List mark: the same set's «check» (Phosphor regular, MIT) as a mask
   filled with the ink, 0.9em square, centred on the first line
   (line-height 1.65 → the line's middle is 0.825em down). It keeps
   Phosphor's own 16/256 stroke, so at 0.9em it is a light tick (≈0.9px),
   quieter than the 2.5px column icons. The text keeps its 1.1rem indent. */
.services__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.375em;
  width: 0.9em;
  height: 0.9em;
  background-color: var(--color-ink);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='none' stroke='black' stroke-width='16' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='40 144 96 200 224 72'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256' fill='none' stroke='black' stroke-width='16' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='40 144 96 200 224 72'/%3E%3C/svg%3E") center / contain no-repeat;
}

@media (min-width: 768px) {
  .services__columns {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
  .services__column-title { font-size: 1.5rem; }
}

@media (min-width: 1024px) {
  .services__columns { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================
   CONTACT BAND — dark brown field
   ============================================ */

.contact {
  position: relative;
  overflow: hidden; /* trims the plan-grid zone */
}

/* Plan-grid zone #3 — behind the contact heading */
.contact::before {
  content: "";
  position: absolute;
  z-index: var(--z-under);
  top: 0;
  left: 0;
  width: 70%;
  height: 62%;
  background-image: var(--plan-grid);
  -webkit-mask-image: linear-gradient(to bottom right, var(--color-ink) 0%, transparent 65%);
  mask-image: linear-gradient(to bottom right, var(--color-ink) 0%, transparent 65%);
  pointer-events: none;
}

/* The contact band deliberately has NO slash. The logo-A angle is used
   once, on the hero, where it carries the "din planșă în clădire" idea.
   Repeating it here read as a chip out of the corner rather than a
   gesture, at every depth we tried. The band enters flat. */

.contact > .container {
  position: relative;
  z-index: var(--z-base);
}

/* Two columns from 1024: intro (heading, line, channels) left, form
   right, top-aligned. One column below, the form after the address. */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.contact__heading {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2.25rem;
  line-height: 1.06;
  letter-spacing: -0.015em;
  max-width: 18ch;
}

.contact__body {
  margin-top: 1.5rem;
  max-width: 46ch;
  font-size: 1.125rem;
  color: var(--ink-75);
}

.contact__channels {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 2.5rem;
}

.contact__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 1.0625rem;
  color: var(--color-ink);
  border-bottom: 1px solid var(--ink-38);
  overflow-wrap: anywhere;
}

.contact__link:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.contact__address {
  margin-top: 0.75rem;
  font-style: normal; /* <address> defaults to italic */
  color: var(--ink-55);
}

/* The form — visible labels above each field, fields on the section's own
   ground with a 1px ink rule. Text steps are measured on #2B1A16:
   label --ink-75 8.65:1, input text --color-ink 14.51:1, placeholder and
   privacy line --ink-55 / --ink-75 (5.27:1 / 8.65:1), rule --ink-38 3.23:1. */
.contact__form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact__field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact__label {
  font-size: var(--text-small);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-75);
}

.contact__input {
  width: 100%;
  min-height: 44px;
  padding: 0.75rem 0.875rem;
  background-color: transparent;
  color: var(--color-ink);
  border: 1px solid var(--ink-38);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.5;
  transition: border-color var(--t-fast);
}

.contact__input::placeholder {
  color: var(--ink-55);
  opacity: 1; /* Firefox dims placeholders on top of the colour */
}

.contact__input:hover {
  border-color: var(--ink-55);
}

.contact__input:focus-visible {
  border-color: var(--color-accent);
}

.contact__input--area {
  resize: vertical;
}

/* Primary button on the dark field: the accent is the light lifted
   turquoise here, so paper text (1.45:1) would vanish. Dark ground
   as the label reads 9.9:1. */
.contact__submit {
  align-self: flex-start;
  color: var(--color-field-dark);
}

.contact__submit:disabled {
  opacity: 0.7;
  cursor: progress;
}

.contact__privacy {
  font-size: var(--text-small);
  line-height: 1.5;
  color: var(--ink-75);
}

.contact__privacy a {
  color: var(--color-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--ink-55);
  display: inline-block;
  padding: 0.75rem 0;   /* 44px tap row around a 13px line */
  margin: -0.75rem 0;
}

.contact__privacy a:hover {
  color: var(--color-accent);
  text-decoration-color: var(--color-accent);
}

.contact__error {
  padding-left: 0.875rem;
  border-left: 2px solid var(--color-accent);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--color-ink);
}

.contact__success {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.5rem 0;
}

.contact__success:focus-visible {
  outline-offset: 8px;
}

.contact__success-icon {
  color: var(--color-accent);
}

.contact__success-title {
  font-size: 1.75rem;
  line-height: 1.1;
}

.contact__success-body {
  color: var(--ink-75);
}

@media (min-width: 768px) {
  .contact__heading { font-size: 2.75rem; }
  .contact__link { font-size: 1.25rem; }
}

@media (min-width: 1024px) {
  .contact__grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
  }
}

@media (min-width: 1280px) {
  .contact__grid { gap: clamp(4rem, 6vw, 7rem); }
  .contact__heading { font-size: clamp(2.25rem, 4.5vw, 3.5rem); }
}

/* ============================================
   LEGAL — privacy and terms pages. One plain text column on the
   paper field, no hero, no motion. <main> already reserves the
   header slot; the header sits solid brown at the top (its normal
   top state), so it reads without anything underneath.
   ============================================ */

.legal {
  max-width: 68ch;
  margin: 0 auto;
  padding: 2.5rem var(--pad) 4.5rem;
}

.legal__title {
  margin-bottom: 2rem;
  font-size: 2rem;
}

.legal__heading {
  margin: 2.25rem 0 0.75rem;
  font-size: 1.375rem;
}

.legal__text,
.legal__list {
  margin-bottom: 1rem;
  overflow-wrap: break-word;
}

.legal__list {
  padding-left: 1.25rem;
  list-style: disc;
}

.legal__list li + li {
  margin-top: 0.5rem;
}

.legal__link {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}

.legal__link:hover {
  color: var(--color-ink);
}

.legal__updated {
  margin-top: 2.5rem;
  font-size: var(--text-small);
  color: var(--ink-70);
}

@media (min-width: 768px) {
  .legal { padding: 4rem var(--pad) 6rem; }
  .legal__title { margin-bottom: 2.5rem; font-size: 2.75rem; }
  .legal__heading { margin-top: 2.75rem; font-size: 1.625rem; }
}

@media (min-width: 1280px) {
  .legal { padding: 5rem var(--pad) 7rem; }
  .legal__title { font-size: clamp(2.75rem, 3.2vw, 3.5rem); }
  .legal__heading { font-size: clamp(1.625rem, 1.8vw, 2rem); }
}

/* ============================================
   FOOTER
   ============================================ */

/* Reveal: the footer pins to the viewport bottom (sticky, z below main)
   and the opaque page slides up over it. Pure CSS — no measured heights.
   body's overflow-x is `clip`, not `hidden`, which keeps sticky alive.
   No border-top: the dark contact band's own edge is the divider. */
.footer {
  position: sticky;
  bottom: 0;
  z-index: var(--z-under);
  padding: 3rem 0 2.5rem;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.footer__logo-svg {
  width: 132px;
  height: auto;
  aspect-ratio: 2800 / 840;
  color: var(--color-ink);
}

.footer__tagline {
  margin-top: 1rem;
  max-width: 42ch;
  font-size: var(--text-small);
  color: var(--ink-55);
}

.footer__meta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: var(--text-small);
  color: var(--ink-75);
}

.footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid var(--ink-16);
}

.footer__links a:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}

.footer__sep {
  color: var(--ink-38);
}

.footer__copy {
  font-size: var(--text-small);
  color: var(--ink-38);
}

@media (min-width: 768px) {
  .footer {
    padding: 4rem 0 3rem;
  }
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2.5rem;
  }
  .footer__meta {
    align-items: flex-end;
    text-align: right;
  }
}

/* ============================================
   SCROLL REVEALS — short-travel, once-only
   (base system preserved from the scaffold)
   ============================================ */

.reveal {
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal--up { transform: translateY(40px); }
.reveal--left { transform: translateX(-40px); }
.reveal--right { transform: translateX(40px); }
.reveal--zoom { transform: scale(0.8); }

/* Stagger children */
.reveal-child {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal-stagger.is-visible > .reveal-child:nth-child(1) { transition-delay: 0s; opacity: 1; transform: none; }
.reveal-stagger.is-visible > .reveal-child:nth-child(2) { transition-delay: 0.15s; opacity: 1; transform: none; }
.reveal-stagger.is-visible > .reveal-child:nth-child(3) { transition-delay: 0.3s; opacity: 1; transform: none; }
.reveal-stagger.is-visible > .reveal-child:nth-child(4) { transition-delay: 0.45s; opacity: 1; transform: none; }
.reveal-stagger.is-visible > .reveal-child:nth-child(5) { transition-delay: 0.6s; opacity: 1; transform: none; }
.reveal-stagger.is-visible > .reveal-child:nth-child(6) { transition-delay: 0.75s; opacity: 1; transform: none; }

/* Blur-to-sharp for project images now lives with the .project block —
   each project reveals on its own, so there is no stagger to mirror. */

/* ============================================
   REDUCED MOTION — kill motion, keep content visible
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }

  /* Reveals never get their JS is-visible under reduced motion — force
     the settled state so nothing stays hidden. */
  .reveal,
  .reveal-child,
  .hero__titleblock,
  .hero__title,
  .hero__subtitle,
  .hero__tagline,
  .hero__actions {
    opacity: 1 !important;
    transform: none !important;
  }

  /* The hero panel skips plan-mode entirely: the render arrives BUILT
     (no resolve choreography), the grid overlay sits at its settled
     opacity. Static geometry (clip-path slash) is kept — it is not motion. */
  .hero__panel-img {
    filter: none !important;
    transform: none !important;
  }

  .hero__panel-grid {
    opacity: 0.35 !important;
  }

  /* Register preview swaps instantly (initRegisterPreview skips the
     wipe; transitions are zeroed above); rows keep their settled position. */
  .register__body {
    transform: none !important;
  }

  /* Drawn lines arrive drawn: the label rules, the hero title-block rule
     and the services icons are shown complete, with no reveal to wait for. */
  .section__eyebrow::after,
  .hero__titleblock::after {
    transform: none !important;
  }

  .services__icon > :not(.services__icon-dot) {
    stroke-dashoffset: 0 !important;
  }

  /* Buttons still change colour and shadow on hover/focus, but neither
     lift nor sweep: the fill is simply there. */
  .btn:hover,
  .btn:focus-visible {
    transform: none !important;
  }

  .btn:hover::before,
  .btn:focus-visible::before {
    transform: none !important;
  }
}
