/* =========================================================
   chinmayrajhans.com
   Mid-century / Bauhaus with a premium motion layer.
   Mandarin is the one loud colour; Crest yellow is a rare accent;
   Forest appears in the footer and project art.
   ========================================================= */

@font-face { font-family: "Anton"; src: url("/fonts/anton-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("/fonts/outfit-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
@font-face { font-family: "Homemade Apple"; src: url("/fonts/homemade-apple-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --mandarin: #FD550A;
  --forest: #005C47;
  --crest: #E0F354;
  --sand: #E8DCC6;
  --cream: #F4EDE1;
  --ink: #10261F;

  --bg: #FFFFFF;
  --text: var(--ink);
  --muted: #4E625B;
  --faint: #C7CFCB;
  --line: #DADADA;
  --line-soft: #ECECEC;
  --grid: #F1F1F1;
  --paper: var(--cream);
  --paper-text: var(--ink);
  --paper-muted: #6B5E48;
  --paper-line: #CDBFA6;
  --band: var(--ink);
  --band-text: var(--cream);
  --band-muted: #A9B8B0;
  --folder-dark: #2B4A40;
  --tile-c: var(--sand);
  --focus: var(--forest);
  --shadow: rgba(16, 38, 31, 0.5);
  --grain: 0;

  --display: "Anton", Impact, "Arial Narrow", sans-serif;
  --sans: "Outfit", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --script: "Homemade Apple", cursive;

  --gutter: clamp(20px, 3.4vw, 48px);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0C1E19;
    --text: #F1EADC;
    --muted: #A9B8B0;
    --faint: #33493F;
    --line: rgba(241, 234, 220, 0.16);
    --line-soft: rgba(241, 234, 220, 0.1);
    --grid: rgba(241, 234, 220, 0.05);
    --paper: #1A332B;
    --paper-text: #F1EADC;
    --paper-muted: #B9C8C0;
    --paper-line: rgba(241, 234, 220, 0.2);
    --band: #071612;
    --tile-c: #F1EADC;
    --focus: var(--crest);
    --shadow: rgba(0, 0, 0, 0.6);
    --grain: 0.06;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); scrollbar-color: var(--forest) var(--bg); overflow-x: clip; }
html:not(.lenis) { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  caret-color: var(--mandarin);
  -webkit-font-smoothing: antialiased;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .8 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
::selection { background: var(--crest); color: var(--forest); }
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 0.24em; }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 3px; }
img { max-width: 100%; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: var(--gutter); top: 12px; z-index: 70; padding: 10px 14px; background: var(--crest); color: var(--forest); font-weight: 600; }
.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mono { font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; }
.label { margin: 0; font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.wrap { padding-inline: var(--gutter); }

/* ---------- Header ---------- */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 22px var(--gutter);
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; text-decoration: none; }
.brand img { width: 26px; height: 26px; display: block; }
.site-nav { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.site-nav form { display: contents; }
.site-nav a, .site-nav button {
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  text-decoration: none;
  cursor: pointer;
}
.site-nav a::before, .site-nav button::before { content: "[ "; color: var(--muted); }
.site-nav a::after, .site-nav button::after { content: " ]"; color: var(--muted); }
.site-nav a:hover, .site-nav button:hover, .site-nav a[aria-current="page"] { color: var(--mandarin); }
.header-end { display: flex; align-items: center; gap: 18px; }
.clock { color: var(--muted); min-width: 9ch; }
.pill-dark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  transition: transform 160ms var(--ease-out), background-color 0.2s ease;
}
.pill-dark:hover { background: var(--mandarin); color: var(--ink); }
.pill-dark:active { transform: scale(0.97); }

/* ---------- Buttons (rolling text) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 26px;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--mandarin); color: var(--ink); }
.btn-dark { background: var(--text); color: var(--bg); }
.btn-ghost { border-color: currentColor; color: inherit; }
.roll { display: block; height: 1.3em; line-height: 1.3em; overflow: hidden; }
.roll > span { display: block; transition: transform 0.45s var(--ease-in-out); }
.roll > span + span { color: var(--crest); }
.btn-primary .roll > span + span { color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover .roll > span, a:hover > .roll > span { transform: translateY(-100%); }
  .btn-ghost:hover { background: var(--text); color: var(--bg); border-color: var(--text); }
  .btn:hover .icon { transform: translate(2px, -2px); }
}
.btn .icon { transition: transform 0.3s var(--ease-out); }

/* ---------- Hero ---------- */
.hero {
  --s: clamp(96px, 14.6vw, 210px);
  --bb: 0.5;
  --H: calc(var(--s) * 2.4);
  --sun: 2.1;
  --hh: clamp(700px, calc(100svh - 90px), 900px); /* hero height */
  position: relative;
  height: var(--hh);
  overflow: clip;
  border-top: 1px solid var(--line-soft);
  background-color: var(--bg);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
}
.hero-corner { position: absolute; top: 26px; margin: 0; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.hero-corner--l { left: var(--gutter); }
.hero-corner--r { right: var(--gutter); }

/* Layout: the toy (left) and the intro (right) share a top line and a mirrored inset; the pill (left) and the
   "that's me" note (right) share a line just above the name. The toy shrinks on short windows to clear the pill. */
.hero-toy { position: absolute; left: max(var(--gutter), 8vw); top: 80px; width: clamp(150px, calc((var(--hh) - var(--s) * (var(--bb) + 0.9) - 222px) / 1.034), 252px); transform: rotate(-4deg); z-index: 3; }
.hero-toy .tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr)); width: 100%; aspect-ratio: 1; box-shadow: 0 22px 40px -22px var(--shadow); }
.hero-toy .t { padding: 0; border: 0; cursor: pointer; }
.shuffle {
  position: absolute;
  right: -24px;
  bottom: -24px;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  background: var(--crest);
  color: var(--forest);
  cursor: pointer;
  box-shadow: 0 10px 24px -10px var(--shadow);
  transition: transform 160ms var(--ease-out);
}
.shuffle[hidden] { display: none; }
.shuffle .icon { width: 24px; height: 24px; transition: transform 0.5s var(--ease-in-out); }
.shuffle:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .shuffle:hover { transform: scale(1.06); } }

