/* Cognate — styles approximated from the Figma file and the mockup site.
   Desktop layout is designed at 1440px; mobile at 390px (breakpoint 900px). */

:root {
  --ink: rgba(13, 13, 13, 0.85);
  --black: #0d0d0d;
  --white: #ffffff;
  --border: #d6d6d6;
  --hero-blue: #99d3ff;
  --warm-cream: #fff2cc;
  --lavender: #c6bdff;
  --mint: #bce9d9;
  --approach-bg: #d5c5ee;

  --serif: "Roboto Serif", Georgia, serif;
  --sans: "Roboto Flex", "Helvetica Neue", Arial, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  color: var(--ink);
  background: var(--white);
  font-family: var(--sans);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

/* ---------- Base ---------- */

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

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

button {
  border: 0;
  font: inherit;
  color: inherit;
  background: none;
  padding: 0;
}

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

h1,
h2,
h3,
p,
ol {
  margin: 0;
}

ol {
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid #1665c1;
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  transform: translateY(-160%);
  border-radius: 999px;
  background: var(--black);
  color: var(--white);
  padding: 10px 16px;
  transition: transform 0.16s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------- Type styles ---------- */

h1,
h2,
h3,
.approach-step__title,
.mila {
  font-family: var(--serif);
  font-variation-settings: "GRAD" 0, "opsz" 144, "wdth" 96;
  font-weight: 450;
  line-height: 1.2;
}

.body-copy,
.approach-step__description,
.site-nav,
.pill-button {
  font-size: 16px;
  font-variation-settings: "opsz" 14, "wdth" 100;
  font-weight: 300;
  letter-spacing: 0.08px;
  line-height: 1.5;
}

.display-copy {
  font-size: 32px;
  font-variation-settings: "opsz" 12, "wdth" 100;
  font-weight: 250;
  letter-spacing: -0.48px;
  line-height: 1.2;
}

.eyebrow,
.visual-tag {
  font-size: 14px;
  font-variation-settings: "opsz" 8, "wdth" 100;
  font-weight: 300;
  letter-spacing: 1.12px;
  line-height: 1.4;
  text-transform: uppercase;
}

/* ---------- Buttons ---------- */

.pill-button {
  display: inline-flex;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 100px;
  background: var(--black);
  color: var(--white);
  line-height: 1.2;
  padding: 8px 16px;
  white-space: nowrap;
  transition: transform 0.16s ease, background-color 0.16s ease;
}

.pill-button:hover {
  background: #292929;
}

.pill-button:active {
  transform: translateY(1px);
}

.pill-button--inverse {
  border-color: var(--white);
  background: var(--white);
  color: var(--ink);
}

.pill-button--inverse:hover {
  background: #f1f1f1;
}

/* ---------- Header ---------- */

.site-header {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  height: 68px;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 0 21px;
}

.brand img {
  width: 129px;
  height: 32px;
}

.site-nav {
  position: absolute;
  left: 50%;
  display: flex;
  gap: 32px;
  transform: translateX(-50%);
}

.site-nav a {
  transition: opacity 0.16s ease;
}

.site-nav a:hover {
  opacity: 0.58;
}

/* ---------- Hero ---------- */

.hero {
  --hero-height: max(780px, 100dvh);
  position: relative;
  height: var(--hero-height);
  overflow: hidden;
  background: linear-gradient(to bottom, var(--hero-blue), var(--warm-cream));
}

.hero h1,
.hero__statement {
  position: absolute;
  z-index: 2;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.hero h1 {
  top: calc(var(--hero-height) * 0.1321);
  width: 720px;
  font-size: clamp(48px, 6.605dvh, 64px);
  letter-spacing: -1.28px;
}

.hero__cell {
  position: absolute;
  z-index: 3;
  top: calc(var(--hero-height) * 0.226);
  left: 50%;
  width: calc(var(--hero-height) * 0.7668);
  height: calc(var(--hero-height) * 0.5346);
  max-width: none;
  object-fit: contain;
  transform: translate3d(-50%, var(--hero-parallax-y, 0), 0);
  will-change: transform;
}

.hero__statement {
  top: calc(var(--hero-height) * 0.7503);
  width: min(820px, calc(100% - 48px));
  font-size: clamp(24px, 3.302dvh, 32px);
  font-variation-settings: "opsz" 12, "wdth" 100;
  font-weight: 250;
  letter-spacing: -0.48px;
  line-height: 1.2;
}

/* ---------- Section headings ---------- */

.section-heading {
  display: grid;
  height: 122px;
  grid-template-columns: 180px minmax(0, 1fr);
  border-bottom: 1px solid var(--border);
  background: var(--white);
}

.section-heading__index {
  padding: 36px 32px 0;
  font-size: 16px;
  font-variation-settings: "opsz" 14, "wdth" 100;
  font-weight: 700;
  line-height: 1.5;
}

.section-heading h2 {
  padding-top: 22px;
  font-size: 48px;
  letter-spacing: -0.96px;
}

/* ---------- 1. About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(540px, auto);
}

.about-visual {
  position: relative;
  overflow: hidden;
}

.about-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Glyphs always fit inside the panel, whatever its shape */
.about-visual img.about-visual__glyphs {
  inset: 48px 64px;
  width: calc(100% - 128px);
  height: calc(100% - 96px);
  object-fit: contain;
}

.about-visual--bridge {
  background: linear-gradient(var(--hero-blue), var(--warm-cream));
}

.about-visual--bridge img {
  inset: 24px 32px;
  width: calc(100% - 64px);
  height: calc(100% - 48px);
  object-fit: contain;
}

.copy-panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 16px;
  padding: 32px;
}

.copy-panel > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.copy-panel h3 {
  font-size: 32px;
  letter-spacing: -0.32px;
}

.copy-panel--gradient {
  background: linear-gradient(to bottom, var(--lavender), var(--mint));
}

.copy-panel--dark {
  align-items: flex-start;
  justify-content: space-between;
  background: var(--black);
  color: rgba(255, 255, 255, 0.9);
}

.copy-panel--dark > div {
  gap: 16px;
}

.copy-panel--dark > div > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---------- 2. Approach ----------
   The section is taller than the viewport: .approach__pin (heading + layout)
   sticks while an extra --approach-scroll-distance of scrolling happens
   underneath (the ::after spacer). js/main.js maps that scroll progress to
   --mix (0–1) on each visual and step, cross-fading 1 → 2 → 3. */

.approach {
  --approach-heading-height: clamp(96px, 13.556dvh, 122px);
  --approach-scroll-distance: clamp(1144px, 143dvh, 1612px);
  position: relative;
}

.approach::after {
  content: "";
  display: block;
  height: var(--approach-scroll-distance);
}

.approach__pin {
  position: sticky;
  top: 0;
  height: 100dvh;
  overflow: hidden;
  background: var(--white);
}

.approach .section-heading {
  height: var(--approach-heading-height);
}

.approach .section-heading__index {
  padding-top: clamp(24px, 4dvh, 36px);
}

.approach .section-heading h2 {
  padding-top: clamp(14px, 2.444dvh, 22px);
  font-size: clamp(32px, 5.333dvh, 48px);
}

.approach__layout {
  display: grid;
  height: calc(100dvh - var(--approach-heading-height));
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.approach__visuals {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: var(--approach-bg);
}

.approach-visual {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: var(--mix, 0);
  transform: scale(calc(1.006 - var(--mix, 0) * 0.006));
  will-change: opacity, transform;
}

.approach-visual:first-child {
  --mix: 1;
}

.approach-visual > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.visual-tag {
  position: absolute;
  display: inline-flex;
  height: 36px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.01), inset 0 40px 30px -40px #e6e6e6;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  color: rgba(13, 13, 13, 0.8);
  padding: 8px 16px;
  white-space: nowrap;
}

.approach-visual--sequencing .visual-tag--one { top: 22.92%; left: 21.25%; }
.approach-visual--sequencing .visual-tag--two { right: 19.7%; bottom: 21.11%; }
.approach-visual--foundation .visual-tag--one { bottom: 33.33%; left: 20.3%; }
.approach-visual--foundation .visual-tag--two { top: 34.72%; right: 25%; }
.approach-visual--agentic .visual-tag--one { bottom: 22.36%; left: 23.75%; }
.approach-visual--agentic .visual-tag--two { top: 27.36%; right: 13%; }

.approach__progress {
  display: none;
}

.approach__steps {
  display: grid;
  min-height: 0;
  grid-template-rows: repeat(3, minmax(0, 1fr));
}

.approach-step {
  --mix: 0;
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  gap: clamp(8px, 1.778dvh, 16px);
  overflow-y: auto;
  border: 1px solid var(--border);
  background: var(--white);
  opacity: calc(0.3 + var(--mix) * 0.7);
  padding: clamp(16px, 3.556dvh, 32px);
  transition: background-color 0.18s ease;
}

.approach-step:first-child {
  --mix: 1;
}

.approach-step:hover {
  background: #fafafa;
}

.approach-step__heading {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  text-align: left;
}

.approach-step__number {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  font-size: 16px;
  font-weight: 300;
}

.approach-step__title {
  font-size: clamp(24px, 3.556dvh, 32px);
  letter-spacing: -0.32px;
}

.approach-step__description {
  padding-left: 48px;
}

/* ---------- 3. Team ---------- */

/* Rows are as tall as a column is wide, so photos stay square at every width
   (360×360 at 1440px, as in Figma). If a long bio makes a row taller, the
   focal point keeps faces in frame. */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(25vw, auto);
}

.team-photo {
  position: relative;
  overflow: hidden;
}

.team-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.team-photo--top img {
  object-position: center 10%;
}

.team-bio {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--border);
  padding: 32px;
}

