/* Jacuria — ivory paper, oxblood ink, brass hairlines. Change a token here to restyle the page.
   Motion: hidden "before" states are scoped to html.motion, which is only set when JavaScript
   runs and the visitor has not asked for reduced motion. */
:root {
  --paper: #F4ECDF;
  --paper-2: #ECE1CF;
  --sheet: #FBF7F0;
  --ink: #2A0E13;
  --muted: #6B5150;
  --oxblood: #6E1E2B;
  --wine: #3A0D16;
  --wine-2: #4A1420;
  --brass: #A67C52;
  --brass-text: #85602F;
  --rose: #D8A48F;
  --cream: #F4ECDF;
  --hair: rgba(166, 124, 82, .35);
  --error: #A3263A;
  --display: "Bodoni Moda", Didot, "Times New Roman", serif;
  --body: "Jost", system-ui, sans-serif;
  --shell: 1200px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.83, 0, .17, 1);
}

*, *::before, *::after { box-sizing: border-box; }
/* clip (not hidden) so position: sticky keeps working */
html, body { overflow-x: clip; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.65 var(--body); }
img, svg { display: block; max-width: 100%; }
a { color: var(--oxblood); }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 500; font-variation-settings: "opsz" 40; }
em { font-style: italic; color: var(--oxblood); }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--oxblood); outline-offset: 3px; }
::selection { background: var(--oxblood); color: var(--cream); }
.defs { position: absolute; }

/* Paper fibre texture */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 80; pointer-events: none; opacity: .35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55 0 0 0 0 .42 0 0 0 0 .3 0 0 0 .18 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");
}

.skip { position: absolute; left: -999px; top: 8px; z-index: 400; padding: 10px 16px; background: var(--oxblood); color: var(--cream); }
.skip:focus { left: 16px; }
.shell { max-width: var(--shell); margin: 0 auto; padding: 0 32px; }
.kicker { display: inline-flex; align-items: center; gap: 14px; margin-bottom: 22px; font-size: 12px; font-weight: 500; letter-spacing: .42em; text-transform: uppercase; color: var(--brass-text); }
.kicker::before { content: ""; width: 8px; height: 8px; border: 1px solid currentColor; transform: rotate(45deg); }
.kicker.center { justify-content: center; }
.kicker.light { color: var(--rose); }
.muted { color: var(--muted); }
h2 { font-size: clamp(38px, 5vw, 72px); line-height: 1.02; letter-spacing: -.01em; }

/* Line-by-line reveal: each .ln clips its inner span, which slides up */
.lines .ln { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.lines .ln > span { display: inline-block; }
h2.lines .ln { display: inline-block; }
.motion .lines .ln > span { transform: translateY(105%); }
.motion .is-in .lines .ln > span, .motion .lines.is-in .ln > span { transform: none; transition: transform 1.3s var(--ease) var(--d, .1s); }
.motion .lines .ln + .ln > span { --d: .22s; }

/* ---------- Curtain (once per session) ---------- */
.curtain { position: fixed; inset: 0; z-index: 300; display: none; pointer-events: none; }
.curtain-on .curtain { display: block; }
.curtain-on body { overflow: hidden; }
.c-half {
  position: absolute; top: 0; bottom: 0; width: 50.5%;
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .18) 0 2px, transparent 2px 38px, rgba(255, 255, 255, .05) 38px 46px, transparent 46px 70px), linear-gradient(var(--wine-2), var(--wine));
  transition: transform 1.5s var(--ease-io);
}
.c-l { left: 0; box-shadow: inset -30px 0 60px rgba(0, 0, 0, .35); }
.c-r { right: 0; box-shadow: inset 30px 0 60px rgba(0, 0, 0, .35); }
.c-seal { position: absolute; left: 50%; top: 50%; display: flex; flex-direction: column; align-items: center; gap: 18px; transform: translate(-50%, -50%); transition: opacity .6s, transform 1s var(--ease); }
.c-seal svg { width: 120px; height: 120px; animation: sealIn 1s var(--ease) both; filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .4)); }
.c-seal p { font: italic 400 22px var(--display); letter-spacing: .3em; color: var(--rose); animation: fadeUp 1s var(--ease) .35s both; }
.curtain.open .c-l { transform: translateX(-101%); }
.curtain.open .c-r { transform: translateX(101%); }
.curtain.open .c-seal { opacity: 0; transform: translate(-50%, -50%) scale(.85); }
@keyframes sealIn { from { transform: scale(1.6) rotate(-30deg); opacity: 0; } }
@keyframes fadeUp { from { transform: translateY(14px); opacity: 0; } }