.hero-place {
  position: absolute;
  left: var(--gutter);
  bottom: calc(var(--s) * (var(--bb) + 0.9) + 28px);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  padding: 12px 12px 12px 22px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.875rem;
  line-height: 1.3;
}
.hero-place .globe { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--bg); }
.hero-place svg { width: 26px; height: 26px; animation: spin 8s linear infinite; }

.hero-intro { position: absolute; right: max(var(--gutter), 8vw); top: 80px; z-index: 3; width: min(320px, 30vw); }
.hero-tagline { margin: 0; font-size: clamp(1.5rem, 2.4vw, 2.125rem); line-height: 1.2; font-weight: 500; letter-spacing: -0.015em; }
.sig { display: inline-block; margin: 18px 0 0; font-family: var(--script); font-size: clamp(1.5rem, 2.4vw, 2.125rem); color: var(--mandarin); transform: rotate(-6deg); transform-origin: left; }

.hero-sun { position: absolute; left: 50%; bottom: calc(var(--s) * 0.67); width: calc(var(--s) * var(--sun)); aspect-ratio: 1; border-radius: 50%; background: var(--mandarin); transform: translateX(-50%); z-index: 1; }

.hero-name { position: absolute; left: 0; right: 0; bottom: calc(var(--s) * var(--bb)); z-index: 3; overflow: hidden; pointer-events: none; }
.marquee { display: flex; width: max-content; font-family: var(--display); font-size: var(--s); line-height: 0.9; letter-spacing: -0.01em; text-transform: uppercase; white-space: nowrap; animation: marquee 30s linear infinite; }
.marquee span { padding-right: 0.25em; }

.hero-me {
  position: absolute;
  left: 50%;
  bottom: calc(var(--s) * var(--bb) + var(--s) * 0.815 - var(--H) * 0.54);
  width: calc(var(--H) * 0.543);
  transform: translateX(-50%);
  z-index: 2; /* behind the scrolling name, in front of the sun */
}
.hero-me img { display: block; width: 100%; height: auto; filter: drop-shadow(0 18px 18px rgba(16, 38, 31, 0.25)); }
.doodle { position: absolute; pointer-events: none; color: var(--text); }
.doodle-spark { left: 86%; top: -6%; width: 64px; }
/* Heights inside the photo box: the pill's centre is 0.085s + 62px + 0.54H above the photo's bottom edge. The sun's
   right edge is 0.4s past the photo's, so the note starts 116px past it (clear of the orange) at every desktop width. */
