/* ============================================================================
   IKD - INNOVATIVE KITCHEN DESIGN
   style.css - unified stylesheet for all pages
   Engineered by Frontal Node / frontalnode.io
   ----------------------------------------------------------------------------
   0.  Tokens
   1.  Reset & base
   2.  Typography
   3.  Layout primitives
   4.  Header / navigation
   5.  Buttons & links
   6.  Hero
   7.  Data strip & spec tables
   8.  Content modules
   9.  Process & compare slider
   10. Portfolio bento & lightbox
   11. Footer
   12. Motion & reveal
   13. Responsive
   14. Discovery chat (every page)
   15. Dimension lines (photographs with data-dims)
   ========================================================================== */

/* ------------------------------------------------------------- FONTS
   Served from this site, not Google: no third-party request (the visitor's IP
   stays here) and no extra connection before first paint. Variable files from
   Google Fonts (Inter v20, Roboto Mono), greek + latin + latin-ext subsets;
   licences in assets/fonts/. */
/* Inter, greek */
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(assets/fonts/inter-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* Inter, latin-ext */
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(assets/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;
}
/* Inter, latin */
@font-face {
  font-family: 'Inter'; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(assets/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;
}
/* Roboto Mono, greek */
@font-face {
  font-family: 'Roboto Mono'; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url(assets/fonts/roboto-mono-greek.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* Roboto Mono, latin-ext */
@font-face {
  font-family: 'Roboto Mono'; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url(assets/fonts/roboto-mono-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;
}
/* Roboto Mono, latin */
@font-face {
  font-family: 'Roboto Mono'; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url(assets/fonts/roboto-mono-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;
}

/* ---------------------------------------------------------------- 0. TOKENS */
:root {
  /* surface - charcoal rather than near-black, so the elevation steps read.
     Hard-coded rgba(20, 20, 23, a) scrims below are --ink at alpha. */
  --ink:        #141417;
  --ink-2:      #1A1A1E;
  --ink-3:      #212125;
  --ink-4:      #28282D;

  /* paper */
  --paper:      #F2F2EF;
  --paper-2:    #E4E4DF;

  /* text - every tier is WCAG AA (4.5:1) on every surface, ink to ink-4 */
  --fg:         #F2F2EF;
  --fg-dim:     #A6A69F;
  --fg-faint:   #91918A;

  /* structure */
  --line:       #2C2C31;
  --line-2:     #45454C;
  --line-3:     #6B6B72;   /* control edges and ghosted figures: 3:1 on ink to ink-3 */
  --line-paper: #C9C9C2;

  /* signal - machine orange, used at <1% coverage */
  --signal:     #FF4A1C;

  /* type */
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'Roboto Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* metrics */
  --gutter:  clamp(20px, 4vw, 64px);
  --maxw:    1680px;
  --gap:     clamp(16px, 2vw, 32px);
  --hdr-h:   72px;

  /* motion */
  --ease:    cubic-bezier(.16, 1, .3, 1);
}

/* ------------------------------------------------------- 1. RESET & BASE */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--hdr-h) + 24px);
  scroll-padding-bottom: 96px;   /* keep focused controls clear of the chat launcher */
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }

h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
fieldset { padding: 0; border: 0; min-width: 0; }

a { color: inherit; text-decoration: none; }

::selection { background: var(--signal); color: var(--ink); }

:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 200;
  background: var(--signal); color: var(--ink); padding: 12px 20px;
  font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  transition: top .2s var(--ease);
}
.skip:focus { top: 16px; }

/* units inside uppercase labels: «4 mm», not «4 MM» */
.u { text-transform: none; }

.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;
}

/* ------------------------------------------------------- 2. TYPOGRAPHY */
.d1, .d2, .d3 {
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: .94;
  text-wrap: balance;
}
.d1 { font-size: clamp(2.6rem, 8vw, 7.25rem); }
.d2 { font-size: clamp(2rem, 5.2vw, 4.25rem); letter-spacing: -.03em; }
.d3 { font-size: clamp(1.45rem, 2.9vw, 2.3rem); letter-spacing: -.025em; line-height: 1.04; }

.lead {
  font-size: clamp(1rem, 1.3vw, 1.175rem);
  line-height: 1.45;
  color: var(--fg-dim);
  max-width: 62ch;
  text-wrap: pretty;
}

.body { font-size: 15px; line-height: 1.6; color: var(--fg-dim); max-width: 68ch; }
.body strong { color: var(--fg); font-weight: 500; }
.body + .body { margin-top: 1em; }

/* monospace spec label - the core typographic device */
.mono {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-faint);
}
.mono--sig { color: var(--signal); }
.mono--fg  { color: var(--fg); }

.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* --------------------------------------------------- 3. LAYOUT PRIMITIVES */
.shell {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(64px, 9vw, 148px); }
.section--tight { padding-block: clamp(48px, 6vw, 88px); }
.section--flush { padding-block: 0; }
.rule { border-top: 1px solid var(--line); }

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
}

/* section header: index / title / meta */
.sec-head {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: var(--gap);
  align-items: end;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(32px, 4vw, 64px);
}
.sec-head .idx {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .1em; color: var(--signal); padding-bottom: 7px;
}
.sec-head .sec-meta {
  font-family: var(--mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--fg-faint); padding-bottom: 7px;
  text-align: right;
}

/* inverted (paper) region. Surface and text tokens swap, so components
   that pair them (solid buttons, hover fills, text on signal) still read.
   Each tier is re-tuned for AA on paper and paper-2; the signal deepens,
   as the machine orange is only 3:1 on paper. */
.invert {
  --ink: var(--paper);
  --ink-2: var(--paper-2);
  --fg: #141417;
  --fg-dim: #55554F;
  --fg-faint: #66665F;
  --line: #C9C9C2;
  --line-2: #B4B4AC;
  --line-3: #8A8A84;
  --signal: #C2370F;
  background: var(--paper);
  color: var(--fg);
}

