/* sebastienmaleville.com
   Birch paper, spruce ink and one red pencil, the red of the Danish flag. Newsreader (Paris) for headlines, Albert Sans (Denmark) for reading.
   Essential Studio's green is the second accent: buttons fill with it on hover, and it marks what belongs to the studio.
   Small text and thin lines stay red, which reads better at that size. */

:root {
  --paper: #eef0eb;
  --paper-2: #e2e6df;
  --ink: #16201c;
  --ink-2: #3f4b45;
  --ink-3: #5f6a63;
  --rule: #cdd5ce;
  --red: #c8102e;
  --on-red: #fff;
  /* Essential's brand green is #7d8475; one step deeper keeps white text on it readable */
  --green: #6e7365;
  --on-green: #fff;

  --display: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Albert Sans", system-ui, -apple-system, "Segoe UI", "Thonburi", "PingFang SC", sans-serif;
  --mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, "Thonburi", "PingFang SC", monospace;
  --hand: "Seb Hand", "Bradley Hand", "Segoe Print", cursive;
  --thai: "Taviraj", "Thonburi", "Leelawadee UI", serif;
  --zh: "Noto Serif SC", "Songti SC", "STSong", serif;
  --ja: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;

  --wrap: 84rem;
  --gutter: clamp(1.25rem, 4.2vw, 3.75rem);
  --space: clamp(5.5rem, 13vw, 11rem);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1613;
    --paper-2: #18211d;
    --ink: #e5eae5;
    --ink-2: #b8c2bb;
    --ink-3: #87928b;
    --rule: #2b3631;
    --red: #f0505f;
    --on-red: #0f1613;
    --green: #7d8475;
    --on-green: #0f1613;
  }
}

/* Dark bands keep their own palette in both themes */
[data-theme="deep"] {
  --paper: #0f1613;
  --paper-2: #18211d;
  --ink: #e5eae5;
  --ink-2: #b8c2bb;
  --ink-3: #87928b;
  --rule: #2a3530;
  --red: #f0505f;
  --on-red: #0f1613;
  --green: #7d8475;
  --on-green: #0f1613;
  background: var(--paper);
  color: var(--ink);
}

/* Words in their own scripts get a typeface made for them */
:is(.hello, .local, .langs .name):lang(th) { font-family: var(--thai); font-style: normal; }
:is(.hello, .local, .langs .name):lang(zh) { font-family: var(--zh); font-style: normal; }
:is(.hello, .local, .langs .name):lang(ja) { font-family: var(--ja); font-style: normal; }

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.65; font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; text-decoration-color: var(--ink-3); transition: text-decoration-color .25s, color .25s; }
a:hover { text-decoration-color: var(--red); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--red); color: var(--on-red); }
/* Decorative overhangs never cause sideways scrolling; clip keeps sticky elements working */
main { overflow-x: clip; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 360; line-height: 1.04; letter-spacing: -.018em; }
p { margin: 0 0 1em; }
button { font: inherit; color: inherit; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.mono, .label { font-family: var(--mono); font-size: .76rem; letter-spacing: .04em; line-height: 1.5; }
.label { text-transform: uppercase; color: var(--ink-3); }
[hidden] { display: none !important; }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: var(--gutter); top: -3rem; z-index: 60; background: var(--ink); color: var(--paper); padding: .5rem .8rem; font-family: var(--mono); font-size: .8rem; text-decoration: none; }
.skip:focus { top: .6rem; }

/* ---------- page transitions (browsers that support cross-document view transitions) ---------- */

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
.top { view-transition-name: top; }
::view-transition-old(root) { animation: vt-out .22s cubic-bezier(.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: vt-in .45s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-10px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(22px); } }

/* ---------- header ---------- */

.top { position: sticky; top: 0; z-index: 40; transition: transform .5s var(--ease), background-color .3s, border-color .3s; border-bottom: 1px solid transparent; }
.top.is-scrolled { background: var(--paper); border-bottom-color: var(--rule); }
.top.is-hidden { transform: translateY(-101%); }
.top-row { display: flex; align-items: center; gap: 1.6rem; min-height: 4rem; }
.wordmark { font-family: var(--display); font-size: 1.12rem; text-decoration: none; white-space: nowrap; letter-spacing: -.005em; }
.wordmark .acc { display: inline-block; transition: transform .45s var(--ease); }
.wordmark:hover .acc { transform: translateY(-.1em) rotate(-6deg); }

.nav { display: flex; gap: 1.6rem; margin-left: auto; }
.nav a { position: relative; font-size: .92rem; text-decoration: none; color: var(--ink-2); padding: .35rem 0; white-space: nowrap; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: .1rem; height: 1px; background: var(--red); transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav .ext { display: inline-block; font-size: .85em; transition: transform .45s var(--ease); }
.nav a:hover .ext { transform: translate(2px, -2px); }

.clock { font-family: var(--mono); font-size: .75rem; letter-spacing: .03em; color: var(--ink-3); text-align: right; line-height: 1.3; white-space: nowrap; }
.clock time { color: var(--ink); }
.clock .status { display: block; }

.redline-toggle, .menu-btn {
  appearance: none; border: 1px solid var(--rule); background: transparent; color: var(--ink-2);
  border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--mono); font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; padding: .4rem .65rem .36rem;
  transition: border-color .2s, color .2s, background .2s;
}
.redline-toggle:hover, .menu-btn:hover { border-color: var(--red); color: var(--red); }
.redline-toggle .pen { width: 1rem; height: 1rem; transition: transform .4s var(--ease); }
.redline-toggle[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: var(--on-red); }
.redline-toggle[aria-pressed="true"] .pen { transform: rotate(-18deg); }
.menu-btn { display: none; width: 2.5rem; height: 2.5rem; padding: 0; justify-content: center; }
.menu-btn .bars, .menu-btn .bars::before { display: block; width: 1rem; height: 1px; background: currentColor; position: relative; }
.menu-btn .bars::before { content: ""; position: absolute; top: 5px; width: .65rem; right: 0; }
.menu-btn .bars { transform: translateY(-2.5px); }

.progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; background: var(--red); transform-origin: left; transform: scaleX(var(--p, 0)); opacity: 0; transition: opacity .3s; }
[data-page="about"] .progress { opacity: 1; }