.doodle-arrow { left: calc(100% - 30px); bottom: calc(var(--s) * 0.085 + 52px + var(--H) * 0.54); width: 140px; }
.doodle-note { left: calc(100% + 116px); bottom: calc(var(--s) * 0.085 + 42px + var(--H) * 0.54); margin: 0; font-family: var(--script); font-size: 1.5rem; color: var(--mandarin); white-space: nowrap; transform: rotate(-5deg); }
.doodle-note--phone { display: none; }

/* ---------- Tiles (shared by hero toy, art, mini rows) ---------- */
.t { position: relative; overflow: hidden; background: var(--tb); transition: background-color 0.45s ease; }
.t > i { position: absolute; inset: 0; transition: transform 0.5s var(--ease-in-out); }
.t > i::before { content: ""; position: absolute; inset: 0; background: var(--tf); clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); transition: background-color 0.45s ease, inset 0.5s var(--ease-in-out), border-radius 0.5s var(--ease-in-out), clip-path 0.5s var(--ease-in-out); }
.bg-o { --tb: var(--mandarin); } .bg-g { --tb: var(--forest); } .bg-c { --tb: var(--tile-c); } .bg-i { --tb: var(--ink); }
.fg-o { --tf: var(--mandarin); } .fg-g { --tf: var(--forest); } .fg-c { --tf: var(--tile-c); } .fg-i { --tf: var(--ink); } .fg-y { --tf: var(--crest); }
.s-circle > i::before { inset: 0; border-radius: 50%; }
.s-half > i::before { inset: 50% 0 0 0; border-radius: 100vmax 100vmax 0 0; }
.s-quarter > i::before { inset: 0; border-radius: 100% 0 0 0; }
.s-tri > i::before { inset: 0; clip-path: polygon(0 0, 0 0, 100% 100%, 0 100%); }
.s-dot > i::before { inset: 31%; border-radius: 50%; }

/* ---------- Sections ---------- */
.about { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 32px; padding: 140px var(--gutter) 120px; border-top: 1px solid var(--line-soft); }
.statement { margin: 0; max-width: 1000px; font-size: clamp(2rem, 4.2vw, 3.75rem); line-height: 1.12; font-weight: 500; letter-spacing: -0.02em; }
.statement .w { transition: color 0.25s ease; }
.statement.is-filling .w { color: var(--faint); }
.statement.is-filling .w.on { color: var(--text); }

.now { padding: 0 var(--gutter) 140px; }
.now-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--text); border-bottom: 1px solid var(--line); }
.now-item { display: flex; gap: 20px; align-items: center; padding: 28px 28px 32px; border-right: 1px solid var(--line); }
.now-item:first-child { padding-left: 0; }
.now-item:last-child { padding-right: 0; border-right: 0; }
.now-item .label { margin-bottom: 12px; }
.now-title { margin: 0; font-size: 1.5rem; line-height: 1.22; font-weight: 500; letter-spacing: -0.01em; }
.now-sub { margin: 6px 0 0; font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.book { flex: none; width: 72px; height: 111px; object-fit: cover; border: 1px solid var(--line); transform: rotate(-3deg); box-shadow: 0 12px 22px -12px var(--shadow); }
.record { position: relative; flex: none; width: 104px; height: 104px; border-radius: 50%; background: radial-gradient(circle, transparent 0 58%, rgba(255,255,255,0.06) 58.5% 59%, transparent 59.5% 72%, rgba(255,255,255,0.06) 72.5% 73%, transparent 73.5%), #111; animation: spin 5s linear infinite; }
.record img { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; object-fit: cover; }
.record::after { content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #fff; }

.band { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); align-items: center; gap: 48px; padding: 120px var(--gutter); background: var(--band); color: var(--band-text); overflow-x: clip; }
.band .label { color: var(--band-muted); margin-bottom: 22px; }
.band h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(3.5rem, 8.4vw, 7.5rem); line-height: 0.9; letter-spacing: -0.01em; text-transform: uppercase; }
.band-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 36px; }
.band-actions a:not(.btn) { color: var(--band-text); font-weight: 500; }
.band-actions a:not(.btn):hover { color: var(--crest); }
.folders { position: relative; height: 380px; }
.folders > div { position: absolute; }
.folders .tab { height: 40px; width: 150px; display: flex; align-items: center; padding: 0 16px; border-radius: 10px 10px 0 0; font-family: var(--mono); font-size: 0.75rem; }
.folders .f2-tab { left: 40px; top: 0; background: var(--folder-dark); color: var(--cream); }
.folders .f2 { left: 40px; right: 0; top: 40px; height: 300px; border-radius: 0 12px 12px 12px; background: var(--folder-dark); }
.folders .f1-tab { left: min(220px, calc(100% - 190px)); top: 60px; background: var(--mandarin); color: var(--ink); }
.folders .f1 { left: 0; right: 40px; top: 100px; height: 280px; border-radius: 12px; background: var(--mandarin); display: grid; place-items: center; color: var(--ink); }
.folders .f1 svg { width: 64px; height: 64px; stroke-width: 1.6; }