/* ---------- Header ---------- */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 100; transition: background .5s, box-shadow .5s, transform .6s var(--ease); }
.site-header.scrolled { background: rgba(244, 236, 223, .9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--hair); }
.site-header.away { transform: translateY(-100%); }
.header-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; max-width: 1360px; margin: 0 auto; padding: 0 32px; min-height: 86px; transition: min-height .5s var(--ease); }
.scrolled .header-row { min-height: 68px; }
.nav { display: flex; align-items: center; gap: 34px; }
.nav-r { justify-content: flex-end; }
.nav a { position: relative; font-size: 12px; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; color: var(--ink); text-decoration: none; }
.nav a:not(.pill)::after { content: ""; position: absolute; left: 50%; right: 50%; bottom: -6px; height: 1px; background: var(--oxblood); transition: left .5s var(--ease), right .5s var(--ease); }
.nav a:not(.pill):hover::after, .nav a.active::after { left: 0; right: 0; }
.pill { padding: 11px 20px; border: 1px solid var(--oxblood); border-radius: 999px; color: var(--oxblood) !important; transition: background .4s, color .4s; }
.pill:hover { background: var(--oxblood); color: var(--cream) !important; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { border-radius: 50%; background: var(--wine); padding: 4px; transition: transform 1s var(--ease); }
.brand:hover img { transform: rotate(360deg); }
.brand-name { font: 500 26px/1 var(--display); letter-spacing: .2em; text-transform: uppercase; color: var(--ink); }
.menu-btn { display: none; justify-self: end; width: 48px; height: 48px; border: 1px solid var(--hair); border-radius: 50%; background: transparent; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.menu-btn span { width: 18px; height: 1.5px; background: var(--ink); transition: transform .5s var(--ease); }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
.menu-btn[aria-expanded="true"] { border-color: rgba(216, 164, 143, .5); }
.menu-btn[aria-expanded="true"] span { background: var(--cream); }

.menu { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; justify-content: center; gap: 48px; padding: 100px 28px 40px; background: var(--wine); visibility: hidden; clip-path: circle(0 at calc(100% - 52px) 43px); transition: clip-path .9s var(--ease-io), visibility 0s .9s; }
.menu.open { visibility: visible; clip-path: circle(150% at calc(100% - 52px) 43px); transition: clip-path .9s var(--ease-io); }
.menu nav { display: flex; flex-direction: column; }
.menu nav a { display: flex; align-items: baseline; gap: 18px; padding: 14px 0; border-bottom: 1px solid rgba(216, 164, 143, .18); font: 400 clamp(34px, 9vw, 52px)/1.1 var(--display); color: var(--cream); text-decoration: none; opacity: 0; transform: translateY(30px); transition: opacity .5s, transform .8s var(--ease); }
.menu nav a i { font-size: 16px; color: var(--rose); }
.menu.open nav a { opacity: 1; transform: none; }
.menu.open nav a:nth-child(2) { transition-delay: .07s; } .menu.open nav a:nth-child(3) { transition-delay: .14s; } .menu.open nav a:nth-child(4) { transition-delay: .21s; }
.menu nav a:first-child { transition-delay: 0s; }
.menu-mail { color: var(--rose); font-size: 15px; letter-spacing: .08em; }
.menu-open .site-header { background: transparent; box-shadow: none; }
.menu-open .brand-name { color: var(--cream); }

/* ---------- Buttons & links ---------- */
.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; min-height: 58px; padding: 0 34px;
  background: var(--oxblood); color: var(--cream); border: 0; border-radius: 999px; font: 500 13px var(--body); letter-spacing: .22em; text-transform: uppercase; text-decoration: none; cursor: pointer;
}
.btn::before { content: ""; position: absolute; inset: 0; background: var(--wine); transform: scaleX(0); transform-origin: 100% 50%; transition: transform .7s var(--ease); }
.btn:hover::before, .btn:focus-visible::before { transform: scaleX(1); transform-origin: 0 50%; }
.btn > span { position: relative; }
.btn:hover { color: var(--cream); }
.btn[disabled] { opacity: .7; cursor: progress; }
.link-arrow { display: inline-flex; align-items: center; gap: 14px; padding: 0; background: none; border: 0; font: 500 13px var(--body); letter-spacing: .22em; text-transform: uppercase; color: var(--ink); text-decoration: none; cursor: pointer; }
.link-arrow i { position: relative; width: 34px; height: 1px; background: currentColor; transition: width .6s var(--ease); }
.link-arrow i::after { content: ""; position: absolute; right: 0; top: -3.5px; width: 8px; height: 8px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); }
.link-arrow:hover i { width: 56px; }