.wordmark { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.clock, .redline-toggle, .menu-btn { flex: none; }
.clock .city-s { display: none; }
/* Five nav links need room: the clock's status line goes first, then the links move into the menu */
@media (max-width: 1359px) { .clock .status { display: none; } }
@media (max-width: 1023px) {
  .nav { display: none; }
  .clock { margin-left: auto; }
  .menu-btn { display: inline-flex; }
}
@media (max-width: 900px) {
  .top-row { gap: .9rem; }
  .redline-toggle .txt { display: none; }
  .redline-toggle { padding: 0; width: 2.5rem; height: 2.5rem; justify-content: center; }
}
@media (max-width: 420px) {
  .clock .city { display: none; }
  .clock .city-s { display: inline; }
}

/* Full-screen menu on small screens */
.menu { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--paper); color: var(--ink); }
.menu::backdrop { background: transparent; }
.menu .wrap { display: flex; flex-direction: column; min-height: 100%; padding-block: 1.1rem 2rem; }
.menu-close { align-self: flex-end; appearance: none; background: none; border: 1px solid var(--rule); border-radius: 999px; padding: .45rem .8rem; font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; cursor: pointer; }
.menu nav { display: grid; gap: .2rem; margin: auto 0; }
.menu nav a { display: flex; align-items: baseline; gap: 1rem; font-family: var(--display); font-size: clamp(2.6rem, 12vw, 4.5rem); line-height: 1.05; text-decoration: none; }
.menu nav a .mono { font-size: .75rem; color: var(--ink-3); min-width: 2ch; }
.menu nav a[aria-current="page"] { color: var(--red); }
.menu-foot { color: var(--ink-3); }
.menu[open] nav a { animation: menu-in .7s var(--ease) both; }
.menu[open] nav a:nth-child(2) { animation-delay: .05s; } .menu[open] nav a:nth-child(3) { animation-delay: .1s; }
.menu[open] nav a:nth-child(4) { animation-delay: .15s; } .menu[open] nav a:nth-child(5) { animation-delay: .2s; }
.menu[open] nav a:nth-child(6) { animation-delay: .25s; }
@keyframes menu-in { from { opacity: 0; transform: translateY(1.2rem); } }

/* ---------- buttons & links ---------- */

.btn {
  display: inline-flex; align-items: center; gap: .7rem; padding: 1rem 1.5rem .95rem; border-radius: 999px;
  background: var(--ink); color: var(--paper); text-decoration: none; font-size: .95rem; letter-spacing: .01em;
  transition: background .3s, color .3s;
}
.btn:hover { background: var(--green); color: var(--on-green); }
.btn .arr, .more .arr { transition: transform .45s var(--ease); display: inline-block; }
.btn:hover .arr, .more:hover .arr { transform: translateX(.3rem); }
.more { display: inline-flex; gap: .5rem; align-items: baseline; font-size: .95rem; text-decoration: none; border-bottom: 1px solid var(--ink-3); padding-bottom: .15rem; transition: border-color .3s; }
.more:hover { border-color: var(--red); }

/* ---------- motion primitives (only active with JS, and never under reduced motion) ---------- */

.w { display: inline-block; overflow: hidden; vertical-align: top; padding: .1em 0 .14em; margin: -.1em 0 -.14em; }
.w > span { display: inline-block; }
.js:not(.calm) [data-split] .w > span { transform: translateY(108%); transition: transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 40ms); }
.js:not(.calm) [data-split].is-in .w > span { transform: none; }

.js:not(.calm) [data-fade] { opacity: 0; transition: opacity .9s var(--ease); transition-delay: var(--d, 0s); }
.js:not(.calm) [data-fade].is-in { opacity: 1; }

.js:not(.calm) [data-clip] { clip-path: inset(0 0 100% 0); transition: clip-path 1.05s var(--ease); transition-delay: var(--d, 0s); }
.js:not(.calm) [data-clip] img { transform: scale(1.1); transition: transform 1.4s var(--ease); transition-delay: var(--d, 0s); }
.js:not(.calm) [data-clip].is-in { clip-path: inset(0 0 0 0); }
.js:not(.calm) [data-clip].is-in img { transform: none; }