/* ----------------------------------------------- 4. HEADER / NAVIGATION */
.hdr {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--hdr-h);
  background: rgba(20, 20, 23, .82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: height .35s var(--ease), background .35s var(--ease);
}
.hdr__in { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.hdr__logo { display: flex; align-items: center; flex: 0 0 auto; }
.hdr__logo img { width: auto; height: 34px; transition: height .35s var(--ease); }
.hdr.is-stuck { height: 60px; background: rgba(20, 20, 23, .96); }
.hdr.is-stuck .hdr__logo img { height: 27px; }

.nav { display: flex; align-items: center; gap: clamp(18px, 2.2vw, 36px); }
.nav__link {
  position: relative;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--fg-dim);
  padding-block: 8px;
  transition: color .25s var(--ease);
}
.nav__link::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 100%; height: 1px; background: var(--signal);
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav__link:hover { color: var(--fg); }
.nav__link:hover::after { transform: scaleX(1); }
.nav__link.is-active { color: var(--fg); }
.nav__link.is-active::after { transform: scaleX(1); }

.hdr__cta { display: flex; align-items: center; gap: 12px; }

/* language switch - ΕΛ / EN, visible at every width */
.lang { display: flex; align-items: center; }
.lang a {
  font-family: var(--mono); font-size: 11px; font-weight: 500; line-height: 1;
  letter-spacing: .13em; color: var(--fg-faint);
  padding: 12px 8px;
  transition: color .25s var(--ease);
}
.lang a + a { border-left: 1px solid var(--line-2); }
.lang a:hover, .lang a[aria-current] { color: var(--fg); }

/* burger */
.burger {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border: 1px solid var(--line-2);
}
.burger i {
  display: block; width: 18px; height: 1px; background: var(--fg);
  position: relative; transition: background .2s var(--ease);
}
.burger i::before, .burger i::after {
  content: ''; position: absolute; left: 0; width: 18px; height: 1px; background: var(--fg);
  transition: transform .35s var(--ease);
}
.burger i::before { top: -6px; }
.burger i::after  { top: 6px; }
.burger.is-open i { background: transparent; }
.burger.is-open i::before { transform: translateY(6px) rotate(45deg); }
.burger.is-open i::after  { transform: translateY(-6px) rotate(-45deg); }

/* call button - mobile header only, beside the burger */
.hdr__tel {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border: 1px solid var(--line-2); color: var(--fg);
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.hdr__tel:hover { border-color: var(--signal); color: var(--signal); }

/* mobile drawer */
.drawer {
  position: fixed; inset: 0; z-index: 99;
  background: var(--ink);
  padding: calc(var(--hdr-h) + 32px) var(--gutter) 40px;
  display: flex; flex-direction: column; justify-content: space-between;
  overflow-y: auto;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .4s var(--ease), transform .4s var(--ease), visibility .4s;
}
.drawer.is-open { opacity: 1; visibility: visible; transform: none; }
.drawer__nav { display: flex; flex-direction: column; }
.drawer__link {
  display: flex; align-items: baseline; gap: 16px;
  padding: 18px 0; border-top: 1px solid var(--line);
  font-size: clamp(1.6rem, 7.5vw, 2.5rem); font-weight: 600; letter-spacing: -.03em;
}
.drawer__link .idx { font: 500 11px/1 var(--mono); letter-spacing: .1em; color: var(--signal); }
.drawer__link:last-of-type { border-bottom: 1px solid var(--line); }
.drawer__foot { display: grid; gap: 14px; padding-top: 32px; }
.drawer__msg { display: flex; gap: 8px; }
.drawer__msg .btn { flex: 1; justify-content: center; }

/* --------------------------------------------------- 5. BUTTONS & LINKS */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 22px;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .13em; text-transform: uppercase;
  border: 1px solid var(--fg);
  color: var(--fg); background: transparent;
  position: relative; overflow: hidden; isolation: isolate;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.btn::before {
  content: ''; position: absolute; inset: 0; background: var(--fg);
  transform: translateY(101%); transition: transform .4s var(--ease); z-index: -1;
}
.btn:hover { color: var(--ink); }
.btn:hover::before { transform: none; }

.btn--solid { background: var(--fg); color: var(--ink); border-color: var(--fg); }
.btn--solid::before { background: var(--signal); }
.btn--solid:hover { color: var(--ink); border-color: var(--signal); }

.btn--sig { border-color: var(--signal); color: var(--signal); }
.btn--sig::before { background: var(--signal); }
.btn--sig:hover { color: var(--ink); }

.btn--sm { padding: 10px 16px; font-size: 11px; }
.btn[disabled], .btn:disabled { opacity: .3; pointer-events: none; }
.btn .arw { transition: transform .35s var(--ease); }
.btn:hover .arw { transform: translateX(4px); }
.btn:hover .arw--dn { transform: translateY(3px); }

.tlink {
  border-bottom: 1px solid var(--line-2);
  color: var(--fg);
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.tlink:hover { border-color: var(--signal); color: var(--signal); }

.ext::after {
  content: '\2197'; display: inline-block; margin-left: .35em;
  font-family: var(--mono); font-size: .85em;
}

/* ------------------------------------------------------------- 6. HERO */
.hero {
  position: relative;
  min-height: 100svh;
  padding-top: calc(var(--hdr-h) + clamp(40px, 7vw, 100px));
  padding-bottom: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.hero__bg picture { display: contents; }
.hero__bg::after {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(20,20,23,.70) 0%, rgba(20,20,23,.28) 38%, rgba(20,20,23,.92) 90%),
    linear-gradient(90deg, rgba(20,20,23,.74) 0%, rgba(20,20,23,.04) 68%);
}
.hero__in { position: relative; z-index: 1; width: 100%; }

.hero__kicker {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: clamp(20px, 3vw, 34px);
}
.hero__kicker::before {
  content: ''; width: clamp(28px, 5vw, 72px); height: 1px; background: var(--signal); flex: 0 0 auto;
}
.hero h1 { margin-bottom: clamp(28px, 4vw, 56px); max-width: 17ch; }
/* lighter than --fg-dim: it sits over the photograph (large text needs 3:1) */
.hero h1 em { font-style: normal; color: #B8B8B1; }
/* The Greek headline sets on four lines where the English takes three;
   scaled so the block keeps the same height and the actions stay in view. */
.hero h1:lang(el) { font-size: clamp(2.6rem, 6.1vw, 5.5rem); }
/* «κατασκευάζουμε» must fit a 320 px screen */
@media (max-width: 374px) { .hero h1:lang(el) { font-size: 2rem; } }
.hero h1 { overflow-wrap: break-word; }

/* three hero blocks: frosted glass over the photograph, which also keeps
   the text off the busy parts of the image */
.hero__blocks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.2vw, 16px);
  margin-bottom: clamp(32px, 4vw, 56px);
}
.hblock {
  position: relative;
  padding: clamp(20px, 2vw, 28px) clamp(18px, 2vw, 28px) clamp(22px, 2.6vw, 32px);
  background: rgba(20, 20, 23, .55);
  border: 1px solid rgba(242, 242, 239, .1);
  box-shadow: inset 0 1px 0 rgba(242, 242, 239, .06);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  backdrop-filter: blur(16px) saturate(130%);
  transition: background .45s var(--ease), border-color .45s var(--ease),
              box-shadow .45s var(--ease), transform .45s var(--ease);
}
/* Blur the content, not the panel: a filter on the panel itself would
   cut it off from its own backdrop-filter. */
.hblock > * { transition: filter .45s var(--ease), opacity .45s var(--ease); }

/* With a pointer, one block reads at a time: the one under the cursor
   lifts and takes a signal edge; the other two blur and recede. :has()
   keeps all three sharp while the cursor crosses the gaps. */
@media (hover: hover) and (pointer: fine) {
  .hero__blocks:has(.hblock:hover) .hblock:not(:hover) { background: rgba(20, 20, 23, .3); }
  .hero__blocks:has(.hblock:hover) .hblock:not(:hover) > * { filter: blur(3px); opacity: .4; }
  .hblock:hover {
    background: rgba(20, 20, 23, .7);
    border-color: rgba(242, 242, 239, .22);
    box-shadow: inset 0 2px 0 var(--signal);
    transform: translateY(-4px);
  }
}
.hblock__idx {
  display: block; font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .14em; color: var(--signal); margin-bottom: 14px;
}
.hblock h2 {
  font-size: clamp(.95rem, 1.15vw, 1.0625rem); font-weight: 600; letter-spacing: -.01em;
  margin-bottom: 10px; color: var(--fg);
}
.hblock p { font-size: 14px; line-height: 1.58; color: var(--fg-dim); text-wrap: pretty; }

.hero__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
  padding-bottom: clamp(28px, 4vw, 48px);
}
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.scrollcue { display: flex; align-items: center; gap: 12px; }
.scrollcue .bar {
  display: block; width: 1px; height: 36px; background: var(--line-2); position: relative; overflow: hidden;
}
.scrollcue .bar::after {
  content: ''; position: absolute; inset: 0; background: var(--signal);
  animation: cue 2.4s var(--ease) 2;   /* stops before 5 s (WCAG 2.2.2) */
}
@keyframes cue {
  0%   { transform: translateY(-100%); }
  55%  { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

/* ------------------------------------------- 7. DATA STRIP & SPEC TABLES */
.datastrip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.datastrip > div {
  padding: clamp(22px, 3vw, 36px) clamp(16px, 2vw, 28px);
  border-right: 1px solid var(--line);
}
.datastrip > div:last-child { border-right: 0; }
.datastrip dt {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--fg-faint);
  margin-bottom: 12px;
}
.datastrip dd {
  font-size: clamp(1.5rem, 2.6vw, 2.25rem); font-weight: 700;
  letter-spacing: -.035em; line-height: 1; color: var(--fg);
  font-variant-numeric: tabular-nums;
}
.datastrip dd span { font-size: .5em; font-weight: 500; color: var(--fg-dim); letter-spacing: 0; }
/* words rather than figures (project pages) */
.datastrip--text dd { font-size: clamp(1.05rem, 1.6vw, 1.4rem); letter-spacing: -.015em; line-height: 1.2; }
.datastrip--text dd span { font-size: .8em; }

/* spec table - the factual core device */
.spec { width: 100%; border-collapse: collapse; }
.spec caption { text-align: left; padding-bottom: 16px; }
.spec th, .spec td {
  text-align: left; padding: 15px 16px 15px 0;
  border-top: 1px solid var(--line);
  vertical-align: top;
}
.spec thead th {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--fg-faint);
  border-top: 0; padding-top: 0;
}
.spec tbody th {
  font-size: 14px; font-weight: 500; color: var(--fg); width: 30%;
}
.spec tbody td { font-size: 14px; color: var(--fg-dim); }
.spec tbody td.val {
  font-family: var(--mono); font-size: 13px; color: var(--fg);
  font-variant-numeric: tabular-nums; white-space: nowrap; width: 22%;
}
.spec tbody tr { transition: background .25s var(--ease); }
.spec tbody tr:hover { background: var(--ink-2); }