.contact { position: relative; padding: 150px var(--gutter) 110px; }
.talk { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(5.5rem, 16vw, 14.4rem); line-height: 0.88; letter-spacing: -0.01em; text-transform: uppercase; }
.say-hi { position: absolute; right: 120px; top: 190px; display: grid; place-items: center; width: 190px; height: 190px; border-radius: 50%; background: var(--mandarin); color: var(--ink); font-weight: 600; font-size: 1.25rem; text-decoration: none; transition: transform 0.35s var(--ease-out); will-change: transform; }
.say-hi:active { scale: 0.96; }
.rows { margin: 70px 0 0; padding: 0; list-style: none; border-top: 2px solid var(--text); }
.rows a { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--line); text-decoration: none; font-family: var(--display); font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1; text-transform: uppercase; transition: color 0.2s ease, padding 0.35s var(--ease-out); }
.rows a span { font-family: var(--mono); font-size: 0.875rem; letter-spacing: 0.04em; text-transform: none; }
@media (hover: hover) and (pointer: fine) { .rows a:hover { color: var(--mandarin); padding-left: 14px; } }

.site-footer { background: var(--forest); color: var(--cream); padding: 70px var(--gutter) 34px; --focus: var(--crest); }
.wordmark { display: block; width: 100%; height: auto; }
.wordmark text { font-family: var(--display); font-size: 160px; fill: var(--mandarin); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; margin-top: 34px; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: #CFE0D6; }
.footer-row a { color: var(--cream); text-decoration: none; }
.footer-row a:hover { color: var(--crest); }

/* ---------- Login ---------- */
.login { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 560px), 1fr)); min-height: 100svh; }
.keyring-panel { position: relative; min-height: 640px; background: var(--band); color: var(--band-text); overflow: clip; }
.keyring-panel .label { position: absolute; top: 32px; color: var(--band-muted); }
.keyring-panel .label--l { left: 40px; } .keyring-panel .label--r { right: 40px; }
.keyring-panel .label--b { top: auto; bottom: 32px; left: 40px; }
.keyring { position: absolute; left: 50%; top: 0; width: 560px; height: 640px; margin-left: -280px; }
/* The whole keyring swings from the top of the cord (site.js); each tag hangs from a point on the ring's lower arc
   (--ax, --ay, the wire's centre) and swings on it. The ring is drawn over the loops, so the wire passes through them. */