.js:not(.calm) [data-rows] > * { opacity: 0; transform: translateY(10px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.js:not(.calm) [data-rows].is-in > * { opacity: 1; transform: none; }

/* ---------- home: hero ---------- */

.hero { position: relative; min-height: min(100svh, 62rem); display: flex; flex-direction: column; justify-content: flex-end; padding: 2rem 0 2.2rem; margin-top: -4rem; padding-top: 6rem; isolation: isolate; }
.contours { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; -webkit-mask-image: radial-gradient(70% 85% at 76% 48%, #000 25%, transparent 78%); mask-image: radial-gradient(70% 85% at 76% 48%, #000 25%, transparent 78%); }
@media (max-width: 860px) { .contours { -webkit-mask-image: radial-gradient(120% 60% at 50% 30%, #000 20%, transparent 75%); mask-image: radial-gradient(120% 60% at 50% 30%, #000 20%, transparent 75%); } }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(2rem, 5vw, 5rem); align-items: end; }
/* Hello in his six languages, the visitor's first, each script in its own typeface */
.greet { margin-bottom: clamp(1.2rem, 2.6vw, 2rem); }
.greet-word { margin: 0; height: 1.3em; display: flex; align-items: flex-end; font-family: var(--display); font-style: italic; font-weight: 340; font-size: clamp(2.3rem, 4.8vw, 4.3rem); line-height: 1.3; letter-spacing: -.015em; color: var(--red); }
.greet-word .hello { display: inline-block; transition: opacity .32s var(--ease), transform .5s var(--ease); }
.greet-word .hello:is(:lang(th), :lang(zh), :lang(ja)) { letter-spacing: 0; }
.greet-word.is-out .hello { opacity: 0; transform: translateY(-.28em); }
.greet-word.is-pre .hello { opacity: 0; transform: translateY(.32em); transition: none; }
.greet-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem 1.1rem; margin-top: .55rem; min-height: 2.9em; font-family: var(--mono); font-size: .78rem; line-height: 1.45; color: var(--ink-3); }
.greet-langs { display: flex; flex-wrap: wrap; gap: .1rem; margin-left: -.35rem; }
.greet-langs button { appearance: none; border: 0; background: none; cursor: pointer; font: inherit; letter-spacing: .06em; color: var(--ink-3); padding: .3rem .35rem .2rem; border-bottom: 1.5px solid transparent; transition: color .2s, border-color .2s; }
.greet-langs button:hover { color: var(--ink); }
.greet-langs button[aria-pressed="true"] { color: var(--red); border-bottom-color: var(--red); }
.greet-say { margin: 0; flex: 1 1 18rem; max-width: 46ch; }
.hero-name { font-size: clamp(3.4rem, 9.6vw, 9.4rem); font-weight: 320; letter-spacing: -.035em; line-height: .92; margin-bottom: clamp(1.6rem, 3vw, 2.4rem); }
.hero-name .line { display: block; }
.hero-lede { font-size: clamp(1.15rem, 1.7vw, 1.45rem); line-height: 1.45; max-width: 34ch; color: var(--ink-2); }
.hero-lede strong { color: var(--ink); font-weight: 500; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 1.2rem 1.8rem; align-items: center; margin-top: 2.2rem; }
.hero-portrait { margin: 0; position: relative; }
.hero-portrait .frame { overflow: hidden; aspect-ratio: 4 / 5; background: var(--paper-2); }
.hero-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
/* The portrait is the largest thing on the first screen: it opens on its own, without waiting for scripts */
.js:not(.calm) .hero-portrait .frame { animation: wipe 1.05s var(--ease) .1s both; }
.js:not(.calm) .hero-portrait .frame img { animation: settle 1.4s var(--ease) .1s both; }
@keyframes wipe { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes settle { from { transform: scale(1.1); } to { transform: none; } }
figcaption, .cap { font-family: var(--mono); font-size: .75rem; letter-spacing: .03em; color: var(--ink-3); margin-top: .65rem; line-height: 1.45; }
figcaption b, .cap b { font-weight: 400; color: var(--ink-2); }
.hero-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: clamp(2.5rem, 6vw, 4.5rem); padding-top: 1rem; border-top: 1px solid var(--rule); }
/* One move after another, joined by his own hand-drawn arrow */
.route-strip { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 0; margin: 0; font-family: var(--mono); font-size: .75rem; color: var(--ink-2); letter-spacing: .04em; text-transform: uppercase; }
.route-strip span { white-space: nowrap; }
.route-strip span:not(:last-child)::after { content: "→"; display: inline-block; margin: 0 .75rem 0 .8rem; font-family: var(--hand); font-size: 1.6rem; line-height: 0; letter-spacing: 0; text-transform: none; color: var(--red); transform: translateY(.12em); }
.route-strip span:last-child { color: var(--ink); }
.scroll-cue { font-family: var(--mono); font-size: .75rem; color: var(--ink-3); display: inline-flex; gap: .6rem; align-items: center; text-transform: uppercase; letter-spacing: .05em; }
.scroll-cue i { display: block; width: 1px; height: 2.2rem; background: var(--rule); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--ink); animation: cue 2.4s var(--ease-io) 3; }
@keyframes cue { to { top: 100%; } }
@media (max-width: 860px) {
  .hero { min-height: auto; padding-top: 5.5rem; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-portrait { max-width: 24rem; order: -1; }
  .scroll-cue { display: none; }
}

/* ---------- sections ---------- */

.sec { padding-block: var(--space); }
.sec + .sec { padding-top: 0; }
.sec-head { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 0 1rem; margin-bottom: clamp(2.6rem, 6vw, 4.5rem); }
.sec-head .num { font-family: var(--mono); font-size: .76rem; color: var(--ink-3); padding-top: .9rem; }
.sec-head h2 { font-size: clamp(2.3rem, 5.4vw, 4.6rem); max-width: 18ch; }
.sec-head .kicker { grid-column: 2; margin-top: 1.2rem; max-width: 48ch; color: var(--ink-2); font-size: 1.12rem; }
@media (max-width: 640px) { .sec-head { grid-template-columns: 1fr; } .sec-head .num { padding: 0 0 .6rem; } .sec-head .kicker { grid-column: 1; } }
/* Headings without a section number sit flush left, in line with the page title */
.sec-head:not(:has(.num)) { grid-template-columns: minmax(0, 1fr); }
.sec-head:not(:has(.num)) .kicker { grid-column: 1; }
/* A short intro that should read as one line wherever the screen allows */
.sec-head .kicker.one-line { max-width: none; }

/* Interior page hero */
.page-hero { padding: clamp(3rem, 9vw, 7rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.page-hero .label { margin-bottom: 1.4rem; display: block; }
.page-hero h1 { font-size: clamp(3.4rem, 11vw, 10rem); font-weight: 300; letter-spacing: -.04em; line-height: .9; }
.page-hero .kicker { margin-top: clamp(1.4rem, 3vw, 2.2rem); max-width: 44ch; font-size: clamp(1.1rem, 1.6vw, 1.35rem); color: var(--ink-2); line-height: 1.5; }

/* ---------- home: approach triangle ---------- */

.approach { padding-block: var(--space); position: relative; overflow: hidden; }
.tri-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
@media (max-width: 960px) { .tri-grid { grid-template-columns: 1fr; } }
/* Take one corner away and the triangle falls flat */
.tri { margin: 0; position: relative; user-select: none; -webkit-user-select: none; }
.tri svg { width: 100%; height: auto; overflow: visible; }
.tri .ghost { fill: none; stroke: var(--ink-3); stroke-width: 1.2; stroke-dasharray: 3 7; stroke-linecap: round; opacity: 0; transition: opacity .4s; }
.tri[data-off] .ghost { opacity: 1; }
.tri .shape { fill: color-mix(in srgb, var(--ink) 4%, transparent); stroke: var(--ink-2); stroke-width: 1.4; stroke-linejoin: round; transition: stroke .3s; }
.tri[data-off] .shape { stroke: var(--red); stroke-width: 2.2; }
.tri .drop { fill: var(--red); opacity: 0; transition: opacity .3s; }
.tri[data-off] .drop { opacity: 1; }
.tri .node { cursor: pointer; }
.tri .node .hit { fill: transparent; }
.tri .node .dot { fill: var(--paper); stroke: var(--ink); stroke-width: 1.4; transition: fill .3s, stroke .3s; }
.tri .node:hover .dot { fill: var(--ink); }
.tri .node.is-off .dot { fill: var(--paper); stroke: var(--ink-3); stroke-dasharray: 3 4; }
.tri .node text { font-family: var(--display); font-size: 25px; fill: var(--ink); transition: opacity .3s; }
.tri .node .sub { font-family: var(--mono); font-size: 12px; fill: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; }
.tri .node.is-off text { opacity: .35; text-decoration: line-through; }
.tri-verdict { margin-top: 1.4rem; text-align: center; font-family: var(--hand); font-size: clamp(1.35rem, 2vw, 1.6rem); line-height: 1.25; color: var(--red); min-height: 2.5em; }
.js:not(.calm) .tri .shape { stroke-dasharray: var(--len, 2000); stroke-dashoffset: var(--len, 2000); transition: stroke-dashoffset 1.8s var(--ease), stroke .3s; }
.js:not(.calm) .tri.is-in .shape { stroke-dashoffset: 0; }
.js:not(.calm) .tri.is-in[data-off] .shape { stroke-dasharray: none; }
.tri-text article { padding: 1.3rem 0 1.4rem; border-top: 1px solid var(--rule); transition: opacity .4s; }
.tri-text article:last-of-type { border-bottom: 1px solid var(--rule); }
.tri-text article.is-off { opacity: .4; }
.tri-text article.is-off h3 { text-decoration: line-through; text-decoration-thickness: 1px; text-decoration-color: var(--red); }
.tri-text h3 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.tri-text h3 .mono { color: var(--ink-3); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.tri-text p { margin: .55rem 0 0; color: var(--ink-2); max-width: 42ch; }
.tri-take { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1.5rem; }
.tri-take .mono { color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; margin-right: .3rem; }
.tri-take button { appearance: none; cursor: pointer; border: 1px solid var(--rule); background: transparent; border-radius: 999px; padding: .5rem .95rem .48rem; font-size: .9rem; color: var(--ink-2); transition: background .25s, color .25s, border-color .25s; }
.tri-take button:hover { border-color: var(--ink); color: var(--ink); }
.tri-take button[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: var(--on-red); text-decoration: line-through; }

/* Where AI fits: the hammer, and Essential C6 as the example */
.ai-note { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 1rem clamp(2rem, 6vw, 6rem); margin-top: clamp(3.5rem, 8vw, 6rem); padding-top: 1.4rem; border-top: 1px solid var(--rule); }
.ai-note h3.label { font-family: var(--mono); font-size: .76rem; font-weight: 400; letter-spacing: .06em; line-height: 1.4; }
.ai-note-text p { color: var(--ink-2); max-width: 46ch; margin: 0 0 .9rem; }
.ai-note .c6 { display: flex; gap: 1.1rem; align-items: center; margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); }
.ai-note .c6 b { color: var(--ink); font-weight: 600; }
/* The full Essential C6 lockup, as the app signs its reports: wordmark, hairline, C6 mark */
.c6-lockup { display: flex; align-items: center; gap: .95rem; margin: 1.7rem 0 0; }
.c6-lockup img:first-child { height: 1.85rem; width: auto; }
.c6-lockup span { width: 1px; height: 1.75rem; background: color-mix(in srgb, var(--ink) 40%, transparent); }
.c6-lockup img:last-child { height: 2.15rem; width: auto; }
@media (max-width: 960px) { .ai-note { grid-template-columns: 1fr; } }

/* ---------- work tiles ---------- */

.tiles { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(2.2rem, 5vw, 4rem) clamp(1rem, 2.4vw, 2rem); }
.tile { position: relative; margin: 0; }
.tile a, .tile button.open { display: block; text-decoration: none; color: inherit; width: 100%; text-align: left; background: none; border: 0; padding: 0; cursor: pointer; }
.tile .ph { position: relative; overflow: hidden; background: var(--paper-2); aspect-ratio: var(--ar, 4 / 5); }
.tile .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease), filter .6s; }
.tile:hover .ph img { transform: scale(1.04); }
.tile .tag { position: absolute; left: .8rem; top: .8rem; z-index: 2; font-family: var(--mono); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; background: var(--paper); color: var(--ink); padding: .28rem .5rem .24rem; border-radius: 2px; }
/* Essential Studio work carries the studio's green */
.tile[data-studio~="essential"] .tag::before { content: ""; display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: var(--green); margin-right: .45rem; vertical-align: .02rem; }
.tile .peek { position: absolute; z-index: 3; left: 0; top: 0; pointer-events: none; font-family: var(--mono); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; background: var(--red); color: #fff; padding: .45rem .65rem .4rem; border-radius: 999px; opacity: 0; transform: translate(var(--px, 0), var(--py, 0)) scale(.6); transition: opacity .25s, transform .12s linear; white-space: nowrap; }
.tile:hover .peek { opacity: 1; transform: translate(var(--px, 0), var(--py, 0)) scale(1); }
.tile h3 { font-size: clamp(1.3rem, 1.8vw, 1.6rem); margin-top: 1rem; }
.tile .meta { font-family: var(--mono); font-size: .75rem; color: var(--ink-3); letter-spacing: .03em; margin-top: .35rem; }
.tile .line { color: var(--ink-2); font-size: .98rem; margin-top: .45rem; max-width: 46ch; }
@media (hover: none) { .tile .peek { display: none; } }

/* Home: four featured tiles in an editorial rhythm */
.tiles.featured .tile:nth-child(1) { grid-column: 1 / span 7; --ar: 4 / 3; }
.tiles.featured .tile:nth-child(2) { grid-column: 9 / span 4; margin-top: clamp(4rem, 12vw, 10rem); }
.tiles.featured .tile:nth-child(3) { grid-column: 2 / span 4; }
.tiles.featured .tile:nth-child(4) { grid-column: 7 / span 6; --ar: 3 / 2; margin-top: clamp(2rem, 6vw, 5rem); }
@media (max-width: 760px) { .tiles.featured .tile { grid-column: 1 / -1 !important; margin-top: 0 !important; } }

/* Design page grid */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.filters button { appearance: none; cursor: pointer; border: 1px solid var(--rule); background: transparent; border-radius: 999px; padding: .5rem .95rem .48rem; font-size: .9rem; color: var(--ink-2); transition: background .25s, color .25s, border-color .25s; }
.filters button:hover { border-color: var(--ink); color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.filters .count { font-family: var(--mono); font-size: .75rem; color: var(--ink-3); margin-left: .3rem; }
.filters button[aria-pressed="true"] .count { color: inherit; }
.tiles.grid { grid-auto-flow: dense; }
.tiles.grid .tile { grid-column: span 4; }
.tiles.grid .tile.wide { grid-column: span 8; --ar: 3 / 2; }
.tiles.grid .tile[hidden] { display: none; }
@media (max-width: 960px) { .tiles.grid .tile, .tiles.grid .tile.wide { grid-column: span 6; --ar: 4 / 5; } }
@media (max-width: 600px) { .tiles.grid .tile, .tiles.grid .tile.wide { grid-column: 1 / -1; } }

/* Project sheet */
.sheet { border: 0; padding: 0; margin: 0 0 0 auto; width: min(100%, 56rem); max-width: none; height: 100%; max-height: none; background: var(--paper); color: var(--ink); overflow-y: auto; }
.sheet::backdrop { background: rgba(9, 16, 13, .55); }
.sheet[open] { animation: sheet-in .7s var(--ease); }
.sheet[open]::backdrop { animation: fade-in .5s var(--ease); }
@keyframes sheet-in { from { transform: translateX(8%); opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }
.sheet-inner { padding: clamp(1.2rem, 4vw, 3rem); }
.sheet-close { position: sticky; top: 0; float: right; z-index: 2; appearance: none; cursor: pointer; background: var(--paper); border: 1px solid var(--rule); border-radius: 999px; padding: .45rem .85rem; font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.sheet-close:hover { border-color: var(--red); color: var(--red); }
.sheet figure { margin: 3rem 0 0; }
.sheet figure img { width: 100%; height: auto; max-height: 70vh; object-fit: contain; background: var(--paper-2); }
.sheet figure video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.sheet h2 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); margin-top: 2rem; }
.sheet .sheet-line { font-size: 1.15rem; color: var(--ink-2); margin-top: 1rem; max-width: 52ch; }
.sheet dl { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: .55rem 1rem; margin: 1.8rem 0; padding-top: 1.2rem; border-top: 1px solid var(--rule); }
.sheet dt { font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); padding-top: .2rem; }
.sheet dd { margin: 0; }
.sheet dl > div { display: contents; }
.sheet dl > div[hidden] { display: none; }
.sheet-links { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem 1.6rem; }
.sheet .credit { font-family: var(--mono); font-size: .75rem; color: var(--ink-3); margin-top: 1.4rem; }
.tile .open { font: inherit; }
.tile .open:focus-visible { outline-offset: 6px; }
.design-intro { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1.5rem; }
.design-note { font-family: var(--mono); font-size: .75rem; color: var(--ink-3); max-width: 44ch; }

/* ---------- lists (jury, awards, topics) ---------- */

.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: grid; grid-template-columns: 5rem minmax(0, 1fr) auto; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--rule); align-items: baseline; }
.rows li:last-child { border-bottom: 1px solid var(--rule); }
.rows .yr { font-family: var(--mono); font-size: .78rem; color: var(--ink-3); }
.rows .what { font-size: 1.05rem; }
.rows .where { display: block; color: var(--ink-3); font-size: .92rem; margin-top: .15rem; }
.rows .go { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 1.5px solid var(--ink); border-radius: 50%; font-size: 1.3rem; line-height: 1; color: var(--ink); align-self: center; transition: transform .4s var(--ease), color .2s, background-color .2s, border-color .2s; }
.rows li:has(a) { position: relative; }
.rows li a::after { content: ""; position: absolute; inset: 0; }
.rows a { text-decoration: none; }
.rows a:hover { text-decoration: underline; text-decoration-color: var(--red); }
.rows li:hover .go { color: var(--on-green); background: var(--green); border-color: var(--green); transform: translate(.15rem, -.15rem); }
@media (max-width: 560px) { .rows li { grid-template-columns: 4rem minmax(0, 1fr) auto; } .rows .go { width: 2.25rem; height: 2.25rem; font-size: 1.1rem; } }

/* ---------- split layouts & photos ---------- */

.split { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.split.flip { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
@media (max-width: 900px) { .split, .split.flip { grid-template-columns: 1fr; } }
.photo { margin: 0; }
.photo .ph { overflow: hidden; background: var(--paper-2); aspect-ratio: var(--ar, 4 / 5); }
.photo .ph img { width: 100%; height: 100%; object-fit: cover; }
.prose { max-width: 60ch; }
.prose p { color: var(--ink-2); }
.prose p.big { font-family: var(--display); font-size: clamp(1.5rem, 2.4vw, 2.1rem); line-height: 1.3; color: var(--ink); letter-spacing: -.01em; }
.subhead { font-size: clamp(1.6rem, 2.6vw, 2.2rem); margin: 0 0 1rem; }
.stack > * + * { margin-top: clamp(3rem, 7vw, 5rem); }

.d1 { --d: .12s; } .d2 { --d: .24s; } .d3 { --d: .36s; }
.ph.ar43, .photo .ar43 { aspect-ratio: 4 / 3; }
.subhead.small { font-size: 1.5rem; margin-top: 2.2rem; }
.photo.zen { max-width: 20rem; margin-top: 2.6rem; }
.invite { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; margin-top: 2rem; color: var(--ink-2); }
.topics { margin-top: 1.8rem; }
/* Speaking: lectures, workshops, or made to measure */
.formats { margin-top: 1.8rem; }
.fmt-tabs { display: flex; flex-wrap: wrap; gap: .5rem; }
.fmt-tabs button { appearance: none; cursor: pointer; border: 1px solid var(--rule); background: transparent; border-radius: 999px; padding: .55rem 1rem .52rem; font-size: .95rem; color: var(--ink-2); transition: background .25s, color .25s, border-color .25s; }
.fmt-tabs button:hover { border-color: var(--ink); color: var(--ink); }
.fmt-tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.fmt-panel { min-height: 17rem; }
.fmt-panel .topics { margin-top: 1.2rem; }
.fmt-panel .where { max-width: 44ch; }
.fmt-made { margin-top: 1.2rem; padding: 1.4rem 0 .4rem; border-top: 1px solid var(--rule); }
.fmt-made .big { font-family: var(--display); font-size: clamp(1.6rem, 2.4vw, 2rem); line-height: 1.2; color: var(--ink); margin-bottom: .6rem; }
.fmt-made .btn { margin-top: .4rem; }
/* Speaking: recent stages, newest first */
.stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(2.2rem, 4.5vw, 3.4rem) clamp(1rem, 2.4vw, 2rem); }
@media (max-width: 960px) { .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .stages { grid-template-columns: minmax(0, 1fr); } }
.stages figure { margin: 0 0 .95rem; aspect-ratio: 3 / 2; overflow: hidden; background: var(--paper-2); }
.stages img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.stages li:hover img { transform: scale(1.03); }
.stages .st-when { margin: 0; display: flex; flex-wrap: wrap; gap: .2rem .8rem; font-family: var(--mono); font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.stages .st-when time { color: var(--red); }
.stages h3 { font-size: clamp(1.35rem, 1.8vw, 1.6rem); margin: .4rem 0 .45rem; }
.stages li > p:last-child { margin: 0; color: var(--ink-2); font-size: .98rem; max-width: 40ch; }
.also-label { margin: clamp(3rem, 7vw, 4.5rem) 0 .9rem; }
.link-btn { appearance: none; background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink); text-decoration: underline; text-decoration-color: var(--ink-3); text-underline-offset: .25em; font: inherit; }
.link-btn:hover { text-decoration-color: var(--red); }
.work-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 1rem; margin-top: clamp(3rem, 7vw, 5rem); padding-top: 1.2rem; border-top: 1px solid var(--rule); }
.awards-line { color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
.photo .ph img[data-parallax] { height: 112%; margin-top: -6%; }

/* Home: two doors to the other pages */
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.4rem, 4vw, 3rem); }
@media (max-width: 760px) { .pair { grid-template-columns: 1fr; } }
.pair a { text-decoration: none; display: block; }
.pair .ph { overflow: hidden; aspect-ratio: 3 / 2; background: var(--paper-2); }
.pair img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.pair a:hover img { transform: scale(1.035); }
.pair h3 { font-size: clamp(1.8rem, 3vw, 2.6rem); margin-top: 1.1rem; display: flex; justify-content: space-between; align-items: baseline; }
.pair h3 .arr { font-family: var(--sans); font-size: 1.2rem; transition: transform .45s var(--ease); }
.pair a:hover h3 .arr { transform: translateX(.35rem); color: var(--green); }
.pair p { color: var(--ink-2); margin-top: .5rem; max-width: 44ch; }

/* ---------- story: the picture on one side, the words on the other, and the line between them ---------- */

.story-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(1.5rem, 3.5vw, 3.5rem); align-items: start; }
/* Wide screens: one frame that follows the chapter you're reading (built by site.js from the chapter photos) */
.chap-media { position: sticky; top: 6rem; }
.chap-media .frame { position: relative; width: min(100%, calc((100svh - 9.5rem) * .8)); aspect-ratio: 4 / 5; margin-left: auto; overflow: hidden; background: var(--paper-2); }
.chap-media .frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity 1s var(--ease), transform 1.6s var(--ease); }
.chap-media .frame img.on { opacity: 1; transform: none; }
.chap-media .cap { width: min(100%, calc((100svh - 9.5rem) * .8)); margin: .65rem 0 0 auto; min-height: 2.9em; font-family: var(--mono); font-size: .75rem; letter-spacing: .03em; line-height: 1.45; color: var(--ink-3); }
.chap-media .cap b { font-weight: 400; color: var(--ink-2); }
.chap-media:not(.is-built) { display: none; }
.story-grid:not(.has-frame) { grid-template-columns: minmax(0, 1fr); }

.timeline { position: relative; --rail: .6rem; --indent: 3.2rem; --gap: clamp(4rem, 9vw, 7rem); }
.timeline::before, .timeline::after { content: ""; position: absolute; left: calc(var(--rail) - .75px); top: .75rem; width: 1.5px; }
.timeline::before { bottom: 0; background: linear-gradient(var(--rule) calc(100% - 8rem), transparent); }
.timeline::after { height: min(var(--fill, 0px), calc(100% - 9rem)); background: var(--red); }
.chapter { position: relative; min-height: 72vh; padding: 0 0 var(--gap) var(--indent); }
.chapter:last-child { min-height: 0; padding-bottom: 2rem; }
.chapter .when { position: relative; margin: 0 0 .5rem; display: flex; flex-wrap: wrap; gap: .1rem .9rem; font-family: var(--mono); font-size: .76rem; letter-spacing: .05em; line-height: 1.4; color: var(--ink-3); }
.chapter .when .yrs { color: var(--ink); }
.chapter .dot { position: absolute; z-index: 1; left: calc(-1 * var(--indent)); top: .1rem; width: calc(var(--rail) * 2); height: calc(var(--rail) * 2); border-radius: 50%; border: 1.5px solid var(--ink); background: var(--paper); transition: background .35s, border-color .35s, transform .5s var(--ease); }
.chapter.is-on .dot { background: var(--red); border-color: var(--red); }
.chapter.now.is-on .dot { background: var(--green); border-color: var(--green); }
.chapter.is-current .dot { transform: scale(1.3); }
.chapter h2 { font-size: clamp(2.6rem, 5.2vw, 4.8rem); margin: 0 0 1.4rem; }
.chapter h2 .local { font-size: .42em; color: var(--ink-3); margin-left: .4rem; letter-spacing: 0; }
.chapter .txt p { color: var(--ink-2); max-width: 52ch; }
.chapter .pic { margin: 0 0 1.4rem; max-width: 26rem; }
.chapter .pic .ph { aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper-2); }
.chapter .pic img { width: 100%; height: 100%; object-fit: cover; }
/* With the frame in place, the inline photos stay for screen readers only */
.story-grid.has-frame .chapter .pic { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); }
/* The distance of the leg that ends here, written along the line */
.chapter .km { position: absolute; left: calc(var(--rail) * 2 + .7rem); top: calc(var(--gap) * -.5 - .6rem); margin: 0; font-family: var(--mono); font-size: .75rem; letter-spacing: .04em; color: var(--ink-3); }
/* Denmark was a visit: a dashed detour off the line and back */
.chapter.visit .dot { left: calc(var(--rail) + .95rem - var(--indent)); }
.chapter.visit .when { padding-left: max(0rem, calc(3.3rem - var(--indent))); }
.chapter.visit .when::before { content: ""; position: absolute; left: calc(var(--rail) - var(--indent)); top: -1.45rem; width: 1.55rem; height: 4.3rem; border: 1.5px dashed var(--ink-3); border-left: 0; border-radius: 0 999px 999px 0; transition: border-color .35s; }
.chapter.visit.is-on .when::before { border-color: var(--red); }
@media (max-width: 900px) {
  .story-grid { grid-template-columns: minmax(0, 1fr); }
  .chap-media { display: none !important; }
  .story-grid.has-frame .chapter .pic { position: static !important; width: auto; height: auto; margin: 0 0 1.4rem; overflow: visible; clip: auto; }
  .timeline { --indent: 2.6rem; --gap: 4.5rem; }
  .chapter { min-height: 0; }
  .chapter h2 { margin-bottom: 1.1rem; }
}

