/* ==================================================================
   FACTYN — stylesheet
   ------------------------------------------------------------------
   Display type : Spectral   (serif — carries the brand)
   Body type    : Geist      (grotesk — quiet, supporting)
   Palette      : black / warm off-white / greys — no accent colour
   Rhythm       : the page breathes between dark and light sections

   Structure
     1.  Fonts
     2.  Tokens (:root)
     3.  Reset & base
     4.  Layout shell
     5.  Header & language switch
     6.  Hero          (home only)
     7.  Page header   (inner pages)
     8.  Sections & headings
     9.  Layers (Truth / Style)
    10.  Definition rows
    11.  Audience list
    12.  Contrast rows
    13.  Links & CTA
    14.  Contact line
    15.  Footer
    16.  Responsive
    17.  Entrance animation
   ================================================================== */


/* 1. FONTS ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,300;0,400;0,500;1,300;1,400&display=swap');

@font-face {
  font-family: 'FactynSans'; font-weight: 400; font-display: swap;
  src: url('https://cdn.jsdelivr.net/npm/geist@1.3.1/dist/fonts/geist-sans/Geist-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'FactynSans'; font-weight: 500; font-display: swap;
  src: url('https://cdn.jsdelivr.net/npm/geist@1.3.1/dist/fonts/geist-sans/Geist-Medium.woff2') format('woff2');
}


/* 2. TOKENS ======================================================== */

:root {
  /* dark (default) */
  --black:      #16161a;
  --ash:        #9a9a9f;   /* secondary text on dark   */
  --ash-dim:    #6b6b70;   /* tertiary on dark         */
  --line:       #2c2c32;   /* hairline on dark         */

  /* light section */
  --paper:      #f4f3f0;   /* warm off-white           */
  --ink:        #16161a;
  --ink-soft:   #55555b;
  --ink-dim:    #8a8a8f;
  --line-light: #d9d8d3;

  /* type */
  --serif: 'Spectral', Georgia, serif;
  --sans:  'FactynSans', system-ui, sans-serif;

  /* metrics */
  --measure: 38rem;
  --shell:   60rem;
  --pad:     clamp(1.5rem, 5vw, 3.5rem);
  --gap:     clamp(7rem, 13vw, 12rem);
}


/* 3. RESET & BASE ================================================== */

*    { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.72;
  color: var(--ash);
  background: var(--black);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}


/* 4. LAYOUT SHELL ================================================== */

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


/* 5. HEADER & LANGUAGE SWITCH ====================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--black);
  border-bottom: 1px solid var(--line);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.6rem 0;
}

.wordmark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.45rem;
  letter-spacing: 0.01em;
  color: var(--paper);
  text-decoration: none;
}

.nav-group {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.site-nav {
  display: flex;
  gap: 2.25rem;
}
.site-nav a {
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: var(--ash);
  text-decoration: none;
  transition: color 0.15s ease;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--paper);
}

/* language switch — set apart from the page nav, lighter */
.lang-switch {
  font-family: var(--sans);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  color: var(--ash-dim);
  text-decoration: none;
  padding-left: 2.25rem;
  border-left: 1px solid var(--line);
  transition: color 0.15s ease;
}
.lang-switch:hover { color: var(--paper); }


/* 6. HERO  (home only) ============================================= */

.hero {
  padding: clamp(7rem, 16vw, 13rem) 0 clamp(6.5rem, 14vw, 11rem);
}
.hero__tagline {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.3rem;
  color: var(--ash);
  margin-bottom: 2.5rem;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.9rem, 7.5vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -0.018em;
  color: var(--paper);
  max-width: 15ch;
  margin-bottom: 2.5rem;
}
.hero__sub {
  font-family: var(--sans);
  font-size: 1.25rem;
  line-height: 1.6;
  color: var(--ash);
  max-width: var(--measure);
}


/* 7. PAGE HEADER  (inner pages) ==================================== */

.page-header {
  padding: clamp(5rem, 11vw, 9rem) 0 clamp(3.5rem, 7vw, 5.5rem);
}
.page-header__kicker {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ash-dim);
  margin-bottom: 1.5rem;
}
.page-header h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--paper);
  max-width: 18ch;
}


/* 8. SECTIONS & HEADINGS =========================================== */

.section { padding: var(--gap) 0; }

/* first section after a page header sits closer to it */
.page-header + .section { padding-top: clamp(2rem, 4vw, 3.5rem); }

/* dark is default; --light inverts to the warm paper */
.section--light {
  background: var(--paper);
  color: var(--ink-soft);
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ash-dim);
  padding-bottom: 1rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}
.section--light .eyebrow {
  color: var(--ink-dim);
  border-color: var(--line-light);
}

h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.8rem, 3.4vw, 2.5rem);
  line-height: 1.22;
  letter-spacing: -0.008em;
  color: var(--paper);
  max-width: 20ch;
  margin-bottom: 1.75rem;
}
.section--light h2 { color: var(--ink); }

.lede {
  font-family: var(--sans);
  max-width: var(--measure);
  color: var(--ash);
  margin-bottom: 1.35rem;
}
.lede:last-child { margin-bottom: 0; }
.lede strong { color: var(--paper); font-weight: 500; }
.section--light .lede { color: var(--ink-soft); }
.section--light .lede strong { color: var(--ink); }

