/* ============================================================
   Interesting. — interesting.work  (v4, built to Guilherme's Figma)
   PP Mori (Black / Semibold / Regular) + Arial. White field, hard
   left-aligned grid, black panels. Layout values map 1:1 to the
   Figma frame (1728 base); motion is retained per Jason 7/21.
   ============================================================ */

/* ---------- tokens (Figma-mapped) ---------- */
:root {
  /* color — Gui runs pure black/white */
  --paper: #ffffff;
  --ink: #000000;
  --muted: #6e6e6e;              /* reserved; unused in Gui's comp */
  --hairline: rgba(0, 0, 0, 0.9);   /* Figma lines read near-solid, 1px */
  --hairline-dark: rgba(255, 255, 255, 0.25);
  --accent: #000000;

  /* type */
  --font-display: "PP Mori", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-text: Arial, "Helvetica Neue", Helvetica, sans-serif;

  /* fluid scale — 1728-frame ratios; hero sized so the widest animation
     state (INTERESTING… at 7.67em) never clips on any screen */
  --fs-hero: min(13.4vw, calc((100vw - 2 * var(--pad)) / 7.72), 15rem);
  --fs-giant: min(13.9vw, calc((100vw - 2 * var(--pad)) / 5.9), 15rem);
  --fs-term: clamp(1.9rem, 5.787vw, 6.25rem);      /* 100px @1728 — terms, Say more. */
  --fs-mid: clamp(1.35rem, 3.183vw, 3.4375rem);    /* 55px  @1728 — quote, email    */
  --fs-body: clamp(1.0625rem, 1.736vw, 1.875rem);  /* 30px  @1728 — everything else */
  --fs-small: 0.9375rem;

  /* rhythm — Figma: 53px margins on 1728 */
  --pad: clamp(1.25rem, 3.07vw, 3.3125rem);
  --max: 108rem;                                   /* 1728px cap */
  --col2: 36.87%;                                  /* right column starts (598/1622) */

  /* motion */
  --ease: cubic-bezier(0.33, 1, 0.68, 1);
  --reveal-y: 1.5rem;
}

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

html {
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: 1.32;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--ink); color: var(--paper); }
.panel ::selection, .contact ::selection { background: var(--paper); color: var(--ink); }

a {
  color: inherit;
  text-decoration: none;
}

a:hover, a:focus-visible { text-decoration: underline; text-decoration-thickness: 0.04em; text-underline-offset: 0.14em; }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

h1, h2, h3, p, ul, figure, blockquote, figcaption { margin: 0; }
ul { padding: 0; list-style: none; }

.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.display { font-family: var(--font-display); font-weight: 900; }

/* two-line lead blocks (PP Mori Black 30px in the Figma) */
.blead {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--fs-body);
  line-height: 1.27;
  letter-spacing: 0;
}

/* ============================================================
   HERO — top-left aligned, full viewport, scroll cue at bottom
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  padding-top: clamp(0.25rem, 1vh, 1rem);
  padding-bottom: clamp(6rem, 10vh, 8rem);   /* keeps the lockup clear of the foot row */
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
}

.hero-word {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--fs-hero);
  line-height: 1.25;
  letter-spacing: 0;
  white-space: nowrap;
  margin-left: -0.045em;         /* optical left alignment of the I */
}

.caret {
  display: none;                 /* only during the typing riff */
  width: 0.05em;
  height: 0.72em;
  margin-left: 0.05em;
  background: var(--ink);
  vertical-align: baseline;
  transform: translateY(0.05em);
}

.hero-say {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--fs-term);
  line-height: 1.25;
  letter-spacing: 0;
  margin-top: clamp(0.25rem, 1.9vw, 2rem);
}

.hero-meta { margin-top: clamp(0.75rem, 1.9vw, 2rem); }

.hero-line {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--fs-body);
  line-height: 1.27;
  color: var(--ink);
}

/* bottom row: down arrow, centered */
.hero-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(1.5rem, 4.7vh, 3.3rem);
  display: flex;
  justify-content: center;
}

.hero-arrow { display: block; color: var(--ink); }

.hero-arrow svg { display: block; height: clamp(2.5rem, 3.7vw, 4rem); width: auto; }

/* --- first-visit animation states (html.anim set inline in <head>) --- */
html.anim .type { visibility: hidden; }
html.anim .caret { display: inline-block; animation: blink 1.1s steps(1) infinite; }
html.anim .hero-line,
html.anim .hero-say,
html.anim .hero-foot {
  opacity: 0;
  transform: translateY(0.4rem);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
html.anim.say .hero-say { opacity: 1; transform: none; }
html.anim.settled .hero-line,
html.anim.settled .hero-say,
html.anim.settled .hero-foot { opacity: 1; transform: none; }
html.anim.settled .hero-meta .hero-line { transition-delay: 0.06s; }
html.anim.settled .hero-foot { transition-delay: 0.2s; }
html.anim.settled .caret { animation: none; opacity: 0; transition: opacity 0.45s var(--ease); }

@keyframes blink { 50% { opacity: 0; } }

/* ============================================================
   WHAT WE DO — lead row + index rows, full-bleed hairlines,
   hover inversion retained
   ============================================================ */
/* the "We do four things." band runs black (Jason, 7/21) */
.svc-lead {
  background: var(--ink);
  color: var(--paper);
}

.svc-lead .blead {
  padding-block: clamp(2.5rem, 7.4vw, 8rem) clamp(2rem, 6.4vw, 7rem);
}

.svc {
  border-bottom: 1px solid var(--hairline);
  transition: background 0.28s var(--ease), color 0.28s var(--ease);
}

.svc-inner {
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(1rem, 1.8vw, 2rem) var(--pad) clamp(2rem, 4.7vw, 5.1rem);
  display: grid;
  grid-template-columns: 598fr 835fr 189fr;
  gap: 0;
  align-items: start;
}

.svc-term {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--fs-term);
  line-height: 1.25;
  letter-spacing: 0;
}

