/* ============================================================
   Forecheck — "Paper + Road" (E2)
   Drafting-paper body, full-bleed photographic hero, blueprint-
   blue ink accent. The hero reads as a photograph pinned above
   the drawing sheet.
   ============================================================ */

:root {
  --paper:      #EDE6D8;
  --card:       #FBF8F1;
  --ink:        #1A1815;
  --muted:      #4A4436;
  --dim:        #625A4B;
  --faint:      #8A8272;
  --accent:     #1E5A8C;  /* blueprint ink — on paper */
  --accent-lt:  #7FB0D4;  /* same hue, lifted — on the dark hero */
  --hero-bg:    #14110E;
  --grid-line:  rgba(122,106,80,.16);

  --pad: clamp(20px, 5.6vw, 72px);
  /* on wide screens the padding grows so content boxes to 1160px */
  --gutter: max(var(--pad), calc(50% - 580px));
  --sans: "Bricolage Grotesque", "Helvetica Neue", Helvetica, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --hand: "Caveat", "Bradley Hand", cursive;

  /* hero verb metrics — JS keeps --wheel-w in sync with the active word */
  --wheel-lh: clamp(48px, 8.2vw, 96px);
  --wheel-w: 160px;
  --wheel-bleed: 40px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background-color: var(--paper);
  /* the drafting grid, everywhere the paper shows */
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: #17466E; }

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

.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; z-index: 100;
  background: var(--accent); color: var(--card);
  padding: 12px 20px; font-family: var(--mono); font-size: 12px;
}
.skip:focus { left: 0; }

/* ---------- shared type ---------- */

.label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}
.label--num { margin-bottom: 16px; }

/* ---------- torn paper ----------
   Every white overlay is a scrap of paper stuck to the sheet: slightly
   rotated, drop-shadowed, edges torn rather than clean. The paper is a
   ::before layer with a jagged clip-path; the shadow is filter: drop-shadow
   on the host, because clip-path would clip the element's own box-shadow. */
:root {
  --torn-a: polygon(1px 3px, 6% 0px, 18% 2px, 33% 0px, 47% 3px, 62% 1px, 78% 3px, 90% 0px, 100% 2px, calc(100% - 2px) 28%, 100% 46%, calc(100% - 3px) 65%, calc(100% - 1px) 84%, calc(100% - 3px) 100%, 82% calc(100% - 2px), 65% 100%, 48% calc(100% - 3px), 30% calc(100% - 1px), 14% calc(100% - 3px), 4% 100%, 0px calc(100% - 3px), 2px 76%, 0px 55%, 3px 34%, 0px 14%);
  --torn-b: polygon(0px 2px, 9% 3px, 22% 0px, 38% 3px, 55% 0px, 71% 2px, 86% 0px, 97% 3px, 100% 0px, calc(100% - 3px) 22%, calc(100% - 1px) 45%, 100% 68%, calc(100% - 2px) 88%, 100% 100%, 88% calc(100% - 3px), 70% calc(100% - 1px), 52% calc(100% - 3px), 34% 100%, 18% calc(100% - 2px), 6% calc(100% - 3px), 0px 100%, 2px 80%, 0px 58%, 2px 38%, 1px 16%);
  --torn-c: polygon(2px 0px, 14% 2px, 29% 0px, 44% 3px, 60% 1px, 74% 3px, 88% 1px, 100% 3px, calc(100% - 1px) 25%, calc(100% - 3px) 48%, 100% 70%, calc(100% - 2px) 100%, 84% calc(100% - 1px), 66% calc(100% - 3px), 47% calc(100% - 1px), 31% calc(100% - 3px), 16% 100%, 5% calc(100% - 2px), 0px calc(100% - 3px), 3px 72%, 0px 50%, 2px 28%, 0px 10%);
}
.sheet {
  position: relative;
  z-index: 0;
  filter: drop-shadow(0 2px 3px rgba(60,50,30,.38));
}
.sheet::before {
  content: "";
  position: absolute; inset: 0;
  z-index: -1;
  background: var(--card);
  clip-path: var(--torn, var(--torn-a));
}
.sheet--b { --torn: var(--torn-b); }
.sheet--c { --torn: var(--torn-c); }

/* section-header labels are torn strips */
.label--strip {
  display: inline-block;
  width: fit-content;
  padding: 9px 18px;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: 0.2em;
  transform: rotate(-0.8deg);
}
#work .label--strip { transform: rotate(0.7deg); }
#fit .label--strip { transform: rotate(-0.5deg); }
.section--about .label--strip { transform: rotate(0.6deg); }
#name .label--strip { transform: rotate(0.5deg); }