/* Courses: four short ones, as cards */
.courses { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.5rem), 1fr)); gap: 1rem; }
.courses > li { display: flex; flex-direction: column; gap: .75rem; padding: 1.2rem 1.25rem 1.4rem; border: 1px solid var(--rule); border-top: 3px solid var(--green); background: color-mix(in srgb, var(--paper-2) 45%, transparent); }
.courses .c-when { margin: 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .3rem 1rem; font-family: var(--mono); font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); }
.courses .c-when time { color: var(--ink); }
.courses h3 { font-size: clamp(1.35rem, 1.9vw, 1.6rem); line-height: 1.15; }
.courses .c-who { margin: auto 0 0; color: var(--ink-2); font-size: .95rem; line-height: 1.45; }
.courses .c-mods { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.courses .c-mods li { font-family: var(--mono); font-size: .75rem; letter-spacing: .03em; color: var(--ink-2); border: 1px solid var(--rule); border-radius: 999px; padding: .2rem .55rem .15rem; }

/* ---------- languages & off the clock ---------- */

.langs, .traits { list-style: none; margin: 0; padding: 0; }
.langs li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .25rem 1.2rem; padding: 1rem 0; border-top: 1px solid var(--rule); }
.langs li:last-child, .traits li:last-child { border-bottom: 1px solid var(--rule); }
.langs .name { font-family: var(--display); font-size: 1.4rem; line-height: 1.2; }
.langs .name small { display: block; font-family: var(--mono); font-size: .75rem; color: var(--ink-3); letter-spacing: .04em; margin-top: .25rem; text-transform: uppercase; }
.langs .meter { height: 2px; background: var(--rule); margin: .75rem 0 .6rem; position: relative; overflow: hidden; }
.langs .meter i { position: absolute; inset: 0 auto 0 0; width: var(--lv); background: var(--ink); }
.js:not(.calm) .langs .meter i { width: 0; transition: width 1.2s var(--ease); }
.js:not(.calm) .langs.is-in .meter i { width: var(--lv); }
.js:not(.calm) .langs.is-in li:nth-child(2) .meter i { transition-delay: .1s; } .js:not(.calm) .langs.is-in li:nth-child(3) .meter i { transition-delay: .2s; }
.js:not(.calm) .langs.is-in li:nth-child(4) .meter i { transition-delay: .3s; } .js:not(.calm) .langs.is-in li:nth-child(5) .meter i { transition-delay: .4s; }
.js:not(.calm) .langs.is-in li:nth-child(6) .meter i { transition-delay: .5s; }
.langs .next .meter i { background: repeating-linear-gradient(90deg, var(--red) 0 4px, transparent 4px 7px); }
.langs p { margin: 0; color: var(--ink-2); font-size: .98rem; }
.lv-100 { --lv: 100%; } .lv-90 { --lv: 90%; } .lv-55 { --lv: 55%; } .lv-40 { --lv: 40%; } .lv-18 { --lv: 18%; } .lv-8 { --lv: 8%; }
.traits li { padding: 1.1rem 0; border-top: 1px solid var(--rule); }
.traits h3 { font-size: 1.45rem; margin-bottom: .3rem; }
.traits p { margin: 0; color: var(--ink-2); }