.svc-desc {
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: 1.13;
  color: inherit;
  padding-top: 0.42em;           /* optical align with the term's cap */
  transition: color 0.28s var(--ease);
}

@media (hover: hover) {
  .svc:hover { background: var(--ink); color: var(--paper); }
}

/* ============================================================
   HOW WE WORK — black panel: lead left, photo + prose right
   ============================================================ */
.panel {
  background: var(--ink);
  color: var(--paper);
}

.how-grid {
  display: grid;
  grid-template-columns: var(--col2) 1fr;
  padding-block: clamp(3rem, 4.9vw, 5.3rem) clamp(4rem, 7.3vw, 7.9rem);
}

.how-right { max-width: 41.4vw; }           /* 671/1622 of content ≈ matches Figma */

.team-photo { margin: 0 0 clamp(3rem, 7.1vw, 7.7rem); }

.team-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #111;
}

.prose {
  display: grid;
  gap: 1.05em;
  font-size: var(--fs-body);
  line-height: 1.13;
}

.prose p { color: var(--paper); }

/* ============================================================
   CLIENTS / CASE STUDIES — structural slot, hidden until real
   work ships. See index.html comments for activation.
   ============================================================ */
.clients { padding-block: clamp(4rem, 9vw, 9.75rem); }

.case-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
  gap: clamp(2rem, 5vw, 4rem);
}

.case-visual { aspect-ratio: 16 / 10; background: #f2f2f2; margin-bottom: 1.25rem; }

.case-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.5rem, 2.6vw, 2.5rem);
}

.case-result { font-size: var(--fs-small); margin-top: 0.5rem; }

.logo-row {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

/* ============================================================
   WHO WE ARE — stacked rows: name + bio left, photo right
   ============================================================ */
.who { padding-block: clamp(3rem, 5.2vw, 5.6rem) 0; }

.bio {
  display: grid;
  grid-template-columns: var(--col2) 1fr;
  align-items: start;
}

.bio + .bio { margin-top: clamp(3.5rem, 6.4vw, 7rem); }

.bio-left { max-width: 30.9vw; }            /* 501/1622 of content */

.bio-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--fs-body);
  line-height: 1.27;
}

.bio-text {
  margin-top: 0.5em;
  font-size: var(--fs-body);
  line-height: 1.13;
}

.bio-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 684 / 739;
  object-fit: cover;
  max-width: 42.2vw;                        /* 684/1622 of content */
  background: #f2f2f2;
}

/* ============================================================
   PROOF — no section header by design; scrub retained
   ============================================================ */
.proof { padding-block: clamp(5rem, 10.3vw, 11.1rem) clamp(3rem, 4.9vw, 5.3rem); }

.quote blockquote {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-mid);
  line-height: 1.25;
  letter-spacing: 0;
  max-width: 79vw;
}

.quote blockquote .w { opacity: 0.55; transition: opacity 0.35s linear; }  /* resting state keeps 4.5:1 on white */
.quote blockquote .w.on { opacity: 1; }

.quote figcaption {
  margin-top: clamp(1.5rem, 2.75vw, 3rem);
  font-size: var(--fs-body);
  line-height: 1.13;
}

.quote + .quote { margin-top: clamp(3.5rem, 8vw, 6rem); }

.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;
}

/* ============================================================
   CONTACT — black close; marquee retained above Gui's lockup
   ============================================================ */
.contact {
  background: var(--ink);
  color: var(--paper);
}

.contact-body {
  padding-top: clamp(2rem, 4vw, 4.4rem);
  padding-bottom: clamp(6rem, 18vw, 19.5rem);
}

.contact-q {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--fs-giant);
  line-height: 1.25;
  letter-spacing: 0;
  margin-left: -0.045em;
  white-space: nowrap;
}

.contact-email {
  display: inline-block;
  margin-top: clamp(0.5rem, 1vw, 1.1rem);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-mid);
}

/* ---------- fixed quiet anchor (retained) ---------- */
.pin {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 1.75rem);
  font-family: var(--font-text);
  font-size: var(--fs-small);
  font-weight: 700;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.95rem;
  border-radius: 100px;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.4rem);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease), visibility 0s 0.35s;
}

.pin.show {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

/* ---------- scroll reveals (retained) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(var(--reveal-y));
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
  transition-delay: var(--d, 0s);
}

.reveal.in { opacity: 1; transform: none; }

/* ---------- 404 ---------- */
.notfound {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1.5rem;
  padding: var(--pad);
}

.notfound .wordmark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.5rem, 9vw, 7rem);
  letter-spacing: 0;
  text-decoration: none;
}

.notfound .q { font-family: var(--font-display); font-weight: 900; font-size: var(--fs-body); }

/* ---------- small screens ---------- */
@media (max-width: 46em) {
  .svc-inner { grid-template-columns: 1fr; padding-bottom: clamp(1.5rem, 6vw, 2.5rem); }
  .svc-desc { padding-top: 0.5rem; }
  .how-grid { grid-template-columns: 1fr; gap: 2rem; }
  .how-right { max-width: 100%; }
  .bio { grid-template-columns: 1fr; gap: 1.5rem; }
  .bio-left { max-width: 100%; }
  .bio-photo { max-width: 100%; }
  .quote blockquote { max-width: 100%; }
  .hero-arrow { display: none; }
}

/* ---------- reduced motion: no animation, ever ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .quote blockquote .w { opacity: 1; transition: none; }
  .svc, .svc-desc, .pin { transition: none; }
}