.kr-swing { position: absolute; inset: 0; transform-origin: 280px 0; }
.kr-swing > svg { position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; }
.ktag { position: absolute; left: var(--ax); top: calc(var(--ay) - 9px); display: flex; flex-direction: column; align-items: center; translate: -50% 0; rotate: var(--rest); transform-origin: 50% 0; }
.ktag .loop { width: 18px; height: 22px; border: 4px solid #C9D2CE; border-bottom: 0; border-radius: 10px 10px 0 0; }
.ktag--circle { --ax: 238px; --ay: 250px; --rest: 44deg; }
.ktag--circle .body { width: 150px; height: 150px; border-radius: 50%; background: var(--mandarin); color: var(--ink); display: grid; place-items: center; font-family: var(--display); font-size: 54px; box-shadow: inset 0 0 0 6px rgba(255,255,255,0.18); }
.ktag--long { --ax: 260px; --ay: 270px; --rest: 4deg; }
.ktag--long .body { position: relative; width: 96px; height: 296px; border-radius: 18px; background: var(--forest); box-shadow: inset 0 0 0 6px rgba(255,255,255,0.12); }
/* Vertical text (not a rotated horizontal line), centred absolutely: grid tracks mis-size vertical text. */
.ktag--long .body span { position: absolute; left: 50%; top: 50%; writing-mode: vertical-rl; transform: translate(-50%, -50%) rotate(180deg); white-space: nowrap; font-family: var(--display); font-size: 44px; line-height: 1; color: var(--cream); }
.ktag--tri { --ax: 300px; --ay: 270px; --rest: -30deg; }
.ktag--tri .body { width: 170px; height: 150px; background: var(--crest); clip-path: polygon(50% 0, 100% 100%, 0 100%); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 18px; font-family: var(--display); font-size: 44px; color: var(--forest); }
.ktag--lock { --ax: 322px; --ay: 250px; --rest: -48deg; top: calc(var(--ay) - 8px); }
.ktag--lock .loop { width: 14px; height: 18px; border-width: 3px; }
.ktag--lock .body { width: 78px; height: 116px; border-radius: 12px; background: var(--cream); display: grid; place-items: center; color: var(--ink); }
.ktag--lock svg { width: 30px; height: 30px; }

.login-main { display: flex; flex-direction: column; padding: 0 0 48px; }
.login-main .site-header { padding-inline: 64px; }
.login-body { flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: 460px; padding: 24px 64px 0; box-sizing: content-box; }
.login-body h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(5rem, 9vw, 8.25rem); line-height: 0.88; letter-spacing: -0.01em; text-transform: uppercase; }
.login-note { margin: 22px 0 34px; font-size: 1.1875rem; color: var(--muted); }
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
.field input { height: 54px; padding: 0 16px; border: 2px solid var(--text); border-radius: 0; background: transparent; color: var(--text); font: inherit; font-family: var(--sans); font-size: 1.0625rem; letter-spacing: 0; text-transform: none; }
.field input:-webkit-autofill { -webkit-box-shadow: 0 0 0 100px var(--bg) inset; -webkit-text-fill-color: var(--text); }
.form .btn { justify-self: start; margin-top: 8px; }
.form-error { margin: 0; padding: 14px 16px; background: var(--mandarin); color: var(--ink); font-weight: 500; }
.form-error[hidden] { display: none; }
.access { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }
.access p { margin: 0; font-size: 1.0625rem; line-height: 1.55; }
.access a { font-weight: 600; }
.access .label { margin-top: 16px; font-size: 0.75rem; letter-spacing: 0.04em; text-transform: none; }

/* ---------- Portfolio ---------- */
.page-title { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 40px var(--gutter) 56px; }
.page-title h1 { margin: 0; display: flex; align-items: flex-start; gap: 14px; font-family: var(--display); font-weight: 400; font-size: clamp(4.5rem, 14.6vw, 13rem); line-height: 0.85; letter-spacing: -0.01em; text-transform: uppercase; }
.page-title h1 .count { font-family: var(--mono); font-size: clamp(0.875rem, 1.6vw, 1.375rem); line-height: 1; margin-top: 0.8em; }
.page-title p { margin: 0 0 18px; max-width: 300px; font-size: 1.1875rem; line-height: 1.45; color: var(--muted); }

