/* Colleo 3D landing page. Plain CSS, no build step.
   Brand values come from assets/brand/tokens.css (Colleo design system v1) and are not changed here.
   Below the token block, no rule names a literal colour or font.
   Waiver on the record: the answers of the questions animate block-size. The rule "never animate height"
   gives way here to the accordion pattern of Modern Web Guidance; it runs only without reduced motion. */

@layer reset, base, layout, parts, motion;

@font-face {
  font-family: 'Bricolage Grotesque';
  src: url('../assets/fonts/bricolage-grotesque-latin-opsz-normal.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: 'DM Mono';
  src: url('../assets/fonts/dm-mono-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

/* The position of the line in a comparison. Registered, so that it can be animated. */
@property --pos {
  syntax: '<percentage>';
  inherits: true;
  initial-value: 50%;
}

:root {
  color-scheme: light;

  /* roles, from the brand colours */
  --paper: var(--c-field);
  --well: var(--c-white);
  --ink: var(--c-forest);
  --ink-soft: color-mix(in oklab, var(--c-forest) 72%, var(--c-moss));
  --brand-ground: var(--c-lime);
  --dark-ground: var(--c-forest);
  --deep-ground: var(--c-deep);
  --on-dark: var(--c-on-dark);
  --on-dark-soft: var(--c-on-dark-2);
  --hair: color-mix(in oklab, var(--c-forest) 22%, var(--c-field));
  --shade: color-mix(in oklab, var(--c-deep) 72%, transparent); /* over pictures only */

  /* space: one scale for every gap, margin and padding */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 40px;
  --s7: 64px;
  --s8: 96px;
  --s9: 144px;
  --col-gap: 32px;
  --menu-top: calc(var(--s7) + var(--s2)); /* the open menu of the phone starts under the top band */

  /* type: three weights; page sizes in rem, so that they follow the text size of the person */
  --w-text: 400;
  --w-ui: 600;
  --w-head: 700;
  --fs-case: clamp(1.75rem, 3.3vw, 2.75rem);
  --fs-item: 1.375rem;
  --fs-small: 1rem;
  --fs-note: 0.9375rem;
  --fs-tag: 0.8125rem;

  /* motion */
  --t-feedback: 140ms;
  --t-state: 280ms;
  --t-focal: 1900ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --knob: 52px;
  --dot: 30px;
}

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html, body { margin: 0; overflow-x: clip; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
  ol, ul { padding: 0; list-style: none; }
  img, picture, canvas { display: block; max-width: 100%; }
  img { height: auto; }
  button, input { font: inherit; color: inherit; }
}

@layer base {
  body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: var(--fs-body);
    font-weight: var(--w-text);
    line-height: var(--lh-body);
    font-synthesis: none;
    font-optical-sizing: auto;
    font-size-adjust: from-font;
  }
  h1, h2, h3 {
    font-weight: var(--w-head);
    text-wrap: balance;
    overflow-wrap: break-word;
    min-width: 0;
  }
  h1 {
    font-size: var(--fs-h1);
    line-height: var(--lh-tight);
    letter-spacing: var(--ls-h1);
    max-width: 16ch;
  }
  h2 {
    font-size: var(--fs-h2);
    line-height: 0.98;
    letter-spacing: var(--ls-h2);
    max-width: 18ch;
  }
  h3 {
    font-size: var(--fs-item);
    line-height: 1.2;
    letter-spacing: -0.01em;
  }
  p { text-wrap: pretty; max-width: 62ch; }
  .lead { font-size: var(--fs-lead); line-height: 1.45; max-width: 46ch; }

  a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 2px; }
  a:hover { text-decoration-color: var(--c-signal); }

  /* the ring is forest on light grounds and signal green on the two dark grounds */
  :focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 3px;
    border-radius: 4px;
  }
  .band-dark :focus-visible, .foot :focus-visible { outline-color: var(--c-signal); }
  main:focus { outline: none; }

  .vh {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .skip {
    position: absolute;
    inset-block-start: var(--s2);
    inset-inline-start: var(--s2);
    z-index: 10;
    padding: var(--s3) var(--s4);
    background: var(--ink);
    color: var(--brand-ground);
    border-radius: var(--r-field);
    transform: translateY(-200%);
  }
  .skip:focus-visible { transform: none; outline-color: var(--well); outline-offset: -6px; }
}

@layer layout {
  .wrap {
    max-width: var(--max-w);
    margin-inline: auto;
    padding-inline: var(--pad-x);
  }

  .band { padding-block: var(--pad-y); }
  .band-well { background: var(--well); }
  .band-dark { background: var(--dark-ground); color: var(--on-dark); }

  .head { display: grid; gap: var(--s5); margin-block-end: var(--s7); }

  /* a head beside its sentence */
  .head-row {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--col-gap);
    align-items: end;
  }
  .head-row > h2 { grid-column: span 6; }
  .head-row > .lead { grid-column: span 6; }

  /* a head on the left that stays in view, the content on the right */
  .split-head {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--col-gap);
    row-gap: var(--s6);
    align-items: start;
  }
  .split-head > .head { grid-column: span 4; margin: 0; position: sticky; inset-block-start: var(--s6); }
  .split-head > .faq { grid-column: span 8; }

  .split-row {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--s6) var(--col-gap);
    align-items: start;
  }
  .split-row > .sheet { grid-column: span 7; }
  .split-row > .checks { grid-column: span 5; }

  @media (max-width: 899px) {
    .head-row > h2, .head-row > .lead,
    .split-head > .head, .split-head > .faq,
    .split-row > .sheet, .split-row > .checks { grid-column: 1 / -1; }
    .split-head > .head { position: static; }
  }
}

