/* 00-layers.css */
/*
 * Codicem I/S — stylesheet
 *
 * Built from the numbered modules in src/styles/ by tools/build.mjs. They are
 * concatenated in filename order, so the numeric prefix is the source order.
 *
 * Cascade layers make the override order explicit and independent of selector
 * specificity: a component rule always beats a base rule, regardless of how the
 * selectors compare.
 */

@layer tokens, reset, base, layout, components, utilities;

/* 01-tokens.css */
@layer tokens {
  :root {
    /* --- Codicem palette ------------------------------------------------- */
    --paper: #f3f0e9; /* page background */
    --paper-warm: #eae6dc; /* portrait placeholder */
    --ink: #1a1815; /* headings, footer background */
    --ink-soft: #57534b; /* body text */
    --ink-mute: #8a857a; /* small labels */
    --rule: #dfdace; /* hairlines */
    --accent: #6b2b23; /* oxblood: eyebrows, links, roles */
    --accent-light: #c98f86; /* accent on the dark footer */

    /* Translucent paper for the sticky header's frosted backdrop. */
    --paper-veil: rgb(243 240 233 / 88%);

    /* Paper-on-ink tints, used in the footer. */
    --on-ink-rule: rgb(243 240 233 / 16%);
    --on-ink-mute: rgb(243 240 233 / 50%);
    --on-ink-soft: rgb(243 240 233 / 86%);

    /* --- GenFind palette (platform card only) ---------------------------- */
    --genfind-navy: #1c2a39;
    --genfind-cream: #f9f8f4;
    --genfind-orange: #cb6040;
    --genfind-rule: rgb(249 248 244 / 24%);
    --genfind-body: rgb(249 248 244 / 78%);
    --genfind-pill: rgb(249 248 244 / 80%);

    /* --- Type ------------------------------------------------------------ */
    --font-display: "Bricolage Grotesque", system-ui, sans-serif;
    --font-body: "Public Sans", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;
    --font-genfind: "Nunito", system-ui, sans-serif;

    /* --- Layout ---------------------------------------------------------- */
    --measure: 1240px;
    --gutter: clamp(20px, 5vw, 64px);

    --radius-card: 20px;
    --radius-media: 14px;
    --radius-tile: 12px;
    --radius-pill: 999px;

    /* Clears the sticky header when an anchor target is scrolled into view. */
    --scroll-offset: 88px;

    /* --- Focus ----------------------------------------------------------- */
    --focus-ring: 2px solid var(--accent);
    --focus-offset: 2px;
  }
}

/* 02-fonts.css */
/*
 * Generated by tools/fetch-fonts.mjs — do not edit by hand.
 * Run `npm run fonts` to regenerate after changing the type stack.
 */

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../assets/fonts/bricolage-grotesque-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;
}

@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../assets/fonts/bricolage-grotesque-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 500;
  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;
}

@font-face {
  font-family: 'Public Sans';
  font-style: normal;
  font-weight: 400 500;
  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: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../assets/fonts/jetbrains-mono-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;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('../assets/fonts/jetbrains-mono-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: 'Nunito';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../assets/fonts/nunito-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;
}

@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../assets/fonts/nunito-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;
}

/* 03-reset.css */
@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  body,
  h1,
  h2,
  h3,
  p,
  dl,
  dd,
  figure {
    margin: 0;
  }

  ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }

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

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

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

/* 04-base.css */
@layer base {
  html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
  }

  body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  a {
    color: var(--accent);
    transition: color 0.15s ease;
  }

  a:hover {
    color: var(--ink);
  }

  :focus-visible {
    outline: var(--focus-ring);
    outline-offset: var(--focus-offset);
    border-radius: 2px;
  }

  ::selection {
    background: var(--accent);
    color: var(--paper);
  }

  /* Lets keyboard users skip the header nav straight to the page content. */
  .skip-link {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 30;
    padding: 10px 16px;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    border-radius: var(--radius-pill);
    transform: translateY(calc(-100% - 16px));
    transition: transform 0.15s ease;
  }

  /*
   * :focus rather than :focus-visible — the link is only ever reached by
   * keyboard, and it must appear however focus arrived.
   */
  .skip-link:focus {
    color: var(--paper);
    transform: translateY(0);
    outline: 2px solid var(--accent-light);
    outline-offset: var(--focus-offset);
  }

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

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

/* 05-layout.css */
@layer layout {
  /*
   * Every block on the page is the same centred column. Sections add their own
   * padding-block; the shell owns the width and the gutters.
   *
   * --measure is the width of the *content*, so the gutters are added outside
   * it. The design reference renders in content-box, where `max-width: 1240px`
   * plus 64px of padding measures 1368px edge to edge; this reproduces that
   * without giving up the border-box reset.
   */
  .shell {
    max-width: calc(var(--measure) + 2 * var(--gutter));
    margin-inline: auto;
    padding-inline: var(--gutter);
  }

  /*
   * Every anchor target on the page, held clear of the sticky header. Set
   * unconditionally rather than on :target, which some browsers apply too late
   * to affect the scroll they trigger.
   */
  :where(main, main > section, .site-footer) {
    scroll-margin-top: var(--scroll-offset);
  }

  /*
   * Hairlines between blocks are a border on the section itself — never a
   * separate element — so they span the full column including its gutters.
   */
  .section--ruled {
    border-top: 1px solid var(--rule);
  }

  /*
   * Multi-column blocks collapse on their own via auto-fit, so the page needs
   * almost no breakpoints. The minimum column width is set per block.
   */
  .grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(var(--grid-min), 1fr));
  }
}