/* ------------------------------------------------------ 8. CONTENT MODULES */
/* two-column statement: sticky label + content */
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--gap); }
.split__aside { position: sticky; top: calc(var(--hdr-h) + 40px); align-self: start; }

/* numbered list of facts */
.facts { border-top: 1px solid var(--line); }
.facts li {
  display: grid; grid-template-columns: 56px minmax(0, 1fr);
  gap: var(--gap);
  padding: clamp(18px, 2.2vw, 26px) 0;
  border-bottom: 1px solid var(--line);
}
.facts .idx { font: 500 11px/1.6 var(--mono); letter-spacing: .1em; color: var(--signal); }
.facts h3 { font-size: clamp(1.05rem, 1.5vw, 1.25rem); font-weight: 600; letter-spacing: -.015em; margin-bottom: 8px; }
.facts p { font-size: 14px; line-height: 1.6; color: var(--fg-dim); max-width: 70ch; }

/* stage rows: one stage per row, the title at display size, hairlines
   between. Columns match .sec-head, so titles align with the heading.
   Without a pointer (touch, small screens) each row shows its photograph. */
.xrows { border-top: 1px solid var(--line); }
.xrows > li { border-bottom: 1px solid var(--line); }
.xrow {
  display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: var(--gap);
  padding-block: clamp(28px, 3.4vw, 48px);
  transition: opacity .45s var(--ease), filter .45s var(--ease);
}
.xrow__idx { font: 500 11px/1 var(--mono); letter-spacing: .14em; color: var(--signal); padding-top: .9em; }
.xrow__title {
  font-size: clamp(2.1rem, 5.4vw, 4.75rem); font-weight: 500;
  letter-spacing: -.035em; line-height: .98; text-wrap: balance;
  transition: transform .6s var(--ease);
}
.xrow__text {
  display: block; max-width: 60ch; margin-top: clamp(14px, 1.6vw, 22px);
  font-size: 15px; line-height: 1.6; color: var(--fg-dim);
}
.xrow__meta {
  display: block; margin-top: 14px;
  font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-faint);
}
.xrow__img { display: block; grid-column: 2; overflow: hidden; aspect-ratio: 16 / 10; background: var(--ink-2); }
.xrow__img img { width: 100%; height: 100%; object-fit: cover; }

