/* ============================================================
   In3 AI Lab

   Zero chroma. White, one tint band, a grey scale — in a pale scheme
   any saturated accent reads as cheap, and Apple's own restraint comes
   from colour being almost absent. Interactive elements are near-black
   rather than coloured. The single near-neutral, --mark, exists only to
   say "this is the level we work on".

   Emphasis is carried by weight and value instead: the I³ sequence
   steps #757578 → #4a4a4e → #1d1d1f at 400 → 500 → 700, so the order
   of the three words is encoded in their visual weight. All three
   clear AA — a paler first step would have read better and failed.
   ============================================================ */

:root {
  --white:    #ffffff;
  --tint:     #f5f5f7;   /* Apple's band */
  --ink:      #1d1d1f;   /* 15:1 on white */
  --ink-2:    #6e6e73;   /* 5.3:1 — the floor for any informational text */
  --ink-3:    #a1a1a6;   /* 2.6:1 — decoration ONLY: rules, chevrons, rings */

  /* The I³ sequence needs three separable values that each clear AA at
     body size, so it cannot reach for --ink-3. Weight climbs with it. */
  --seq-1:    #757578;   /* 4.6:1 */
  --seq-2:    #4a4a4e;   /* 8.9:1 */
  --hairline: #e3e3e8;
  /* "the level we work on". Against #f5f5f7 this has to be a real step
     or the emphasis vanishes — cool enough to read as deliberate, pale
     enough to stay in the scheme. */
  --mark:     #e7edf4;
  --ink-lift: #33333a;   /* button hover */

  --sans: 'Instrument Sans', -apple-system, BlinkMacSystemFont,
          'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;

  --maxw:   1040px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --nav-h:  48px;
  --radius: 18px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

/* The field (below) sits under the content but over the page ground, so
   the background colour has to live on html rather than body. */
html { background: var(--white); }

body {
  margin: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.53;
  letter-spacing: -0.003em;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
  background: var(--ink);
  color: var(--white);
  padding: 0.7rem 1.1rem;
  font-size: 0.875rem;
  border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; top: 0; z-index: 200; }

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

/* ── the discovery field ───────────────────────────────── */

/* A sampling grid that is always present and only resolves where the
   pointer is. It is the page's own thesis applied to the background:
   the structure is already there, and measuring is what makes it
   legible. Kept faint enough to read as paper texture, not as an
   animation following the cursor.

   Anything with a surface — tint bands, cards, the footer — occludes
   it, so the field only appears in the open space between them. */
/* A canvas rather than a masked layer: each mark's intensity is driven
   independently by the passing wavefront, which a CSS mask cannot do.
   Nothing is drawn while the pointer is still. */
.field {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Content rides above the field. */
main, .foot { position: relative; z-index: 1; }

/* No pointer to track, or motion suppressed — then it is pure
   decoration and should not exist at all. */
@media (hover: none), (prefers-reduced-motion: reduce) {
  .field { display: none; }
}

/* ── nav ───────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.nav-in {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 3vw, 2.25rem);
}

.brand {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  white-space: nowrap;
  flex: 0 0 auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 2vw, 1.6rem);
  margin-left: auto;
  font-size: 0.75rem;
  letter-spacing: -0.002em;
}
.nav-links a {
  white-space: nowrap;
  color: var(--ink-2);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--ink); font-weight: 500; }

@media (max-width: 400px) {
  .nav-links {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .nav-links::-webkit-scrollbar { display: none; }
}

/* ── the I³ sequence — the signature ───────────────────── */

/* Three words whose weight and value climb with their order. The
   rules between them are the only ornament on the page. */
.triad {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 0;
  font-size: clamp(0.9375rem, 1.5vw, 1.0625rem);
  letter-spacing: 0.035em;
}
.triad .i1,
.triad .i2,
.triad .i3 { white-space: nowrap; }
.triad .i1 { color: var(--seq-1); font-weight: 400; }
.triad .i2 { color: var(--seq-2); font-weight: 500; }
.triad .i3 { color: var(--ink);   font-weight: 700; }

.triad .rule {
  width: clamp(1.5rem, 4vw, 2.75rem);
  height: 1px;
  margin-inline: clamp(0.6rem, 1.4vw, 1rem);
  background: var(--hairline);
  flex: 0 0 auto;
}

/* Stacked on a phone, the rules turn vertical and the sequence reads
   downward — same information, no horizontal squeeze. */
@media (max-width: 560px) {
  .triad { flex-direction: column; gap: 0.5rem; }
  .triad .rule {
    width: 1px;
    height: 1.1rem;
    margin-inline: 0;
  }
}

/* ── hero ──────────────────────────────────────────────── */

.hero {
  text-align: center;
  padding-block: clamp(3.25rem, 8vw, 6.25rem) clamp(2.25rem, 5vw, 3.5rem);
}

.hero .triad { margin-bottom: clamp(1.35rem, 3vw, 2.1rem); }

/* One orchestrated entrance on load, in reading order, rather than
   scattered effects. `backwards` holds each element hidden through its
   delay so nothing flashes before its turn. */
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
.hero > * {
  animation: rise 0.85s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.hero .triad        { animation-delay: 0.06s; }
.hero h1            { animation-delay: 0.15s; }
.hero .sub          { animation-delay: 0.25s; }
.hero .hero-actions { animation-delay: 0.35s; }

.hero h1 {
  font-size: clamp(2.3rem, 5.6vw, 4.25rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.036em;
  text-wrap: balance;
  max-width: 22ch;
  margin-inline: auto;
}

.hero .sub {
  margin-top: clamp(0.95rem, 2vw, 1.4rem);
  font-size: clamp(1.0625rem, 1.9vw, 1.375rem);
  font-weight: 400;
  line-height: 1.42;
  letter-spacing: -0.014em;
  color: var(--ink-2);
  max-width: 42ch;
  margin-inline: auto;
  text-wrap: pretty;
}

.hero-actions {
  margin-top: clamp(1.6rem, 3vw, 2.35rem);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
}

/* ── buttons and links ─────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.45rem;
  border-radius: 980px;
  background: var(--ink);
  color: var(--white);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: background 0.22s ease, transform 0.12s ease;
}
.btn:hover { background: var(--ink-lift); }
/* A press should register. Apple's controls give the same slight give. */
.btn:active { transform: scale(0.975); }

.btn-quiet {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--hairline);
}
.btn-quiet:hover { background: var(--tint); border-color: var(--ink-3); }

.cta {
  display: inline-flex;
  align-items: baseline;
  gap: 0.2em;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.cta::after {
  content: "\203A";
  font-size: 1.2em;
  line-height: 1;
  color: var(--ink-3);
  transition: transform 0.2s ease, color 0.2s ease;
}
.cta:hover { text-decoration: underline; text-underline-offset: 0.22em; }
.cta:hover::after { color: var(--ink); transform: translateX(2px); }

/* Status text sitting where a second action would go. */
.note-soon {
  font-size: 0.9375rem;
  color: var(--ink-2);
  letter-spacing: -0.008em;
}

/* ── sections ──────────────────────────────────────────── */

.sec { padding-block: clamp(3.25rem, 7.5vw, 6rem); }
.sec-tint { background: var(--tint); }

.sec-head { text-align: center; margin-bottom: clamp(1.9rem, 4vw, 3.1rem); }

.sec-head h2 {
  font-size: clamp(1.7rem, 3.7vw, 2.85rem);
  font-weight: 600;
  line-height: 1.09;
  letter-spacing: -0.03em;
  text-wrap: balance;
  max-width: 24ch;
  margin-inline: auto;
}

.sec-head .sub {
  margin-top: 0.85rem;
  font-size: clamp(1rem, 1.6vw, 1.1875rem);
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--ink-2);
  max-width: 56ch;
  margin-inline: auto;
  text-wrap: pretty;
}

.copy { max-width: 660px; margin-inline: auto; }
.copy p { color: var(--ink-2); }
.copy p + p { margin-top: 1.2em; }
.copy .lead {
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.012em;
}
.copy a:not(.btn):not(.cta) {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--ink-3);
}
.copy a:not(.btn):not(.cta):hover { text-decoration-color: var(--ink); }

/* ── cards ─────────────────────────────────────────────── */

/* Explicit column counts, not auto-fit: a set of four must not land
   as 3+1, and three must not land as 2+1. */
.cards,
.cards-pair {
  display: grid;
  gap: clamp(0.85rem, 1.6vw, 1.25rem);
}
.cards      { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }

@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .cards-pair { grid-template-columns: 1fr; } }

.card {
  background: var(--tint);
  border-radius: var(--radius);
  padding: clamp(1.45rem, 2.4vw, 2.1rem);
}
.sec-tint .card { background: var(--white); }

.card h3 {
  font-size: 1.3125rem;
  font-weight: 600;
  line-height: 1.24;
  letter-spacing: -0.02em;
}
.card p {
  margin-top: 0.65rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.56;
}

.card .step-n {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 0.75rem;
}

/* The card for the level we work on: no colour, just the pale cool
   tint and a heavier heading. */
.card.is-us { background: var(--mark); }
.sec-tint .card.is-us { background: var(--mark); }
.card.is-us .step-n { color: var(--ink-2); }

.panel {
  background: var(--tint);
  border-radius: clamp(var(--radius), 2.4vw, 28px);
  padding: clamp(1.85rem, 4.5vw, 3.75rem);
  text-align: center;
}
.sec-tint .panel { background: var(--white); }
.panel h2 {
  font-size: clamp(1.55rem, 3.3vw, 2.35rem);
  font-weight: 600;
  line-height: 1.11;
  letter-spacing: -0.028em;
  text-wrap: balance;
  max-width: 26ch;
  margin-inline: auto;
}
.panel p {
  margin-top: 0.9rem;
  color: var(--ink-2);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  line-height: 1.5;
  letter-spacing: -0.008em;
  max-width: 52ch;
  margin-inline: auto;
  text-wrap: pretty;
}
.panel .triad { margin-top: clamp(1.25rem, 2.4vw, 1.75rem); }
.panel .hero-actions { margin-top: clamp(1.35rem, 2.5vw, 1.9rem); }

/* ── the five levels ───────────────────────────────────── */

.levels {
  max-width: 820px;
  margin-inline: auto;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}

.levels li {
  display: grid;
  grid-template-columns: 3.25rem 9rem minmax(0, 1fr);
  gap: 0 0.75rem;
  align-items: baseline;
  padding: 1.1rem clamp(1rem, 2.4vw, 1.75rem);
  font-size: 0.9375rem;
  color: var(--ink-2);
}
.levels li + li { border-top: 1px solid var(--hairline); }
.levels .n { color: var(--ink-2); }
.levels .name { font-weight: 500; letter-spacing: -0.012em; color: var(--ink-2); }

.levels .is-here {
  background: var(--mark);
  color: var(--ink);
}
.levels .is-here .n { color: var(--ink-2); }
.levels .is-here .name { color: var(--ink); font-weight: 600; }

@media (max-width: 640px) {
  .levels li { grid-template-columns: 2.75rem minmax(0, 1fr); }
  .levels .what { grid-column: 2; margin-top: 0.2rem; }
}

/* ── numbered questions ────────────────────────────────── */

.questions { max-width: 780px; margin-inline: auto; }
.questions li {
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: 0.5rem;
  padding-block: 1.2rem;
  font-size: clamp(1rem, 1.6vw, 1.1875rem);
  line-height: 1.45;
  letter-spacing: -0.014em;
}
.questions li + li { border-top: 1px solid var(--hairline); }
.questions .n {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-2);
  padding-top: 0.35em;
}