.team-bio h3 {
  font-size: 32px;
  letter-spacing: -0.32px;
}

.advisors-heading {
  display: grid;
  min-height: 64px;
  place-items: center;
  padding: 24px;
  font-family: var(--sans);
}

.mila {
  display: flex;
  min-height: 128px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 32px 24px;
  font-size: 32px;
  letter-spacing: -0.32px;
  text-align: center;
}

.mila__program {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mila__logo {
  width: auto;
  height: 27px;
}

/* ---------- Final CTA ---------- */

.final-cta {
  position: relative;
  display: flex;
  min-height: 100dvh;
  align-items: center;
  justify-content: center;
  padding: clamp(32px, 5dvh, 64px) 24px;
  background: linear-gradient(to bottom, var(--warm-cream), var(--hero-blue));
}

.final-cta__content {
  display: flex;
  width: min(900px, 100%);
  flex-direction: column;
  align-items: center;
  gap: 32px;
  margin-top: clamp(-64px, -6dvh, -36px);
  text-align: center;
}

.final-cta h2 {
  font-size: 48px;
  letter-spacing: -1.28px;
}

.final-cta__content > p {
  max-width: 704px;
  font-size: 16px;
  font-variation-settings: "opsz" 14, "wdth" 100;
  font-weight: 300;
  letter-spacing: 0.08px;
  line-height: 1.5;
}

.copyright {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
}

/* Reveal on scroll (class added by js/main.js) */
.final-cta.is-hidden .final-cta__content > *,
.final-cta.is-hidden .copyright {
  opacity: 0;
  translate: 0 14px;
}

.final-cta__content > *,
.copyright {
  transition: opacity 0.7s var(--ease-out), translate 0.7s var(--ease-out);
}

.final-cta__content > p { transition-delay: 90ms; }
.final-cta__content > .pill-button { transition-delay: 180ms; }
.copyright { transition-delay: 260ms; }

/* ---------- Tablet ---------- */

@media (min-width: 901px) and (max-width: 1180px) {
  .section-heading {
    grid-template-columns: 140px minmax(0, 1fr);
  }

  .section-heading h2 {
    font-size: 40px;
  }

  .copy-panel h3,
  .team-bio h3 {
    font-size: 27px;
  }

  .display-copy {
    font-size: 21px;
  }

  .approach-step {
    gap: 8px;
    padding: 16px;
  }

  .approach-step__title {
    font-size: clamp(24px, 3.556dvh, 27px);
  }
}

@media (min-width: 901px) and (max-height: 760px) {
  .approach-step {
    gap: 6px;
    padding: clamp(12px, 2.2dvh, 16px);
  }

  .approach-step__title {
    font-size: 24px;
  }
}

/* ---------- Mobile ---------- */

@media (max-width: 900px) {
  .site-nav {
    display: none;
  }

  .eyebrow,
  .visual-tag {
    font-size: 12px;
    letter-spacing: 0.96px;
  }

  .display-copy {
    font-size: 24px;
    letter-spacing: -0.36px;
  }

  /* Hero flows in normal layout on mobile */
  .hero {
    display: grid;
    height: auto;
    min-height: 100dvh;
    grid-template-rows: auto minmax(calc(clamp(260px, 93.59vw, 365px) - 21px), 1fr) auto;
    padding: 96px 24px max(24px, env(safe-area-inset-bottom));
  }

  .hero h1,
  .hero__statement {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    transform: none;
    text-align: left;
  }

  .hero h1 {
    font-size: 40px;
    letter-spacing: -0.8px;
  }

  .hero__visual {
    position: relative;
    margin-top: -21px;
  }

  .hero__cell {
    top: 0;
    width: calc(100% + 181px);
    height: 100%;
  }

  .hero__statement {
    font-size: 24px;
    letter-spacing: -0.36px;
  }

  .section-heading,
  .approach .section-heading {
    display: block;
    height: auto;
    min-height: 166px;
    padding: 24px;
  }

  .section-heading__index,
  .approach .section-heading__index {
    display: block;
    padding: 0;
  }

  .section-heading h2,
  .approach .section-heading h2 {
    padding: 8px 0 0;
    font-size: 36px;
    letter-spacing: -0.72px;
  }

  /* About: text first, then its image */
  .about-grid {
    display: flex;
    flex-direction: column;
  }

  .about-intro {
    order: -1;
  }

  .about-bridge {
    order: 1;
    gap: 32px;
  }

  .about-visual--bridge {
    order: 2;
  }

  .about-visual {
    aspect-ratio: 4 / 3;
  }

  .about-visual--bridge img {
    inset: 16px 0;
    width: 100%;
    height: calc(100% - 32px);
  }

  .copy-panel {
    padding: 24px;
  }

  .copy-panel--dark {
    padding: 32px;
  }

  .about-visual img.about-visual__glyphs {
    inset: 24px 32px;
    width: calc(100% - 64px);
    height: calc(100% - 48px);
  }

  .copy-panel h3 {
    font-size: 24px;
    letter-spacing: -0.24px;
  }

  /* Approach: pinned full-screen card — image on top, the active step's
     text below, with a 1-2-3 progress bar between them */
  .approach {
    --approach-scroll-distance: 180svh;
  }

  /* The heading scrolls away; only the layout below it stays pinned.
     --approach-heading-offset is the heading's height, set by js/main.js. */
  .approach__pin {
    top: calc(-1 * var(--approach-heading-offset, 166px));
    height: auto;
    overflow: visible;
  }

  .approach .section-heading {
    height: auto;
  }

  .approach__layout {
    display: flex;
    height: 100svh;
    flex-direction: column;
  }

  .approach__visuals {
    flex: 1 1 auto;
    min-height: 0;
  }

  .approach__progress {
    display: flex;
    gap: 8px;
    padding: 20px 24px 0;
  }

  .approach__progress button {
    flex: 1;
    padding: 8px 0;
    cursor: pointer;
  }

  .approach__progress span {
    display: block;
    height: 3px;
    border-radius: 3px;
    background: var(--border);
    transition: background-color 0.2s ease;
  }

  .approach__progress .is-active span {
    background: var(--black);
  }

  /* All three steps share one cell and cross-fade */
  .approach__steps {
    display: grid;
    flex: 0 0 auto;
    grid-template-rows: auto;
  }

  .approach-step {
    grid-area: 1 / 1;
    gap: 12px;
    overflow: visible;
    border: 0;
    opacity: var(--mix);
    transform: translateY(calc((1 - var(--mix)) * 8px));
    padding: 16px 24px max(24px, env(safe-area-inset-bottom));
  }

  .approach-step:not(.is-active) {
    pointer-events: none;
  }

  .approach-step:hover {
    background: var(--white);
  }

  .approach-step__heading {
    cursor: default;
  }

  .approach-step__number {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .approach-step__title {
    font-size: 22px;
    letter-spacing: -0.22px;
  }

  .approach-step__description {
    padding-left: 0;
  }

  .approach-visual--sequencing .visual-tag--one { top: 20.25%; left: 11.3%; }
  .approach-visual--sequencing .visual-tag--two { right: 6.65%; bottom: 30.5%; }
  .approach-visual--foundation .visual-tag--one { bottom: 24%; left: 13.6%; }
  .approach-visual--foundation .visual-tag--two { top: 17.4%; right: 17.7%; }
  .approach-visual--agentic .visual-tag--one { bottom: 25%; left: 18%; }
  .approach-visual--agentic .visual-tag--two { top: 22.5%; right: 11%; }

  /* Team: photo above bio, single column */
  .team-grid {
    display: flex;
    flex-direction: column;
  }

  .team-grid--founders .team-bio:nth-child(1) { order: 1; }
  .team-grid--founders .team-photo:nth-child(2) { order: 0; }
  .team-grid--founders .team-bio:nth-child(3) { order: 3; }
  .team-grid--founders .team-photo:nth-child(4) { order: 2; }

  .team-photo {
    aspect-ratio: 1;
  }

  .team-bio {
    padding: 24px;
  }

  .team-bio h3 {
    font-size: 24px;
    letter-spacing: -0.24px;
  }

  .mila {
    flex-direction: column;
    gap: 2px;
    min-height: 133px;
    font-size: 24px;
    letter-spacing: -0.24px;
  }

  .mila__program {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .mila__logo {
    height: 22px;
  }

  .final-cta {
    padding: 32px 24px max(64px, calc(24px + env(safe-area-inset-bottom)));
  }

  .final-cta__content {
    gap: 16px;
    margin-top: clamp(-44px, -4.5dvh, -24px);
  }

  .final-cta h2 {
    font-size: 36px;
    letter-spacing: -0.72px;
  }

  .final-cta .pill-button {
    margin-top: 8px;
  }

  .copyright {
    bottom: max(26px, calc(16px + env(safe-area-inset-bottom)));
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero__cell {
    will-change: auto;
  }
}