/* With a pointer: the photograph waits in a reserved column and wipes up
   on hover or keyboard focus; the title steps in; the other rows recede. */
@media (hover: hover) and (pointer: fine) and (min-width: 961px) {
  .xrow { grid-template-columns: 56px minmax(0, 1fr) clamp(220px, 21vw, 320px); align-items: center; }
  .xrow__idx { align-self: start; }
  .xrow__img {
    grid-column: 3; grid-row: 1; aspect-ratio: 4 / 3;
    clip-path: inset(100% 0 0 0); transition: clip-path .7s var(--ease);
  }
  .xrow__img img { transform: scale(1.12); transition: transform 1s var(--ease); }
  .xrow:hover .xrow__img, .xrow:focus-visible .xrow__img { clip-path: inset(0); }
  .xrow:hover .xrow__img img, .xrow:focus-visible .xrow__img img { transform: none; }
  .xrow:hover .xrow__title, .xrow:focus-visible .xrow__title { transform: translateX(clamp(8px, 1vw, 16px)); }
  .xrows:has(.xrow:hover, .xrow:focus-visible) .xrow:not(:hover):not(:focus-visible) { opacity: .35; filter: blur(2px); }
}

/* full-bleed image band */
.band { position: relative; height: clamp(320px, 56vw, 720px); overflow: hidden; }
.band img { width: 100%; height: 100%; object-fit: cover; }
.band__cap {
  position: absolute; left: var(--gutter); bottom: 24px; z-index: 1;
  background: rgba(20,20,23,.72); backdrop-filter: blur(8px);
  padding: 10px 16px; border-left: 2px solid var(--signal);
}

/* partner block */
.partner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.partner__fig { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ink-2); }
.partner__fig img { width: 100%; height: 100%; object-fit: cover; }

/* CTA band */
.cta {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(24px, 4vw, 64px); align-items: center;
  padding-block: clamp(56px, 8vw, 120px);
}
.cta h2 { max-width: 20ch; }

/* long-form text (legal) */
.legal__nav { display: grid; margin-top: 4px; border-bottom: 1px solid var(--line); }
.legal__nav a {
  display: flex; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line);
  font: 500 11px/1.4 var(--mono); letter-spacing: .13em; text-transform: uppercase;
  color: var(--fg-dim); transition: color .25s var(--ease);
}
.legal__nav a:hover { color: var(--fg); }
.legal__nav .idx { color: var(--signal); }

.prose { max-width: 72ch; }
.prose > section + section {
  margin-top: clamp(48px, 6vw, 80px); padding-top: clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--line);
}
.prose h2 { margin: 12px 0 20px; }
.prose h3 { font-size: 1.05rem; font-weight: 600; letter-spacing: -.01em; color: var(--fg); margin: 32px 0 10px; }
.prose p, .prose li { font-size: 15px; line-height: 1.65; color: var(--fg-dim); }
.prose p + p { margin-top: 1em; }
.prose ul { margin-block: 12px; }
.prose li { position: relative; padding-left: 24px; }
.prose li + li { margin-top: 8px; }
.prose li::before {
  content: ''; position: absolute; left: 0; top: .8em;
  width: 12px; height: 1px; background: var(--signal);
}
.prose strong { color: var(--fg); font-weight: 500; }
.prose p a, .prose li a, .prose .val a {
  color: var(--fg); border-bottom: 1px solid var(--line-2);
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.prose p a:hover, .prose li a:hover, .prose .val a:hover { color: var(--signal); border-color: var(--signal); }
.prose .mono { display: block; }

/* --------------------------------------------- 9. PROCESS & COMPARE SLIDER */
.step {
  display: grid;
  grid-template-columns: 96px minmax(0, 5fr) minmax(0, 6fr);
  gap: var(--gap);
  padding-block: clamp(40px, 5vw, 76px);
  border-top: 1px solid var(--line);
  /* stretch so the figure fills the row beside a long text column */
  align-items: stretch;
}
.step__num, .step__body { align-self: start; }
.step__num {
  font-family: var(--mono); font-size: clamp(2rem, 3.4vw, 3.25rem); font-weight: 400;
  line-height: .8; color: var(--line-3); letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
  transition: color .5s var(--ease);
}
.step:hover .step__num { color: var(--signal); }
.step__body h2 { margin-bottom: 16px; }
.step__tag {
  display: inline-block; margin-bottom: 18px;
  font: 500 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--signal); border: 1px solid var(--line-2); padding: 7px 11px;
}
.step__data { margin-top: 28px; }
.step__fig { position: relative; overflow: hidden; background: var(--ink-2); min-height: 340px; }
.step__fig img { width: 100%; height: 100%; object-fit: cover; }

/* --- Render vs Reality slider --- */
.compare {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--ink-2);
  border: 1px solid var(--line);
  cursor: ew-resize;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.compare__layer { position: absolute; inset: 0; }
.compare__layer img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

/* base layer = finished installation */
.compare__reality { z-index: 1; }

/* top layer = CAD/wireframe, clipped by --pos */
.compare__render {
  z-index: 2;
  clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0);
}
/* Technical-drawing treatment. Swap the <img> for the real CAD export and
   delete this filter to show the render unmodified. */
