@font-face {
  font-family: "Young Serif";
  src: url("/fonts/young-serif-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-grotesk-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bone: #f4efe6;
  --kraft: #e7dfd0;
  --tan: #ddd2bd;
  --ink: #25221e;
  --ink-soft: #5c554b;
  --ochre: #b47a1f;
  --ochre-light: #d9a441;
  --on-dark: #f4efe6;
  --on-dark-soft: #bcb3a4;

  --serif: "Young Serif", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, sans-serif;

  --gutter: max(20px, env(safe-area-inset-left), env(safe-area-inset-right), 4vw);
  --section: clamp(88px, 13vw, 200px);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-pen: cubic-bezier(0.6, 0, 0.3, 1);
  --press: 120ms;
}

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  background: var(--bone);
}
html[data-hero="video"] { background: var(--ink); }
html:has(dialog[open]) { overflow: hidden; }

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, blockquote, figure { margin: 0; }
img, video, iframe, svg { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }

::selection { background: var(--ochre-light); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ochre); outline-offset: 3px; border-radius: 2px; }
.close :focus-visible, [data-hero="video"] .hero :focus-visible { outline-color: var(--ochre-light); }

a, button { touch-action: manipulation; }
.btn, button { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }

/* Bar */
.bar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  padding: max(20px, env(safe-area-inset-top)) var(--gutter) 0;
  pointer-events: none;
}
.wordmark {
  pointer-events: auto;
  display: inline-block;
  padding: 12px 0;
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.2;
  text-decoration: none;
}
[data-hero="video"] .wordmark { color: var(--on-dark); }

/* Hero */
.hero {
  position: relative;
  display: flex;
  min-height: 100svh;
  padding: calc(max(20px, env(safe-area-inset-top)) + 72px) var(--gutter) calc(max(28px, env(safe-area-inset-bottom)) + 8px);
  overflow: hidden;
}
.hero__body {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
}
.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.5rem, 16.4vw, 9.25rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
}
.hero__line { display: block; }
@media (max-width: 639px) { .hero__title { line-height: 1.05; } }
.heading, .ai__title, .close__ask { text-wrap: balance; }
.hero__aside { display: flex; flex-direction: column; gap: 28px; }
.hero__sub { max-width: 34ch; font-size: 1.1875rem; line-height: 1.45; }

/* Hero with video */
.hero__media { position: absolute; inset: 0; z-index: 1; }
.hero__media:empty { display: none; }
.hero__media img, .hero__media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__media video { opacity: 0; transition: opacity 900ms ease; }
.hero__media video.is-playing { opacity: 1; }
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(37 34 30 / 0.62) 0%, rgb(37 34 30 / 0.56) 46%, rgb(37 34 30 / 0.7) 76%, rgb(37 34 30 / 0.8) 100%);
}
[data-hero="video"] .hero { background: var(--ink); color: var(--on-dark); }
[data-hero="video"] .mark--underline { color: var(--ochre-light); }

.hero__pause {
  position: absolute;
  z-index: 2;
  right: var(--gutter);
  top: max(20px, env(safe-area-inset-top));
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: var(--on-dark);
  cursor: pointer;
}
.hero__pause[hidden] { display: none; }
.hero__pause svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.hero__pause .i-play { display: none; }
.hero__pause[aria-pressed="true"] .i-play { display: block; }
.hero__pause[aria-pressed="true"] .i-pause { display: none; }

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 34px;
  background: var(--ink);
  color: var(--on-dark);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border-radius: 3px;
  transition: background-color 220ms ease, color 220ms ease, transform var(--press) var(--ease-out);
}
.btn:active { transform: scale(0.975); }
.btn--light { background: var(--bone); color: var(--ink); }
[data-hero="video"] .hero .btn { background: var(--bone); color: var(--ink); }