/* ── notes ─────────────────────────────────────────────── */

.notes { max-width: 820px; margin-inline: auto; }
.notes li + li { border-top: 1px solid var(--hairline); }
.notes a {
  display: block;
  padding-block: 1.4rem;
  transition: opacity 0.2s ease;
}
.notes a:hover { opacity: 0.66; }
/* An <a> with no href yet: keeps the markup ready for the real post
   without offering a click that goes nowhere. */
.notes a:not([href]) { cursor: default; }
.notes a:not([href]):hover { opacity: 1; }
.notes .when {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.notes .what {
  display: block;
  margin-top: 0.32rem;
  font-size: clamp(1.0625rem, 1.8vw, 1.3125rem);
  font-weight: 600;
  line-height: 1.27;
  letter-spacing: -0.02em;
}
/* The 404 list reuses this component without a date line above it. */
.notes .what:first-child { margin-top: 0; }
.notes .gist {
  display: block;
  margin-top: 0.35rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.55;
}

/* ── open roles ────────────────────────────────────────── */

.roles { max-width: 820px; margin-inline: auto; }
.roles li {
  border-radius: var(--radius);
  background: var(--tint);
  padding: clamp(1.2rem, 2.2vw, 1.65rem) clamp(1.2rem, 2.4vw, 1.8rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem 1.25rem;
  align-items: center;
}
.sec-tint .roles li { background: var(--white); }
.roles li + li { margin-top: 0.75rem; }
.roles h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.016em;
}
.roles .where {
  grid-column: 1;
  color: var(--ink-2);
  font-size: 0.875rem;
}
.roles .apply { grid-row: 1 / span 2; grid-column: 2; }

@media (max-width: 560px) {
  .roles li { grid-template-columns: minmax(0, 1fr); }
  .roles .apply { grid-row: auto; grid-column: 1; justify-self: start; }
}

/* ── team ──────────────────────────────────────────────── */

/* Flex, not grid: five people divide evenly into no column count, so
   let the last row centre itself rather than sit ragged-left. */
.people {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1.75rem, 3.5vw, 2.75rem) clamp(1.25rem, 3vw, 2.5rem);
  max-width: 900px;
  margin-inline: auto;
}