.folders-stack { padding: 0 var(--gutter) 80px; }
.folder { position: sticky; top: 20px; padding-top: 14px; }
.folder + .folder { margin-top: 64px; }
.folder-tab { display: inline-flex; align-items: center; height: 54px; padding: 0 26px; border-radius: 14px 14px 0 0; font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase; }
.folder:nth-child(2) .folder-tab { margin-left: min(380px, 30%); }
.folder-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 48px; padding: 48px; border-radius: 0 18px 18px 18px; box-shadow: 0 -18px 40px -30px var(--shadow); }
.folder:nth-child(2) .folder-body { border-radius: 18px; }
.folder--paper .folder-tab, .folder--paper .folder-body { background: var(--paper); color: var(--paper-text); }
.folder--forest .folder-tab, .folder--forest .folder-body { background: var(--forest); color: var(--cream); }
.folder h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(3.5rem, 7vw, 6.25rem); line-height: 0.9; letter-spacing: -0.01em; text-transform: uppercase; }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 28px; margin: 30px 0 0; padding: 20px 0; border-top: 1.5px solid currentColor; border-bottom: 1px solid var(--paper-line); font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.04em; text-transform: uppercase; }
.facts dt { color: var(--paper-muted); }
.facts dd { margin: 0; }
.folder--forest .facts { border-bottom-color: #2E7A64; }
.folder--forest .facts dt { color: #B9D3C8; }
.folder p.desc { margin: 24px 0 0; max-width: 520px; font-size: 1.125rem; line-height: 1.55; }
.folder .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.folder--paper .btn-dark { background: var(--paper-text); color: var(--paper); }
.folder--forest .btn-ghost { color: var(--cream); }

.preview { position: relative; display: block; align-self: start; border: 1.5px solid currentColor; border-radius: 12px; overflow: hidden; text-decoration: none; background: var(--bg); }
.chrome { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-bottom: 1.5px solid currentColor; font-family: var(--mono); font-size: 0.6875rem; color: var(--muted); background: var(--bg); }
.chrome i { width: 10px; height: 10px; border-radius: 50%; }
.chrome i:nth-child(1) { background: var(--mandarin); } .chrome i:nth-child(2) { background: var(--crest); } .chrome i:nth-child(3) { background: var(--forest); }
.chrome span { margin-left: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: left top; transition: transform 0.6s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .preview:hover img { transform: scale(1.025); } .preview { cursor: none; } }
.cursor-label { position: fixed; left: 0; top: 0; z-index: 50; display: flex; align-items: center; gap: 8px; pointer-events: none; opacity: 0; transition: opacity 0.2s ease; }
.cursor-label.is-on { opacity: 1; }
.cursor-label .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); }
.cursor-label .tag { padding: 9px 15px; border-radius: 999px; background: var(--mandarin); color: var(--ink); font-weight: 600; font-size: 0.9375rem; }
.updated { margin-top: 18px; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.8; }