.compare__render img {
  filter: grayscale(1) contrast(1.42) brightness(.44);
}
.compare__render::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(9,18,32,.55), rgba(9,18,32,.72));
  mix-blend-mode: multiply;
}
.compare__wire { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.compare__wire svg { width: 100%; height: 100%; }

/* divider + handle */
.compare__bar {
  position: absolute; top: 0; bottom: 0; left: var(--pos, 50%);
  width: 1px; background: var(--signal); z-index: 5;
  transform: translateX(-.5px); pointer-events: none;
}
.compare__handle {
  position: absolute; top: 50%; left: var(--pos, 50%); z-index: 6;
  width: 56px; height: 56px; margin: -28px 0 0 -28px;
  border-radius: 50%; border: 1px solid var(--signal);
  background: rgba(20,20,23,.78); backdrop-filter: blur(6px);
  display: grid; place-items: center; gap: 0;
  cursor: ew-resize; color: var(--signal);
  transition: transform .3s var(--ease), background .3s var(--ease);
}
.compare__handle:hover, .compare.is-dragging .compare__handle { transform: scale(1.07); background: rgba(20,20,23,.92); }
.compare__handle svg { width: 22px; height: 12px; }
.compare.is-dragging { cursor: grabbing; }

.compare__tag {
  position: absolute; top: 16px; z-index: 4;
  font: 500 11px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase;
  padding: 8px 12px; background: rgba(20,20,23,.72); backdrop-filter: blur(6px);
  border: 1px solid var(--line-2); color: var(--fg-dim);
}
.compare__tag--l { left: 16px; }
.compare__tag--r { right: 16px; }

.compare__legend {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 14px;
}

/* ------------------------------------------- 10. PORTFOLIO BENTO & LIGHTBOX */
.filters {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding-block: 20px; border-bottom: 1px solid var(--line);
  margin-bottom: var(--gap);
}
.filter {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  padding: 9px 14px; border: 1px solid var(--line-2); color: var(--fg-dim);
  transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.filter:hover { color: var(--fg); border-color: var(--fg-faint); }
.filter.is-active { background: var(--signal); border-color: var(--signal); color: var(--ink); }
.filter .n { margin-left: 6px; font-weight: 400; }

.bento {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: clamp(112px, 11vw, 190px);
  grid-auto-flow: dense;
  gap: var(--gap);
}
/* full bleed: photographs edge to edge, 2px joints between them */
.bento--bleed { gap: 2px; grid-auto-rows: clamp(120px, 13.5vw, 260px); }
.tile {
  position: relative; overflow: hidden; background: var(--ink-2);
  grid-column: span 2; grid-row: span 2;
  cursor: zoom-in; display: block; width: 100%; padding: 0; border: 0; text-align: left;
}
.tile--w2 { grid-column: span 2; }
.tile--w3 { grid-column: span 3; }
.tile--w4 { grid-column: span 4; }
.tile--w6 { grid-column: span 6; }
.tile--h2 { grid-row: span 2; }
.tile--h3 { grid-row: span 3; }
.tile--h4 { grid-row: span 4; }

.tile img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .9s var(--ease), filter .6s var(--ease), opacity .6s var(--ease);
  opacity: 0;
}
.tile img.is-loaded { opacity: 1; }
.tile:hover img { transform: scale(1.035); }

.tile__veil {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(20,20,23,0) 42%, rgba(20,20,23,.86) 100%);
  opacity: 0; transition: opacity .45s var(--ease);
}
.tile:hover .tile__veil, .tile:focus-visible .tile__veil { opacity: 1; }

.tile__cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 32px 18px 18px; pointer-events: none;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
  /* its own dark ground, so small captions stay readable over bright photos */
  background: linear-gradient(180deg, rgba(20,20,23,0) 0%, rgba(20,20,23,.9) 55%);
  transform: translateY(8px); opacity: 0;
  transition: transform .45s var(--ease), opacity .45s var(--ease);
}
.tile:hover .tile__cap, .tile:focus-visible .tile__cap { transform: none; opacity: 1; }
.tile__cap h3, .tile__cap .t { display: block; font-size: 14px; font-weight: 600; letter-spacing: -.01em; color: var(--fg); }
.tile__cap .mono { display: block; margin-bottom: 5px; color: var(--fg-dim); }
.tile__cap .val { font: 500 11px/1 var(--mono); color: var(--signal); white-space: nowrap; letter-spacing: .06em; }
/* Captions sit on the photograph's dark veil, so inside a paper section
   tiles keep the dark-theme text and the full-strength signal. */
.invert .tile { --fg: var(--paper); --fg-faint: #91918A; --signal: #FF4A1C; }
/* …but the focus ring is drawn on the paper around the tile: use the paper signal */
.invert .tile:focus-visible { outline-color: #C2370F; }

.tile.is-hidden { display: none; }

/* project gallery - photos at their own aspect ratio, never cropped */
.gallery { columns: 3; column-gap: var(--gap); }
.gallery .tile { height: auto; margin-bottom: var(--gap); break-inside: avoid; }
.gallery .tile img { height: auto; }

/* project cards (portfolio) */
.projs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.proj { display: block; }
.proj__img { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--ink-2); }
.proj__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.proj:hover .proj__img img { transform: scale(1.035); }
.proj__meta {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  padding-block: 16px; border-bottom: 1px solid var(--line);
}
.proj__t {
  display: block; margin-top: 8px;
  font-size: clamp(1.1rem, 1.6vw, 1.4rem); font-weight: 600; letter-spacing: -.02em;
  transition: color .25s var(--ease);
}
.proj:hover .proj__t { color: var(--signal); }
.proj__n { white-space: nowrap; }

/* previous / next between project pages */
.proj-next {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding-block: clamp(32px, 4vw, 56px);
}
.proj-next__link { display: grid; justify-items: end; gap: 10px; text-align: right; }
.proj-next__link .d3 { transition: color .25s var(--ease); }
.proj-next__link:hover .d3 { color: var(--signal); }

/* lightbox */
.lbox {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(7, 7, 8, .97);
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden;
  transition: opacity .35s var(--ease), visibility .35s;
}
.lbox.is-open { opacity: 1; visibility: visible; }
.lbox__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px var(--gutter); border-bottom: 1px solid var(--line); flex: 0 0 auto;
}
.lbox__stage {
  flex: 1; min-height: 0; position: relative; display: grid; place-items: center; padding: clamp(12px, 2vw, 28px);
  /* One track the size of the stage, so the photo's max-height: 100% has something to measure against. */
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  touch-action: pan-y pinch-zoom;
}
.lbox__stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lbox__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter); border-top: 1px solid var(--line); flex: 0 0 auto;
}
.lbox__nav { display: flex; gap: 8px; }
.lbox__btn {
  width: 42px; height: 42px; border: 1px solid var(--line-2);
  display: grid; place-items: center; color: var(--fg-dim);
  transition: color .25s var(--ease), border-color .25s var(--ease);
}
.lbox__btn:hover { color: var(--fg); border-color: var(--fg-faint); }
.lbox__count { font: 500 11px/1 var(--mono); letter-spacing: .12em; color: var(--fg-faint); }

