/* Faythe site v2, round 2 · 2026-10-16
   Every value below comes from the visual book Travis tuned on 2026-10-16 (founding/brand/visual.md sections 3 to 5).
   Rules: no divider lines, no section numbers, no eyebrow labels, no full stop at the end of a heading. */
:root {
  --paper: #FAFAFA;
  --ink: #121821;
  --muted: #5B6472;
  --rule: #E3E3E3;     /* outlines of cards and inputs only, never a divider */
  --wash: #F1F1F1;
  --white: #FFFFFF;
  --pen: #2446C8;
  --pen-dark: color-mix(in srgb, #2446C8 82%, #000000);
  --pen-wash: #EEF1FB;
  --night: #0F141C;
  --on-night: #F2F4F7;
  --on-night-muted: #9AA3B0;
  --pen-night: #8FA6FF;

  --sans: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
  --ui-cn: system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;

  /* Type: desktop sizes; the phone block at the bottom swaps them */
  --hero-size: 64px;
  --h2-size: 40px;
  --h3-size: 20px;
  --stmt-size: 20px;
  --sub-size: 18px;
  --body-size: 16px;
  --end-size: 20px;

  /* Spacing: layout gaps are multiples of 16 */
  --sec-gap: 96px;      /* last line of one section to the next heading */
  --blk-gap: 48px;
  --head-gap: 16px;
  --hero-gap: 32px;
  --card-gap: 16px;
  --card-pad: 16px;

  --r-ctl: 4px;
  --r-blk: 6px;

  --gut: 32px;          /* side gutter: 32 on phones and tablets, 48 from 1024px, 64 from 1440px */
  --gutter: max(var(--gut), env(safe-area-inset-left, 0px));
  --gutter-r: max(var(--gut), env(safe-area-inset-right, 0px));
  --max: 1360px;
  --measure: 36em;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: var(--body-size); font-weight: 400; line-height: 1.25; letter-spacing: -0.01em; }
/* letter-spacing in em is inherited as a fixed length, so every element recomputes it from its own size */
:where(body *) { letter-spacing: -0.01em; }
a { color: inherit; }
img, canvas, svg { max-width: 100%; display: block; }
button, input { font: inherit; letter-spacing: inherit; }
::selection { background: var(--pen); color: var(--white); }
:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(255, 255, 255, .2); }   /* after Ramp: 4px ring, white at 20% */

.container { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }


/* ---------- Header: glass, after Ramp ---------- */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; border-bottom: 1px solid rgba(18, 24, 33, .05); background: color-mix(in srgb, var(--paper) 75%, transparent); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); }
.site-header .container { display: flex; align-items: center; gap: 28px; min-height: 64px; }
/* The logo is one SVG file, faythe-logo.svg, copied in from founding/brand/logo/ by sync_logo.py. It is drawn as a
   mask filled with the text colour, so the same file serves light and dark grounds. Sized in em: font-size is the
   logo's size (1000 units of the SVG = 1 em), the box is the SVG's own width and height, and the baseline sits
   where the letters stand. */
.logo { display: inline-block; flex: none; font-size: 24px; width: 2.5566em; height: 0.9221em; vertical-align: -0.1904em; color: var(--ink); background: currentColor;
  -webkit-mask: url(faythe-logo.svg) center / 100% 100% no-repeat; mask: url(faythe-logo.svg) center / 100% 100% no-repeat; }
/* Header and footer: the T2 mark beside the wordmark (Travis 2026-11-02, to match the YC demo video's portal; the
   eclipse 2026-10-23 to 2026-11-02 is in visual.md's history). The T2 box takes the eclipse tile's measures, in wordmark
   units (1000 = 1 em): 0.979em square, its centre at the F's half height, 0.2837em before the F. Light ground: the ink
   tile (faythe-t2-tile.svg, the demo portal's file). Dark ground: the light mark alone, no tile (faythe-t2-light.svg),
   0.724em tall, its centre on the centre of the wordmark's box, 0.2837em before the F (Travis 2026-11-02, in a footer
   tuner); its box keeps 3% air on every side, pulled back by the negative margins. The numbers are printed by
   logo/favicon/build_t2.py. Both files are copied in from founding/brand/logo/ by sync_logo.py. */