/* Hand marks */
.hand { position: relative; display: inline-block; white-space: nowrap; }
.mark { position: absolute; pointer-events: none; color: var(--ochre); overflow: visible; height: auto; }
.mark__ink { fill: currentColor; }
.mark__reveal {
  fill: none;
  stroke: #fff;
  stroke-width: 46;
  stroke-linecap: butt;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 0;
}
.mark--underline { left: -1%; bottom: -0.17em; width: 102%; }
.mark--strike { left: -3%; top: 50%; width: 106%; transform: translateY(-46%); }
.mark--short { left: -2%; bottom: -0.34em; width: 104%; color: var(--ochre-light); }

/* Shared text */
.heading {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.heading--large { font-size: clamp(3.25rem, 10vw, 8.5rem); line-height: 1; letter-spacing: -0.025em; }
.lead {
  font-size: clamp(1.5rem, 3.3vw, 2.5rem);
  line-height: 1.24;
  font-weight: 450;
  letter-spacing: -0.012em;
  text-wrap: pretty;
}
.body { max-width: 56ch; font-size: clamp(1.125rem, 1.6vw, 1.3125rem); line-height: 1.5; color: var(--ink-soft); text-wrap: pretty; }
.statement {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.6vw, 4rem);
  line-height: 1.14;
  letter-spacing: -0.012em;
  text-wrap: pretty;
}

/* What I do */
.what { padding: var(--section) var(--gutter); display: grid; gap: 28px; }
.what__body { display: grid; gap: 28px; }
.what .body { color: var(--ink); }
.what__next { display: block; margin-top: 0.7em; font-weight: 600; }

/* Why me */
.why { padding: 0 var(--gutter) var(--section); display: grid; gap: 28px; }
.why__choice { margin-top: 28px; }
.signature { font-size: 1.0625rem; font-weight: 600; }

