@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/instrument-serif.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("fonts/dm-sans.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0c0e12;
  --bg-raised: #12151b;
  --bg-sunk: #08090c;
  --ink: #f2f0ea;
  --muted: #a3abb8;
  --faint: #7d8593;
  --line: rgba(242, 240, 234, 0.1);
  --line-strong: rgba(242, 240, 234, 0.2);
  --accent: #d4a574;
  --accent-ink: #1a120a;
  --font: "DM Sans", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --measure: 1120px;
  --pad: clamp(1.25rem, 4vw, 2rem);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 10;
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 1rem; }

/* -- Header -- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: calc(var(--measure) + 2 * var(--pad));
  margin: 0 auto;
  padding: 1.25rem var(--pad);
}
.mark { display: inline-flex; }
.mark img { display: block; height: 25px; width: auto; }
nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.95rem;
}
nav a {
  color: var(--muted);
  text-decoration: none;
}
nav a:hover { color: var(--ink); }
nav .nav-cta {
  color: var(--ink);
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}
nav .nav-cta:hover { border-color: var(--ink); }

main {
  max-width: calc(var(--measure) + 2 * var(--pad));
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* -- Hero -- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(220px, 24vw, 280px);
  gap: 2.5rem clamp(2.5rem, 8vw, 7rem);
  align-items: start;
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(4rem, 9vw, 7rem);
}
.hero-copy { max-width: 35rem; }

.eyebrow {
  margin: 0 0 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.015em;
}
h1 {
  margin: 0 0 1.1rem;
  font-size: clamp(2.5rem, 5.4vw, 4rem);
  line-height: 1.04;
}
h2 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.9rem, 3.2vw, 2.4rem);
  line-height: 1.1;
}
h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.lede {
  margin: 0 0 1.75rem;
  max-width: 30rem;
  font-size: 1.12rem;
  line-height: 1.55;
  color: var(--muted);
}
.lede.short { font-size: 1.05rem; }
.lede + .method { margin-top: -0.75rem; }
.method {
  margin: 0 0 1.75rem;
  max-width: 30rem;
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #e0b88c; }
.btn.ghost { color: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.full { width: 100%; }

.hero-photo {
  margin: 0;
  justify-self: end;
  width: 100%;
}
.hero-photo img {
  display: block;
  width: 100%;
  height: var(--hero-photo-h, 340px);
  object-fit: cover;
  object-position: 50% 15%;
  border-radius: 6px;
}
.hero-photo figcaption {
  display: flex;
  flex-direction: column;
  margin-top: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.4;
}
.hero-photo figcaption strong { font-weight: 600; }
.hero-photo figcaption span { color: var(--muted); font-size: 0.88rem; }

/* -- Sections -- */
.section {
  padding: clamp(3rem, 6vw, 4.5rem) 0;
  border-top: 1px solid var(--line);
}
.section-note {
  margin: 0;
  color: var(--muted);
}
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

/* -- What I help with -- */
.help {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 1.5rem 3rem;
  padding-bottom: clamp(3.5rem, 8vw, 6rem);
}
.help-list article {
  display: grid;
  grid-template-columns: minmax(10rem, 13rem) minmax(0, 1fr);
  gap: 0.35rem 2rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
}
.help-list article:first-child { border-top: 0; padding-top: 0.5rem; }
.help-list p {
  margin: 0;
  max-width: 30rem;
  color: var(--muted);
}

/* -- Pause / play -- */
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  padding: 0.4rem 0.8rem;
  font: inherit;
  font-size: 0.85rem;
  color: var(--muted);
  background: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}
.toggle:hover { color: var(--ink); border-color: var(--line-strong); }
.toggle-icon {
  width: 8px;
  height: 9px;
  border-left: 2.5px solid currentColor;
  border-right: 2.5px solid currentColor;
}
.toggle[data-state="paused"] .toggle-icon {
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 4.5px 0 4.5px 8px;
  border-color: transparent transparent transparent currentColor;
}
.toggle[hidden] { display: none; }


/* -- Results metrics under founder portrait -- */
.hero-metrics {
  margin-top: 1.15rem;
  padding-top: 1.05rem;
  border-top: 1px solid var(--line);
}
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1rem;
  margin: 0;
  text-align: left;
}
.metric-value {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.55rem, 2.4vw, 1.85rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.metric-label {
  margin: 0.3rem 0 0;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--muted);
}

/* -- Film strip -- */
.clip { padding-bottom: clamp(3.5rem, 7vw, 5.5rem); }

.reel {
  position: relative;
  padding: 26px 12px;
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.reel::before,
.reel::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  height: 8px;
  background: radial-gradient(circle, rgba(242, 240, 234, 0.13) 0 2.5px, transparent 3px) 0 0 / 18px 8px repeat-x;
}
.reel::before { top: 9px; }
.reel::after { bottom: 9px; }