/* ------------------------------------------------------------ 11. FOOTER */
.ftr { border-top: 1px solid var(--line); background: var(--ink); }
.ftr__top {
  display: grid; grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 2fr));
  gap: var(--gap);
  padding-block: clamp(48px, 6vw, 88px);
}
.ftr__brand img { height: 36px; width: auto; margin-bottom: 20px; }
.ftr__brand p { font-size: 14px; line-height: 1.6; color: var(--fg-dim); max-width: 34ch; }
.ftr__col h3 {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--fg-faint);
  margin-bottom: 18px;
}
.ftr__col li { margin-bottom: 11px; }
.ftr__col a, .ftr__col span { font-size: 14px; color: var(--fg-dim); transition: color .25s var(--ease); }
.ftr__col a:hover { color: var(--signal); }

.ftr__bot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
  padding-block: 22px; border-top: 1px solid var(--line);
}
.ftr__legal { display: flex; gap: 20px; flex-wrap: wrap; }
.ftr__legal a, .ftr__copy { font: 500 11px/1.6 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-faint); }
.ftr__legal a:hover { color: var(--fg-dim); }

/* agency credit - required */
.credit {
  font: 500 11px/1.6 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--fg-faint);
}
.credit a { color: var(--fg-dim); border-bottom: 1px solid var(--line-2); transition: color .25s var(--ease), border-color .25s var(--ease); }
.credit a:hover { color: var(--signal); border-color: var(--signal); }

/* ------------------------------------------------------ 12. MOTION & REVEAL */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .75s var(--ease), transform .75s var(--ease);
  transition-delay: var(--d, 0ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* The page header is the first screen (and the LCP element on inner pages):
   show it at once instead of waiting for script.js to reveal it. */
main > section:first-of-type [data-reveal] { opacity: 1; transform: none; transition: none; }

/* Without JavaScript nothing would ever reveal: show everything. */
@media (scripting: none) {
  [data-reveal], .tile img { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* --------------------------------------------------------- 13. RESPONSIVE */
@media (max-width: 1180px) {
  .step { grid-template-columns: 72px minmax(0, 1fr); }
  .step__fig { grid-column: 2; margin-top: 8px; aspect-ratio: 16 / 10; min-height: 0; }
  .partner { grid-template-columns: 1fr; }
  .ftr__top { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .ftr__brand { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
  :root { --hdr-h: 64px; }
  .nav { display: none; }
  .hdr__cta .btn { display: none; }
  .burger, .hdr__tel { display: flex; }
  .hero__blocks { grid-template-columns: 1fr; }
  .datastrip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .datastrip > div:nth-child(2n) { border-right: 0; }
  .datastrip > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .split { grid-template-columns: 1fr; }
  .split__aside { position: static; }
  .cta { grid-template-columns: 1fr; }
  /* Stacked hero copy covers far more of the photograph than it does on
     desktop, so the scrim carries more weight here. */
  .hero__bg::after {
    background: linear-gradient(180deg, rgba(20,20,23,.80) 0%, rgba(20,20,23,.68) 28%, rgba(20,20,23,.86) 62%, rgba(20,20,23,.95) 100%);
  }
  .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: clamp(100px, 16vw, 150px); }
  .tile--w6 { grid-column: span 4; }
  .tile--w4 { grid-column: span 4; }
  .tile--w3 { grid-column: span 2; }
  .compare { aspect-ratio: 4 / 3; }
  .gallery { columns: 2; }
}

@media (max-width: 640px) {
  .sec-head { grid-template-columns: 1fr; align-items: start; gap: 10px; }
  .sec-head .sec-meta { text-align: left; padding-bottom: 0; }
  .sec-head .idx { padding-bottom: 0; }
  .xrow { grid-template-columns: 1fr; gap: 14px; }
  .xrow__idx { padding-top: 0; }
  .xrow__img { grid-column: 1; }
  .facts li { grid-template-columns: 1fr; gap: 8px; }
  .step { grid-template-columns: 1fr; gap: 14px; }
  .step__num { font-size: 2.25rem; }
  .step__fig { aspect-ratio: 4 / 3; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: clamp(120px, 30vw, 170px); }
  .tile, .tile--w3, .tile--w4, .tile--w6 { grid-column: span 2; grid-row: span 2; }
  .tile--h3, .tile--h4 { grid-row: span 2; }
  /* Captions are permanent on touch, so the veil has to carry them
     unaided over bright photography. */
  .tile__cap { opacity: 1; transform: none; }
  .tile__veil {
    opacity: 1;
    background: linear-gradient(180deg, rgba(20,20,23,0) 44%, rgba(20,20,23,.58) 70%, rgba(20,20,23,.93) 100%);
  }
  /* Three columns stop fitting once a term or value runs long (Greek
     especially): each row becomes term + value, description underneath. */
  .spec thead { display: none; }
  .spec, .spec tbody { display: block; }
  .spec tbody tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px;
    padding: 14px 0; border-top: 1px solid var(--line);
  }
  .spec tbody th, .spec tbody td { width: auto; padding: 0; border-top: 0; }
  .spec tbody td:not(.val) { grid-column: 1 / -1; grid-row: 2; margin-top: 6px; }
  .spec tbody td.val { width: auto; text-align: right; }
  .ftr__top { grid-template-columns: 1fr; }
  .ftr__bot { flex-direction: column; align-items: flex-start; gap: 12px; }
  .compare__handle { width: 48px; height: 48px; margin: -24px 0 0 -24px; }
  .datastrip { grid-template-columns: 1fr; }
  .datastrip > div { border-right: 0; }
  .datastrip > div + div { border-top: 1px solid var(--line); }
  .gallery { columns: 1; }
  .projs { grid-template-columns: 1fr; }
  .proj-next__link { justify-items: start; text-align: left; }
}

/* ------------------------------------------------- 14. DISCOVERY CHAT */
/* Injected on every page by script.js (11). The launcher is round; the
   panel keeps the site's square geometry. */
.chat-fab, .chat { --edge: clamp(16px, 2.4vw, 28px); }

.chat-fab {
  position: fixed; right: var(--edge); bottom: var(--edge); z-index: 121;
  width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--fg); color: var(--ink);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
  /* visibility switches at once, so focus can return here on close */
  transition: background .3s var(--ease), color .3s var(--ease), opacity .3s var(--ease);
}
.chat-fab:hover { background: var(--signal); color: var(--ink); }
.chat-fab > svg { grid-area: 1 / 1; transition: opacity .25s var(--ease), transform .4s var(--ease); }
.chat-fab__x { opacity: 0; transform: rotate(-90deg) scale(.5); }
.chat-fab[aria-expanded="true"] .chat-fab__i { opacity: 0; transform: rotate(90deg) scale(.5); }
.chat-fab[aria-expanded="true"] .chat-fab__x { opacity: 1; transform: none; }

/* a brief in progress */
.chat-fab__dot {
  position: absolute; top: 2px; right: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--signal); box-shadow: 0 0 0 2px var(--ink);
  transform: scale(0); transition: transform .3s var(--ease);
}
.chat-fab.has-draft .chat-fab__dot { transform: scale(1); }
.chat-fab[aria-expanded="true"] .chat-fab__dot { transform: scale(0); }

.chat-fab__tip {
  position: absolute; right: calc(100% + 12px); top: 50%;
  padding: 9px 12px; white-space: nowrap;
  background: var(--ink-3); border: 1px solid var(--line-2); color: var(--fg);
  font: 500 11px/1 var(--mono); letter-spacing: .13em; text-transform: uppercase;
  opacity: 0; transform: translate(6px, -50%); pointer-events: none;
  transition: opacity .25s var(--ease), transform .35s var(--ease);
}
.chat-fab:hover .chat-fab__tip, .chat-fab:focus-visible .chat-fab__tip { opacity: 1; transform: translate(0, -50%); }
.chat-fab[aria-expanded="true"] .chat-fab__tip { display: none; }

/* out of the way of the mobile drawer and the lightbox */
body.is-locked:not(.chat-on) .chat-fab { opacity: 0; visibility: hidden; }

/* keep the required agency credit clear of the launcher */
.ftr__bot { padding-bottom: 96px; }

/* panel */
.chat {
  position: fixed; right: var(--edge); bottom: calc(var(--edge) + 72px); z-index: 120;
  width: min(420px, calc(100vw - 2 * var(--edge)));
  height: min(680px, calc(100vh - var(--edge) - 160px));
  display: flex; flex-direction: column;
  background: var(--ink-2); border: 1px solid var(--line-3);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .55);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  /* hidden only once the fade is over; visible (and focusable) at once */
  transition: opacity .3s var(--ease), transform .45s var(--ease), visibility 0s linear .3s;
}
.chat.is-open {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .3s var(--ease), transform .45s var(--ease), visibility 0s;
}
.chat.is-instant { transition: none; }