/* ---------- Hero ---------- */
.hero { position: relative; display: flex; align-items: center; justify-content: center; min-height: 100vh; min-height: 100svh; padding: 116px 0 70px; overflow: clip; text-align: center; }
.frame { position: absolute; inset: 20px; pointer-events: none; }
.frame i { position: absolute; background: var(--hair); }
.f-t, .f-b { left: 0; right: 0; height: 1px; } .f-t { top: 0; } .f-b { bottom: 0; }
.f-l, .f-r { top: 0; bottom: 0; width: 1px; } .f-l { left: 0; } .f-r { right: 0; }
.frame::before, .frame::after { content: ""; position: absolute; left: 50%; width: 9px; height: 9px; margin-left: -4.5px; background: var(--paper); border: 1px solid var(--brass); transform: rotate(45deg); }
.frame::before { top: -5px; } .frame::after { bottom: -5px; }
.motion .f-t, .motion .f-b { transform: scaleX(0); } .motion .f-l, .motion .f-r { transform: scaleY(0); }
.motion.is-ready .frame i { transform: none; transition: transform 1.8s var(--ease-io) .2s; }

.fan { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 72%; pointer-events: none; will-change: transform; }
.motion .fan-arcs path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.motion.is-ready .fan-arcs path { stroke-dashoffset: 0; transition: stroke-dashoffset 2.4s var(--ease-io) var(--d); }
.fan-rays { transform-box: view-box; transform-origin: 600px 640px; }
.wheel, .ticks { transform-box: view-box; transform-origin: 600px 640px; }
.wheel { animation: spin 120s linear infinite; }
.ticks { animation: spin 90s linear infinite reverse; }
.motion .fan-rays { opacity: 0; transform: scaleY(.2); }
.motion.is-ready .fan-rays { opacity: 1; transform: none; transition: opacity 1.6s ease .8s, transform 2.2s var(--ease) .8s; }

.hero-inner::before { content: ""; position: absolute; left: 50%; top: 52%; z-index: -1; width: 135%; height: 120%; transform: translate(-50%, -50%); background: radial-gradient(closest-side, var(--paper) 55%, rgba(244, 236, 223, .85) 72%, transparent); pointer-events: none; }
.hero-inner { position: relative; z-index: 1; isolation: isolate; display: flex; flex-direction: column; align-items: center; max-width: 1000px; padding: 0 24px; }
.badge { position: relative; width: 132px; height: 132px; margin-bottom: 20px; }
.badge-ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 26s linear infinite; }
.badge-ring text { font: 500 11px var(--body); fill: var(--brass-text); letter-spacing: .1em; }
.badge-core { position: absolute; inset: 22%; width: 56%; height: 56%; transition: transform .8s var(--ease); }
.badge:hover .badge-core { transform: rotate(-12deg) scale(1.06); }
@keyframes spin { to { transform: rotate(360deg); } }
.hero h1 { font-weight: 600; font-variation-settings: "opsz" 28; text-shadow: 0 0 18px var(--paper), 0 0 6px var(--paper); font-size: clamp(46px, min(7.4vw, 11.5vh), 112px); line-height: .98; letter-spacing: -.02em; }
.hero h1 em { font-weight: 500; }
.hero .kicker { margin-bottom: 26px; }
.lead { max-width: 620px; margin-top: 28px; font-size: 19px; color: #4F3836; }
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 22px 36px; margin-top: 34px; }
.motion .rise { opacity: 0; transform: translateY(24px); }
.motion.is-ready .rise { opacity: 1; transform: none; transition: opacity 1.1s var(--ease) var(--d), transform 1.3s var(--ease) var(--d); }
.motion .hero h1 .ln > span { transform: translateY(105%); }
.motion.is-ready .hero h1 .ln > span { transform: none; transition: transform 1.4s var(--ease) var(--d); }