/* spacing modifier — replaces former inline margin-top overrides */
.lede--spaced { margin-top: 2.5rem; }

/* large serif statement — typography as image, distinct from h2 */
.statement {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.9rem, 3.8vw, 2.8rem);
  line-height: 1.36;
  color: var(--paper);
  max-width: 26rem;
  margin-top: 3rem;
}
.statement--lead {        /* opening statement directly under a page header */
  margin-top: 0;
  max-width: 34rem;
}
.section--light .statement { color: var(--ink); }


/* 9. LAYERS  (Truth / Style) ======================================= */

.layers { margin-top: 3.5rem; }
.layer {
  padding: 2.75rem 0;
  border-top: 1px solid var(--line);
}
.layer:last-child { border-bottom: 1px solid var(--line); }
.section--light .layer { border-color: var(--line-light); }

.layer__name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.5rem;
  color: var(--paper);
  margin-bottom: 0.35rem;
}
.section--light .layer__name { color: var(--ink); }

.layer__role {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ash-dim);
  margin-bottom: 1.35rem;
}
.layer p {
  font-family: var(--sans);
  color: var(--ash);
  max-width: var(--measure);
  margin-bottom: 1rem;
}
.layer p:last-child { margin-bottom: 0; }
.section--light .layer p { color: var(--ink-soft); }


/* 10. DEFINITION ROWS ============================================== */

.defs { margin-top: 2.5rem; }
.def {
  display: grid;
  grid-template-columns: 14rem 1fr;
  gap: 0.3rem 2rem;
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
}
.def:last-child { border-bottom: 1px solid var(--line); }
.section--light .def { border-color: var(--line-light); }

.def__term {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--paper);
}
.section--light .def__term { color: var(--ink); }

.def__desc {
  font-family: var(--sans);
  color: var(--ash);
  max-width: var(--measure);
}
.section--light .def__desc { color: var(--ink-soft); }


/* 11. AUDIENCE LIST ================================================ */

.audience { margin-top: 3rem; }
.audience li {
  list-style: none;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.4vw, 1.65rem);
  color: var(--ink);
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line-light);
}
.audience li:first-child { border-top: 1px solid var(--line-light); }


/* 12. CONTRAST ROWS  (what Factyn is not) ========================== */

.contrasts { margin-top: 2.5rem; }
.contrast {
  padding: 1.6rem 0;
  border-top: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--paper);
  max-width: 42rem;
}
.contrast:last-child { border-bottom: 1px solid var(--line); }
.contrast .not { color: var(--ash-dim); }


/* 13. LINKS & CTA ================================================== */

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--paper);
  text-decoration: none;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--ash-dim);
  transition: gap 0.15s ease, border-color 0.15s ease;
}
.cta:hover { gap: 0.85rem; border-color: var(--paper); }
.section--light .cta {
  color: var(--ink);
  border-color: var(--ink-dim);
}
.section--light .cta:hover { border-color: var(--ink); }


/* 14. CONTACT LINE ================================================= */

.contact-line { margin-top: 2.5rem; }
.contact-line a {
  font-family: var(--serif);
  font-size: 1.7rem;
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid var(--ash-dim);
  transition: border-color 0.15s ease;
}
.contact-line a:hover { border-color: var(--paper); }


/* 15. FOOTER ======================================================= */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 3.25rem 0;
}
.site-footer__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: var(--ash-dim);
}
.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.site-footer__nav a {
  color: var(--ash-dim);
  text-decoration: none;
  transition: color 0.15s ease;
}
.site-footer__nav a:hover { color: var(--paper); }


/* 16. RESPONSIVE =================================================== */

@media (max-width: 40rem) {
  .def { grid-template-columns: 1fr; }
  .def__desc { margin-top: 0.3rem; }

  /* header — wordmark and nav stack rather than crowd */
  .site-header__bar { flex-wrap: wrap; gap: 0.75rem 0; padding: 1.1rem 0; }
  .nav-group { width: 100%; gap: 1.4rem; justify-content: space-between; }
  .site-nav { gap: 1.4rem; }
  .site-nav a { font-size: 0.875rem; }
  .lang-switch { padding-left: 1.4rem; }

  /* hero — pull oversized type and padding in on phones */
  .hero { padding: clamp(3.5rem, 14vw, 5rem) 0 clamp(3rem, 12vw, 4rem); }
  .hero__tagline { font-size: 1.15rem; margin-bottom: 1.75rem; }
  .hero__sub { font-size: 1.1rem; }

  /* footer — stack the two rows */
  .site-footer__row { flex-direction: column; gap: 1.25rem; }

  /* contact line — keep the big serif address from overflowing */
  .contact-line a { font-size: 1.35rem; word-break: break-word; }
}


/* 17. ENTRANCE ANIMATION =========================================== */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    animation: rise 0.8s cubic-bezier(0.2, 0.6, 0.2, 1) forwards;
  }
  .reveal:nth-child(1) { animation-delay: 0.05s; }
  .reveal:nth-child(2) { animation-delay: 0.16s; }
  .reveal:nth-child(3) { animation-delay: 0.27s; }

  @keyframes rise {
    to { opacity: 1; transform: translateY(0); }
  }
}
