/* =============================================================================
   Apollon Health — M1 recruiting landing page
   Values below are taken directly from the APL-63 handoff. The handoff marks
   colours, type, and spacing as locked ("implement pixel-perfectly"), so treat
   the tokens and the component block as spec, not preference.
   ========================================================================== */

/* -----------------------------------------------------------------------------
   Fonts — self-hosted per the handoff ("swap for self-hosted fonts in
   production to avoid FOUT/FOIT"). font-display:swap would still flash, so the
   headline face uses `block` with a short cap; body text uses `swap`.

   Public Sans ships no Greek subset, so Greek glyphs fall through to
   Commissioner via unicode-range. See README "Deviations".
-------------------------------------------------------------------------------*/

/* Source Serif 4 — headline only. Variable weight axis. */
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 500 700;
  font-display: block;
  src: url('./assets/fonts/source-serif-4-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 500 700;
  font-display: block;
  src: url('./assets/fonts/source-serif-4-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1,
    U+03A3-03FF;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 500 700;
  font-display: block;
  src: url('./assets/fonts/source-serif-4-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Public Sans — everything except the headline. Latin only. */
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('./assets/fonts/public-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('./assets/fonts/public-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Commissioner — Greek glyphs only, standing in for Public Sans, which has no
   Greek subset. Restricted by unicode-range so Latin text on the Greek page
   (e.g. "health tech", the colophon) still renders in Public Sans. */
@font-face {
  font-family: 'Commissioner';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('./assets/fonts/commissioner-greek.woff2') format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1,
    U+03A3-03FF;
}

/* -----------------------------------------------------------------------------
   Design tokens (handoff: "Design Tokens")
-------------------------------------------------------------------------------*/
:root {
  --ground: #ede8e0; /* page background */
  --ink: #211e1a; /* headline (incl. premise), bold bio lead-in */
  --muted: #6b6559; /* subhead, bio, privacy, footer, toggle */
  --accent: #3a4a3f; /* CTA background + focus ring ONLY */
  --rule: #d6cfc4; /* axis rule, divider, toggle underline */
  --radius: 8px; /* CTA only */

  --font-sans: 'Public Sans', 'Commissioner', system-ui, sans-serif;
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;

  --page-padding: clamp(20px, 5vw, 64px);
  --content-gap: clamp(18px, 3vw, 26px);
  --axis-gap: clamp(20px, 3vw, 32px);

  /* Measure shared by the subhead, divider, founder row and privacy line. */
  --measure: 480px;
}

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

html {
  /* Prevent iOS bumping type size when the device is rotated. */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

/* -----------------------------------------------------------------------------
   Page shell — full-height flex column, hero centred in the remaining space,
   footer pinned to the bottom of the viewport.
-------------------------------------------------------------------------------*/
.page {
  min-height: 100vh;
  /* Avoids the mobile browser chrome clipping the pinned footer. */
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: var(--page-padding);
}

/* On-load motion: the only motion on the page (handoff "Interactions"). */
.page--enter {
  animation: page-enter 0.7s ease-out both;
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .page--enter {
    animation: none;
  }
}

/* -----------------------------------------------------------------------------
   Hero — the vertical rule is the page's axis; the content column hangs off it.
   Deliberately NOT centred horizontally: it starts at the left padding edge.
-------------------------------------------------------------------------------*/
.hero {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--axis-gap);
  max-width: 720px;
  width: 100%;
  padding: 32px 0;
}

.hero__axis {
  width: 1px;
  flex: none;
  align-self: stretch;
  background: var(--rule);
}

.hero__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--content-gap);
}

/* -----------------------------------------------------------------------------
   Headline — the single large element on the page. Premise and question now
   render as one block (see page.js): the small-caps premise treatment tested
   as skippable — readers passed straight over it — so it was folded into the
   headline's own type, weight, and colour. `.headline__gap` is the only thing
   marking the premise pair as a distinct beat before the question.
-------------------------------------------------------------------------------*/
.headline {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(34px, 6.5vw, 68px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-align: left;
  text-wrap: pretty;
}

.headline__gap {
  display: block;
  /* em, not px — scales with the headline's own clamp() so the pause reads
     the same proportionally at 34px and at 68px. */
  height: 0.4em;
}

/* -----------------------------------------------------------------------------
   Subhead
-------------------------------------------------------------------------------*/
.subhead {
  margin: 6px 0 0;
  max-width: var(--measure);
  font-size: clamp(17px, 1.8vw, 19px);
  line-height: 1.65;
  color: var(--muted);
  text-align: left;
}

/* -----------------------------------------------------------------------------
   CTA — the page's only action. Hover darkens the same pine; no second accent.
-------------------------------------------------------------------------------*/
.cta {
  align-self: flex-start;
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  border-radius: var(--radius);
  background: var(--accent);
  /* The page's own background colour, reused — no new "white". */
  color: var(--ground);
  font-family: inherit;
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
  transition: filter 0.15s ease-out;
}

.cta:hover {
  filter: brightness(0.92);
}

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

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

/* -----------------------------------------------------------------------------
   Divider
-------------------------------------------------------------------------------*/
.divider {
  width: 100%;
  max-width: var(--measure);
  height: 1px;
  margin: 14px 0 2px;
  border: 0;
  background: var(--rule);
}

/* -----------------------------------------------------------------------------
   Founder row — photo height must equal the height of the bio block beside it,
   so the row stretches and the image fills it with object-fit: cover.
-------------------------------------------------------------------------------*/
.founder {
  display: flex;
  align-items: stretch;
  gap: 18px;
  width: 100%;
  max-width: var(--measure);
}

/**
 * The frame — not the image — is the flex item, so the photo's intrinsic
 * aspect ratio can't inflate the row. The image is taken out of flow inside
 * it, which leaves the bio block as the only thing setting the row height and
 * makes the photo exactly as tall as the bio, as the handoff requires.
 */
.founder__frame {
  position: relative;
  flex: none;
  align-self: stretch;
  width: 110px;
  overflow: hidden;
  background: var(--rule);
}

.founder__photo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.founder__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 2px;
  min-width: 0;
}

.founder__bio {
  margin: 0;
  max-width: 440px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

.founder__lead {
  font-weight: 700;
  color: var(--ink);
}

/* -----------------------------------------------------------------------------
   Privacy line
-------------------------------------------------------------------------------*/
.privacy {
  margin: 0;
  max-width: var(--measure);
  font-size: 13px;
  color: var(--muted);
  text-align: left;
}

/* -----------------------------------------------------------------------------
   Bottom row — language toggle + colophon, pinned to the bottom of the page.
-------------------------------------------------------------------------------*/
.footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

.footer__toggle {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  /* Underline via border, not text-decoration, per the handoff. */
  border-bottom: 1px solid var(--rule);
}

.footer__toggle:hover {
  color: var(--ink);
}

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

.footer__colophon {
  font-size: 12px;
  color: var(--muted);
}

/* -----------------------------------------------------------------------------
   Narrow screens — the handoff calls out testing the founder row at 375px and
   allowing it to wrap if 110px of photo plus the bio no longer fits.
-------------------------------------------------------------------------------*/
@media (max-width: 380px) {
  .founder {
    gap: 14px;
  }

  .founder__frame {
    width: 92px;
  }
}

/* -----------------------------------------------------------------------------
   Utilities
-------------------------------------------------------------------------------*/
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