.person {
  flex: 0 1 138px;
  max-width: 160px;
  text-align: center;
}

.person .plate {
  width: clamp(78px, 11vw, 96px);
  aspect-ratio: 1;
  margin: 0 auto 0.9rem;
  border-radius: 50%;
  background: var(--tint);
  /* ink-2, not ink-3: initials on a pale plate need to clear 4.5:1,
     and the inset ring gives the circle an edge against the band. */
  color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--hairline);
  display: grid;
  place-items: center;
  font-size: clamp(0.9375rem, 1.6vw, 1.0625rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  overflow: hidden;
}
.sec-tint .person .plate { background: var(--white); }
.person .plate img { width: 100%; height: 100%; object-fit: cover; }

.person h3 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.014em;
}
/* Family name set in caps, the convention in academic bylines. */
.person h3 .fam { letter-spacing: 0.01em; }

.person .role {
  margin-top: 0.2rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--ink-2);
}

/* ── footer ────────────────────────────────────────────── */

.foot {
  background: var(--tint);
  border-top: 1px solid var(--hairline);
  font-size: 0.75rem;
  color: var(--ink-2);
}
.foot-in {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: clamp(1.85rem, 3.5vw, 2.6rem) var(--gutter);
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  padding-bottom: 1.05rem;
  border-bottom: 1px solid var(--hairline);
}
.foot-links a:hover { color: var(--ink); text-decoration: underline; }
.foot-legal {
  padding-top: 1.05rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  color: var(--ink-2);
}

/* ── scroll reveal ─────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  /* Explicit: a near-zero duration would still honour the delay and
     leave the hero blank for a third of a second. */
  .hero > * { animation: none; }
}