/* ---------- Invitation card that flips with scroll ---------- */
.invite { position: relative; height: 240vh; background: var(--paper-2); border-top: 1px solid var(--hair); }
.invite-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 90px 20px 40px; overflow: hidden; }
.card3d { width: min(720px, 100%); aspect-ratio: 1.55; perspective: 1800px; }
.card-flip { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateY(var(--flip, 0deg)) rotateX(var(--tiltx, 0deg)); }
.face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 9% 10%; text-align: center; -webkit-backface-visibility: hidden; backface-visibility: hidden; box-shadow: 0 50px 80px -40px rgba(58, 13, 22, .45), 0 2px 0 rgba(0, 0, 0, .04); }
.front { background: var(--sheet); }
.back { background: radial-gradient(130% 120% at 50% 0%, var(--wine-2), var(--wine)); color: var(--cream); transform: rotateY(180deg); }
.deco-border { position: absolute; inset: 16px; border: 1px solid var(--hair); pointer-events: none; }
.deco-border::before { content: ""; position: absolute; inset: 6px; border: 1px solid var(--hair); }
.deco-border.light, .deco-border.light::before { border-color: rgba(216, 164, 143, .35); }
.face-mono { width: 84px; height: 84px; }
.face-title { font: italic 400 clamp(32px, 5vw, 56px)/1 var(--display); color: var(--oxblood); }
.face-sub { font-size: 12px; font-weight: 500; letter-spacing: .36em; text-transform: uppercase; color: var(--brass-text); }
.face-quote { font: italic 400 clamp(19px, 2.6vw, 31px)/1.4 var(--display); }
.invite-hint { font-size: 11px; letter-spacing: .4em; text-transform: uppercase; color: var(--muted); transition: opacity .5s; }
.invite.flipped .invite-hint { opacity: 0; }
/* Without motion: show both faces, side by side, no pinning */
html:not(.motion) .invite { height: auto; }
html:not(.motion) .invite-sticky { position: relative; height: auto; padding: 110px 20px; }
html:not(.motion) .card3d { aspect-ratio: auto; width: min(1100px, 100%); perspective: none; }
html:not(.motion) .card-flip { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; transform: none; }
html:not(.motion) .face { position: relative; min-height: 340px; transform: none; }
html:not(.motion) .invite-hint { display: none; }

/* ---------- Expertise index ---------- */
.expertise { position: relative; padding: 140px 0 150px; }
.sec-head { max-width: 760px; margin-bottom: 70px; }
.index { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair); }
.row { position: relative; isolation: isolate; display: grid; grid-template-columns: 80px minmax(0, 1.25fr) minmax(0, 1fr) 60px; align-items: center; gap: 28px; padding: 34px 20px; border-bottom: 1px solid var(--hair); cursor: default; transition: color .5s; }
.row::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--oxblood); transform: scaleY(0); transform-origin: 50% 100%; transition: transform .7s var(--ease); }
.row:hover::before { transform: scaleY(1); transform-origin: 50% 0; }
.row:hover { color: var(--cream); }
.rn { font: italic 400 22px var(--display); color: var(--brass-text); transition: color .5s; }
.row h3 { font-size: clamp(24px, 2.5vw, 36px); line-height: 1.08; transition: transform .7s var(--ease); }
.row p { font-size: 16px; color: var(--muted); transition: color .5s; }
.row:hover .rn, .row:hover p { color: var(--rose); }
.row:hover h3 { transform: translateX(14px); }
.go { justify-self: end; position: relative; width: 44px; height: 44px; border: 1px solid var(--hair); border-radius: 50%; transition: transform .7s var(--ease), border-color .5s; }
.go::before { content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; margin: -5px 0 0 -7px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); }
.row:hover .go { transform: rotate(-45deg); border-color: var(--rose); }
.ic { display: none; }
.motion .row[data-reveal] { opacity: 0; transform: translateY(30px); }
.motion .row[data-reveal].is-in { opacity: 1; transform: none; transition: opacity 1s var(--ease) var(--rd, 0s), transform 1.2s var(--ease) var(--rd, 0s), color .5s; }