/* ---------- Case studies ---------- */
.crumb { display: inline-block; margin: 36px var(--gutter) 26px; font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; }
.crumb:hover { color: var(--mandarin); }
.case-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: end; padding: 0 var(--gutter) 56px; }
@media (min-width: 960px) { .case-head { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); } }
/* The title column is a size container, so a title word up to about 3.8em wide in Anton always fits it. */
.case-head > div:first-child { container-type: inline-size; min-width: 0; }
.case-head h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(3.5rem, 12vw, 13rem); font-size: clamp(3.5rem, 26cqi, 13rem); line-height: 0.85; letter-spacing: -0.01em; text-transform: uppercase; }
.case-head .lede { margin: 28px 0 0; max-width: 580px; font-size: clamp(1.125rem, 1.8vw, 1.5rem); line-height: 1.4; }
.case-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 14px 32px; margin: 0; padding: 24px 0; border-top: 2px solid var(--text); border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 0.875rem; letter-spacing: 0.04em; text-transform: uppercase; }
.case-facts dt { color: var(--muted); }
.case-facts dd { margin: 0; }
.shot { padding: 0 var(--gutter); }
.shot .frame { border: 2px solid var(--text); border-radius: 16px; overflow: hidden; }
.shot .frame .chrome { height: 44px; border-bottom-width: 2px; }
.shot .frame img { display: block; width: 100%; height: auto; }
.shot .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 110px var(--gutter) 0; border-top: 2px solid var(--text); }
.stats div { padding: 28px 24px 30px; border-right: 1px solid var(--line); }
.stats div:first-child { padding-left: 0; }
.stats div:last-child { border-right: 0; }
.stats b { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(3.5rem, 6.6vw, 6rem); line-height: 1; }
.stats div:last-child b { color: var(--mandarin); }
.stats span { display: block; margin-top: 10px; font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.why { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 32px; padding: 120px var(--gutter) 0; }
.why p:last-child { margin: 0; max-width: 980px; font-size: clamp(1.75rem, 3.6vw, 3.25rem); line-height: 1.15; font-weight: 500; letter-spacing: -0.02em; }
.block { padding: 110px var(--gutter) 0; }
.block > .label { margin-bottom: 22px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.step { padding: 26px; border: 1.5px solid var(--text); border-radius: 14px; }
.step .n { margin: 0 0 40px; font-family: var(--mono); font-size: 0.8125rem; }
.step h3 { margin: 0 0 10px; font-family: var(--display); font-weight: 400; font-size: 2.125rem; line-height: 1; text-transform: uppercase; }
.step p { margin: 0; font-size: 1rem; line-height: 1.5; color: var(--muted); }
.step--accent { border-color: var(--mandarin); background: var(--mandarin); color: var(--ink); }
.step--accent p { color: var(--ink); }
.step--dark { border-color: var(--band); background: var(--band); color: var(--band-text); }
.step--dark p { color: #CFE0D6; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0.04em; text-transform: uppercase; }
.chips span { padding: 9px 14px; border: 1.5px solid var(--text); border-radius: 999px; }
.chips .hl { border-color: var(--crest); background: var(--crest); color: var(--forest); }
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; }
.person { display: flex; gap: 22px; align-items: center; padding: 26px; border: 1.5px solid var(--text); border-radius: 14px; }
.person .av { flex: none; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 34px; }
.person h3 { margin: 0 0 6px; font-family: var(--display); font-weight: 400; font-size: 2.125rem; line-height: 1; text-transform: uppercase; }
.person p { margin: 0; color: var(--muted); }
.fine { margin: 26px 0 0; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.04em; color: var(--muted); }
.next { display: grid; grid-template-columns: minmax(0, 1fr) 360px; align-items: center; gap: 40px; margin: 130px var(--gutter) 0; padding: 40px 0 90px; border-top: 2px solid var(--text); text-decoration: none; }
.next .label { display: block; }
.next b { display: block; margin-top: 14px; font-family: var(--display); font-weight: 400; font-size: clamp(3.5rem, 10vw, 9.4rem); line-height: 0.88; letter-spacing: -0.01em; text-transform: uppercase; transition: color 0.2s ease; }
.next img { display: block; width: 360px; height: 225px; object-fit: cover; object-position: left top; border-radius: 12px; transform: rotate(3deg); box-shadow: 0 24px 40px -24px var(--shadow); transition: transform 0.5s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .next:hover b { color: var(--mandarin); } .next:hover img { transform: rotate(0deg) scale(1.03); } }

/* ---------- 404 ---------- */
.lost { padding: 40px var(--gutter) 120px; }
.lost h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(6rem, 22vw, 18rem); line-height: 0.85; }
.lost p { max-width: 460px; font-size: 1.25rem; color: var(--muted); }

/* ---------- Motion ---------- */
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes tile-in { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: none; } }

.hero-me { animation: rise 0.9s var(--ease-out) 0.15s backwards; }
.hero-toy .t { animation: tile-in 0.55s var(--ease-out) backwards; animation-delay: calc(0.2s + var(--d, 0) * 45ms); }
.hero-intro, .hero-place { animation: rise 0.8s var(--ease-out) 0.35s backwards; }

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 0.35s ease both; }
::view-transition-new(root) { animation: vt-in 0.6s var(--ease-in-out) both; }
@keyframes vt-out { to { opacity: 0.4; transform: translateY(-24px); } }
@keyframes vt-in { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }

@media (prefers-reduced-motion: reduce) {
  html:not(.lenis) { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .marquee { animation: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1199px) {
  .doodle-arrow, .doodle-note { display: none; }
  .hero-intro { width: min(280px, 34vw); }
  /* Smaller Say hi, pinned to the right edge and centred on the heading (171px down, 0.88em tall), so it never covers "Talk". */
  .say-hi { width: 150px; height: 150px; right: var(--gutter); top: calc(96px + 0.44 * clamp(5.5rem, 16vw, 14.4rem)); }
}
@media (max-width: 959px) {
  .hero { --H: calc(var(--s) * 3); --bb: 0.81; --sun: 2.8; --hh: clamp(700px, calc(100svh - 90px), 860px); }
  .about, .why { grid-template-columns: 1fr; padding-top: 100px; }
  .now-grid { grid-template-columns: 1fr; }
  .now-item, .now-item:first-child, .now-item:last-child { padding: 22px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .now-item:last-child { border-bottom: 0; }
  .band { grid-template-columns: 1fr; padding-block: 90px; }
  .folders { height: 260px; max-width: 520px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats div:nth-child(2) { border-right: 0; }
  .stats div:nth-child(3) { padding-left: 0; }
  .next { grid-template-columns: 1fr; }
  .next img { width: min(360px, 100%); height: auto; aspect-ratio: 16 / 10; }
  .folder { position: static; }
}

/* ---------- Phone ---------- */
@media (max-width: 719px) {
  .site-header { padding-block: 16px; }
  .clock { display: none; }
  .site-nav { order: 3; width: 100%; gap: 6px 20px; }
  .hero {
    --s: clamp(64px, 24vw, 104px);
    --bb: 0.85;
    --H: calc(var(--s) * 3.1);
    --sun: 3;
    /* The pill and toy sit at fixed heights from the top, while the sun, photo and note rise about 3.7px for
       every 1px of --s. Growing the hero by the same amount keeps the 375px spacing on wider phones. */
    height: max(700px, calc(700px + (var(--s) - 90px) * 3.7));
    background-size: 32px 32px;
  }
  .hero-corner { top: 14px; font-size: 0.6875rem; }
  .hero-toy { left: 22px; top: 52px; width: 120px; }
  .shuffle { width: 44px; height: 44px; right: -18px; bottom: -18px; }
  .shuffle .icon { width: 20px; height: 20px; }
  .hero-place { top: 228px; bottom: auto; left: 20px; gap: 10px; padding: 8px 8px 8px 14px; font-size: 0.75rem; }
  .hero-place .globe { width: 32px; height: 32px; }
  .hero-place svg { width: 18px; height: 18px; }
  .hero-intro { top: 58px; right: 20px; width: 172px; text-align: right; }
  .hero-tagline { font-size: 1.3125rem; }
  .sig { font-size: 1.375rem; margin-top: 8px; transform-origin: right; }
  .doodle-spark { width: 44px; }
  /* Above the sun (its top sits about 19% of the photo's height above the photo), pinned to the left gutter. */
  .doodle-note--phone { display: block; left: calc(var(--gutter) - 50vw + 50%); right: auto; top: calc(-19% - 46px); bottom: auto; font-size: 1.0625rem; }
  .hero-corner--r { display: none; }
  .about { padding: 64px var(--gutter) 56px; gap: 14px; }
  .now { padding-bottom: 64px; }
  .contact { padding: 70px var(--gutter) 40px; }
  /* "Let's" and "Talk" on their own lines, with the button beside "Talk" (centred on the second line). */
  .talk { width: min-content; }
  .say-hi { width: 112px; height: 112px; right: var(--gutter); top: calc(35px + 1.32 * clamp(5.5rem, 16vw, 14.4rem)); font-size: 1rem; }
  .rows { margin-top: 40px; }
  .rows a span { display: none; }
  .rows a.show-detail span { display: inline; min-width: 0; font-size: 0.6875rem; text-align: right; overflow-wrap: anywhere; } /* the email wraps on the narrowest phones */
  .site-footer { padding: 40px var(--gutter) 30px; }
  .keyring-panel { min-height: 420px; }
  .keyring { transform: scale(0.62); transform-origin: 50% 0; }
  .keyring-panel .label--r { display: none; } /* no room beside the left label; a tap still swings it */
  .keyring-panel .label { font-size: 0.6875rem; }
  .keyring-panel .label--l, .keyring-panel .label--b { left: 20px; }
  .login-main .site-header, .login-body { padding-inline: var(--gutter); }
  .folder-body { padding: 24px 18px; gap: 24px; }
  .folder:nth-child(2) .folder-tab { margin-left: auto; }
  .folder:nth-child(2) { display: flex; flex-direction: column; }
  .folder:nth-child(2) .folder-tab { align-self: flex-end; }
  .folder-tab { height: 42px; padding: 0 16px; font-size: 0.6875rem; }
  .shot .actions .btn, .folder .actions .btn { flex: 1 1 100%; justify-content: center; }
}

/* Smallest phones: the top label would touch the cord */
@media (max-width: 359px) { .keyring-panel .label--l { display: none; } }