@layer parts {
  /* ---------- top ---------- */
  .top-band, .hero { background: var(--brand-ground); }
  .top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--s2) var(--s5);
    padding-block: var(--s4);
  }
  .brand { display: inline-flex; align-items: center; gap: var(--s3); text-decoration: none; }
  .brand img { height: 30px; width: auto; }
  .brand-3d {
    border: var(--border);
    border-radius: var(--r-pill);
    padding: 0 var(--s3);
    font-size: var(--fs-note);
    font-weight: var(--w-head);
    line-height: 26px;
  }
  .brand-on-dark .brand-3d { border-color: var(--brand-ground); color: var(--brand-ground); }

  .nav, .foot-nav { display: flex; flex-wrap: wrap; gap: 0 var(--s5); }
  .nav a, .foot-nav a {
    font-size: var(--fs-note);
    font-weight: var(--w-ui);
    text-decoration: none;
    padding-block: var(--s2);
    background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 2px;
  }
  .nav a:hover, .foot-nav a:hover { background-size: 100% 2px; }

  /* ---------- buttons: on hover a fill wipes in from the left, like the line of the comparison ---------- */
  .btn {
    position: relative;
    isolation: isolate;
    overflow: clip;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 var(--s5);
    border: var(--border);
    border-radius: var(--r-pill);
    background: transparent;
    color: var(--ink);
    font-size: var(--fs-note);
    font-weight: var(--w-ui);
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
  }
  .btn::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--ink);
    transform: scaleX(0);
    transform-origin: 0 50%;
  }
  .btn:hover, .btn:focus-visible { color: var(--brand-ground); }
  .btn:hover::before, .btn:focus-visible::before { transform: scaleX(1); }
  .btn:active::before { background: var(--deep-ground); }

  .btn-solid { background: var(--ink); color: var(--brand-ground); }
  .btn-solid::before { background: var(--c-signal); }
  .btn-solid:hover, .btn-solid:focus-visible { color: var(--deep-ground); }
  .btn-solid:active::before { background: var(--well); }

  .btn-lime { background: var(--brand-ground); color: var(--ink); border-color: var(--brand-ground); }
  .btn-lime::before { background: var(--well); }
  .btn-lime:hover, .btn-lime:focus-visible { color: var(--ink); }

  .btn-small { min-height: 44px; padding-inline: var(--s4); }
  .btn[aria-pressed='true'] { background: var(--ink); color: var(--brand-ground); }
  .btn[aria-disabled='true'] { cursor: progress; opacity: 0.7; }
  .btn[hidden] { display: none; }
  .intro { display: none; } /* the opening shows only where motion is welcome: see the motion layer */

  .actions { display: flex; flex-wrap: wrap; gap: var(--s3); max-width: none; }

  @media (max-width: 899px) {
    .top > .nav { order: 3; flex-basis: 100%; }
  }
  /* phone: the action of the hero is on the first screen, so the top has the mark and the sections only */
  @media (max-width: 599px) {
    .top > .top-cta { display: none; }
    .top { padding-block: var(--s4) 0; }
    .brand img { height: 26px; }
  }

  /* ---------- hero ---------- */
  .hero { padding-block: var(--s5) var(--s8); }
  .hero-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: auto auto 1fr;
    gap: var(--s6) var(--col-gap);
  }
  .hero-grid > h1 { grid-column: 1 / -1; }
  .hero-say { grid-column: 1 / span 4; grid-row: 2; display: grid; gap: var(--s5); align-content: start; }
  .hero-facts { grid-column: 1 / span 4; grid-row: 3; align-self: end; display: grid; gap: var(--s5); }
  .hero .lead { font-size: clamp(1.3125rem, 1.85vw, 1.625rem); line-height: 1.38; }
  .hero-grid > .sheet { grid-column: 5 / -1; grid-row: 2 / span 2; }
  .hero-note {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--s3);
    align-items: center;
    font-size: var(--fs-small);
    font-weight: var(--w-ui);
    line-height: 1.35;
  }
  @media (max-width: 899px) {
    .hero-grid { grid-template-rows: none; }
    .hero-say, .hero-facts, .hero-grid > .sheet { grid-column: 1 / -1; grid-row: auto; }
  }
  @media (max-width: 599px) {
    .hero { padding-block: var(--s5) var(--s7); }
    .hero .compare { aspect-ratio: 4 / 5; }
  }

  /* ---------- the sheet: a framed picture, and beside it a title block as on a drawing ---------- */
  .sheet {
    border: var(--border);
    border-radius: var(--r-panel);
    overflow: clip;
    background: var(--well);
  }
  .titleblock { border: var(--border); border-radius: var(--r-card); overflow: clip; }
  .titleblock > div {
    display: grid;
    grid-template-columns: 6rem minmax(0, 1fr);
    gap: var(--s4);
    align-items: baseline;
    padding: var(--s4);
  }
  .titleblock > div + div { border-block-start: var(--border); }
  .titleblock dt, .facts dt { font-size: var(--fs-tag); font-weight: var(--w-ui); }
  .titleblock dd { font-size: var(--fs-small); line-height: 1.3; }

  /* ---------- comparison: the model lies over the image and is cut at the line ---------- */
  .compare {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: clip;
    background: var(--well);
  }
  .compare picture, .compare img { width: 100%; height: 100%; object-fit: cover; }
  .compare-top {
    position: absolute;
    inset: 0;
    clip-path: inset(0 calc(100% - var(--pos)) 0 0);
  }
  .split {
    position: absolute;
    inset: 0;
    translate: var(--pos) 0;
    pointer-events: none;
  }
  .split::before {
    content: '';
    position: absolute;
    inset-block: 0;
    inset-inline-start: -1px;
    width: 2px;
    background: var(--ink);
  }
  /* the knob: also the mark of the steps and of the note in the hero */
  .knob {
    position: relative;
    display: block;
    width: var(--knob);
    height: var(--knob);
    border: var(--border);
    border-radius: 50%;
    background: var(--brand-ground);
  }
  .knob::before, .knob::after {
    content: '';
    position: absolute;
    inset-block-start: 50%;
    width: 17%;
    height: 23%;
    translate: 0 -50%;
    background: var(--ink);
  }
  .knob::before { inset-inline-start: 21%; clip-path: polygon(100% 0, 0 50%, 100% 100%); }
  .knob::after { inset-inline-end: 21%; clip-path: polygon(0 0, 100% 50%, 0 100%); }
  .split > .knob { position: absolute; inset-block-start: 50%; inset-inline-start: 0; translate: -50% -50%; }
  .hero-note > .knob { --knob: 34px; background: var(--well); }
  .compare:hover .split > .knob { scale: 1.08; }
  .compare:active .split > .knob { scale: 0.96; }
  .compare-range {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: ew-resize;
    touch-action: pan-y;
  }
  .compare:has(.compare-range:focus-visible) .split > .knob { outline: 3px solid var(--ink); outline-offset: 3px; }
  .tag {
    position: absolute;
    inset-block-start: var(--s4);
    padding: var(--s2) var(--s3);
    border: var(--border);
    border-radius: var(--r-pill);
    background: var(--well);
    font-size: var(--fs-tag);
    font-weight: var(--w-ui);
    line-height: 1;
    pointer-events: none;
  }
  .tag-a { inset-inline-start: var(--s4); }
  .tag-b { inset-inline-end: var(--s4); }

  /* ---------- homes ---------- */
  .case {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--s6) var(--col-gap);
    align-items: start;
  }
  .case + .case { margin-block-start: var(--s9); }
  .case-text { grid-column: span 4; display: grid; gap: var(--s5); position: sticky; inset-block-start: var(--s6); }
  .case > .mosaic { grid-column: span 8; }
  .case-flip > .case-text { order: 2; }
  .case-text h3 { font-size: var(--fs-case); line-height: 1; letter-spacing: var(--ls-h2); }
  @media (max-width: 899px) {
    .case-text, .case > .mosaic { grid-column: 1 / -1; }
    .case-text { position: static; }
    .case-flip > .case-text { order: 0; }
    .case + .case { margin-block-start: var(--s8); }
  }

  .facts { border-block-start: 1px solid var(--hair); }
  .facts > div {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr);
    gap: var(--s4);
    align-items: baseline;
    padding-block: var(--s3);
    border-block-end: 1px solid var(--hair);
  }
  .facts dd { font-size: var(--fs-small); font-variant-numeric: tabular-nums; }
  .facts .num { font-family: var(--font-mono); }

  .links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s5); }
  .links a:not(.btn), .after a { font-size: var(--fs-note); font-weight: var(--w-ui); display: inline-block; padding-block: var(--s2); }

  .mosaic {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-rows: clamp(104px, 12.4vw, 168px);
    gap: var(--s4);
  }
  .shot {
    grid-column: span 2;
    display: block;
    overflow: clip;
    border-radius: var(--r-card);
    background: var(--well);
    cursor: zoom-in;
  }
  .shot picture, .shot img { width: 100%; height: 100%; object-fit: cover; }
  .shot:hover img { scale: 1.04; }
  .shot.flat { border: var(--border); }
  .shot.flat img { object-fit: contain; padding: var(--s3); }
  .shot.flat:hover img { scale: 1; }
  .m-big { grid-column: span 4; grid-row: span 2; }
  .m-plan { grid-column: span 2; grid-row: span 2; }
  .m-wide { grid-column: span 3; }
  .mosaic-b > .m-big { grid-column: 3 / span 4; grid-row: 1 / span 2; }
  .mosaic-c > .m-big { grid-column: span 3; grid-row: span 2; }
  .m-tall { grid-column: span 3; grid-row: span 2; }
  @media (max-width: 599px) {
    .mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 30vw; gap: var(--s3); }
    .shot, .m-wide { grid-column: span 1; }
    .m-big, .m-tall, .mosaic-b > .m-big, .mosaic-c > .m-big { grid-column: 1 / -1; grid-row: span 2; }
    .m-plan { grid-column: span 1; grid-row: span 2; }
    .mosaic-a > .m-plan + .shot { grid-column: span 1; }
    .mosaic-a > .shot:last-child, .mosaic-c > .shot:last-child { grid-column: 1 / -1; grid-row: span 2; }
  }

  /* ---------- steps: a real sequence. Each step hangs on one line, and the result is the largest ---------- */
  .steps {
    counter-reset: step;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 1.75fr);
    gap: var(--s6) var(--s5);
    align-items: start;
  }
  .steps > li {
    counter-increment: step;
    position: relative;
    display: grid;
    gap: var(--s3);
    align-content: start;
    padding-block-start: calc(var(--dot) + var(--s4));
  }
  .steps > li::before {
    content: counter(step);
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: 0;
    z-index: 1;
    display: grid;
    place-items: center;
    width: var(--dot);
    height: var(--dot);
    border: var(--border);
    border-radius: 50%;
    background: var(--brand-ground);
    font-family: var(--font-mono);
    font-size: var(--fs-tag);
    line-height: 1;
  }
  .steps > li:not(:last-child)::after {
    content: '';
    position: absolute;
    inset-block-start: calc(var(--dot) / 2 - 1px);
    inset-inline: var(--dot) calc(-1 * var(--s5));
    height: 2px;
    background: var(--ink);
  }
  .steps > li:last-child::before { background: var(--ink); color: var(--brand-ground); }
  .step-pic {
    aspect-ratio: 4 / 3;
    overflow: clip;
    border-radius: var(--r-card);
    background: var(--paper);
    margin-block-end: var(--s2);
  }
  .step-pic img { width: 100%; height: 100%; object-fit: cover; }
  .step-pic.flat { border: var(--border); background: var(--well); }
  .step-pic.flat img { object-fit: contain; padding: var(--s2); }
  .steps > li:last-child .step-pic { aspect-ratio: 3 / 2; }
  .steps p { font-size: var(--fs-small); line-height: 1.5; }
  @media (max-width: 1099px) {
    .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .steps > li:nth-child(even)::after { display: none; }
    .steps > li:last-child { grid-column: 1 / -1; }
  }
  @media (max-width: 599px) {
    .steps { grid-template-columns: minmax(0, 1fr); }
    .steps > li:not(:last-child)::after { display: none; }
    .steps .step-pic { aspect-ratio: 16 / 10; }
    .steps .step-pic.flat { aspect-ratio: 16 / 12; }
  }

  /* ---------- look around ---------- */
  .pano-wrap { position: relative; }
  .pano {
    position: relative;
    aspect-ratio: 2 / 1;
    overflow: clip;
    border: 2px solid var(--brand-ground);
    border-radius: var(--r-panel);
    background: var(--deep-ground);
  }
  .pano-poster, .pano-poster img, .pano-stage { position: absolute; inset: 0; width: 100%; height: 100%; }
  .pano-poster img { object-fit: cover; }
  .pano-stage canvas { width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
  .pano-stage canvas:active { cursor: grabbing; }
  .pano-stage:focus-visible { outline-offset: -6px; }
  .pano[data-state='live'] .pano-poster { visibility: hidden; }
  /* The button and the hint stand under the picture, not on it. */
  .pano-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); margin-block-start: var(--s4); }
  .pano-hint { color: var(--on-dark); font-size: var(--fs-small); line-height: 1.4; }
  @media (max-width: 599px) {
    .pano { aspect-ratio: 1 / 1; }
  }

  /* The rooms: three homes, three rooms each. Each room is a link to its picture. */
  .rooms {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--s6) var(--col-gap);
    margin-block-start: var(--s6);
    padding-block-start: var(--s5);
    border-block-start: 1px solid var(--on-dark-soft);
  }
  .rooms h3 { font-size: var(--fs-small); font-weight: var(--w-ui); letter-spacing: 0; margin-block-end: var(--s3); }
  .rooms ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
  .room { display: grid; gap: var(--s2); color: var(--on-dark); font-size: var(--fs-tag); font-weight: var(--w-ui); line-height: 1.25; text-decoration: none; }
  .room picture { aspect-ratio: 3 / 2; overflow: clip; border: 2px solid transparent; border-radius: var(--r-field); background: var(--deep-ground); }
  .room img { width: 100%; height: 100%; object-fit: cover; }
  .room:hover picture { border-color: var(--on-dark); }
  /* the room in the viewer: a frame and a line under its name, so the colour is not the only sign */
  .room[aria-current='true'] picture { border-color: var(--c-signal); }
  .room[aria-current='true'] span { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
  @media (max-width: 899px) {
    .rooms { grid-template-columns: minmax(0, 1fr); }
  }

  /* ---------- checks ---------- */
  .checks > li { padding-block: var(--s4); border-block-end: 1px solid var(--hair); display: grid; gap: var(--s1); }
  .checks > li:first-child { padding-block-start: 0; }
  .checks p { font-size: var(--fs-small); color: var(--ink-soft); line-height: 1.5; }

  /* ---------- what you get: two columns of rows; the file type is a tag in the mono face ---------- */
  .gets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--col-gap);
    border-block-start: var(--border);
  }
  .gets > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--s2) var(--s4);
    align-items: baseline;
    padding-block: var(--s5);
    border-block-end: 1px solid var(--hair);
  }
  .gets dt { font-size: var(--fs-item); font-weight: var(--w-head); line-height: 1.2; letter-spacing: -0.01em; }
  .kind-word { font-family: inherit; font-weight: var(--w-ui); } /* a word, not a file type: the text face */
  .kind {
    font-family: var(--font-mono);
    font-size: var(--fs-tag);
    padding: var(--s1) var(--s2);
    border: 1px solid var(--ink);
    border-radius: var(--r-field);
    line-height: 1.2;
  }
  .gets dd.kind-word { font-family: inherit; }
  .gets dd:not(.kind) { grid-column: 1 / -1; font-size: var(--fs-small); max-width: 44ch; }
  @media (max-width: 699px) {
    .gets { grid-template-columns: minmax(0, 1fr); }
  }

  /* ---------- price: the two ways to buy as a table, then the calculator with its example building ---------- */
  .rates { width: 100%; border-collapse: collapse; margin-block-end: var(--s7); }
  .rates th, .rates td { padding: var(--s4) var(--s4) var(--s4) 0; border-block-end: 1px solid var(--hair); text-align: start; vertical-align: baseline; font-size: var(--fs-small); font-weight: var(--w-text); line-height: 1.35; }
  .rates thead th { border-block-end: var(--border); font-size: var(--fs-item); font-weight: var(--w-head); letter-spacing: -0.01em; }
  .rates thead td { border-block-end: var(--border); }
  .rates tbody th { width: 30%; color: var(--ink-soft); }
  .rates .fig { font-family: var(--font-mono); font-size: var(--fs-item); font-weight: 500; }
  .rates-note { margin-block-start: var(--s5); max-width: 70ch; font-size: var(--fs-small); color: var(--ink-soft); }

  .calc {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--s6) var(--col-gap);
    padding: var(--s6);
    border: var(--border);
    border-radius: var(--r-panel);
    background: var(--brand-ground);
  }
  .calc-top { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s4) var(--s5); }
  .calc-top h3 { font-size: var(--fs-case); line-height: 1; letter-spacing: var(--ls-h2); }
  .presets { display: flex; flex-wrap: wrap; gap: var(--s2); }
  .scale-side, .calc-side { grid-column: span 6; display: grid; gap: var(--s4); align-content: start; }
  .calc-side { gap: var(--s5); }
  .scale { position: relative; aspect-ratio: 4 / 3; overflow: clip; border: var(--border); border-radius: var(--r-card); background: var(--paper); }
  .scale-poster, .scale-poster img, .scale-stage { position: absolute; inset: 0; width: 100%; height: 100%; }
  .scale-poster img { object-fit: cover; }
  .scale-stage canvas { width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
  .scale-stage canvas:active { cursor: grabbing; }
  .scale-stage:focus-visible { outline-offset: -6px; }
  .scale[data-state='live'] .scale-poster { visibility: hidden; }
  .scale-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); }
  .types { display: flex; flex-wrap: wrap; gap: var(--s2); min-width: 0; margin: 0; padding: 0; border: 0; }
  .types label { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding-inline: var(--s4); border: var(--border); border-radius: var(--r-pill); font-size: var(--fs-note); font-weight: var(--w-ui); line-height: 1; cursor: pointer; }
  .types input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
  .types label:has(input:checked) { background: var(--ink); color: var(--brand-ground); }
  .types label:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 3px; }
  .scale-hint { font-size: var(--fs-small); line-height: 1.4; max-width: 52ch; }
  .scale-facts { border-block-start-color: var(--ink); }
  .scale-facts > div[hidden] { display: none; }
  .scale-facts > div { border-block-end-color: var(--ink); grid-template-columns: 8.5rem minmax(0, 1fr); }
  .scale-facts dd { font-weight: var(--w-ui); }

  .calc-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s1) var(--s4); align-items: baseline; }
  .calc-field label { font-size: var(--fs-small); }
  .calc-field output { font-weight: var(--w-head); font-variant-numeric: tabular-nums; }
  .calc-field input { grid-column: 1 / -1; width: 100%; height: 28px; margin: 0; accent-color: var(--ink); cursor: ew-resize; }
  .sum { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s2) var(--s4); align-items: baseline; padding-block-start: var(--s4); border-block-start: 1px solid var(--ink); }
  .sum-total { font-size: var(--fs-item); font-weight: var(--w-head); font-variant-numeric: tabular-nums; }
  .sum-bar { grid-column: 1 / -1; display: block; height: 14px; overflow: clip; border: var(--border); border-radius: var(--r-pill); background: var(--well); }
  .sum-bar > span { display: block; width: calc(var(--share) * 1%); height: 100%; background: var(--ink); }
  .sum-how { grid-column: 1 / -1; font-family: var(--font-mono); font-size: var(--fs-tag); line-height: 1.4; }
  .verdict { display: grid; gap: var(--s2); padding: var(--s5); border-radius: var(--r-card); background: var(--ink); color: var(--on-dark); }
  .verdict p { max-width: none; font-size: var(--fs-small); line-height: 1.45; }
  .verdict .verdict-kicker { font-weight: var(--w-ui); }
  .verdict .verdict-head { color: var(--brand-ground); font-size: var(--fs-case); font-weight: var(--w-head); line-height: 1; letter-spacing: var(--ls-h2); }
  @media (max-width: 899px) {
    .calc { grid-template-columns: minmax(0, 1fr); padding: var(--s5); }
    .scale-side, .calc-side { grid-column: auto; }
  }
  @media (max-width: 599px) {
    .calc { padding: var(--s4); border-radius: var(--r-card); }
    .rates th, .rates td { padding-block: var(--s3); padding-inline-end: var(--s3); }
    .rates tbody th { width: 34%; }
    .rates thead th { font-size: var(--fs-small); }
    .rates .fig { font-size: var(--fs-small); }
  }

  /* ---------- questions ---------- */
  .faq { border-block-start: var(--border); }
  .faq details { border-block-end: 1px solid var(--hair); }
  .faq summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--s4);
    align-items: center;
    padding-block: var(--s5);
    font-size: var(--fs-item);
    font-weight: var(--w-head);
    line-height: 1.2;
    letter-spacing: -0.01em;
    cursor: pointer;
    list-style: none;
  }
  .faq summary::-webkit-details-marker { display: none; }
  .faq summary::before {
    content: '';
    width: var(--dot);
    height: var(--dot);
    border: var(--border);
    border-radius: 50%;
    background:
      linear-gradient(var(--ink), var(--ink)) center / 12px 2px no-repeat,
      linear-gradient(var(--ink), var(--ink)) center / 2px 12px no-repeat,
      var(--brand-ground);
  }
  .faq details[open] > summary::before { rotate: 45deg; }
  .faq summary:hover { text-decoration: underline; text-decoration-color: var(--c-signal); text-decoration-thickness: 3px; text-underline-offset: 0.25em; }
  .faq details > p { padding: 0 0 var(--s5) calc(var(--dot) + var(--s4)); }

  /* ---------- closing and footer ---------- */
  .closing { padding-block: 0 var(--pad-y); }
  .closing-panel {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--s6) var(--col-gap);
    align-items: end;
    padding: clamp(var(--s6), 6vw, var(--s8));
    border: var(--border);
    border-radius: var(--r-panel);
    background: var(--brand-ground);
  }
  .closing-say { grid-column: span 7; display: grid; gap: var(--s5); }
  .needs { grid-column: span 5; display: grid; gap: var(--s4); }
  .need-list { border-block-start: var(--border); }
  .need-list > li { padding-block: var(--s3); border-block-end: var(--border); font-size: var(--fs-small); font-weight: var(--w-ui); line-height: 1.3; }
  .contact { font-size: var(--fs-small); }
  .contact a { font-weight: var(--w-ui); }
  @media (max-width: 899px) {
    .closing-say, .needs { grid-column: 1 / -1; }
  }

  .foot { background: var(--deep-ground); color: var(--on-dark); padding-block: var(--s7); }
  .foot-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s5) var(--col-gap); align-items: start; }
  .foot-grid > .brand { grid-column: span 3; }
  .foot-grid > p { grid-column: span 5; font-size: var(--fs-small); color: var(--on-dark-soft); }
  .foot-grid > .foot-nav { grid-column: span 4; }
  @media (max-width: 899px) {
    .foot-grid > .brand, .foot-grid > p, .foot-grid > .foot-nav { grid-column: 1 / -1; }
  }

  /* ---------- larger picture ---------- */
  .zoom {
    width: min(96vw, 1536px, 92dvh * 1.5);
    max-height: 94dvh;
    padding: 0;
    border: var(--border);
    border-radius: var(--r-card);
    background: var(--well);
    overflow: clip;
  }
  .zoom:modal { overscroll-behavior: contain; }
  .zoom::backdrop { background: var(--shade); overscroll-behavior: contain; overflow: hidden; }
  .zoom img { width: 100%; max-height: 92dvh; object-fit: contain; }
  .zoom-close { position: absolute; inset-block-start: var(--s4); inset-inline-end: var(--s4); background: var(--well); }
}