.lockup { display: inline-flex; align-items: flex-start; gap: 0.2837em; flex: none; font-size: 24px; justify-self: start; text-decoration: none; }
.lockup .logo { font-size: 1em; }
.lockup .moon { flex: none; width: 0.979em; height: 0.979em; margin: -0.0813em 0 0; background: url(faythe-t2-tile.svg) center / 100% 100% no-repeat; }
.on-night .lockup .moon { width: 0.6676em; height: 0.7674em; margin: 0.0773em -0.0217em -0.0217em; background-image: url(faythe-t2-light.svg); }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { font-size: 14px; font-weight: 500; text-decoration: none; color: var(--muted); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.site-header .btn { font-size: 14px; font-weight: 500; height: 34px; padding: 0 14px; }
/* Phone: the four links fold into a menu button; the panel drops under the header (Travis 2026-10-18) */
.menu-btn { display: none; }
@media (max-width: 720px) {
  .site-header .container { gap: 12px; }
  .site-header .btn { margin-left: auto; }
  .menu-btn { display: grid; place-items: center; width: 34px; height: 34px; margin-right: -8px; padding: 0; border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--ink); cursor: pointer; }
  .menu-btn:hover { background: var(--wash); }
  .menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 18px; height: 1.5px; border-radius: 1px; background: currentColor; transition: transform 240ms cubic-bezier(0.65, 0, 0.35, 1), background 0ms 120ms; }
  .menu-btn span { position: relative; }
  .menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; }
  .menu-btn span::before { top: -6px; }
  .menu-btn span::after { top: 6px; }
  .site-header.open .menu-btn span { background: transparent; }
  .site-header.open .menu-btn span::before { transform: translateY(6px) rotate(45deg); }
  .site-header.open .menu-btn span::after { transform: translateY(-6px) rotate(-45deg); }
  .nav { position: absolute; top: 100%; left: 0; right: 0; margin: 0; display: grid; gap: 0; padding: 8px var(--gutter-r) 16px var(--gutter); background: var(--paper); border-bottom: 1px solid rgba(18, 24, 33, .05); box-shadow: 0 12px 24px rgba(18, 24, 33, .06); visibility: hidden; opacity: 0; transform: translateY(-6px); transition: opacity 240ms cubic-bezier(0.16, 1, 0.3, 1), transform 240ms cubic-bezier(0.16, 1, 0.3, 1), visibility 0ms 240ms; }
  .site-header.open .nav { visibility: visible; opacity: 1; transform: none; transition-delay: 0ms; }
  .nav a { display: flex; align-items: center; min-height: 48px; }
}

/* ---------- Buttons and links ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 18px; background: var(--pen); color: var(--white); text-decoration: none; font-size: 16px; font-weight: 400; line-height: 1.25; border: 0; border-radius: var(--r-ctl); cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--pen-dark); }
.btn.sec { background: var(--ink); color: var(--white); }
.btn.sec:hover { background: #000000; }
.btn.sm { height: 34px; padding: 0 12px; font-size: 14px; font-weight: 500; }
.tlink { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; font-weight: 500; }
.tlink:hover { color: var(--pen); }

/* ---------- Type roles ---------- */
.hero-title { font-size: var(--hero-size); font-weight: 700; letter-spacing: -0.04em; line-height: 1; margin: 0; text-wrap: balance; }
.hero-sub { font-size: var(--sub-size); font-weight: 400; letter-spacing: -0.01em; line-height: 1.25; color: var(--muted); max-width: 42em; margin: 0; }
.h2 { font-size: var(--h2-size); font-weight: 600; letter-spacing: -0.04em; line-height: 1; margin: 0; text-wrap: balance; }
.h3 { font-size: var(--h3-size); font-weight: 600; letter-spacing: -0.025em; line-height: 1.25; margin: 0; }
.body { font-size: var(--body-size); font-weight: 400; letter-spacing: -0.01em; line-height: 1.25; max-width: var(--measure); margin: 0; }
.body + .body { margin-top: 16px; }
:where(p, li, dd) { text-wrap: pretty; }
.h3 { text-wrap: balance; }
.lead { font-size: var(--h3-size); font-weight: 400; letter-spacing: -0.015em; line-height: 1.25; margin: 0; }
.label { font-size: 14px; font-weight: 500; letter-spacing: -0.01em; line-height: 1.25; color: var(--muted); }
.note { font-family: var(--sans); font-style: italic; font-weight: 500; font-size: 14px; letter-spacing: -0.01em; line-height: 1.25; color: var(--pen); }
.perm { font-weight: 500; }
.statement { font-family: var(--serif); font-weight: 350; font-size: var(--stmt-size); line-height: 1.25; letter-spacing: -0.005em; margin: 0; max-width: 30em; text-wrap: pretty; }
.stack { display: grid; gap: var(--head-gap); align-content: start; }