/* ---------- contact ---------- */

.doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); margin-bottom: clamp(3rem, 7vw, 5rem); }
@media (max-width: 900px) { .doors { grid-template-columns: 1fr; } }
.door { padding: 1.7rem clamp(0rem, 2vw, 1.6rem) 1.9rem; border-left: 1px solid var(--rule); display: flex; flex-direction: column; gap: .65rem; }
.door:first-child { border-left: 0; padding-left: 0; }
@media (max-width: 900px) { .door { border-left: 0; border-top: 1px solid var(--rule); padding-inline: 0; } .door:first-child { border-top: 0; } }
.door h2 { font-size: 1.8rem; }
.door p { color: var(--ink-2); margin: 0; flex: 1; }
.door-go { appearance: none; border: 0; background: none; padding: 0; cursor: pointer; color: var(--ink); font-family: var(--mono); font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; display: inline-flex; gap: .5rem; align-items: center; margin-top: .6rem; align-self: flex-start; text-decoration: underline; text-decoration-color: var(--ink-3); text-underline-offset: .3em; }
.door-go:hover { text-decoration-color: var(--red); color: var(--red); }
.door-go .arr { transition: transform .4s var(--ease); }
.door-go:hover .arr { transform: translateX(.3rem); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-aside p { color: var(--ink-2); }
.contact-aside .mail { font-family: var(--display); font-size: 1.4rem; word-break: break-word; }
.form { display: grid; gap: 1.4rem; }
.form .row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.4rem; }
@media (max-width: 640px) { .form .row { grid-template-columns: 1fr; } }
.field { display: grid; gap: .4rem; }
.field label, .field legend { font-family: var(--mono); font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
.field .opt { text-transform: none; color: var(--ink-3); letter-spacing: .02em; }
.field input, .field textarea { font: inherit; font-size: 1.1rem; color: var(--ink); background: transparent; border: 0; border-bottom: 1px solid var(--ink-3); border-radius: 0; padding: .45rem 0 .5rem; width: 100%; transition: border-color .2s; }
.field textarea { min-height: 8.5rem; resize: vertical; border: 1px solid var(--ink-3); padding: .7rem .8rem; line-height: 1.5; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--red); }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); opacity: 1; }
.field.is-bad input, .field.is-bad textarea { border-color: var(--red); }
.field .err { font-family: var(--mono); font-size: .75rem; color: var(--red); min-height: 1em; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .3rem; }
.chip { position: relative; }
.field .chip { font-family: var(--sans); text-transform: none; letter-spacing: 0; color: var(--ink); }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--ink-3); border-radius: 999px; padding: .45rem .9rem .42rem; font-size: .98rem; line-height: 1.2; transition: background .2s, color .2s, border-color .2s; }
.chip span::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; border: 1px solid currentColor; transition: background .2s, transform .3s var(--ease); }
.chip input:hover + span { border-color: var(--ink); }
.chip input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip input:checked + span::before { background: var(--red); border-color: var(--red); transform: scale(1.15); }
.chip input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
.send-row { display: flex; flex-wrap: wrap; gap: 1rem 1.6rem; align-items: center; }
.send { appearance: none; cursor: pointer; border: 0; }
.send[disabled] { opacity: .6; cursor: progress; }
.form-msg { font-family: var(--mono); font-size: .8rem; color: var(--ink-2); margin: 0; }
.form-msg.is-bad { color: var(--red); }
.hp { position: absolute; left: -9999px; }
.sent { display: none; border-top: 1px solid var(--ink); padding-top: 1.4rem; }
.sent h2 { font-size: 2.2rem; margin-bottom: .6rem; }
.form.is-sent { display: none; }
.form.is-sent + .sent { display: block; }