/* Everything that moves is here, and only for a person who has not asked for less motion.
   Without this layer each state still changes, at once. */
@layer motion {
  @media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }

    /* The opening (owner, 2026-11-30): the mark on the brand ground, a wipe, then the hero comes in part by part,
       and last the line crosses the hero picture once. CSS only, so it also runs without scripts. */
    .intro {
      position: fixed;
      inset: 0;
      z-index: 100;
      display: grid;
      place-items: center;
      background: var(--brand-ground);
      pointer-events: none;
      animation: intro-out 600ms var(--ease-brand) 550ms both;
    }
    .intro img { width: min(220px, 50vw); height: auto; animation: rise 450ms var(--ease-brand) both; }
    .hero h1 { animation: rise 700ms var(--ease-brand) 850ms backwards; }
    .hero-say { animation: rise 700ms var(--ease-brand) 1000ms backwards; }
    .hero-grid > .sheet { animation: wipe-in 900ms var(--ease-brand) 1050ms backwards; }
    .hero-facts { animation: rise 700ms var(--ease-brand) 1250ms backwards; }
    .compare[data-sweep] { animation: sweep var(--t-focal) var(--ease-brand) 1900ms both; }

    /* Sections come in when they reach the screen (owner, 2026-11-30). js/site.js sets .reveal on parts below
       the first screen, and .in when a part is on the screen. Text rises; pictures are wiped in, as the line does. */
    .reveal {
      opacity: 0;
      translate: 0 32px;
      transition: opacity 700ms var(--ease-brand), translate 700ms var(--ease-brand);
      transition-delay: calc(var(--i, 0) * 90ms);
    }
    .reveal.in { opacity: 1; translate: none; }
    /* The wipe is on the picture inside, not on the part itself: a part that is clipped to nothing never
       counts as "on the screen" for the observer in js/site.js. */
    .mosaic > .shot.reveal, .pano-wrap.reveal { opacity: 1; translate: none; transition: none; }
    .mosaic > .shot.reveal > picture, .pano-wrap.reveal > .pano {
      clip-path: inset(0 100% 0 0);
      transition: clip-path 900ms var(--ease-brand);
      transition-delay: calc(var(--i, 0) * 90ms);
    }
    .mosaic > .shot.reveal.in > picture, .pano-wrap.reveal.in > .pano { clip-path: inset(0 0 0 0); }

    .btn { transition: color var(--t-state) var(--ease-out); }
    .btn::before { transition: transform var(--t-state) var(--ease-out); }
    .nav a, .foot-nav a { transition: background-size var(--t-state) var(--ease-out); }
    .split > .knob { transition: scale var(--t-feedback) var(--ease-out); }
    .shot img { transition: scale 600ms var(--ease-out); }
    .faq summary::before { transition: rotate var(--t-state) var(--ease-out); }

    .faq details { interpolate-size: allow-keywords; }
    .faq details::details-content {
      block-size: 0;
      overflow: clip;
      contain: layout;
      transition: block-size var(--t-state) var(--ease-out), content-visibility var(--t-state) allow-discrete;
    }
    .faq details[open]::details-content { block-size: auto; }
  }
  @media (prefers-reduced-motion: reduce) {
    .shot:hover img, .compare:hover .split > .knob, .compare:active .split > .knob { scale: 1; }
  }
  @keyframes intro-out {
    from { clip-path: inset(0 0 0 0); }
    to { clip-path: inset(0 0 0 100%); visibility: hidden; }
  }
  @keyframes rise {
    from { opacity: 0; translate: 0 28px; }
  }
  @keyframes wipe-in {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0 0 0 0); }
  }
  @media print {
    .intro { display: none; }
    .reveal, .reveal > * { opacity: 1; translate: none; clip-path: none; }
  }
  @keyframes sweep {
    from { --pos: 100%; }
    to { --pos: 46%; }
  }
}

