@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2");
}

/* Layout: one dark room. A bulb hangs off-centre; pulling its cord floods the page with light
   and the wordmark unfolds. Below, a quiet single column of sections on the lit page. */
@property --bg     { syntax: '<color>'; inherits: true; initial-value: #110c09; }
@property --fg     { syntax: '<color>'; inherits: true; initial-value: #8f8277; }
@property --strong { syntax: '<color>'; inherits: true; initial-value: #dccdbd; }
@property --line   { syntax: '<color>'; inherits: true; initial-value: #221914; }
@property --panel  { syntax: '<color>'; inherits: true; initial-value: #170f0b; }
@property --slate  { syntax: '<color>'; inherits: true; initial-value: #7a6a5a; }
@property --ink    { syntax: '<color>'; inherits: true; initial-value: #c7914a; }

:root {
  /* Espresso: dark roast room, warm paper when lit, brass tagline. Dark-room tokens here, lit tokens under .on */
  --room-dark: #110c09;
  --room-lit: #efe9e1;
  --bg: #110c09;
  --fg: #8f8277;
  --strong: #dccdbd;
  --line: #221914;
  --panel: #170f0b;
  --slate: #7a6a5a;
  --ink: #c7914a;            /* tungsten, readable on the current ground */
  --filament: #ffb648;       /* decorative glow only */
  --glass-line: rgba(255,255,255,.13);

  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --display: var(--mono);
  --body: var(--mono);

  --t-h2: clamp(28px, 4.4vw, 52px);
  --t-h3: 19px;
  --t-body: 15.5px;
  --t-small: 12px;

  color-scheme: dark;
  transition: --bg .9s ease .1s, --fg .9s ease .1s, --strong .9s ease .1s, --line .9s ease .1s, --panel .9s ease .1s, --slate .9s ease .1s, --ink .9s ease .1s;
}
:root.on {
  --bg: #efe9e1; --fg: #4d4036; --strong: #2b1d14; --line: #ddd2c5; --panel: #f8f4ee; --slate: #a8875a;
  --ink: #8a5a1c;
  --glass-line: rgba(160,110,40,.45);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { background: var(--room-dark); }
body {
  margin: 0;
  background: var(--room-dark);
  position: relative; z-index: 0;   /* own stacking context so the lit .room layer paints above this background */
  color: var(--fg);
  font: 400 var(--t-body)/1.7 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 4px; }
.label {
  font: 500 var(--t-small)/1.3 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  /* the first screen is the dark room only; everything else starts below the fold */
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}
.bloom {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(circle at var(--bx, 70%) var(--by, 40%), rgba(255,200,120,.55) 0, rgba(255,214,160,.22) 18%, rgba(255,230,200,0) 52%);
  opacity: 0;
  transition: opacity 1.4s ease;
}
.on .bloom { opacity: 1; }
.room {
  /* the lit room: a fixed layer that grows out of the bulb */
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: var(--room-lit);
  -webkit-mask-image: linear-gradient(transparent, transparent);
  mask-image: linear-gradient(transparent, transparent);
}
/* elements that light up when the light front reaches them; --d is set from their distance to the bulb */
[data-lit] { transition: opacity .45s ease var(--d, 0s); }

.lamp {
  position: absolute; top: 0; left: 68%;
  width: clamp(150px, 17vw, 210px);
  transform: translateX(-50%);
  transform-origin: 50% 0;
  z-index: 2;
}
.lamp svg { display: block; width: 100%; height: auto; overflow: visible; }
.lamp.swing { animation: swing 1.6s cubic-bezier(.3,.6,.3,1); }
@keyframes swing {
  0% { transform: translateX(-50%) rotate(0); }
  18% { transform: translateX(-50%) rotate(2.4deg); }
  42% { transform: translateX(-50%) rotate(-1.6deg); }
  66% { transform: translateX(-50%) rotate(.8deg); }
  100% { transform: translateX(-50%) rotate(0); }
}
.wire { stroke: var(--glass-line); stroke-width: 1.4; }
.socket rect { fill: var(--panel); stroke: var(--glass-line); stroke-width: 1.2; }
.socket line { stroke: var(--glass-line); stroke-width: 1; }
.glass { fill: rgba(255,255,255,.015); stroke: var(--glass-line); stroke-width: 1.4; transition: fill .3s; }
.filament { fill: none; stroke: var(--glass-line); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.halo { opacity: 0; transition: opacity .25s; }
.lit .glass { fill: url(#glassLit); stroke: rgba(255,190,110,.7); }
.lit .filament { stroke: #fff4dc; filter: drop-shadow(0 0 3px #ffc46b) drop-shadow(0 0 8px #ffb648); }
.lit .halo { opacity: 1; }
.cord { stroke: var(--fg); stroke-width: 1.4; opacity: .7; }
.knob { cursor: grab; touch-action: none; outline: none; }
.knob:active { cursor: grabbing; }
.knob .bead { fill: var(--strong); }
.knob .hit { fill: transparent; }
.knob:focus-visible .ring { stroke: var(--ink); stroke-width: 1.5; fill: none; }
.knob.nudge .bead-g { animation: nudge 2.4s ease-in-out infinite; }
@keyframes nudge { 0%, 70%, 100% { transform: translateY(0); } 80% { transform: translateY(9px); } 90% { transform: translateY(-2px); } }
.hint {
  font: 500 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase;
  fill: var(--strong); opacity: .8; transition: opacity .6s;
}
.on .hint { opacity: .35; }

.hero-copy {
  position: relative;
  padding-block: 0 clamp(48px, 9vh, 96px);
  display: grid; gap: 22px;
}
.eyebrow { opacity: .6; }
.on .eyebrow { opacity: 1; }
.lockup {
  --h: clamp(56px, 8.4vw, 118px);
  margin: 0; display: flex; align-items: flex-start;
  color: var(--strong);
}
.lockup svg { display: block; fill: currentColor; overflow: visible; }
.lockup .mark { height: var(--h); width: auto; aspect-ratio: 505 / 136; opacity: .3; }
.on .lockup .mark { opacity: 1; }
.lockup .mask { margin-left: calc(var(--h) * 57 / 136); padding-top: calc(var(--h) * 19 / 136); }
.lockup .rest {
  height: calc(var(--h) * 119 / 136); width: auto; aspect-ratio: 699 / 119;
  opacity: 0;
}
.lockup .rest .tag { fill: var(--slate); }
.on .lockup .rest { opacity: 1; }
.lede { margin: 0; max-width: 40ch; font-size: 17px; line-height: 1.6; color: var(--fg);
  opacity: 0; }
.on .lede { opacity: 1; }
.scroll { display: inline-flex; gap: 10px; align-items: center; text-decoration: none; opacity: .55; }
.scroll::after { content: ""; width: 1px; height: 26px; background: currentColor; }

/* ---------- Sections ---------- */
section.block { padding-block: clamp(72px, 11vw, 140px); border-top: 1px solid var(--line); }
h2 {
  margin: 0;
  font: 600 var(--t-h2)/1.08 var(--display);
  letter-spacing: -.045em;
  color: var(--strong);
  text-wrap: balance;
}
h3 { margin: 0; font: 600 var(--t-h3)/1.3 var(--display); letter-spacing: -.02em; color: var(--strong); }
p { margin: 0; }

.belief { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; justify-items: start; }
.belief h2 { max-width: 18ch; }
.belief h2 em { font-style: normal; color: var(--ink); }
.belief .copy { display: grid; gap: 16px; max-width: 60ch; }

.head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(36px, 5vw, 56px); }
.areas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.area {
  display: grid; gap: 14px; align-content: start;
  padding: clamp(24px, 3.4vw, 40px);
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.area::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,190,100,.16), transparent 45%);
  opacity: 0; transition: opacity .3s;
}
.area:hover::before { opacity: 1; }
.area { isolation: isolate; }
.area p { max-width: 44ch; }
.spec { font: 400 12px/1.5 var(--mono); color: var(--ink); letter-spacing: .02em; }

.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); }
.about .copy { display: grid; gap: 18px; max-width: 54ch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 6px 0 0; list-style: none; }
.chips li { font: 500 12px/1 var(--body); padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--strong); }
.path { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--line); }
.path li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 16px; padding-block: 18px; border-bottom: 1px solid var(--line); }
.path .yr { font: 400 13px/1.6 var(--mono); color: var(--fg); font-variant-numeric: tabular-nums; }
.path strong { display: block; color: var(--strong); font-weight: 600; }
.path span.d { font-size: 14px; }

.contact { display: grid; gap: 28px; }
.contact h2 { max-width: 16ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 14px/1 var(--body); text-decoration: none;
  padding: 15px 20px; border-radius: 999px; border: 1px solid var(--strong);
  color: var(--bg); background: var(--strong); cursor: pointer;
}
.btn.ghost { background: transparent; color: var(--strong); }

/* "Drop me a message": a pill that opens into a field, with a send arrow revealed at its right edge */
.msg {
  position: relative; display: flex; align-items: center;
  height: 46px; width: 100%; max-width: var(--closed, 216px);
  border: 1px solid var(--strong); border-radius: 999px; overflow: hidden;
  transition: max-width .55s cubic-bezier(.2,.8,.2,1), border-color .3s;
}
.msg.open { max-width: 560px; }
.msg:focus-within { border-color: var(--ink); }
.msg-open {
  position: absolute; inset: 0; z-index: 1;
  padding: 0 20px; border: 0; background: none; cursor: pointer;
  font: 600 14px/1 var(--body); color: var(--strong); white-space: nowrap; text-align: left;
  transition: opacity .2s;
}
.msg.open .msg-open { opacity: 0; pointer-events: none; }
.msg input[name="message"] {
  flex: 1; min-width: 0; height: 100%;
  padding: 0 10px 0 20px; border: 0; outline: none; background: transparent;
  font: 400 14px var(--mono); color: var(--strong); opacity: 0;
}
.msg input[name="message"]::placeholder { color: var(--fg); opacity: .8; }
.msg.open input[name="message"] { opacity: 1; transition: opacity .3s ease .25s; }
.msg-send {
  flex: none; display: grid; place-items: center;
  width: 0; height: 36px; margin-right: 4px; padding: 0;
  border: 0; border-radius: 999px; cursor: pointer;
  background: var(--strong); color: var(--bg); opacity: 0;
  transition: width .35s cubic-bezier(.2,.8,.2,1) .3s, opacity .25s ease .3s, transform .2s;
}
.msg-send svg { width: 16px; height: 16px; }
.msg.open .msg-send { width: 36px; opacity: 1; }
.msg-send:hover { transform: translate(1px, -1px); }
.msg.sending .msg-send { opacity: .45; cursor: progress; }
.msg.sent { max-width: var(--closed, 216px); border-color: var(--line); }
.msg.sent .msg-open { opacity: 1; cursor: default; color: var(--fg); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.msg-status { margin: 0; min-height: 1.7em; font-size: 13px; color: var(--fg); }
.msg-status a { color: var(--strong); }

/* sections below the hero appear as they come into view */
.js [data-reveal] { opacity: 0; transition: opacity .8s ease; }
.js [data-reveal].seen { opacity: 1; }

footer { border-top: 1px solid var(--line); }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 28px; }
.switch { background: none; border: 0; padding: 0; cursor: pointer; color: var(--fg); }
.switch:hover { color: var(--strong); }

@media (max-width: 760px) {
  .msg input[name="message"] { font-size: 16px; } /* stops iOS zooming into the field */
  .lamp { left: 74%; width: 132px; }
  .lockup { --h: min(64px, calc((100vw - 48px) / 5.3)); flex-direction: column; }
  .lockup .mask { margin-left: 0; padding-top: calc(var(--h) * .22); }
  .about { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .areas { grid-template-columns: minmax(0, 1fr); }
  .path li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .lede { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  :root { transition: none; }
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; animation: none !important; }
}