/* AI */
.ai { padding: var(--section) var(--gutter); background: var(--kraft); }
.ai__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.75rem, 10vw, 8.5rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
}
.ai__body { margin-top: clamp(48px, 7vw, 104px); display: grid; gap: 28px; }
.ai__rest { display: grid; gap: 20px; }
.ai .body { color: #4d473e; }
.ai .ai__end { color: var(--ink); font-weight: 600; }

/* Owner-filled sections */
.slot[hidden] { display: none; }
.slot { padding: var(--section) var(--gutter) 0; background: var(--tan); }
.slot.is-last { padding-bottom: var(--section); }
.intro__title { margin-bottom: 28px; }
.heading--mid { font-size: clamp(2.5rem, 7vw, 5.5rem); line-height: 1; letter-spacing: -0.02em; }

.frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--kraft);
  border-radius: 4px;
  overflow: hidden;
}
.frame--tall { aspect-ratio: 9 / 16; }
.frame--instagram { aspect-ratio: 4 / 7; background: #fff; }
.frame--tiktok { aspect-ratio: 325 / 739; background: #000; }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.frame__play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.frame__play img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease-out); }
.frame__icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 68px;
  height: 68px;
  margin: -34px 0 0 -34px;
  display: grid;
  place-items: center;
  background: var(--bone);
  color: var(--ink);
  border-radius: 50%;
  box-shadow: 0 8px 24px rgb(37 34 30 / 0.22);
  transition: transform 220ms var(--ease-out);
}
.frame__icon svg { width: 22px; height: 22px; margin-left: 2px; fill: currentColor; }
.frame__play:active .frame__icon { transform: scale(0.94); }

.intro__frame { max-width: 1120px; margin-inline: auto; }
.intro__frame .frame--tall, .intro__frame .frame--instagram, .intro__frame .frame--tiktok { max-width: 400px; margin-inline: auto; }

.work__empty { margin-top: 20px; max-width: 30ch; font-size: clamp(1.25rem, 2.4vw, 1.625rem); line-height: 1.35; }
.work__grid { margin-top: clamp(40px, 6vw, 72px); display: grid; gap: 56px; justify-items: start; }
.work__grid:empty { display: none; }
.piece { width: 100%; }
.piece--tall, .piece--ig, .piece--tt { width: min(100%, 300px); }
.piece--wide { --ar: 1.7778; }
.piece--tall { --ar: 0.5625; }
.piece--ig { --ar: 0.5714; }
.piece--tt { --ar: 0.4398; }
.piece h3 { margin-top: 14px; font-size: 1.0625rem; font-weight: 600; line-height: 1.35; text-wrap: balance; }

.results__list { margin-top: 36px; display: grid; gap: 64px; }
.quote blockquote {
  font-family: var(--serif);
  font-size: clamp(1.625rem, 3.4vw, 2.75rem);
  line-height: 1.2;
  letter-spacing: -0.008em;
  text-wrap: pretty;
}
.quote__by { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 2px 16px; font-size: 1.0625rem; }
.quote__name { font-weight: 600; }
.quote__result { color: var(--ink-soft); }
.quote .frame { max-width: 720px; margin-top: 24px; }
.quote .frame--tall, .quote .frame--instagram, .quote .frame--tiktok { max-width: 340px; }
.quote > .frame:first-child { margin-top: 0; }

/* Close */
.close {
  padding: var(--section) var(--gutter) max(24px, env(safe-area-inset-bottom));
  background: var(--ink);
  color: var(--on-dark);
}
.close__ask { font-family: var(--serif); font-size: clamp(1.75rem, 4.4vw, 3.75rem); line-height: 1.1; letter-spacing: -0.012em; }
.close__talk { margin-top: 0.1em; font-family: var(--serif); font-size: clamp(4.25rem, 17vw, 15rem); line-height: 1; letter-spacing: -0.012em; }
.close__apos { margin-right: -0.09em; }
.close__terms { margin-top: clamp(28px, 4vw, 44px); font-size: clamp(1.1875rem, 2vw, 1.5rem); }
.close .btn { display: flex; margin-top: 30px; }
.close__foot {
  margin-top: var(--section);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 24px;
  font-size: 0.9375rem;
  color: var(--on-dark-soft);
}

/* Booking */
.book {
  position: fixed;
  inset: auto 0 0;
  width: 100%;
  max-width: none;
  height: min(92svh, 900px);
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 14px 14px 0 0;
  background: var(--bone);
  color: var(--ink);
  transform: translateY(100%);
  transition: transform 320ms var(--ease-out), display 320ms allow-discrete, overlay 320ms allow-discrete;
}
.book[open] { display: flex; flex-direction: column; transform: none; }
@starting-style { .book[open] { transform: translateY(100%); } }
.book::backdrop { background: rgb(37 34 30 / 0); transition: background-color 320ms ease, display 320ms allow-discrete, overlay 320ms allow-discrete; }
.book[open]::backdrop { background: rgb(37 34 30 / 0.55); }
@starting-style { .book[open]::backdrop { background: rgb(37 34 30 / 0); } }
.book__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 8px 8px 20px; }
.book__title { font-family: var(--serif); font-size: 1.1875rem; line-height: 1.2; }
.book__close { flex: none; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; background: none; cursor: pointer; }
.book__close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; }
.book__stage { position: relative; flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; background: #fff; }
.book__stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.book__stage::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border: 2px solid var(--kraft);
  border-top-color: var(--ochre);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}