.reel-frames {
  list-style: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.frame {
  display: flex;
  flex-direction: column;
  min-height: 12.5rem;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 3px;
  transition: border-color 0.4s ease;
}
.frame.is-live { border-color: rgba(212, 165, 116, 0.55); }

.frame-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: opacity 0.4s ease;
}
.frame.is-live .frame-head { color: var(--ink); }
.frame-no { color: var(--faint); margin-right: 0.3rem; }
.frame.is-live .frame-no { color: var(--accent); }
.tc {
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: var(--faint);
}

.frame-body {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.9rem;
  font-size: 0.93rem;
  line-height: 1.45;
  transition: opacity 0.4s ease;
}
.frame-body p { margin: 0; }

.reel.is-running .frame:not(.is-live):not(.is-done) .frame-body { opacity: 0.12; }
.reel.is-running .frame:not(.is-live):not(.is-done) .frame-head { opacity: 0.6; }
.reel.is-paused * { animation-play-state: paused !important; }

.line { color: var(--ink); font-weight: 500; }

.checks {
  list-style: none;
  margin: 0;
  padding: 0;
}
.checks li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0;
  transition: opacity 0.3s ease;
}
.checks li::before {
  content: "";
  flex: none;
  width: 0.9rem;
  height: 0.9rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='%23d4a574' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.reel.is-running .frame:not(.is-done) .checks li:not(.is-in) { opacity: 0; }

.choices {
  display: flex;
  gap: 0.5rem;
}
.choice {
  padding: 0.35rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
}
.choice.go {
  color: var(--ink);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.frame.is-pressed .choice.go {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.status {
  margin-top: auto !important;
  padding-top: 0.6rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
  transition: opacity 0.4s ease;
}
.reel.is-running .frame:not(.is-status) .status { opacity: 0; }

/* -- Common problems -- */
.problems {
  --gap: 1rem;
  padding-bottom: clamp(3rem, 6vw, 4rem);
}
.marquee {
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
}
.marquee.is-dragging { cursor: grabbing; user-select: none; }
.marquee-track {
  display: flex;
  gap: var(--gap);
  width: max-content;
  will-change: transform;
}
.slip {
  --slip-w: calc((min(100vw - 2 * var(--pad), var(--measure)) - 2 * var(--gap)) / 3);
  flex: 0 0 var(--slip-w);
  width: var(--slip-w);
  padding: 1.2rem 1.25rem 1.3rem;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.tier {
  margin: 0 0 0.35rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.slip h3 { margin-bottom: 0.4rem; }
.slip h3 + p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
}
.marquee.is-static {
  overflow-x: auto;
  cursor: auto;
  padding-bottom: 0.5rem;
}
.marquee.is-static .marquee-track { will-change: auto; }

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  padding-bottom: clamp(4rem, 8vw, 6rem);
}
.contact-actions { margin: 0 0 1rem; }
.email-line { margin: 0; color: var(--muted); }
.email-line a { color: var(--accent); }

.form {
  display: grid;
  gap: 1rem;
}
.form label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
}
.optional { color: var(--muted); font-weight: 400; }
.form input,
.form textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--bg-raised);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
}
.form textarea { resize: vertical; }
.form textarea::placeholder { color: var(--faint); }
.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form input:focus-visible,
.form textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.hp {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-status {
  min-height: 1.3rem;
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.form-status.ok { color: #8fd6a8; }
.form-status.err { color: #f0a0a0; }

footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.25rem 0 2rem;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
@media (max-width: 1184px) {
  footer { margin: 0 var(--pad); }
}

/* -- Responsive -- */
@media (max-width: 960px) {
  .help { grid-template-columns: 1fr; }
  .reel-frames { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact { grid-template-columns: 1fr; }
  .form { max-width: 34rem; }
}

@media (max-width: 720px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 2rem;
  }
  .hero-photo {
    order: -1;
    justify-self: start;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem 1.1rem;
    width: auto;
    max-width: 100%;
  }
  .hero-photo img {
    width: 8.5rem;
    height: 10rem;
  }
  .hero-photo figcaption { margin: 0; }
  .hero-metrics {
    flex: 1 1 100%;
    width: 100%;
    margin-top: 0.35rem;
    padding-top: 0.9rem;
  }
  .metrics-grid { gap: 0.75rem 1.25rem; max-width: 18rem; }
  .help-list article { grid-template-columns: 1fr; }
  .slip { --slip-w: min(78vw, 20rem); }
  .section-head { flex-direction: column; align-items: flex-start; gap: 0.9rem; }
}

@media (max-width: 520px) {
  .reel { padding: 24px 8px; }
  .reel-frames { grid-template-columns: 1fr; }
  .frame { min-height: 0; }
  nav { gap: 0.9rem; }
  nav a[href="#work"] { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn,
  .frame,
  .frame-head,
  .frame-body,
  .checks li,
  .choice.go,
  .status { transition: none; }
}