/* 06-type.css */
@layer components {
  /*
   * Small monospaced section marker. Oxblood on paper by default; the two dark
   * surfaces each get their own tint.
   */
  .eyebrow {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
  }

  .eyebrow--genfind {
    color: var(--genfind-orange);
  }

  .eyebrow--on-ink {
    color: var(--accent-light);
  }

  /*
   * Key/value label, one step smaller and quieter than the eyebrow. Used in the
   * hero fact strip and the footer meta grid.
   */
  .label {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-mute);
  }

  .label--on-ink {
    color: var(--on-ink-mute);
  }
}

/* 07-header.css */
@layer components {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--paper-veil);
    border-bottom: 1px solid var(--rule);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }

  .site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-block: 16px;
  }

  /* --- Wordmark ---------------------------------------------------------- */

  .wordmark {
    display: flex;
    align-items: baseline;
    gap: 8px;
    color: var(--ink);
  }

  .wordmark__name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 22px;
    letter-spacing: -0.035em;
  }

  .wordmark__suffix {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    color: var(--ink-mute);
  }

  /* --- Navigation -------------------------------------------------------- */

  .site-nav {
    display: flex;
    align-items: center;
    gap: clamp(16px, 2.4vw, 34px);
  }

  .site-nav__list {
    display: flex;
    align-items: center;
    gap: clamp(16px, 2.4vw, 34px);
  }

  .site-nav__link {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--ink-soft);
  }

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

  /*
   * The anchor links do not fit beside the wordmark and the language switch on
   * a phone. The page is five short sections, so they are dropped there rather
   * than hidden behind a menu button — the switch stays, since it is the one
   * control with no equivalent elsewhere on the page.
   */
  @media (width < 720px) {
    .site-nav__list {
      display: none;
    }
  }

  /* --- Language switch --------------------------------------------------- */

  .lang-switch {
    display: flex;
    border: 1px solid var(--rule);
    border-radius: var(--radius-pill);
    overflow: hidden;
  }

  .lang-switch__option {
    padding: 6px 12px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--ink-soft);
  }

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

  .lang-switch__option[aria-current="page"] {
    background: var(--ink);
    color: var(--paper);
  }

  /* The ring would be clipped by the pill's overflow without an inset outline. */
  .lang-switch__option:focus-visible {
    outline-offset: -3px;
    border-radius: 0;
  }
}

/* 08-hero.css */
@layer components {
  .hero {
    padding-block: clamp(64px, 11vh, 132px) clamp(52px, 8vh, 104px);
  }

  .hero__title {
    margin-top: 26px;
    max-width: 16ch;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(42px, 7.2vw, 102px);
    line-height: 0.94;
    letter-spacing: -0.035em;
    text-wrap: balance;
  }

  .hero__lede {
    margin-top: 30px;
    max-width: 46ch;
    font-size: clamp(18px, 1.45vw, 23px);
    line-height: 1.5;
    color: var(--ink-soft);
    text-wrap: pretty;
  }

  /* --- Fact strip -------------------------------------------------------- */

  .fact-strip {
    --grid-min: 170px;

    margin-top: clamp(44px, 7vh, 86px);
    gap: 1px 32px;
  }

  .fact {
    border-top: 1px solid var(--rule);
    padding-top: 14px;
  }

  .fact__value {
    margin-top: 6px;
    font-size: 16px;
  }
}

/* 09-manifesto.css */
@layer components {
  .manifesto {
    padding-block: clamp(48px, 7vh, 96px);
  }

  .manifesto__grid {
    --grid-min: 320px;

    margin-top: clamp(26px, 4vh, 44px);
    gap: clamp(28px, 4.5vw, 72px);
    align-items: start;
  }

  .manifesto__lead {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(25px, 2.9vw, 40px);
    line-height: 1.16;
    letter-spacing: -0.025em;
    text-wrap: pretty;
  }

  /* The closing sentence of the lead carries the accent colour. */
  .manifesto__turn {
    color: var(--accent);
  }

  /*
   * Nudged down so the first line of the smaller column sits optically level
   * with the first line of the display text beside it.
   */
  .manifesto__notes {
    display: grid;
    gap: 22px;
    padding-top: clamp(6px, 1.2vh, 14px);
  }

  .manifesto__note {
    max-width: 50ch;
    font-size: clamp(17px, 1.3vw, 19px);
    line-height: 1.6;
    color: var(--ink-soft);
    text-wrap: pretty;
  }

  .manifesto__note + .manifesto__note {
    border-top: 1px solid var(--rule);
    padding-top: 22px;
  }
}