/* ---------- footer ---------- */

.foot { border-top: 1px solid var(--rule); padding-block: clamp(3rem, 8vw, 6rem) 2.5rem; }
.foot-cta { display: inline-block; text-decoration: none; margin-bottom: clamp(3rem, 7vw, 5rem); }
.foot-cta .label { display: block; margin-bottom: .8rem; }
.foot-big { font-family: var(--display); font-size: clamp(3rem, 10vw, 8.5rem); font-weight: 300; letter-spacing: -.035em; line-height: .95; display: inline-flex; gap: .3em; align-items: baseline; background: linear-gradient(var(--green), var(--green)) 0 100% / 0 3px no-repeat; transition: background-size .8s var(--ease); padding-bottom: .08em; }
.foot-cta:hover .foot-big { background-size: 100% 3px; }
.foot-big .arr { font-size: .6em; transition: transform .6s var(--ease); }
.foot-cta:hover .foot-big .arr { transform: translateX(.2em) rotate(-8deg); color: var(--green); }
[data-page="contact"] .foot-cta { display: none; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: end; padding-top: 2rem; border-top: 1px solid var(--rule); }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }
.sig { width: min(14rem, 60vw); margin-bottom: 1.2rem; }
.sig img { width: 100%; }
@media (prefers-color-scheme: dark) { .sig img { filter: invert(1); } }
.js:not(.calm) .sig img { clip-path: inset(0 100% 0 0); }
.js:not(.calm) .sig.is-in img { clip-path: inset(0 0 0 0); transition: clip-path 2.2s cubic-bezier(.55, .1, .3, 1); }
.social { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; }
.social a { font-size: .92rem; }
.fine { font-family: var(--mono); font-size: .75rem; color: var(--ink-3); letter-spacing: .02em; line-height: 1.7; }
.fine p { margin: 0 0 .5rem; max-width: 60ch; }
.motion-toggle { appearance: none; background: none; border: 0; padding: .3rem .25rem; margin: -.3rem -.25rem; cursor: pointer; font: inherit; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--ink-3); text-underline-offset: .25em; }
.motion-toggle:hover { color: var(--red); text-decoration-color: var(--red); }
.to-top { font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; text-decoration: none; display: inline-block; margin-top: .3rem; padding: .35rem 0; color: var(--ink-2); }