.chat__hd {
  position: relative; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 14px 14px 20px; border-bottom: 1px solid var(--line);
}
.chat__title { font-size: 15px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
.chat__step { margin-top: 6px; font-size: 11px; color: var(--signal); }
.chat__tools { display: flex; gap: 12px; }   /* «start again» is not a near miss for «close» */
.chat__tool {
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 1px solid var(--line-2); color: var(--fg-dim);
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.chat__tool:hover { border-color: var(--signal); color: var(--signal); }
.chat__prog { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; }
.chat__fill { width: 0; height: 100%; background: var(--signal); transition: width .5s var(--ease); }

.chat__log {
  position: relative; flex: 1 1 auto; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 10px;
  padding: 20px;
}

/* messages */
@keyframes chat-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.msg { max-width: 88%; font-size: 14px; line-height: 1.55; animation: chat-in .35s var(--ease) both; }
.msg--bot {
  align-self: flex-start; padding: 12px 14px;
  background: var(--ink-3); border: 1px solid var(--line-2); color: var(--fg);
}
.msg__hint { margin-top: 8px; font-size: 12px; line-height: 1.5; color: var(--fg-dim); }
.msg--warn { border-color: transparent; border-left: 2px solid var(--signal); background: rgba(255, 74, 28, .1); }
.msg .chat__acts { margin-top: 12px; }

.msg--typing { display: flex; gap: 5px; padding: 15px 16px; }
.msg--typing i {
  width: 5px; height: 5px; border-radius: 50%; background: var(--fg-faint);
  animation: chat-dot 1s ease-in-out infinite;
}
.msg--typing i:nth-child(2) { animation-delay: .15s; }
.msg--typing i:nth-child(3) { animation-delay: .3s; }
@keyframes chat-dot { 0%, 80%, 100% { opacity: .3; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }

.msg--user { align-self: flex-end; display: flex; flex-direction: column; align-items: flex-end; }
.msg__body {
  padding: 10px 14px; background: var(--fg); color: var(--ink);
  white-space: pre-wrap; overflow-wrap: anywhere;
}
.msg__edit {
  margin-top: 6px; padding: 4px 0;
  font: 500 11px/1 var(--mono); letter-spacing: .13em; text-transform: uppercase; color: var(--fg-dim);
  transition: color .25s var(--ease);
}
.msg__edit:hover { color: var(--signal); }
/* superseded by a change, or turned down and asked again */
.msg--user.is-old .msg__body, .msg--user.is-wrong .msg__body { background: transparent; text-decoration: line-through; }
.msg--user.is-old .msg__body { color: var(--fg-faint); box-shadow: inset 0 0 0 1px var(--line-2); }
.msg--user.is-wrong .msg__body { color: var(--signal); box-shadow: inset 0 0 0 1px var(--signal); }
.msg--user.is-old .msg__edit, .chat.is-done .msg__edit { display: none; }

/* options: hairline cards, one column */
.chat__choices { display: grid; gap: 1px; animation: chat-in .35s var(--ease) both; }
.chat__opt {
  position: relative;
  display: grid; grid-template-columns: 24px minmax(0, 1fr); column-gap: 8px; row-gap: 3px;
  width: 100%; padding: 11px 14px 12px 12px; text-align: left;
  background: var(--ink-3); box-shadow: 0 0 0 1px var(--line-2);
  transition: background .2s var(--ease), box-shadow .2s var(--ease);
}
.chat__opt:hover { background: var(--ink-4); box-shadow: 0 0 0 1px var(--line-3); z-index: 1; }
.chat__opt:focus-visible { outline-offset: -2px; }
.chat__opt-n { grid-row: span 2; padding-top: 3px; font: 500 11px/1.4 var(--mono); letter-spacing: .08em; color: var(--fg-faint); }
.chat__opt-t { font-size: 14px; font-weight: 500; color: var(--fg); }
.chat__opt-d { font-size: 12px; line-height: 1.45; color: var(--fg-dim); }

/* "choose all that apply": a checkbox on the right says so before any tap */
.chat__opt[aria-pressed] { padding-right: 44px; }
.chat__opt[aria-pressed]::after {
  content: ''; position: absolute; right: 14px; top: 13px;
  width: 16px; height: 16px; border: 1px solid var(--line-3);
  background: no-repeat center / 12px 12px;
}
/* selected: signal edge and title (4.7:1 on ink-3, so hover keeps ink-3) */
.chat__opt[aria-pressed="true"], .chat__opt[aria-pressed="true"]:hover {
  background: var(--ink-3); box-shadow: 0 0 0 1px var(--signal), inset 3px 0 0 var(--signal); z-index: 1;
}
.chat__opt[aria-pressed="true"]::after {
  border-color: var(--signal); background-color: var(--signal);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.3l2.6 2.5L10 3.4' fill='none' stroke='%23141417' stroke-width='1.8'/%3E%3C/svg%3E");
}
.chat__opt[aria-pressed="true"] .chat__opt-t, .chat__opt[aria-pressed="true"] .chat__opt-n { color: var(--signal); }
.chat__choices > .btn { justify-self: start; margin-top: 10px; }
.chat__acts { display: flex; flex-wrap: wrap; gap: 8px; }

/* review */
.chat__review { border-top: 1px solid var(--line); animation: chat-in .35s var(--ease) both; }
.chat__row {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 12px;
  width: 100%; padding: 10px 2px; text-align: left; border-bottom: 1px solid var(--line);
}
.chat__k { font: 500 11px/1.5 var(--mono); letter-spacing: .13em; text-transform: uppercase; color: var(--fg-faint); }
.chat__v { font-size: 13px; line-height: 1.45; color: var(--fg); overflow-wrap: anywhere; transition: color .2s var(--ease); }
.chat__row:not(:disabled):hover .chat__v { color: var(--signal); }
.chat__row:disabled { cursor: default; }

/* composer */
.chat__bar { flex: 0 0 auto; display: flex; align-items: flex-end; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat__in {
  flex: 1 1 auto; min-width: 0; max-height: 140px;
  padding: 12px 14px; border: 1px solid var(--line-3); border-radius: 0;
  background: var(--ink); color: var(--fg);
  font-size: 16px; line-height: 1.4; resize: none;
  transition: border-color .25s var(--ease);
}
.chat__in[hidden] { display: none; }
.chat__in::placeholder { color: var(--fg-faint); }
.chat__in:focus { outline: none; border-color: var(--signal); }
.chat__in:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
/* the panel only holds focus for a moment while a turn is replaced */
.chat:focus { outline: none; }
.chat__send {
  flex: 0 0 auto; width: 48px; height: 48px; display: grid; place-items: center;
  background: var(--fg); color: var(--ink);
  transition: background .3s var(--ease), color .3s var(--ease), opacity .3s var(--ease);
}
.chat__send:hover { background: var(--signal); color: var(--ink); }
.chat__bar.is-busy .chat__send { opacity: .3; pointer-events: none; }
.chat.is-done .chat__bar { display: none; }

@media (max-width: 640px) {
  .chat-fab { width: 56px; height: 56px; }
  .chat { inset: 0; width: auto; height: auto; border: 0; box-shadow: none; transform: translateY(16px); }
  .chat-on .chat-fab { opacity: 0; visibility: hidden; }
  .chat__bar { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
}

/* Touch screens have no hover tooltip, so the launcher carries its label:
   the one quote control that is always on screen on a phone. */
@media (hover: none) {
  .chat-fab {
    width: auto; border-radius: 28px;
    grid-template-columns: auto auto; column-gap: 10px; padding: 0 20px 0 16px;
  }
  .chat-fab > svg { grid-area: 1 / 1; }
  .chat-fab__tip {
    position: static; grid-area: 1 / 2;
    opacity: 1; transform: none; padding: 0; background: none; border: 0; color: inherit;
  }
}

/* Phones: the home page's buttons come straight after the headline,
   above the three text blocks, instead of a screen and a half down. */
@media (max-width: 640px) {
  .hero__in { display: flex; flex-direction: column; }
  .hero__foot { order: 1; padding-bottom: 32px; }
  .hero__blocks { order: 2; padding-bottom: 28px; }
  .hero__foot .scrollcue { display: none; }
  /* the photo covers the first screen only (portrait crop); the text blocks
     below it sit on the dark ground instead of a stretched sliver of photo */
  .hero__bg { bottom: auto; height: 100svh; }
  .hero__bg img { object-position: 50% 50%; }
}

/* -------------------------------------------------- 15. DIMENSION LINES */
/* Drawn by script.js (12) over photographs that carry data-dims. Strokes
   are in screen px (the SVG viewBox is the element's own size). Hidden
   until the host takes .is-drawn; then each stroke draws on in turn
   (--i), the labels fade up and their numbers count. */
.dm {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1;
  pointer-events: none; overflow: visible;
  filter: drop-shadow(0 0 1.5px rgba(20, 20, 23, .7));
  opacity: 0; transition: opacity .3s var(--ease), transform .9s var(--ease);
}
.is-drawn > .dm { opacity: 1; transition: transform .9s var(--ease); }
/* the tile photo zooms on hover: the drawing zooms with it */
.tile:hover > .dm { transform: scale(1.035); }

.dm__line, .dm__ext, .dm__tick {
  fill: none; stroke: var(--signal); stroke-width: 1.5; stroke-linecap: square;
  stroke-dasharray: var(--len); stroke-dashoffset: var(--len);
  transition: stroke-dashoffset 0s .3s;
}
.dm__ext { stroke-width: 1; }
.dm__tick { stroke-width: 2; }
.is-drawn > .dm .dm__line, .is-drawn > .dm .dm__ext, .is-drawn > .dm .dm__tick {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset .7s var(--ease) calc(var(--i) * 140ms);
}

.dm__val {
  font: 500 12px var(--mono); letter-spacing: .08em; fill: var(--paper);
  dominant-baseline: central;
}
.dm__chip { fill: rgba(20, 20, 23, .84); }
.dm__dot { fill: var(--signal); }
.dm__val, .dm__chip, .dm__dot { opacity: 0; transition: opacity 0s .3s; }
.is-drawn > .dm .dm__val, .is-drawn > .dm .dm__chip, .is-drawn > .dm .dm__dot {
  opacity: 1; transition: opacity .4s var(--ease) calc(var(--i) * 140ms + 450ms);
}

/* re-laid out while drawn (resize): settle in place, no replay */
.dm--still * { transition: none !important; }

@media print {
  .hdr, .drawer, .burger, .lbox, .scrollcue, .compare__handle, .chat, .chat-fab, .dm { display: none !important; }
  body { background: #fff; color: #000; }
}