/* ---------- Sections: spacing only, no rules ---------- */
.section { padding-block: calc(var(--sec-gap) / 2); }
.section-head { display: grid; gap: var(--head-gap); max-width: 46em; }
.section-body { margin-top: var(--blk-gap); }

/* ---------- Pen marks ---------- */
.struck { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--pen); text-decoration-thickness: 2.5px; }
.circled { position: relative; display: inline-block; }
.circled::after { content: ""; position: absolute; inset: -7px -11px; border: 1.6px solid var(--pen); border-radius: 50%; transform: rotate(-5deg); pointer-events: none; }

/* ---------- Cards ---------- */
.card { background: var(--white); border: 1px solid var(--rule); border-radius: var(--r-blk); padding: var(--card-pad); }
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--wash); color: var(--muted); font-size: 14px; font-weight: 500; white-space: nowrap; }
.chip.pen { background: var(--pen-wash); color: var(--pen); }

/* ---------- Placeholder cards: layout only, storyline still being decided ---------- */
.ph-card { display: grid; gap: 16px; align-content: start; }
.ph-art { min-height: 160px; border-radius: 4px; background: repeating-linear-gradient(-45deg, var(--wash) 0 8px, var(--paper) 8px 16px); display: grid; place-items: center; }
.ph-art span { background: var(--white); color: var(--muted); font-size: 14px; font-weight: 500; padding: 4px 10px; border-radius: 999px; }
.ph-line { height: 12px; border-radius: 6px; background: var(--wash); }
.ph-line.title { height: 20px; width: 60%; background: var(--rule); }
.ph-line.short { width: 70%; }

/* ---------- Email + button, after Ramp ---------- */
.mail { display: flex; align-items: center; gap: 4px; width: min(100%, 420px); height: 48px; padding: 4px; background: var(--white); border: 1px solid var(--rule); border-radius: calc(var(--r-ctl) + 4px); }
.mail:focus-within { box-shadow: 0 0 0 4px rgba(255, 255, 255, .2); }
.mail label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.mail input { flex: 1 1 auto; min-width: 0; height: 100%; border: 0; background: transparent; padding: 0 10px; font-size: 16px; font-weight: 400; color: var(--ink); }
.mail input::placeholder { color: var(--muted); }
.mail input:focus { outline: none; box-shadow: none; }
.mail .btn { height: 100%; padding: 0 16px; }
.form-note { margin: 12px 0 0; min-height: 1.25em; font-size: 14px; color: var(--muted); }

/* ---------- Statement block ---------- */
.stmt-block { background: var(--pen); color: var(--white); padding: clamp(32px, 5vw, 64px); border-radius: var(--r-blk); }
.stmt-block a { color: var(--white); }

/* ---------- Footer ---------- */
.on-night { background: var(--night); color: var(--on-night); }
.site-footer { padding-block: 64px 32px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
@media (max-width: 720px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }
.foot-links { display: grid; gap: 8px; align-content: start; font-size: 14px; }
.foot-links a, .foot-links span { text-decoration: none; color: var(--on-night-muted); }
.foot-links a:hover { color: var(--on-night); }
.site-footer .logo { color: var(--on-night); }
.foot-mission { color: var(--on-night-muted); font-size: 16px; max-width: 24em; margin: 0; }
.foot-base { margin-top: 48px; color: var(--on-night-muted); font-size: 14px; }
.selectable { user-select: all; }

/* ---------- Phone ---------- */
@media (max-width: 640px) {
  :root { --hero-size: 40px; --h2-size: 24px; --h3-size: 18px; --stmt-size: 18px; --sub-size: 16px; --end-size: 16px; --sec-gap: 64px; }
}
@media (min-width: 1024px) { :root { --gut: 48px; } }
@media (min-width: 1440px) { :root { --gut: 64px; } }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