.micro {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 0;
}

.hand {
  font-family: var(--hand);
  color: var(--accent);
}

.h2 {
  font-size: clamp(27px, 3.1vw, 38px);
  line-height: 1.18;
  font-weight: 500;
  letter-spacing: -0.025em;
  margin: 0 0 20px;
  max-width: 21ch;
  text-wrap: pretty;
}
.h2--wide { max-width: 26ch; margin-bottom: 48px; }
.h2--sm   { font-size: clamp(25px, 2.8vw, 34px); }
.h2--big  { font-size: clamp(31px, 3.8vw, 46px); max-width: 18ch; }

.h3 {
  font-size: clamp(21px, 2vw, 25px);
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}
.h3--sm { font-size: clamp(19px, 1.8vw, 22px); }

.lede {
  font-size: clamp(16px, 1.4vw, 17px);
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 18px;
  max-width: 62ch;
}
.lede:last-child { margin-bottom: 0; }
.lede--tight  { margin-bottom: 44px; max-width: 52ch; }
.lede--center { margin: 0 auto 38px; text-align: center; max-width: 52ch; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 16px 30px;
  min-height: 48px;
  transition: background-color .18s ease, color .18s ease;
}
.btn--solid {
  background: var(--accent); color: var(--card);
  box-shadow: 0 2px 6px rgba(40,35,20,.3);
}
.btn--solid:hover { background: #17466E; color: var(--card); }
/* nav chip — a paper strip sitting on the photograph */
.btn--ghost {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(0,0,0,.35);
  padding: 10px 20px;
  min-height: 0;
  font-size: 11px;
}
.btn--ghost:hover { background: var(--accent); color: var(--card); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 26px;
}
.cta-row--center { justify-content: center; }

/* ============================================================
   HERO — the photograph pinned above the drawing
   ============================================================ */

.hero {
  position: relative;
  min-height: min(100svh, 860px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* paper behind the photo: with the image at .9 opacity, the sheet
     warms the shadows and the grid overlay reads as showing through */
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  color: var(--card);
}

.hero__bg { position: absolute; inset: 0; }
/* The hero is Jordan's blueprint-mountain art: pre-graded, so it renders
   without the b/w filter the old stock rotation needed. Kept at .93 over
   the paper background so the sheet still warms it and the grid overlay
   reads as showing through. (The old five-image rotation pattern is
   documented in the README if it ever comes back.) */
.hero__bg img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .93;
  filter: contrast(1.02);
}

/* the graph paper shining through the photograph */
.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(237,230,216,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(237,230,216,.10) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(9,11,16,.78) 0%, rgba(9,11,16,.45) 42%, rgba(9,11,16,.08) 100%),
    linear-gradient(180deg, rgba(9,11,16,.55) 0%, rgba(9,11,16,0) 26%, rgba(9,11,16,0) 70%, rgba(9,11,16,.5) 100%);
}

/* ---------- nav ---------- */

.nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 30px var(--gutter);
}
.nav__brand {
  display: flex; align-items: center; gap: 11px;
  color: var(--card);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
}
.nav__brand span { color: var(--card); }
.nav__links { display: flex; align-items: center; gap: clamp(16px, 2.6vw, 34px); }
.nav__links > a:not(.btn) {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #D9D0C0;
}
.nav__links > a:not(.btn):hover { color: var(--card); }

/* ---------- hero content ---------- */

.hero__inner {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(28px, 5vh, 52px);
  padding: clamp(28px, 5vh, 40px) var(--gutter) clamp(48px, 8vh, 92px);
}

/* eyebrow is a torn paper strip on the photograph */
.eyebrow {
  display: inline-block;
  width: fit-content;
  padding: 9px 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink);
  font-weight: 500;
  margin: 0;
  transform: rotate(-0.6deg);
}
.eyebrow.sheet { filter: drop-shadow(0 2px 4px rgba(0,0,0,.4)); }

.hero__h1 { margin: 0; font-weight: 500; }

.wheel {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: clamp(38px, 6.6vw, 78px);
  letter-spacing: -0.035em;
  line-height: var(--wheel-lh);
}