.book__stage.is-ready::before { display: none; }
.book__alt { padding: 4px 20px calc(4px + env(safe-area-inset-bottom)); font-size: 0.9375rem; text-align: center; }
.book__alt a { display: inline-block; padding: 10px 0; text-underline-offset: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Hero entrance */
@media (prefers-reduced-motion: no-preference) {
  .hero__line { animation: rise 1000ms var(--ease-out) both; }
  .hero__line:nth-child(2) { animation-delay: 110ms; }
  .hero__aside { animation: rise-small 800ms var(--ease-out) 320ms both; }
  .mark--underline .mark__reveal { animation: draw 780ms var(--ease-pen) 700ms both; }

  [data-delay="1"] { --delay: 100ms; }
  [data-delay="2"] { --delay: 340ms; }
  [data-armed] { opacity: 0; transform: translateY(20px); }
  [data-armed].is-in {
    opacity: 1;
    transform: none;
    transition: opacity 760ms ease var(--delay, 0ms), transform 1000ms var(--ease-out) var(--delay, 0ms);
  }
  .hand[data-waiting] .mark__reveal { stroke-dashoffset: 1; }
  .hand.is-drawn .mark__reveal { stroke-dashoffset: 0; transition: stroke-dashoffset 900ms var(--ease-pen) 260ms; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .book, .book::backdrop { transition: none; }
  .book__stage::before { animation-duration: 2.4s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(0.16em); } }
@keyframes rise-small { from { opacity: 0; transform: translateY(14px); } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* Hover, only where a pointer can hover */
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: #3a352e; }
  .btn--light:hover, [data-hero="video"] .hero .btn:hover { background: #fff; }
  .frame__play:hover img { transform: scale(1.025); }
  .frame__play:hover .frame__icon { transform: scale(1.06); }
  .book__alt a:hover { color: var(--ink-soft); }
  .hero__pause:hover, .book__close:hover { opacity: 0.7; }
}

/* Phone landscape and small heights */
@media (max-height: 560px) {
  .hero { min-height: 560px; }
}

/* Tablet up */
@media (min-width: 640px) {
  .hero__sub { font-size: 1.25rem; }
  .hero .btn { align-self: flex-start; }
  .close .btn { display: inline-flex; }
  .work__grid { grid-template-columns: repeat(2, 1fr); }
  .book {
    inset: 0;
    margin: auto;
    width: min(960px, calc(100vw - 48px));
    height: min(820px, calc(100svh - 48px));
    border-radius: 8px;
    transform: translateY(16px) scale(0.985);
    opacity: 0;
    transition: transform 280ms var(--ease-out), opacity 200ms ease, display 280ms allow-discrete, overlay 280ms allow-discrete;
  }
  .book[open] { opacity: 1; transform: none; }
  @starting-style { .book[open] { opacity: 0; transform: translateY(16px) scale(0.985); } }
}

/* Desktop composition: twelve columns, deliberately uneven */
@media (min-width: 960px) {
  .bar { padding-top: 28px; }
  .wordmark { font-size: 1.25rem; }
  .hero { padding-top: 112px; padding-bottom: 48px; }
  .hero__title { font-size: clamp(5.5rem, 10.1vw, 12rem); }
  .hero__aside { align-self: flex-end; width: calc(41.66% - 12px); }
  .hero__pause { top: 24px; }

  .what, .why, .ai__body { grid-template-columns: repeat(12, 1fr); column-gap: 24px; }
  .what { row-gap: 0; }
  .what .heading { grid-column: 1 / span 3; padding-top: 0.32em; }
  .what__body { grid-column: 4 / -1; gap: 40px; }
  .what .body { font-size: 1.5rem; line-height: 1.4; }

  .why { row-gap: 0; align-items: end; }
  .why .heading { grid-column: 1 / span 7; }
  .why__past { grid-column: 8 / -1; padding-bottom: 0.5em; }
  .why__choice { grid-column: 3 / -1; margin-top: 72px; max-width: 22em; }
  .signature { grid-column: 3 / -1; margin-top: 32px; }

  .ai__body { row-gap: 0; }
  .ai__body .statement { grid-column: 1 / span 6; }
  .ai__rest { grid-column: 8 / -1; padding-top: 0.5em; }

  .work__grid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 72px 28px;
  }
  .work__grid::after { content: ""; flex: 999 1 0; height: 0; margin-top: -72px; } /* keeps a short last row left-aligned */
  .piece, .piece--tall, .piece--ig, .piece--tt {
    width: auto;
    flex: calc(var(--ar) * 100) 1 calc(var(--ar) * 360px);
    max-width: calc(var(--ar) * 520px);
    min-width: 0;
  }
  .results__list { max-width: 1040px; margin-left: auto; }

  .close__foot { margin-top: 160px; }
}

@media (min-width: 1600px) {
  .what__body, .ai__body { max-width: 1520px; }
}

/* 404 */
.missing {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 32px;
  padding: 120px var(--gutter) max(32px, env(safe-area-inset-bottom));
}
