/* Kancelaria Wierzbowa
   Design read: concept landing page for a radca prawny office in Wrocław, for business owners and
   private clients; editorial-legal with one live 3D centrepiece. Dials: variance 7, motion 8, density 3.

   Theme: one deliberate switch (allowed once). The hero is night: the scales under a lamp, in deep navy.
   When the story reaches balance, the page eases into daylight through the maxims band, and stays light:
   the paper of a code, printed in black, with the jabot navy as the accent. ".theme-dark" scopes the
   few night surfaces (hero, interlude, two cards, two tiles); everything else uses the light tokens.
   Accent lock: Pantone 289, the radca prawny's jabot, in one family (navy surfaces, navy text on paper,
   pale blue text on night).
   Shape lock: pressable things are pills; photos and surfaces 14px; inputs underlined.
   Type: Newsreader (Polish acts must be set in Times New Roman "or a similar typeface"), IBM Plex Mono
   only for interface labels. Icons: Phosphor light. */
:root {
  /* light (default): the page of a code */
  --bg: #EDEFF2;          /* cool paper, no cream */
  --surface: #F7F8FA;     /* raised paper */
  --surface-2: #E3E7ED;   /* sunk paper */
  --fg: #121722;          /* print black */
  --mute: #4A5263;        /* 7.3:1 on --bg */
  --line: rgba(18, 23, 34, 0.12);
  --accent: #163A6B;      /* jabot navy, readable as text on paper */
  --cta-bg: #0C2340;      /* Pantone 289 */
  --cta-bg-hover: #163A6B;
  --cta-fg: #EEF1F5;
  --ghost: rgba(18, 23, 34, 0.28);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 18px 40px -18px rgba(12, 35, 64, 0.28);
  --err: #A3332A;

  --navy: #0C2340;
  --navy-2: #163A6B;
  --night: #10141B;       /* the hero: graphite, a dark desk rather than a night sky */
  --night-2: #171C25;

  --f-serif: "Newsreader", "Times New Roman", Times, serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --gutter: clamp(16px, 3.4vw, 48px);
  --max: 1360px;
  --r: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  color-scheme: light;
}
/* night surfaces */
.theme-dark {
  --bg: var(--night);
  --surface: var(--night-2);
  --surface-2: #1A2740;
  --fg: #EEF1F5;
  --mute: rgba(238, 241, 245, 0.72);
  --line: rgba(238, 241, 245, 0.14);
  --accent: #A9C1E2;
  --cta-bg: #EEF1F5;
  --cta-bg-hover: #FFFFFF;
  --cta-fg: #0E1522;
  --ghost: rgba(238, 241, 245, 0.34);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 24px 50px -20px rgba(4, 9, 18, 0.6);
  --err: #F0A49A;
  color: var(--fg);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 1.0625rem/1.6 var(--f-serif); font-optical-sizing: auto; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 80; background: var(--cta-bg); color: var(--cta-fg); padding: 10px 14px; border-radius: 999px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* z-index scale: content 1-4, menu 55, nav 60, grain 70. Grain is fixed and never scrolls. */
.grain { position: fixed; inset: 0; z-index: 70; pointer-events: none; opacity: 0.045; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ------------------------------------------------------------------ Buttons
   Colour lives on a solid layer: navy on paper, paper on night. Feedback on press, not release. */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; height: 48px; padding: 0 24px; border-radius: 999px; border: 1px solid transparent; text-decoration: none; white-space: nowrap; cursor: pointer;
  font: 500 0.8125rem/1 var(--f-mono); letter-spacing: 0.04em; text-transform: uppercase; transition: background-color 250ms ease, border-color 250ms ease, color 250ms ease; }
.btn span { display: inline-block; pointer-events: none; transition: transform 120ms ease-out; }
.btn:active span { transform: scale(0.96); }
.btn-lg { height: 56px; padding: 0 30px; }
.btn-primary { background: var(--cta-bg); color: var(--cta-fg); box-shadow: 0 10px 24px -12px rgba(12, 35, 64, 0.5); }
.btn-primary:hover { background: var(--cta-bg-hover); }
.btn-ghost { border-color: var(--ghost); color: var(--fg); }
.btn-ghost:hover { border-color: var(--fg); }

/* ------------------------------------------------------------------ Nav
   A translucent layer. Night material over the hero, paper material over the day; the change eases.
   No hard rule under it: a soft scroll-edge fade. */
.nav-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 40px; pointer-events: none; }
.nav { position: fixed; z-index: 60; top: 0; left: 0; right: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; height: 72px; padding: 0 var(--gutter); color: var(--fg); transition: color 500ms ease; }
.nav::before { content: ""; position: absolute; inset: 0 0 -24px; z-index: -1; pointer-events: none; opacity: 0; transition: opacity 400ms ease, background-color 500ms ease;
  background: rgba(237, 239, 242, 0.76); backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
  -webkit-mask: linear-gradient(#000 calc(100% - 24px), transparent); mask: linear-gradient(#000 calc(100% - 24px), transparent); }
.nav.theme-dark::before { background: rgba(14, 21, 34, 0.7); }
.nav.is-stuck::before { opacity: 1; }
.logo { justify-self: start; display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); font: italic 400 1.25rem/1 var(--f-serif); color: var(--accent); transition: color 500ms ease, border-color 500ms ease; }
.logo-name { font: 400 1.375rem/1 var(--f-serif); letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { position: relative; padding: 8px 14px 8px 20px; border-radius: 999px; text-decoration: none; font-size: 1rem; color: var(--mute); transition: color 250ms ease, background-color 250ms ease; }
.nav-links a:hover, .nav-links a.is-current { color: var(--fg); background: color-mix(in srgb, var(--fg) 7%, transparent); }
.nav-links a::before { content: "§"; position: absolute; left: 7px; top: 50%; font-style: italic; color: var(--accent); opacity: 0; transform: translate(4px, -50%); transition: opacity 300ms ease, transform 400ms var(--ease); }
.nav-links a.is-current::before { opacity: 1; transform: translate(0, -50%); }
.nav-actions { justify-self: end; display: flex; align-items: center; gap: 10px; }
.nav .btn { height: 42px; padding: 0 18px; }
.menu-btn { display: none; position: relative; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 50%; background: color-mix(in srgb, var(--bg) 60%, transparent); cursor: pointer; }
.menu-btn span { position: absolute; left: 14px; right: 14px; height: 1px; background: var(--fg); transition: transform 400ms var(--ease), top 400ms var(--ease); }
.menu-btn span:first-child { top: 19px; } .menu-btn span:last-child { top: 26px; }
.menu-btn[aria-expanded="true"] span:first-child { top: 22.5px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { top: 22.5px; transform: rotate(-45deg); }
/* The menu grows out of its button and closes back into it (same path both ways). */
.menu { position: fixed; z-index: 55; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 100px var(--gutter) 32px; background: var(--bg); color: var(--fg);
  clip-path: circle(0 at calc(100% - var(--gutter) - 23px) 36px); transition: clip-path 650ms var(--ease-io); }
.menu.is-open { clip-path: circle(150% at calc(100% - var(--gutter) - 23px) 36px); }
.menu nav { display: grid; }
.menu nav a { padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; font: 300 2.25rem/1.1 var(--f-serif); letter-spacing: -0.03em; }
.menu-cta { align-self: stretch; }
@media (max-width: 1080px) { .nav { grid-template-columns: 1fr auto; } .nav-links { display: none; } .menu-btn { display: block; } }
@media (min-width: 1081px) { .menu { display: none; } }
@media (max-width: 560px) { .nav .btn { display: none; } }
@media (prefers-reduced-transparency: reduce) { .nav::before { background: var(--bg); backdrop-filter: none; -webkit-backdrop-filter: none; } }
@media (prefers-reduced-motion: reduce) { .menu { transition: opacity 200ms linear; clip-path: none; opacity: 0; } .menu.is-open { opacity: 1; } }

/* ------------------------------------------------------------------ Hero: night
   Pinned for the scroll story. dvh so the phone address bar never makes it jump. */
.hero { position: relative; height: 300dvh; background: var(--night); }
.hero-pin { --rigw: min(82dvh, 46vw, 860px); --rigtop: calc(50% - var(--rigw) * 0.46); position: sticky; top: 0; height: 100dvh; min-height: 600px; overflow: hidden;
  background: linear-gradient(135deg, #1C222C 0%, var(--night-2) 38%, var(--night) 72%, #0B0E13 100%); }
.hero-light { position: absolute; inset: 0; pointer-events: none;
  /* a desk lamp from the upper left: a plain directional falloff, no halo */
  background: linear-gradient(118deg, rgba(255, 246, 228, 0.07) 0%, rgba(255, 246, 228, 0) 46%); z-index: 1; }

/* A page of the Civil Code behind the scales: real articles, set in the same serif, barely there.
   It fades out toward the headline so the copy always sits on a calm field. */
.hero-code { position: absolute; inset: 0; padding: 110px var(--gutter) 40px 38vw; color: rgba(232, 234, 238, 0.085); pointer-events: none;
  -webkit-mask: linear-gradient(90deg, transparent 30%, #000 58%); mask: linear-gradient(90deg, transparent 30%, #000 58%);
  transform: translateY(calc(var(--cp, 0) * -60px)); }
.code-title { margin: 0 0 22px; font: 500 0.8125rem/1 var(--f-serif); letter-spacing: 0.24em; text-transform: uppercase; text-align: center; }
.code-cols { columns: 3 15rem; column-gap: 34px; column-rule: 1px solid rgba(232, 234, 238, 0.05); font: 400 0.9375rem/1.62 var(--f-serif); text-align: justify; hyphens: auto; }
.code-cols p { margin: 0 0 0.9em; }
.code-cols b { font-weight: 600; }
.code-cols sup { font-size: 0.65em; }
/* The scales: four layers of one photograph. The rig is a square sized to the screen height;
   the photo is graded down from studio gold to brass under a lamp, with a soft floor shadow. */
.scales { position: absolute; inset: 0; z-index: 2; perspective: 1600px; touch-action: pan-y; }
/* The desk: its far edge runs just behind the base, the surface falls toward the viewer, a lamp pool sits
   under the scales and a thin highlight marks the edge. */
.desk { position: absolute; left: 0; right: 0; bottom: 0; top: calc(var(--rigtop) + var(--rigw) * 0.8); z-index: 1;
  background:
    radial-gradient(38% 60% at calc(100% - max(var(--gutter), 5vw) - var(--rigw) * 0.5) 18%, rgba(255, 236, 205, 0.07), rgba(255, 236, 205, 0) 70%),
    repeating-linear-gradient(178deg, rgba(255, 255, 255, 0.012) 0 2px, rgba(0, 0, 0, 0.018) 2px 7px),
    linear-gradient(180deg, #1E1A17 0%, #16130F 30%, #0E0C0A 100%);
  box-shadow: inset 0 1px 0 rgba(255, 238, 214, 0.1), 0 -30px 60px -20px rgba(0, 0, 0, 0.55); }
.desk::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 22%; background: linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0)); }
/* the reflection: mirrored at the base's contact line (96% of the image), fading within a short distance */
.rig .reflect { position: absolute; inset: 0; transform-origin: 50% 96.2%; transform: scaleY(-1); opacity: 0.32; filter: blur(1.2px) brightness(0.8);
  -webkit-mask: linear-gradient(180deg, transparent 74%, rgba(0, 0, 0, 0.9) 95.6%, transparent 96.2%); mask: linear-gradient(180deg, transparent 74%, rgba(0, 0, 0, 0.9) 95.6%, transparent 96.2%); }
.rig .reflect img { filter: none; }
.rig { position: absolute; right: max(var(--gutter), 5vw); top: var(--rigtop); width: var(--rigw); aspect-ratio: 1; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  filter: saturate(0.8) brightness(0.9) contrast(1.06) sepia(0.12); }
.rig img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; user-select: none; -webkit-user-drag: none; pointer-events: none; will-change: transform;
  filter: drop-shadow(0 22px 26px rgba(4, 9, 18, 0.45)); }
.rig .s-beam { transform-origin: 50% 19.54%; }                   /* the pivot knob: (627, 245) of 1254 */
.rig .s-pan-l { transform-origin: 19.54% 22.81%; }                /* left hook: (245, 286) */
.rig .s-pan-r { transform-origin: 80.46% 22.81%; }                /* right hook: (1009, 286) */
.rig .s-pan { transition: filter 600ms ease; }
.rig .s-pan.is-lit { filter: drop-shadow(0 22px 26px rgba(4, 9, 18, 0.45)) brightness(1.28); transition-duration: 120ms; }
/* floor shadow under the base; the lamp's warm pool is painted behind, in .hero-light */
.rig::before { content: ""; position: absolute; left: 26%; right: 26%; bottom: 1.5%; height: 6%; border-radius: 50%; background: radial-gradient(closest-side, rgba(3, 7, 14, 0.75), rgba(3, 7, 14, 0)); transform: translateZ(-1px); }
/* The lower edge melts into the night the dawn band starts from, so there is no seam. */
.hero-pin::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22%; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(14, 21, 34, 0), var(--night)); }
@media (max-width: 900px) {
  .hero-code { padding: 90px var(--gutter) 0; -webkit-mask: linear-gradient(180deg, #000 20%, transparent 62%); mask: linear-gradient(180deg, #000 20%, transparent 62%); }
  .code-cols { columns: 2 9rem; column-gap: 18px; font-size: 0.75rem; }
  .hero-pin { --rigw: min(88vw, 58dvh); --rigtop: 9%; }
  .rig { right: 50%; transform: translateX(50%) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
}
.scales-tip { position: fixed; left: 0; top: 0; z-index: 4; margin: 0; padding: 8px 14px; border-radius: 999px; background: rgba(20, 32, 53, 0.86); border: 1px solid rgba(238, 241, 245, 0.16); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  font: 400 0.875rem/1.2 var(--f-serif); color: #EEF1F5; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity 300ms ease; }
.scales-tip.is-on { opacity: 1; }

.hero-copy, .hero-story { position: absolute; left: var(--gutter); bottom: clamp(36px, 9dvh, 96px); max-width: min(720px, 56vw); z-index: 2; }
.hero-copy { transition: opacity 500ms ease, transform 700ms var(--ease); }
.hero.is-story .hero-copy { opacity: 0; transform: translateY(-24px); pointer-events: none; }
.hero-title { margin: 0; font-weight: 300; font-size: clamp(3.25rem, min(7vw, 11.5dvh), 7rem); line-height: 1.04; letter-spacing: -0.035em; font-variation-settings: "opsz" 72; padding-bottom: 0.08em; }
.hero-title .ln { display: block; white-space: nowrap; }
.hero-title em { font-style: italic; color: var(--accent); }
.hero-title .ch { display: inline-block; font-variation-settings: "opsz" 72, "wght" var(--w, 300); }
.hero-lead { margin: 22px 0 0; max-width: 40ch; font-size: clamp(1.0625rem, 1.25vw, 1.25rem); line-height: 1.5; color: var(--mute); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.hero-story { list-style: none; margin: 0; padding: 0; height: 12rem; pointer-events: none; }
.hero-story li { position: absolute; left: 0; bottom: 0; opacity: 0; transform: translateY(28px); transition: opacity 500ms ease, transform 800ms var(--ease); }
.hero-story li.is-on { opacity: 1; transform: none; }
.hero-story b { display: block; font: italic 300 clamp(3rem, min(6.4vw, 11dvh), 6.25rem)/1.05 var(--f-serif); letter-spacing: -0.035em; padding-bottom: 0.06em; }
.hero-story span { display: block; margin-top: 14px; font-size: clamp(1.0625rem, 1.3vw, 1.25rem); color: var(--mute); max-width: 32ch; }

@media (max-width: 900px) {
  .hero { height: 260dvh; }
  .hero-copy, .hero-story { right: var(--gutter); max-width: none; bottom: 28px; }
  .hero-title { font-size: clamp(2.75rem, 12.5vw, 4.75rem); }
  .hero-lead { font-size: 1rem; margin-top: 16px; }
  .hero-ctas { margin-top: 20px; }
}
@media (max-width: 560px) { .hero-ctas .btn-ghost { display: none; } .hero-ctas .btn { flex: 1; } }

/* ------------------------------------------------------------------ Dawn: the one theme switch.
   A long, eased gradient from the hero's night to the paper of the day, with the maxims riding in it. */
.dawn { position: relative; padding: clamp(140px, 22dvh, 240px) 0 clamp(48px, 8dvh, 96px);
  background: linear-gradient(180deg, var(--night) 0%, #262C37 28%, #6E7582 52%, #C5CAD3 74%, var(--bg) 100%); }
.maxims { position: relative; overflow: hidden; padding: 20px 0; }
.maxims-track { display: flex; align-items: center; gap: 40px; width: max-content; font: italic 300 clamp(2rem, 4.2vw, 3.75rem)/1.1 var(--f-serif); letter-spacing: -0.02em; white-space: nowrap; color: #16263F; will-change: transform; }
.maxims-track i { font-style: normal; color: var(--accent); font-size: 0.6em; }

/* ------------------------------------------------------------------ Shared section heads */
section { scroll-margin-top: 72px; }
.sec-head { max-width: 760px; }
.h2 { margin: 0; font: 300 clamp(2.5rem, 5.4vw, 5.25rem)/1.04 var(--f-serif); letter-spacing: -0.032em; font-variation-settings: "opsz" 72; text-wrap: balance; padding-bottom: 0.06em; }
.sec-lead { margin: 18px 0 0; max-width: 44ch; font-size: clamp(1.0625rem, 1.3vw, 1.25rem); line-height: 1.5; color: var(--mute); }

/* Reveal: words of a heading rise into place once; other blocks fade up. */
.js [data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.js [data-split] .w > span { display: inline-block; transform: translateY(105%); transition: transform 1000ms var(--ease); transition-delay: calc(var(--k) * 45ms); }
.js [data-split].is-in .w > span { transform: none; }
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 800ms var(--ease), transform 1000ms var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ------------------------------------------------------------------ Specializations: photo accordion */
.specs { padding: clamp(56px, 8vw, 120px) var(--gutter) clamp(80px, 10vw, 140px); max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; }
.acc { margin-top: clamp(40px, 5vw, 72px); display: flex; gap: 10px; height: min(72dvh, 680px); }
.acc-panel { position: relative; flex: 1 1 0; min-width: 0; overflow: hidden; border-radius: var(--r); background: var(--surface-2); transition: flex-grow 700ms var(--ease-io); isolation: isolate; color: #F4F6F9; box-shadow: var(--shadow); }
.acc-panel.is-open { flex-grow: 4.2; }
.acc-panel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transform: scale(1.08); filter: brightness(0.82) saturate(0.85); transition: transform 900ms var(--ease), filter 700ms ease; }
.acc-panel.is-open img { transform: scale(1); filter: brightness(0.98) saturate(0.95); }
.acc-panel::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(14, 21, 34, 0) 45%, rgba(14, 21, 34, 0.82) 100%); }
.acc-panel h3 { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; }
.acc-panel button { display: block; width: 100%; padding: 22px; border: 0; background: none; text-align: left; cursor: pointer; font: 400 clamp(1.25rem, 1.6vw, 1.5rem)/1.15 var(--f-serif); letter-spacing: -0.02em; transition: padding 500ms var(--ease); }
.acc-panel button::after { content: ""; position: absolute; inset: -1000px 0 0; } /* the whole panel is the button's target */
.acc-panel button:focus-visible { outline-color: #F4F6F9; outline-offset: -6px; }
.acc-panel.is-open button { font-size: clamp(1.75rem, 2.8vw, 2.75rem); padding-bottom: 92px; }
.acc-body { position: absolute; left: 22px; right: 22px; bottom: 22px; max-width: 44ch; opacity: 0; transform: translateY(10px); transition: opacity 400ms ease, transform 600ms var(--ease); pointer-events: none; }
.acc-body p { margin: 0; color: rgba(244, 246, 249, 0.86); }
.acc-panel.is-open .acc-body { opacity: 1; transform: none; transition-delay: 180ms; }
@media (max-width: 900px) {
  .acc { flex-direction: column; height: auto; }
  .acc-panel { flex: none; height: 76px; transition: height 600ms var(--ease-io); }
  .acc-panel.is-open { height: 340px; }
  .acc-panel button { padding: 24px 18px; }
  .acc-panel.is-open button { padding-bottom: 96px; }
  .acc-body { left: 18px; right: 18px; }
}

/* ------------------------------------------------------------------ Interlude: a photograph, so it stays dark in the light page
   The frame opens to full bleed as it scrolls in (CSS scroll-driven where supported, static elsewhere). */
.interlude { position: relative; height: 100dvh; min-height: 560px; overflow: hidden; background: var(--bg); }
.interlude-media { position: absolute; inset: 0; overflow: hidden; }
.interlude-media img { width: 100%; height: 100%; object-fit: cover; }
.interlude-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 21, 34, 0.15), rgba(14, 21, 34, 0.75)); }
.interlude-quote { position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(40px, 12dvh, 120px); margin: 0; z-index: 2; }
.interlude-quote p { margin: 0; font: italic 300 clamp(3rem, 9vw, 9rem)/1.02 var(--f-serif); letter-spacing: -0.04em; padding-bottom: 0.08em; }
.interlude-quote footer { margin-top: 20px; max-width: 46ch; font-size: clamp(1rem, 1.3vw, 1.1875rem); color: var(--mute); }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .interlude { background: #EDEFF2; } /* the paper shows around the frame while it opens */
    .interlude-media { animation: open-frame linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }
    .interlude-media img { animation: drift linear both; animation-timeline: view(); }
  }
}
@keyframes open-frame { from { clip-path: inset(12% var(--gutter) 12% var(--gutter) round var(--r)); } to { clip-path: inset(0 0 0 0 round 0); } }
@keyframes drift { from { transform: scale(1.14) translateY(-3%); } to { transform: scale(1.02) translateY(3%); } }

/* ------------------------------------------------------------------ How we work: sticky stack */
.process { padding: clamp(96px, 12vw, 180px) var(--gutter) clamp(64px, 8vw, 120px); max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; }
.stack { list-style: none; margin: clamp(40px, 5vw, 72px) 0 0; padding: 0; display: grid; gap: 28px; }
/* Number top right, words bottom left: the card has no dead area. */
.card { position: sticky; top: calc(96px + var(--i, 0) * 18px); display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 1fr auto; gap: 24px clamp(20px, 4vw, 64px); min-height: min(52dvh, 440px); padding: clamp(28px, 4vw, 52px); border-radius: var(--r); overflow: hidden;
  background: var(--surface); color: var(--fg); box-shadow: var(--shadow);
  transform-origin: 50% 0; transform: scale(var(--s, 1)); will-change: transform; }
.card:nth-child(1) { --i: 0; } .card:nth-child(2) { --i: 1; } .card:nth-child(3) { --i: 2; } .card:nth-child(4) { --i: 3; }
.card-text { grid-column: 1; grid-row: 2; align-self: end; transition: opacity 200ms linear; opacity: var(--o, 1); }
.card h3 { margin: 0; font: 300 clamp(2.25rem, 4.4vw, 4.25rem)/1.04 var(--f-serif); letter-spacing: -0.03em; padding-bottom: 0.06em; }
.card-text p { margin: 14px 0 0; max-width: 42ch; color: var(--mute); font-size: clamp(1.0625rem, 1.3vw, 1.1875rem); }
.card-big { grid-column: 2; grid-row: 1 / span 2; align-self: start; margin: 0; font: 300 clamp(4rem, 9vw, 8.5rem)/1 var(--f-serif); letter-spacing: -0.05em; color: var(--accent); padding-bottom: 0.08em; }
.card-big em { font-size: 0.6em; }
.card-navy { background: radial-gradient(120% 120% at 100% 0%, var(--navy-2) 0%, var(--navy) 50%, #091A30 100%); }
.card-navy .card-big { color: #EEF1F5; }
.card-photo img { grid-column: 2; grid-row: 1 / span 2; width: min(38vw, 420px); height: 100%; min-height: 240px; object-fit: cover; border-radius: calc(var(--r) - 4px); }
.card-ink { background: var(--surface-2); }
.card-raised { background: linear-gradient(160deg, #1F3354, var(--night-2)); }
@media (max-width: 760px) {
  .card { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; min-height: 0; top: calc(84px + var(--i, 0) * 12px); }
  .card-big { grid-column: 1; grid-row: 1; }
  .card-text { grid-row: 2; }
  .card-photo img { grid-column: 1; grid-row: 1; width: 100%; height: 200px; min-height: 0; }
}

/* ------------------------------------------------------------------ Fees: bento, exactly five cells */
.fees { padding: clamp(96px, 12vw, 180px) var(--gutter); max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; }
.bento { list-style: none; margin: clamp(40px, 5vw, 72px) 0 0; padding: 0; display: grid; grid-template-columns: 1.25fr 1fr 1fr; grid-template-rows: auto auto; gap: 12px; }
.tile { position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 250px; padding: clamp(22px, 2.6vw, 34px); border-radius: var(--r); background: var(--surface); color: var(--fg); box-shadow: var(--shadow); overflow: hidden; isolation: isolate; }
.tile h3 { margin: 0; font: 400 1.25rem/1.25 var(--f-serif); letter-spacing: -0.01em; max-width: 22ch; }
.tile p { margin: 0; color: var(--mute); max-width: 34ch; }
.tile .price { margin-top: auto; font: 300 clamp(2.25rem, 3.6vw, 3.25rem)/1.05 var(--f-serif); letter-spacing: -0.035em; color: var(--fg); }
.tile .price small { font: 400 0.8125rem/1 var(--f-mono); letter-spacing: 0.02em; color: var(--mute); }
.tile-lead { grid-row: span 2; background: radial-gradient(120% 90% at 0% 0%, var(--navy-2) 0%, var(--navy) 55%, #091A30 100%); }
.tile-lead .price { font-size: clamp(4.5rem, 9vw, 8rem); }
.tile-lead .btn { align-self: flex-start; margin-top: 10px; }
.tile-mark::before { content: "§"; position: absolute; right: -10px; bottom: -70px; z-index: -1; font: italic 300 18rem/1 var(--f-serif); color: rgba(22, 58, 107, 0.08); }
.tile-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; filter: brightness(0.62); }
.tile-photo::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(14, 21, 34, 0.86), rgba(14, 21, 34, 0.2)); }
.tile-photo .price { font-size: clamp(1.75rem, 2.6vw, 2.25rem); font-style: italic; }
.fees-note { margin: 20px 0 0; font-size: 0.875rem; color: var(--mute); }
@media (max-width: 960px) { .bento { grid-template-columns: 1fr 1fr; } .tile-lead { grid-row: auto; grid-column: span 2; } }
@media (max-width: 600px) { .bento { grid-template-columns: minmax(0, 1fr); } .tile-lead { grid-column: auto; } .tile { min-height: 0; } }

/* ------------------------------------------------------------------ About: split, image drifts slower than the page */
.about { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 88px); align-items: center; padding: clamp(80px, 10vw, 160px) var(--gutter); max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; }
.about-media { position: relative; height: min(82dvh, 820px); overflow: hidden; border-radius: var(--r); box-shadow: var(--shadow); }
.about-media img { width: 100%; height: 118%; object-fit: cover; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .about-media img { animation: slow-drift linear both; animation-timeline: view(); }
  }
}
@keyframes slow-drift { from { transform: translateY(-14%); } to { transform: translateY(0); } }
.about-lead { margin: 24px 0 0; font-size: clamp(1.25rem, 1.8vw, 1.5rem); line-height: 1.45; }
.about-points { margin: 32px 0 0; display: grid; gap: 22px; }
.about-points dt { font-weight: 500; }
.about-points dd { margin: 4px 0 0; color: var(--mute); }
.jabot { margin: 36px 0 0; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 18px; align-items: start; padding-top: 28px; border-top: 1px solid var(--line); }
.jabot-swatch { width: 56px; height: 56px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, var(--navy-2), var(--navy)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 10px 20px -10px rgba(12, 35, 64, 0.6); }
.jabot figcaption { color: var(--mute); font-size: 0.9375rem; }
.jabot figcaption b { color: var(--accent); font-weight: 500; }
@media (max-width: 900px) { .about { grid-template-columns: minmax(0, 1fr); } .about-media { height: 56dvh; } }

/* ------------------------------------------------------------------ Contact */
.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 112px); align-items: start; padding: clamp(80px, 10vw, 160px) var(--gutter) clamp(96px, 12vw, 180px); max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; }
.contact-facts { margin: 36px 0 0; display: grid; gap: 14px; }
.contact-facts div { display: flex; justify-content: space-between; gap: 16px; }
.contact-facts dt { display: inline-flex; align-items: center; gap: 10px; color: var(--mute); }
.contact-facts dt i { font-size: 1.25rem; color: var(--accent); }
.contact-facts dd { margin: 0; text-align: right; }
.contact-facts a { text-decoration: none; }
.form { position: relative; display: grid; gap: 26px; padding: clamp(24px, 3.6vw, 48px); background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 8px; }
.field label, .field legend { padding: 0; font: 500 0.75rem/1.3 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg); }
.field legend { margin-bottom: 10px; }
.opt { text-transform: none; letter-spacing: 0; color: var(--mute); font-family: var(--f-serif); font-size: 0.9375rem; }
.field input, .field textarea { width: 100%; min-width: 0; padding: 10px 0; border: 0; border-bottom: 1px solid color-mix(in srgb, var(--fg) 40%, transparent); border-radius: 0; background: transparent; font: 400 1.25rem/1.4 var(--f-serif); color: var(--fg); transition: border-color 200ms ease, box-shadow 200ms ease; }
.field textarea { resize: vertical; min-height: 96px; font-size: 1.125rem; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--accent); box-shadow: 0 1px 0 0 var(--accent); }
.field input[aria-invalid="true"] { border-bottom-color: var(--err); }
.f-hint { margin: 0; font-size: 0.9375rem; color: var(--mute); }
.f-err { margin: 0; font-size: 0.9375rem; color: var(--err); }
.f-err[hidden], .f-done[hidden] { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { position: relative; }
.chips input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chips span { display: inline-flex; align-items: center; height: 42px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--ghost); font: 400 1rem/1 var(--f-serif); color: var(--fg); transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease, transform 120ms ease-out; }
.chips input:active + span { transform: scale(0.96); }
.chips input:checked + span { background: var(--cta-bg); border-color: var(--cta-bg); color: var(--cta-fg); }
.chips input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 0.9375rem; line-height: 1.45; color: var(--mute); cursor: pointer; position: relative; }
.consent input { position: absolute; opacity: 0; width: 24px; height: 24px; margin: 0; }
.box { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid color-mix(in srgb, var(--fg) 45%, transparent); border-radius: 999px; transition: background-color 200ms ease, border-color 200ms ease; }
.box i { font-size: 0.875rem; color: var(--cta-fg); opacity: 0; transform: scale(0.6); transition: opacity 150ms ease, transform 300ms var(--ease); }
.consent input:checked + .box { background: var(--cta-bg); border-color: var(--cta-bg); }
.consent input:checked + .box i { opacity: 1; transform: none; }
.consent input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 3px; }
.consent input[aria-invalid="true"] + .box { border-color: var(--err); }
.f-submit { justify-self: start; }
.f-done { position: absolute; inset: 0; z-index: 2; display: grid; align-content: center; gap: 12px; padding: clamp(24px, 4vw, 56px); background: var(--surface); border-radius: var(--r); outline: none; }
.f-done p { margin: 0; max-width: 38ch; color: var(--mute); }
.f-done-mark { font: italic 300 5rem/0.8 var(--f-serif); color: var(--accent) !important; }
.f-done-title { font: 300 clamp(2rem, 3.4vw, 3rem)/1.1 var(--f-serif); letter-spacing: -0.03em; color: var(--fg) !important; }
@media (prefers-reduced-motion: no-preference) { .f-done:not([hidden]) { animation: done-in 500ms var(--ease); } }
@keyframes done-in { from { opacity: 0; transform: scale(0.98); } }
@media (max-width: 900px) { .contact { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .f-row { grid-template-columns: minmax(0, 1fr); } .f-submit { width: 100%; } }

/* ------------------------------------------------------------------ Footer */
.footer { padding: clamp(56px, 7vw, 100px) var(--gutter) 28px; border-top: 1px solid var(--line); overflow: hidden; }
.footer-word { display: block; width: 100%; height: auto; margin: 0 0 clamp(36px, 5vw, 64px); overflow: visible; }
.footer-word text { font: italic 300 232px var(--f-serif); letter-spacing: -0.06em; fill: var(--navy); }
.footer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; padding-bottom: 32px; color: var(--mute); }
.footer-grid p { margin: 0; }
.footer-grid a { text-decoration: none; color: var(--fg); }
.footer-grid nav { display: grid; gap: 6px; justify-items: start; }
.footer-grid nav a { color: var(--mute); }
.footer-grid nav a:hover, .footer-base a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 0.875rem; color: var(--mute); }
.footer-base p { margin: 0; }
.footer-base a { color: inherit; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------------ Reduced motion: no pinning, no stacking,
   everything readable in place; the scales still render, balanced, without camera moves. */
@media (prefers-reduced-motion: reduce) {
  .hero { height: auto; }
  .hero-pin { position: relative; }
  .hero-story { display: none; }
  .card { position: relative; top: auto; transform: none; }
  .acc-panel, .acc-panel img, .acc-body, .acc-panel button, .hero-copy, .nav, .nav::before { transition: none; }
  .js [data-split] .w > span, .js [data-reveal] { transition: opacity 300ms linear; transform: none; }
}
@media (prefers-contrast: more) {
  :root { --mute: #2F3644; --line: rgba(18, 23, 34, 0.4); }
  .theme-dark { --mute: rgba(238, 241, 245, 0.9); --line: rgba(238, 241, 245, 0.45); }
}
html:not(.js) .hero { height: auto; }
html:not(.js) .hero-pin { position: relative; }
html:not(.js) .hero-story { display: none; }
html:not(.js) .card { position: relative; top: auto; }
html:not(.js) .acc-body { opacity: 1; transform: none; }