/* Emblem that follows the pointer over the list (mouse/trackpad only, added by main.js) */
.ic { display: none; }
.emblem { position: fixed; left: 0; top: 0; z-index: 50; width: 150px; height: 150px; margin: -75px 0 0 -75px; border-radius: 50%; background: var(--sheet); box-shadow: 0 30px 60px -20px rgba(42, 14, 19, .5); pointer-events: none; display: grid; place-items: center; opacity: 0; transform: translate3d(-200px, -200px, 0) scale(.4); transition: opacity .4s; }
.emblem::before { content: ""; position: absolute; inset: 8px; border: 1px dashed var(--brass); border-radius: 50%; animation: spin 18s linear infinite; }
.emblem svg { width: 62px; height: 62px; fill: none; stroke: var(--oxblood); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.emblem svg path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.emblem.on { opacity: 1; }
.emblem.swap svg path { animation: redraw .9s var(--ease-io); }
@keyframes redraw { from { stroke-dashoffset: 1; } }

/* ---------- Corridor of arches (horizontal scroll) ---------- */
.corridor { position: relative; background: var(--wine); color: var(--cream); }
.cor-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.cor-sticky::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 70% at 50% 110%, rgba(216, 164, 143, .16), transparent 70%); }
.cor-track { display: flex; align-items: center; gap: 7vw; width: max-content; padding: 0 8vw; will-change: transform; }
.cor-intro { width: min(520px, 80vw); flex: none; }
.cor-intro h2 { color: var(--cream); }
.cor-intro h2 em { color: var(--rose); }
.cor-note { margin-top: 28px; font-size: 17px; color: rgba(244, 236, 223, .7); }
.door { position: relative; flex: none; width: 320px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.door-frame { position: relative; width: 260px; aspect-ratio: 220 / 300; }
.arch { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: none; stroke: var(--rose); stroke-width: 1.5; }
.arch .a2 { stroke: var(--cream); stroke-width: .8; opacity: .5; }
.arch path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.door-photo { position: absolute; left: 4.55%; top: 3.33%; width: 90.9%; height: 96.67%; object-fit: cover; border-radius: 50% 50% 0 0 / 34.5% 34.5% 0 0; transition: clip-path 1.6s var(--ease-io), transform 2.2s var(--ease); }
.door-frame::after { content: ""; position: absolute; left: 4.55%; top: 3.33%; width: 90.9%; height: 96.67%; border-radius: 50% 50% 0 0 / 34.5% 34.5% 0 0; background: linear-gradient(transparent 45%, rgba(58, 13, 22, .85)); pointer-events: none; }
.door-num { position: absolute; left: 50%; bottom: 22px; z-index: 1; transform: translateX(-50%); font: italic 500 54px/1 var(--display); color: var(--cream); text-shadow: 0 4px 20px rgba(0, 0, 0, .5); }
.motion .corridor:not(.stacked) .door-photo { clip-path: inset(100% 0 0 0); transform: scale(1.18); }
.motion .corridor:not(.stacked) .door.on .door-photo { clip-path: inset(0 0 0 0); transform: none; transition-delay: .3s; }
.door h3 { margin-top: 30px; font-size: 32px; line-height: 1.1; }
.door p { margin-top: 10px; max-width: 260px; font-size: 16px; color: rgba(244, 236, 223, .72); }
.motion .corridor:not(.stacked) .arch path { stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s var(--ease-io); }
.motion .corridor:not(.stacked) .door.on .arch path { stroke-dashoffset: 0; }
.motion .corridor:not(.stacked) .door .door-num, .motion .corridor:not(.stacked) .door h3, .motion .corridor:not(.stacked) .door p { opacity: 0; transform: translateY(20px); transition: opacity .9s var(--ease) .5s, transform 1s var(--ease) .5s; }
.motion .corridor:not(.stacked) .door .door-num { transform: translate(-50%, 20px); transition-delay: 1.1s; }
.motion .corridor:not(.stacked) .door.on h3, .motion .corridor:not(.stacked) .door.on p { opacity: 1; transform: none; }
.motion .corridor:not(.stacked) .door.on .door-num { opacity: 1; transform: translateX(-50%); }
.cor-meter { position: absolute; left: 50%; bottom: 44px; display: flex; align-items: center; gap: 16px; transform: translateX(-50%); font: italic 400 16px var(--display); color: var(--rose); }
.cor-meter i { position: relative; width: 180px; height: 1px; background: rgba(216, 164, 143, .25); }
.cor-meter b { position: absolute; inset: 0; background: var(--rose); transform: scaleX(var(--cp, 0)); transform-origin: 0 50%; }
/* Small screens and reduced motion: a simple vertical list */
.corridor.stacked .cor-sticky { position: relative; height: auto; padding: 120px 0; }
.corridor.stacked .cor-track { flex-direction: column; align-items: stretch; gap: 64px; width: auto; padding: 0 28px; transform: none !important; }
.corridor.stacked .cor-intro { width: auto; }
.corridor.stacked .door { width: auto; }
.corridor.stacked .cor-meter { display: none; }

/* ---------- Contact: a letter ---------- */
.contact { position: relative; padding: 150px 0; background: var(--paper-2); border-top: 1px solid var(--hair); }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 90px; align-items: start; }
.contact-copy { position: sticky; top: 130px; }
.contact-copy .muted { margin-top: 26px; max-width: 420px; }
.mail-line { margin-top: 34px; font-size: 16px; color: var(--muted); }
.mail-line a { font-weight: 500; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.contact-photo { width: min(340px, 100%); aspect-ratio: 4 / 5; margin-top: 44px; object-fit: cover; border-radius: 170px 170px 4px 4px; box-shadow: 0 40px 70px -35px rgba(42, 14, 19, .55); }
.letter { position: relative; }
.letter-body {
  position: relative; display: flex; flex-direction: column; gap: 26px; padding: 54px 56px 48px; background: var(--sheet);
  box-shadow: 0 60px 90px -50px rgba(58, 13, 22, .45), 0 1px 0 rgba(0, 0, 0, .05); transform: rotate(-.6deg);
  transition: transform 1s var(--ease), opacity .7s, filter .7s;
}
.letter-body:focus-within { transform: none; }
.letter-body::before { content: ""; position: absolute; inset: 14px; border: 1px solid var(--hair); pointer-events: none; }
.letter-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 20px; border-bottom: 1px solid var(--hair); font-size: 11px; font-weight: 500; letter-spacing: .34em; text-transform: uppercase; color: var(--brass-text); }
.letter-head svg { width: 46px; height: 46px; }
.salute { font: italic 400 30px var(--display); color: var(--oxblood); }
.f { position: relative; display: flex; flex-direction: column; gap: 4px; }
.f label { font-size: 14px; color: var(--muted); }
.f label small { font-size: 12px; opacity: .8; }
.f input, .f textarea { width: 100%; padding: 6px 0 8px; background: transparent; border: 0; border-bottom: 1px solid rgba(42, 14, 19, .25); border-radius: 0; font: italic 400 22px/1.4 var(--display); color: var(--ink); transition: border-color .4s; }
.f textarea { resize: vertical; min-height: 165px; padding-top: 2px; line-height: 36px; border-bottom: 0; background: repeating-linear-gradient(transparent 0 35px, rgba(42, 14, 19, .18) 35px 36px); background-attachment: local; }
.f input { background: linear-gradient(var(--oxblood), var(--oxblood)) 0 100% / 0 2px no-repeat; transition: border-color .4s, background-size .7s var(--ease); }
.f input:focus { background-size: 100% 2px; }
.f input:focus, .f textarea:focus { outline: none; border-bottom-color: var(--oxblood); }
.err { max-height: 0; overflow: hidden; font-size: 13px; font-weight: 500; color: var(--error); opacity: 0; transition: max-height .4s var(--ease), opacity .3s, margin .4s; }
.f.invalid .err { max-height: 4em; margin-top: 6px; opacity: 1; }
.f.invalid input, .f.invalid textarea { border-bottom-color: var(--error); }
.f.invalid label { color: var(--error); }
.motion .f.invalid { animation: nudge .45s var(--ease); }
@keyframes nudge { 25% { transform: translateX(-7px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
.sign { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 24px; margin-top: 8px; }
.status { flex: 1 1 220px; font-size: 15px; color: var(--muted); }
.status.error { color: var(--error); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Sent: the letter folds away and a sealed envelope takes its place */
.sealed { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; visibility: hidden; opacity: 0; transition: opacity .6s .5s, visibility 0s 1.1s; }
.letter.sent .letter-body { opacity: 0; transform: translateY(60px) scale(.6) rotate(0); filter: blur(2px); pointer-events: none; }
.letter.sent .sealed { visibility: visible; opacity: 1; transition: opacity .6s .5s; }
.envelope { width: 240px; margin-bottom: 18px; overflow: visible; filter: drop-shadow(0 24px 30px rgba(58, 13, 22, .25)); }
.flap { transform-box: view-box; transform-origin: 120px 40px; transform: scaleY(-1); }
.letter.sent .flap { transform: none; transition: transform .8s var(--ease-io) 1s; }
.wax { transform-box: fill-box; transform-origin: center; opacity: 0; transform: scale(2); }
.letter.sent .wax { opacity: 1; transform: none; transition: opacity .2s 1.75s, transform .6s cubic-bezier(.5, 1.8, .5, .9) 1.75s; }
.sealed-title { font: italic 400 34px var(--display); color: var(--oxblood); }
.again { margin-top: 16px; }

/* ---------- Footer ---------- */
.site-footer { position: relative; overflow: clip; padding: 130px 0 0; background: var(--wine); color: var(--cream); text-align: center; }
.foot-big { font: 400 clamp(60px, 13vw, 200px)/.9 var(--display); letter-spacing: -.02em; }
.foot-big em { color: var(--rose); }
.foot-seal { position: relative; width: 170px; height: 170px; margin: 70px auto 0; }
.foot-ring { position: absolute; inset: 0; animation: spin 40s linear infinite reverse; }
.foot-ring text { font: 500 10.5px var(--body); fill: var(--rose); }
.foot-core { position: absolute; inset: 28%; width: 44%; height: 44%; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 18px; margin-top: 80px; padding: 34px 0; border-top: 1px solid rgba(216, 164, 143, .2); font-size: 13px; color: rgba(244, 236, 223, .7); }
.foot-row a { color: rgba(244, 236, 223, .85); text-decoration: none; }
.foot-row a:hover { color: var(--rose); }
.link-arrow.up { color: inherit; }
.link-arrow.up i { transform: rotate(-90deg); width: 22px; }
.link-arrow.up:hover i { width: 22px; transform: rotate(-90deg) translateX(4px); }

/* Generic reveal */
.motion [data-reveal]:not(.row) { opacity: 0; transform: translateY(36px); }
.motion [data-reveal]:not(.row).is-in { opacity: 1; transform: none; transition: opacity 1.1s var(--ease), transform 1.3s var(--ease); }
.motion .sec-head[data-reveal], .motion .contact-copy[data-reveal] { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav { display: none; }
  .menu-btn { display: inline-flex; }
  .header-row { grid-template-columns: 1fr auto; padding: 0 20px; }
  .contact-grid { grid-template-columns: 1fr; gap: 56px; }
  .contact-photo { display: none; }
  .contact-copy { position: relative; top: 0; }
  .row { grid-template-columns: 54px minmax(0, 1fr) 44px; gap: 8px 18px; padding: 28px 8px; }
  .row p { grid-column: 2; grid-row: 2; }
  .row .go { grid-column: 3; grid-row: 1 / span 2; }
}
@media (max-width: 600px) {
  .shell { padding: 0 16px; }
  .header-row { padding: 0 16px; }
  .brand-name { font-size: 22px; }
  .frame { inset: 10px; }
  .hero { padding: 120px 0 80px; }
  .badge { width: 124px; height: 124px; }
  .lead { font-size: 17px; }
  .cta { flex-direction: column; width: 100%; }
  .btn { width: 100%; }
  .expertise, .contact { padding: 96px 0; }
  .row { grid-template-columns: 40px minmax(0, 1fr) 40px; }
  .go { width: 38px; height: 38px; }
  .card3d { aspect-ratio: .82; }
  .face { padding: 14% 12%; }
  html:not(.motion) .card-flip { grid-template-columns: 1fr; }
  .letter-body { padding: 40px 24px 32px; transform: none; }
  .salute { font-size: 26px; }
  .f input, .f textarea { font-size: 20px; }
  .corridor.stacked .cor-track { padding: 0 16px; }
  .foot-row { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