.wheel__slot {
  flex: 0 0 auto;
  display: block;
  width: calc(var(--wheel-w) + var(--wheel-bleed));
  height: calc(var(--wheel-lh) * 3);
  margin-right: calc(var(--wheel-bleed) * -1);
  overflow: hidden;
  /* The slot must never be narrower than the word currently on screen, or the
     verb collides with "with Forecheck" mid-transition. script.js sets the
     duration/delay per step: widen fast and immediately, narrow only after
     the slide completes. Those numbers are load-bearing — see README. */
  transition: width .42s cubic-bezier(.65,0,.35,1);
  -webkit-mask-image:
    linear-gradient(180deg, transparent 0%, rgba(0,0,0,.16) 22%, #000 42%, #000 58%, rgba(0,0,0,.16) 78%, transparent 100%),
    linear-gradient(90deg, #000 calc(100% - var(--wheel-bleed)), transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(180deg, transparent 0%, rgba(0,0,0,.16) 22%, #000 42%, #000 58%, rgba(0,0,0,.16) 78%, transparent 100%),
    linear-gradient(90deg, #000 calc(100% - var(--wheel-bleed)), transparent 100%);
  mask-composite: intersect;
}

.wheel__track {
  display: block;
  transform: translateY(var(--wheel-lh));
  transition: transform .62s cubic-bezier(.76,0,.24,1);
}
.wheel__track span {
  display: block;
  height: var(--wheel-lh);
  line-height: var(--wheel-lh);
  white-space: nowrap;
  color: var(--accent-lt);
}

.wheel__static { white-space: nowrap; }

.hero__foot { display: flex; flex-direction: column; gap: clamp(24px, 4vh, 34px); }
.hero__sub {
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.6;
  color: #E4DCCD;
  margin: 0;
  max-width: 48ch;
}
.hero .micro { color: #D9D0C0; }

/* ---------- animation toggle ---------- */

.motion-toggle {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(20px, 4vh, 36px);
  z-index: 2;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: rgba(9,11,16,.55);
  border: 1px solid rgba(251,248,241,.3);
  color: var(--card);
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: border-color .18s ease, background-color .18s ease;
}
.motion-toggle:hover { border-color: var(--accent-lt); background: rgba(9,11,16,.8); }
.motion-toggle__play { display: none; }
.motion-toggle[aria-pressed="true"] .motion-toggle__pause { display: none; }
.motion-toggle[aria-pressed="true"] .motion-toggle__play  { display: block; }


/* ============================================================
   SECTIONS — the drawing sheet
   ============================================================ */

/* the hard ink rule where the photograph meets the paper */
main { border-top: 3px solid var(--ink); }

.section {
  padding: clamp(56px, 8vw, 76px) var(--gutter);
  border-top: 1.5px solid var(--ink);
}
main > .section:first-child { border-top: 0; }
.section > .label { margin-bottom: 40px; }

.section--split { display: flex; gap: clamp(24px, 4.4vw, 56px); align-items: flex-start; }
.section__labelcol { flex: 0 0 190px; padding-top: 4px; }
.section__body { flex: 1 1 auto; min-width: 0; }

.grid { display: grid; gap: clamp(24px, 2.6vw, 30px); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

#work .grid { margin-top: 4px; }

/* work pillars are torn scraps, kin to the taped prints */
.pillar {
  padding: 30px 28px;
}
.pillar:nth-child(1) { transform: rotate(-0.7deg); }
.pillar:nth-child(2) { transform: rotate(0.5deg); margin-top: 10px; }
.pillar:nth-child(3) { transform: rotate(-0.4deg); margin-top: 4px; }
.pillar p:not(.label) { font-size: 15px; line-height: 1.68; color: var(--muted); margin: 0; }

/* ---------- taped prints ---------- */

.print {
  position: relative;
  margin: 0;
  background: var(--card);
  padding: 8px 8px 8px 8px;
  box-shadow: 0 3px 9px rgba(60,50,30,.3);
}
.print img { filter: grayscale(1) contrast(1.05); }
.print figcaption {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  padding-top: 8px;
}
.tape {
  position: absolute;
  top: -12px; left: 50%;
  margin-left: -42px;
  width: 84px; height: 26px;
  background: rgba(226,215,185,.65);
  box-shadow: 0 1px 2px rgba(60,50,30,.15);
  transform: rotate(-2deg);
}

.print--premise {
  flex: 0 0 208px;
  transform: rotate(2.5deg);
  margin-top: -6px;
}
.print--premise .hand {
  position: absolute;
  left: -4px; bottom: -44px;
  font-size: 23px;
  white-space: nowrap;
  transform: rotate(-2deg);
}

/* ---------- fit ---------- */

.fit { gap: clamp(24px, 3vw, 40px); align-items: start; }
.fit__col { padding: 32px 30px 36px; }
.fit__col--yes { transform: rotate(-0.5deg); }
.fit__col--no { transform: rotate(0.6deg); margin-top: 14px; }
.fit__col--no .label { color: var(--dim); }

.ticks { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.ticks li {
  display: flex; gap: 13px; align-items: flex-start;
  font-size: clamp(16px, 1.5vw, 17.5px); line-height: 1.6;
}
.ticks svg { flex: 0 0 auto; width: 17px; height: 17px; margin-top: 4px; }
.fit__col--yes .ticks li { color: var(--ink); }
.fit__col--yes .ticks svg { color: var(--accent); }
.fit__col--no .ticks li { color: var(--muted); }
.fit__col--no .ticks svg { color: var(--faint); }

/* ---------- about ---------- */

.section--about {
  display: flex;
  gap: clamp(28px, 4.4vw, 56px);
  align-items: center;
  flex-wrap: wrap;
}
.portrait {
  position: relative;
  flex: 0 0 auto;
  width: min(300px, 100%);
  aspect-ratio: 300 / 340;
  background: var(--card);
  box-shadow: 0 3px 9px rgba(60,50,30,.3);
  transform: rotate(-1.6deg);
  display: grid; place-items: center;
  text-align: center; padding: 20px;
}
.portrait::before {
  content: "";
  position: absolute;
  top: -12px; left: 50%;
  margin-left: -42px;
  width: 84px; height: 26px;
  background: rgba(226,215,185,.65);
  box-shadow: 0 1px 2px rgba(60,50,30,.15);
  transform: rotate(-2deg);
}
.portrait img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.portrait::before { z-index: 1; }
.section--about .section__body { flex: 1 1 380px; }
.section--about .label { margin-bottom: 20px; }

/* ---------- cta ---------- */

.section--cta {
  text-align: center;
  padding-top: clamp(64px, 10vw, 110px);
  padding-bottom: clamp(64px, 10vw, 110px);
}
.cta-sheet {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 64px) clamp(24px, 5vw, 56px);
  transform: rotate(-0.5deg);
  filter: drop-shadow(0 4px 10px rgba(60,50,30,.35));
}
.cta-sheet::after {
  content: "";
  position: absolute;
  top: -13px; left: 50%;
  margin-left: -46px;
  width: 92px; height: 28px;
  background: rgba(226,215,185,.7);
  box-shadow: 0 1px 2px rgba(60,50,30,.15);
  transform: rotate(-2deg);
}
.section--cta .h2 { margin-left: auto; margin-right: auto; margin-bottom: 22px; }
.section--cta .micro a { color: var(--accent); }

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

.footer {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 26px var(--gutter);
  border-top: 1.5px solid var(--ink);
}
.footer .label { color: var(--dim); }

/* ---------- booking form (book.html) ---------- */

.bform { display: grid; gap: 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bform .bfield--wide { grid-column: 1 / -1; }
.bfield { display: flex; flex-direction: column; gap: 8px; }
.bfield span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.bfield input, .bfield textarea {
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid #C4BBA6;
  padding: 13px 14px;
  border-radius: 0;
}
.bfield input:focus, .bfield textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.bfield textarea { min-height: 130px; resize: vertical; }
.calendly-slot {
  padding: 56px 24px;
  text-align: center;
  transform: rotate(0.4deg);
  margin-bottom: clamp(40px, 6vw, 64px);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  .grid--3 { grid-template-columns: 1fr; }
  .pillar:nth-child(2), .pillar:nth-child(3), .fit__col--no { margin-top: 0; }
  .bform { grid-template-columns: 1fr; }
  .section--split { display: block; }
  .section__labelcol { margin-bottom: 24px; padding-top: 0; }
  .print--premise { margin: 40px 0 44px auto; }
  .nav__links > a:not(.btn) { display: none; }
}

@media (max-width: 680px) {
  .grid--2 { grid-template-columns: 1fr; }

  /* Stack the verb above the static line; ghosts are dropped — with
     "with Forecheck" directly underneath, a half-visible third word reads
     as a third line of headline. Negative margins collapse the hidden
     slots so the JS geometry stays untouched. */
  .wheel { display: block; }
  .wheel__slot {
    width: 100%;
    margin-right: 0;
    margin-top: calc(var(--wheel-lh) * -1);
    margin-bottom: calc(var(--wheel-lh) * -1);
    -webkit-mask-image: linear-gradient(180deg, transparent 0 33.34%, #000 33.34% 66.66%, transparent 66.66% 100%);
    mask-image: linear-gradient(180deg, transparent 0 33.34%, #000 33.34% 66.66%, transparent 66.66% 100%);
    -webkit-mask-composite: source-over;
    mask-composite: add;
    transition: none;
  }
  .hero__scrim {
    background:
      linear-gradient(180deg, rgba(9,11,16,.78) 0%, rgba(9,11,16,.5) 40%, rgba(9,11,16,.78) 100%);
  }
  .footer { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  .wheel__slot, .wheel__track { transition: none; }
}