/* 10-platform.css */
@layer components {
  .platform {
    padding-block: clamp(20px, 3vh, 40px) clamp(48px, 7vh, 96px);
  }

  /*
   * The only place GenFind's own brand appears. It carries its own typeface and
   * palette, so everything inside is scoped to this card.
   */
  .platform-card {
    background: var(--genfind-navy);
    color: var(--genfind-cream);
    border-radius: var(--radius-card);
    padding: clamp(28px, 4vw, 56px);
    font-family: var(--font-genfind);
  }

  .platform-card__grid {
    --grid-min: 280px;

    gap: clamp(28px, 4vw, 56px);
    align-items: start;
  }

  .platform-card__lockup {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 22px;
  }

  .platform-card__tile {
    display: flex;
    background: var(--genfind-cream);
    border-radius: var(--radius-tile);
    padding: 8px;
  }

  .platform-card__name {
    font-weight: 700;
    font-size: 34px;
    letter-spacing: -0.02em;
  }

  .platform-card__tagline {
    margin-top: 22px;
    max-width: 22ch;
    font-weight: 600;
    font-size: clamp(20px, 2vw, 26px);
    line-height: 1.25;
    text-wrap: balance;
  }

  .platform-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 26px;
  }

  .platform-card__tag {
    border: 1px solid var(--genfind-rule);
    border-radius: var(--radius-pill);
    padding: 6px 12px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--genfind-pill);
  }

  .platform-card__paragraph {
    max-width: 54ch;
    font-size: 17px;
    line-height: 1.62;
    color: var(--genfind-body);
    text-wrap: pretty;
  }

  .platform-card__paragraph + .platform-card__paragraph {
    margin-top: 18px;
  }
}

/* 11-team.css */
@layer components {
  /* No top padding — the platform card above already provides it. */
  .team {
    padding-bottom: clamp(56px, 8vh, 104px);
  }

  .team__header {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 40px;
    align-items: baseline;
    justify-content: space-between;
  }

  .team__heading {
    margin-top: 18px;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.06;
    letter-spacing: -0.025em;
  }

  .team__intro {
    max-width: 44ch;
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink-soft);
    text-wrap: pretty;
  }

  .team__grid {
    --grid-min: 260px;

    margin-top: clamp(28px, 4vh, 48px);
    gap: clamp(20px, 3vw, 40px);
  }

  /*
   * The portrait is optional: no founder photos exist yet, so the block is
   * simply absent from the markup. Adding a `photo` entry in content/*.json
   * brings it back, and the sibling rule below restores the spacing with it.
   */
  .founder__photo {
    aspect-ratio: 4 / 5;
    background: var(--paper-warm);
    border-radius: var(--radius-media);
    overflow: hidden;
  }

  .founder__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /*
   * The 18px offset is unconditional, matching the design reference: with a
   * portrait it separates the two, and without one it keeps the rule clear of
   * the section above. Adding portraits therefore shifts nothing else.
   */
  .founder__body {
    margin-top: 18px;
    border-top: 1px solid var(--rule);
    padding-top: 14px;
  }

  .founder__name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 20px;
    letter-spacing: -0.02em;
  }

  .founder__role {
    margin-top: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
  }

  .founder__bio {
    margin-top: 12px;
    max-width: 42ch;
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink-soft);
    text-wrap: pretty;
  }
}

/* 12-footer.css */
@layer components {
  .site-footer {
    background: var(--ink);
    color: var(--paper);
    padding-block: clamp(48px, 8vh, 96px);
  }

  /*
   * The widest element on the page. At the clamp floor the address measures
   * ~277px against 280px of content width at a 320px viewport, so it fits — but
   * only just. break-word costs nothing while it fits and wraps instead of
   * forcing the page sideways if a browser's metrics run wider.
   */
  .site-footer__mail {
    display: inline-block;
    margin-top: 22px;
    max-width: 100%;
    overflow-wrap: break-word;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(30px, 5.2vw, 68px);
    line-height: 1.05;
    letter-spacing: -0.035em;
    color: var(--paper);
  }

  .site-footer__mail:hover {
    color: var(--accent-light);
  }

  .site-footer__mail:focus-visible {
    outline-color: var(--accent-light);
  }

  .meta-grid {
    --grid-min: 190px;

    margin-top: clamp(40px, 6vh, 72px);
    border-top: 1px solid var(--on-ink-rule);
    padding-top: 24px;
    gap: 28px;
  }

  .meta__value {
    margin-top: 8px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--on-ink-soft);
  }

  /* Each entry is its own line rather than a <br> inside one run of text. */
  .meta__value span {
    display: block;
  }
}

/* 13-utilities.css */
@layer utilities {
  /*
   * Available to assistive technology, absent from the visual design. Used for
   * the full language names behind the "DA" / "EN" abbreviations.
   */
  .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
}