/* ---------- Redline mode ---------- */

.redline-layer { position: absolute; inset: 0 0 auto 0; height: 0; pointer-events: none; z-index: 45; }
html.redline body {
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--red) 9%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--red) 4%, transparent) 1px, transparent 1px);
  background-size: calc(var(--wrap) / 12) 100%, 100% 1.6rem; background-position: center top;
}
.rl-note { position: absolute; width: 14.5rem; padding: .3rem .45rem .35rem; border-radius: 6px; background: color-mix(in srgb, var(--paper) 88%, transparent); color: var(--red); font-family: var(--hand); font-size: 1.15rem; line-height: 1.3; letter-spacing: .01em; opacity: 0; transform: translateY(4px) rotate(var(--tilt, -1.5deg)); transition: opacity .35s var(--ease), transform .35s var(--ease); }
.rl-note.is-on { opacity: 1; transform: rotate(var(--tilt, -1.5deg)); }
.rl-note.is-fixed { position: fixed; }
html.rl-scrolled .rl-note.is-fixed { opacity: 0; transform: translateY(-6px) rotate(var(--tilt, -1.5deg)); }
.rl-note svg { position: absolute; overflow: visible; pointer-events: none; }
.rl-note svg path { stroke-linecap: round; stroke-linejoin: round; }
.rl-note .halo { fill: none; stroke: var(--paper); stroke-width: 7; opacity: .85; }
.rl-note .draw { fill: none; stroke: var(--red); stroke-width: 1.6; stroke-dasharray: 400; stroke-dashoffset: 400; transition: stroke-dashoffset .7s .15s var(--ease); }
.rl-note .head { fill: var(--red); opacity: 0; transition: opacity .2s .75s; }
.rl-note .head-halo { fill: var(--paper); stroke: var(--paper); stroke-width: 2.4; opacity: .85; }
.rl-note.is-on .draw { stroke-dashoffset: 0; }
.rl-note.is-on .head { opacity: 1; }
.rl-track { position: fixed; left: 50%; top: 4.6rem; z-index: 39; width: min(calc(100vw - 2rem), 26rem); padding: .6rem .9rem .65rem; background: var(--paper); color: var(--red); border: 1.5px solid var(--red); border-radius: 10px; font-family: var(--hand); font-size: 1.15rem; line-height: 1.32; letter-spacing: .01em; box-shadow: 0 14px 30px -20px color-mix(in srgb, var(--ink) 70%, transparent); transform: translate(-50%, calc(-100% - 5rem)); visibility: hidden; transition: transform .4s var(--ease), visibility 0s .4s; }
html.rl-track-on .rl-track { transform: translate(-50%, 0); visibility: visible; transition: transform .4s var(--ease); }
.rl-track.is-pop { animation: pop .35s var(--ease); }
@keyframes pop { from { opacity: .15; } to { opacity: 1; } }
.rl-banner { position: fixed; left: 50%; bottom: 1rem; z-index: 50; transform: translate(-50%, calc(100% + 2rem)); visibility: hidden; transition: transform .45s var(--ease), visibility 0s .45s; background: var(--red); color: #fff; font-family: var(--mono); font-size: .75rem; letter-spacing: .04em; padding: .55rem .95rem; border-radius: 999px; white-space: nowrap; max-width: calc(100vw - 2rem); overflow: hidden; text-overflow: ellipsis; }
.rl-banner.is-shown { transform: translate(-50%, 0); visibility: visible; transition: transform .45s var(--ease); }

/* ---------- reduced motion ---------- */

/* The footer switch ("Motion: off") gets the same treatment as the system setting */
.calm *, .calm *::before, .calm *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

@media print {
  .top, .menu, .redline-toggle, .rl-banner, .form, .doors, .contours, .foot-cta { display: none !important; }
  body { background: #fff; color: #000; }
}
