/*
 * styles.css — all styling for comelis.com (index.html, 404.html).
 *
 * Tokens copied from Celial's design system so the company and the product read as one family:
 * networking-prototype/src/app/globals.css, redesign of 2026-11-29. Contrast ratios below are
 * the ones computed there (WCAG 2.2 AA); re-check if a colour changes.
 *   LIGHT  text #17291F on #F8F8F4 14.4 · muted #5A6A60 5.4 · brand #345A43 on bg 7.3 ·
 *          white on brand 7.8
 *   DARK   ivory #F1EEE2 on #102119 14.4 · muted #A7B4A9 7.8 · gold #E2C98F 10.4
 * Type: Manrope for all text; Cormorant Garamond ONLY for the wordmark and brand headlines
 * (Celial's rule: never serif for functional text). Self-hosted from @fontsource 5.3.0
 * (OFL-1.1, licences in fonts/) so the page makes no third-party requests.
 *
 * Must never: load anything from another origin (the CSP in _headers would block it anyway),
 * or animate when the visitor asked for reduced motion.
 */

/* ── Fonts ─────────────────────────────────────────────────────────────────────────────── */
@font-face { font-family: "Manrope"; font-weight: 400; font-display: swap; src: url("/fonts/manrope-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 500; font-display: swap; src: url("/fonts/manrope-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 600; font-display: swap; src: url("/fonts/manrope-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 700; font-display: swap; src: url("/fonts/manrope-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-display: swap; src: url("/fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 600; font-display: swap; src: url("/fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: italic; font-display: swap; src: url("/fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 600; font-style: italic; font-display: swap; src: url("/fonts/cormorant-garamond-latin-600-italic.woff2") format("woff2"); }

/* ── Tokens ────────────────────────────────────────────────────────────────────────────── */
:root {
  --bg: #F8F8F4;          /* light page */
  --bg-alt: #EFEFE7;      /* alternating section, still 13+:1 with --text */
  --text: #17291F;
  --muted: #5A6A60;
  --brand: #345A43;
  --link: #2D5A3F;
  --line: #D9DDD3;
  --forest: #102119;      /* dark hero/footer */
  --forest-raised: #172A20;
  --ivory: #F1EEE2;
  --ivory-muted: #A7B4A9;
  --gold: #E2C98F;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --radius: 12px;
  --wrap: 1080px;
  /* Celial's motion scale: fast 120 · base 200 · slow 320 ms. */
  --base: 200ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--link); text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
p { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; list-style: none; }

/* Visible focus everywhere — keyboard users need it on the dark hero too. */
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -9999px; top: 0; padding: .75rem 1rem; background: var(--ivory); color: var(--forest); z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

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

.eyebrow { font-size: .8125rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin-bottom: .75rem; }
.wordmark { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 1.75rem; letter-spacing: .01em; color: inherit; text-decoration: none; }
.wordmark.small { font-size: 1.375rem; }
.brand { font-family: var(--serif); font-weight: 500; font-size: clamp(2.5rem, 6vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.25rem); font-weight: 600; margin-bottom: 1.5rem; }
h3 { font-size: 1.0625rem; font-weight: 600; margin-bottom: .5rem; }
.big { font-size: clamp(1.125rem, 2.2vw, 1.3125rem); line-height: 1.55; }

/* ── Hero (dark, Celial's "immersive" palette) ─────────────────────────────────────────── */
.hero {
  background:
    radial-gradient(60rem 30rem at 75% 40%, rgba(226, 201, 143, .10), transparent 70%),
    var(--forest);
  color: var(--ivory);
}
.hero a { color: var(--ivory); }
.hero .eyebrow { color: var(--gold); }
.bar { max-width: var(--wrap); margin: 0 auto; padding: 1.25rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.bar ul { display: flex; gap: 1.5rem; font-size: .9375rem; font-weight: 500; }
/* Padding (not just text) makes each link a 44 px tap target on phones, as in the app. */
.bar ul a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .25rem; text-decoration: none; color: var(--ivory-muted); transition: color var(--base); }
.bar ul a:hover { color: var(--ivory); }

.hero-inner { max-width: var(--wrap); margin: 0 auto; padding: 4rem 1.5rem 6rem; display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
/* One column (404.html). A class, not an inline style: the CSP allows no inline styles. */
.hero-inner.single { grid-template-columns: 1fr; }
.hero.full { min-height: 100vh; min-height: 100dvh; }
.hero h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(2.75rem, 7vw, 4.75rem); line-height: 1.02; margin-bottom: 1.5rem; }
.lede { font-size: clamp(1.0625rem, 2vw, 1.25rem); color: var(--ivory-muted); max-width: 34rem; margin-bottom: 2rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* 44 px minimum touch target, as in the app. */
.button { display: inline-flex; align-items: center; min-height: 44px; padding: .625rem 1.375rem; border-radius: 999px; font-weight: 600; font-size: .9375rem; text-decoration: none; transition: background var(--base), color var(--base), border-color var(--base); }
.button.primary { background: var(--ivory); color: var(--forest) !important; }
.button.primary:hover { background: #fff; }
.button.ghost { border: 1px solid rgba(241, 238, 226, .35); }
.button.ghost:hover { border-color: var(--ivory); }

.motif { width: 100%; max-width: 420px; justify-self: center; }
.motif .threads .met { stroke: #E2C98F; stroke-width: 1.4; opacity: .75; }
.motif .threads .web { stroke: #A7B4A9; stroke-width: 1; opacity: .4; }
.motif .threads .intro { stroke: #E2C98F; stroke-width: 2; stroke-dasharray: 4 6; }
.motif .person circle:first-child { fill: #172A20; stroke: #A7B4A9; stroke-width: 1; }
.motif .person .fig { fill: #F1EEE2; }
.motif .person.you circle:first-child { fill: #E2C98F; stroke: none; }
.motif .person.you .fig { fill: #102119; }
.motif .person.target circle:first-child { stroke: #E2C98F; stroke-width: 2; }
.motif .person.you { animation: breathe 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
/* Lines are VISIBLE by default; the animation only fades them in. (2026-12-05: an earlier
   version started them hidden and relied on the animation, so where animations don't run —
   a background tab, some readers — they never appeared.) `backwards` holds the start frame
   only during each line's delay. The intro path keeps its dashes, so it fades, not draws. */
.motif .threads path { animation: appear 1.6s ease-out backwards; }
.motif .threads .web { animation-delay: .6s; }
.motif .threads .intro { animation-delay: 1.2s; }
@keyframes appear { from { opacity: 0; } }
@keyframes breathe { 0%, 100% { scale: 1; } 50% { scale: 1.1; } }

/* ── Sections ──────────────────────────────────────────────────────────────────────────── */
.section { padding: 5.5rem 0; }
.section.alt { background: var(--bg-alt); }
.two { display: grid; grid-template-columns: .8fr 1.2fr; gap: 3rem; align-items: start; margin-bottom: 3.5rem; }
.status { display: inline-block; margin-top: 1rem; padding: .25rem .75rem; border: 1px solid var(--brand); border-radius: 999px; font-size: .8125rem; font-weight: 600; color: var(--brand); }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.features li, .principles li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }
.features p, .principles p { color: var(--muted); margin: 0; font-size: .9375rem; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }

.contact { text-align: center; }
.contact .big { color: var(--muted); }
.mail { font-family: var(--serif); font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 500; }

.foot { background: var(--forest); color: var(--ivory-muted); padding: 2rem 0; font-size: .875rem; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.foot .wordmark { color: var(--ivory); }

/* ── Small screens (checked at 375 px, the width the app is designed for) ──────────────── */
@media (max-width: 860px) {
  .hero-inner, .two { grid-template-columns: 1fr; }
  .hero-inner { padding: 2rem 1.5rem 4rem; }
  .motif { max-width: 280px; order: -1; }
  .features { grid-template-columns: 1fr 1fr; }
  .principles { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .bar ul { gap: 1rem; font-size: .875rem; }
  .features { grid-template-columns: 1fr; }
  .section { padding: 4rem 0; }
}

/* Visitors who asked for less motion get the finished picture, no animation. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .motif .person.you, .motif .threads path { animation: none; }
  * { transition: none !important; }
}