/* Third pass: fixes after the second critic. */
@layer parts {
  /* Twelve tracks and their eleven gaps do not fit a narrow box: one column below 900 px. */
  @media (max-width: 899px) {
    .hero-grid, .case, .split-row, .split-head, .head-row, .closing-panel, .foot-grid { grid-template-columns: minmax(0, 1fr); }
    .head-row > h2, .head-row > .lead { grid-column: auto; }
  }

  .menu-btn { display: none; }
  /* phone: the mark and a Menu button; the sections open as a popover.
     Without popover support the links stay in the page, as a wrapped row. */
  @supports selector(:popover-open) {
    @media (max-width: 599px) {
      .top { padding-block: var(--s4); }
      .top > .menu-btn { display: inline-flex; }
      .nav[popover] {
        position: fixed;
        inset: var(--menu-top) var(--pad-x) auto;
        width: auto;
        margin: 0;
        padding: var(--s2) var(--s5);
        border: var(--border);
        border-radius: var(--r-card);
        background: var(--well);
        color: var(--ink);
        flex-direction: column;
      }
      .nav[popover]:not(:popover-open) { display: none; }
      .nav[popover]::backdrop { background: var(--shade); }
      .nav[popover] a { padding-block: var(--s4); font-size: var(--fs-item); background: none; border-block-end: 1px solid var(--hair); }
      .nav[popover] a:last-child { border-block-end: 0; }
    }
  }
  @media (min-width: 600px) {
    .nav[popover] { display: flex; position: static; inset: auto; width: auto; height: auto; margin: 0; padding: 0; border: 0; background: none; color: inherit; overflow: visible; }
  }

  .split-head > .head p { font-size: var(--fs-small); }
  .split-head > .head a, .contact a { display: inline-block; padding-block: var(--s1); }

  /* the main deliveries: the 3D model is large and can be turned; stills and panoramas stand beside it */
  .deliver { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s6) var(--col-gap); align-items: start; margin-block-end: var(--s7); }
  .model-tile { grid-column: span 8; display: grid; gap: var(--s3); align-content: start; }
  .deliver > .tiles { grid-column: span 4; }
  .model { position: relative; aspect-ratio: 16 / 10; overflow: clip; border: var(--border); border-radius: var(--r-panel); background: var(--paper); }
  .model-poster, .model-poster img, .model-stage { position: absolute; inset: 0; width: 100%; height: 100%; }
  .model-poster img { object-fit: cover; }
  .model-stage canvas { width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
  .model-stage canvas:active { cursor: grabbing; }
  .model-stage:focus-visible { outline-offset: -6px; }
  .model[data-state='live'] .model-poster { visibility: hidden; }
  .model-bar, .model-views { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
  .model-views[hidden] { display: none; }
  .model-hint { font-size: var(--fs-small); color: var(--ink-soft); max-width: 62ch; }
  .tiles { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s6) var(--s5); }
  .tiles > li { display: grid; gap: var(--s3); align-content: start; }
  .tiles picture { aspect-ratio: 16 / 10; overflow: clip; border-radius: var(--r-card); margin-block-end: var(--s2); background: var(--paper); }
  .tiles img { width: 100%; height: 100%; object-fit: cover; }
  .tile-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--s2) var(--s4); }
  .tiles p, .model-tile > p:last-child { font-size: var(--fs-small); }
  @media (max-width: 899px) {
    .deliver { grid-template-columns: minmax(0, 1fr); }
    .model-tile, .deliver > .tiles { grid-column: auto; }
    .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  @media (max-width: 599px) {
    .tiles { grid-template-columns: minmax(0, 1fr); }
    .model { aspect-ratio: 1 / 1; }
  }

  /* phone: each step is one row, the picture beside the text. Nothing to swipe. */
  @media (max-width: 599px) {
    .hero { padding-block-start: var(--s2); }
    .hero-grid { row-gap: var(--s5); }
    .steps > li { grid-template-columns: 104px minmax(0, 1fr); column-gap: var(--s4); padding-block-start: 0; }
    .steps > li::before { inset: var(--s2) auto auto var(--s2); }
    .steps > li > .step-pic, .steps > li > .step-pic.flat, .steps > li:last-child > .step-pic { grid-row: 1 / span 2; aspect-ratio: 1 / 1; margin: 0; }
    .steps > li > h3 { grid-column: 2; align-self: end; }
    .steps > li > p { grid-column: 2; }
    .steps > li:last-child { grid-column: auto; }
    .closing-panel { padding: var(--s5); }
    .case + .case { margin-block-start: var(--s7); }
  }
}

/* Fourth pass. */
@layer parts {
  @media (min-width: 900px) {
    .hero-grid > .sheet > .compare { aspect-ratio: auto; height: 100%; }
  }
  /* the action in the open menu of the phone; on wider screens the top has its own button */
  .nav > .nav-cta { display: none; }
  @supports selector(:popover-open) {
    @media (max-width: 599px) {
      .nav[popover] > .nav-cta { display: inline-flex; margin-block: var(--s4); font-size: var(--fs-note); border: var(--border); background: var(--ink); padding-block: 0; }
    }
  }
}
