/* Hallmark · genre: editorial · macrostructure: Long Document · theme: EtudeSpark warm (ported to OKLCH)
 * nav: N9 edge-aligned minimal · footer: Ft2 inline single line · enrichment: none (typography + brand plate)
 * pre-emit critique: P5 H5 E4 S5 R5 V4
 */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 340 700;
  font-display: swap;
  src: url("assets/fonts/fraunces-variable.woff2") format("woff2");
}

@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("assets/fonts/nunito-sans-variable.woff2") format("woff2");
}

:root {
  /* ---- Paper (warm oat, ported from brand hex to OKLCH) ---- */
  --paper: oklch(94.5% 0.019 83.1);
  --paper-soft: oklch(97.4% 0.014 84.6);
  --paper-warm: oklch(98.1% 0.018 81.3);
  --paper-deep: oklch(93% 0.022 83.3);

  /* ---- Ink ---- */
  --ink: oklch(27.2% 0.013 72.3);
  --ink-soft: oklch(50.8% 0.025 76.3);
  --ink-faint: oklch(65.5% 0.028 78.8);

  /* ---- Accent + secondary hues ---- */
  --ember: oklch(54.3% 0.121 43.9);
  --ember-strong: oklch(46.5% 0.116 32.1);
  --honey: oklch(75.8% 0.127 71.7);
  --sage: oklch(54.8% 0.064 137.4);
  --sky: oklch(75.3% 0.08 228.5);
  --coral: oklch(71.1% 0.147 30.7);
  --footer-bg: oklch(23% 0.01 67.3);

  /* ---- Lines, focus, shadow ---- */
  --hairline: oklch(27% 0.013 72 / 0.16);
  --hairline-light: oklch(97% 0.014 85 / 0.16);
  --focus: var(--ember-strong);
  --focus-light: oklch(97.4% 0.014 84.6);
  --shadow-tiny: 0 10px 28px oklch(30% 0.03 60 / 0.12);

  /* ---- Type ---- */
  --serif: "Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", serif;
  --sans: "Nunito Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 10px;

  /* ---- Motion ---- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-micro: 120ms;
  --dur-short: 220ms;
  --dur-long: 420ms;

  /* ---- Z-index scale ---- */
  --z-sticky: 200;
  --z-spark: 500;

  /* ---- Fluid spacing scale (min @360px -> max @1240px) ---- */
  --space-2xs: clamp(0.5rem, 0.42rem + 0.35vw, 0.75rem);
  --space-xs: clamp(0.75rem, 0.6rem + 0.7vw, 1.25rem);
  --space-sm: clamp(1.125rem, 0.9rem + 1vw, 1.75rem);
  --space-md: clamp(1.5rem, 1.1rem + 1.8vw, 2.75rem);
  --space-lg: clamp(2.5rem, 1.85rem + 2.9vw, 4.5rem);
  --space-xl: clamp(4rem, 2.8rem + 5.3vw, 8rem);
  --space-2xl: clamp(5.5rem, 3.9rem + 7vw, 10.25rem);

  /* ---- Layout primitives ---- */
  --shell-max: 760px;
  --gutter: clamp(1.5rem, 1.1rem + 2vw, 2.5rem);
  --header-h: 66px;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--space-2xs));
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.96rem + 0.19vw, 1.125rem);
  line-height: 1.65;
  font-optical-sizing: auto;
  font-synthesis: none;
  background:
    radial-gradient(circle at 12px 12px, oklch(30% 0.03 60 / 0.05) 1px, transparent 1.2px) 0 0 / 28px 28px,
    var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

::selection {
  color: var(--ink);
  background: oklch(75.8% 0.127 71.7 / 0.34);
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: var(--z-sticky);
  padding: 10px 14px;
  color: var(--paper-soft);
  background: var(--ink);
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-160%);
  transition: transform var(--dur-short) var(--ease-out), opacity var(--dur-short) var(--ease-out);
}

.skip-link:focus,
.skip-link:focus-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ---------- Reading shell ---------- */
.page-shell {
  width: min(var(--shell-max), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

/* ---------- Headings + prose ---------- */
h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 600;
  font-style: normal;
  font-optical-sizing: auto;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

h1 {
  margin-bottom: var(--space-xs);
  font-size: clamp(2.6rem, 1.95rem + 3vw, 4.5rem);
  font-weight: 620;
  font-variation-settings: "opsz" 144, "wght" 620, "SOFT" 40;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.85rem, 1.5rem + 1.7vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
}

h3 {
  font-size: clamp(1.35rem, 1.2rem + 0.6vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.lede {
  max-width: 60ch;
  color: var(--ink-soft);
  font-size: clamp(1.15rem, 1.06rem + 0.4vw, 1.4rem);
  line-height: 1.55;
  text-wrap: pretty;
}

.kicker {
  margin: 0 0 var(--space-xs);
  color: var(--ember-strong);
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.3rem);
  letter-spacing: 0.01em;
}

/* ---------- Header · N9 edge-aligned minimal ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  min-height: var(--header-h);
  padding: 10px var(--gutter);
  background: oklch(98.1% 0.018 81.3 / 0.82);
  border-bottom: 1px solid var(--hairline);
  backdrop-filter: blur(14px);
  transition: transform var(--dur-short) var(--ease-in-out);
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1;
}

.brand-name {
  font-size: 1.15rem;
}

.brand-mark {
  display: block;
  flex: none;
  height: 30px;
  aspect-ratio: 1460 / 1630;
  background-color: currentColor;
  -webkit-mask: url("assets/logo.svg") center / contain no-repeat;
          mask: url("assets/logo.svg") center / contain no-repeat;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  flex: none;
  min-height: 44px;
  padding-inline: 4px;
  color: var(--ember-strong);
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: color var(--dur-short) var(--ease-out);
}

/* Wordmark yields first; the CTA is pinned so it can never be clipped. */
.site-header .brand {
  flex: 0 1 auto;
  min-width: 0;
}

.site-header .brand-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-cta-mini {
  display: none;
}

.nav-arrow {
  transition: transform var(--dur-short) var(--ease-out);
}

.nav-cta:hover,
.nav-cta:focus-visible {
  color: var(--ember);
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
}

.nav-cta:hover .nav-arrow,
.nav-cta:focus-visible .nav-arrow {
  transform: translateX(3px);
}

/* ---------- Opening (image-background hero, copy overlaid on the empty left) ---------- */
.opening {
  position: relative;
  display: grid;
  align-items: center;
  overflow: clip;
  min-height: clamp(500px, 76svh, 740px);
  padding: calc(var(--header-h) + var(--space-lg)) 0 var(--space-lg);
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 66% center;
}

/* Left-biased scrim: the painting's light left carries the copy; the wash
   keeps the headline legible and clears toward the busy right edge. */
.hero-media::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(94deg,
      oklch(98.1% 0.018 81.3 / 0.96) 0%,
      oklch(98.1% 0.018 81.3 / 0.82) 34%,
      oklch(98.1% 0.018 81.3 / 0.28) 64%,
      oklch(98.1% 0.018 81.3 / 0.02) 92%),
    linear-gradient(180deg,
      oklch(98.1% 0.018 81.3 / 0.4),
      transparent 32%,
      oklch(27% 0.013 72 / 0.06));
}

.hero-content {
  position: relative;
  z-index: 1;
}

.opening h1 {
  max-width: 14ch;
}

.opening .lede {
  max-width: 38ch;
  margin-top: var(--space-sm);
}

/* ---------- Movements (Vision / Mission) ---------- */
.movement {
  padding-block: var(--space-xl);
}

.movement + .movement {
  border-top: 1px solid var(--hairline);
}

#mission {
  padding-top: var(--space-2xl);
}

.movement-head {
  margin-bottom: var(--space-md);
}

.label {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  margin: 0 0 var(--space-xs);
  color: var(--ember-strong);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.label::before {
  content: "";
  width: 9px;
  height: 9px;
  background: currentColor;
  border-radius: 2px;
}

.label-honey {
  color: var(--honey);
}

.movement .lede {
  margin-bottom: 0;
}

/* Vision points — hairline-divided editorial list, not cards */
.vision-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: var(--space-lg) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--hairline);
}

.vpoint {
  min-width: 0;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--hairline);
}

.vpoint:nth-child(odd) {
  padding-right: var(--space-lg);
  border-right: 1px solid var(--hairline);
}

.vpoint:nth-child(even) {
  padding-left: var(--space-lg);
}

.vpoint-title {
  display: flex;
  align-items: center;
  gap: 0.6em;
  margin: 0 0 0.35em;
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.2rem);
  line-height: 1.24;
}

.vpoint-title::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  background: var(--accent, var(--ember));
  border-radius: 2px;
}

.vpoint-ember { --accent: var(--ember); }
.vpoint-sage { --accent: var(--sage); }
.vpoint-sky { --accent: var(--sky); }
.vpoint-honey { --accent: var(--honey); }

.vpoint p:not(.vpoint-title) {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  line-height: 1.55;
}

/* Mission — F4 step sequence, numerals stacked above headings */
.steps {
  margin: var(--space-lg) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--hairline);
}

.step {
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--hairline);
}

.step-num {
  margin: 0 0 var(--space-2xs);
  color: var(--ember-strong);
  font-family: var(--serif);
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  font-weight: 340;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.step-body h3 {
  margin: 0 0 0.5em;
  max-width: 24ch;
}

.step-body p {
  max-width: 64ch;
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.68;
}

/* ---------- Closing band (waitlist) ---------- */
.closing {
  padding-block: var(--space-2xl);
  color: var(--paper-soft);
  background:
    radial-gradient(circle at 12px 12px, oklch(98% 0.018 81 / 0.045) 1px, transparent 1.2px) 0 0 / 28px 28px,
    var(--ink);
}

.closing h2,
.closing .kicker {
  color: var(--paper-soft);
}

.closing .lede {
  color: oklch(97.4% 0.014 84.6 / 0.8);
}

.closing :focus-visible {
  outline-color: var(--focus-light);
}

.closing-inner {
  max-width: min(760px, 100% - var(--gutter) * 2);
}

/* Founding offers — hairline-divided, mirrors the vision list on dark */
.founding-offers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: var(--space-md) 0 0;
  border-top: 1px solid oklch(97.4% 0.014 84.6 / 0.16);
}

.offer {
  display: grid;
  gap: 0.35em;
  margin: 0;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid oklch(97.4% 0.014 84.6 / 0.16);
}

.offer:first-child {
  padding-right: var(--space-md);
  border-right: 1px solid oklch(97.4% 0.014 84.6 / 0.16);
}

.offer:last-child {
  padding-left: var(--space-md);
}

.offer-who {
  color: var(--paper-soft);
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.4rem);
  font-weight: 600;
  line-height: 1.2;
}

.offer-what {
  color: var(--honey);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* Waitlist form */
.final-form {
  margin-top: var(--space-lg);
}

.final-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-field {
  display: grid;
  gap: 7px;
}

.field-label {
  color: oklch(97.4% 0.014 84.6 / 0.85);
  font-size: 0.85rem;
  font-weight: 800;
}

.field-marker {
  margin-left: 6px;
  color: oklch(97.4% 0.014 84.6 / 0.55);
  font-size: 0.74rem;
  font-weight: 700;
}

.full-span {
  grid-column: 1 / -1;
}

.final-form input,
.final-form select,
.final-form textarea {
  width: 100%;
  min-width: 0;
  color: var(--paper-soft);
  background: oklch(97.4% 0.014 84.6 / 0.08);
  border: 1px solid oklch(97.4% 0.014 84.6 / 0.24);
  border-radius: var(--radius);
  outline-offset: 2px;
  transition: border-color var(--dur-short) var(--ease-out), background var(--dur-short) var(--ease-out);
}

.final-form input,
.final-form select {
  height: 52px;
  padding: 0 14px;
}

.final-form textarea {
  min-height: 96px;
  padding: 13px 14px;
  resize: vertical;
}

.final-form select {
  cursor: pointer;
}

.final-form option {
  color: var(--ink);
}

.final-form input:hover,
.final-form select:hover,
.final-form textarea:hover {
  border-color: oklch(97.4% 0.014 84.6 / 0.4);
}

.final-form input:focus-visible,
.final-form select:focus-visible,
.final-form textarea:focus-visible {
  border-color: var(--focus-light);
  background: oklch(97.4% 0.014 84.6 / 0.12);
  outline: 2px solid var(--focus-light);
  outline-offset: 2px;
}

.final-form input::placeholder,
.final-form textarea::placeholder {
  color: oklch(97.4% 0.014 84.6 / 0.6);
}

.final-form button {
  min-height: 54px;
  margin-top: 4px;
  padding: 0 22px;
  color: var(--paper-soft);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  background: var(--ember);
  border: 0;
  border-radius: 999px;
  transition: background var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}

.final-form button:hover,
.final-form button:focus-visible {
  background: var(--ember-strong);
}

.final-form button:active {
  transform: translateY(1px);
}

.final-form button:disabled {
  cursor: progress;
  opacity: 0.7;
}

.spam-guard {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  pointer-events: none;
  opacity: 0;
  white-space: nowrap;
}

.form-message {
  min-height: 22px;
  margin: 14px 0 0;
  color: oklch(97.4% 0.014 84.6 / 0.72);
  font-size: 0.95rem;
  line-height: 1.45;
}

.form-message.is-error {
  color: var(--coral);
}

.form-message.is-success {
  color: oklch(90.5% 0.028 122.7);
  font-weight: 700;
}

.privacy-note {
  max-width: 60ch;
  margin: 6px 0 0;
  color: oklch(97.4% 0.014 84.6 / 0.6);
  font-size: 0.84rem;
  line-height: 1.45;
}

/* Submission spark (JS-positioned; a single moment of delight, not scroll motion) */
.submission-spark {
  position: absolute;
  z-index: var(--z-spark);
  width: 18px;
  height: 18px;
  pointer-events: none;
  color: var(--honey);
  background: var(--honey);
  border-radius: 50%;
  box-shadow:
    0 0 0 10px oklch(75.8% 0.127 71.7 / 0.18),
    0 0 28px oklch(75.8% 0.127 71.7 / 0.48);
}

.submission-spark::before,
.submission-spark::after {
  position: absolute;
  inset: 7px -10px;
  content: "";
  background: currentColor;
  border-radius: 999px;
}

.submission-spark::after {
  transform: rotate(90deg);
}

/* ---------- Footer · Ft2 inline single line ---------- */
.site-footer {
  padding-block: var(--space-md);
  color: oklch(97.4% 0.014 84.6 / 0.68);
  background: var(--footer-bg);
  border-top: 1px solid var(--hairline-light);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-md);
  align-items: center;
  justify-content: space-between;
}

.site-footer .brand {
  color: oklch(97.4% 0.014 84.6 / 0.68);
  transition: color var(--dur-short) var(--ease-out);
}

.site-footer .brand:hover,
.site-footer .brand:focus-visible {
  color: var(--paper-soft);
}

.site-footer .brand-name {
  font-size: 1.05rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px var(--space-md);
  align-items: center;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: oklch(97.4% 0.014 84.6 / 0.68);
  font-size: 0.92rem;
  transition: color var(--dur-short) var(--ease-out);
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: var(--paper-soft);
}

.footer-legal {
  margin: 0;
  color: oklch(97.4% 0.014 84.6 / 0.5);
  font-size: 0.85rem;
}

.footer-legal a {
  transition: color var(--dur-short) var(--ease-out);
}

.footer-legal a:hover,
.footer-legal a:focus-visible {
  color: oklch(97.4% 0.014 84.6 / 0.85);
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  h1 {
    font-size: clamp(2.35rem, 1.8rem + 3vw, 3.25rem);
  }

  .site-header {
    gap: 0.5rem;
    padding-inline: 16px;
  }

  .brand-name {
    font-size: 1rem;
  }

  .nav-cta {
    padding-inline: 0;
    font-size: 0.9rem;
  }

  .nav-cta-full {
    display: none;
  }

  .nav-cta-mini {
    display: inline;
  }

  /* Hero: headline sits toward the top-left; the painting reads below and
     to the right. L-shaped scrim keeps the copy legible on the artwork. */
  .opening {
    align-items: start;
    min-height: clamp(460px, 80svh, 600px);
  }

  .hero-media img {
    object-position: 72% center;
  }

  .hero-media::before {
    background:
      linear-gradient(180deg,
        oklch(98.1% 0.018 81.3 / 0.95) 0%,
        oklch(98.1% 0.018 81.3 / 0.82) 30%,
        oklch(98.1% 0.018 81.3 / 0.42) 54%,
        oklch(98.1% 0.018 81.3 / 0.06) 82%,
        oklch(98.1% 0.018 81.3 / 0) 100%),
      linear-gradient(90deg,
        oklch(98.1% 0.018 81.3 / 0.55) 0%,
        oklch(98.1% 0.018 81.3 / 0.2) 55%,
        oklch(98.1% 0.018 81.3 / 0) 82%);
  }

  .opening h1 {
    max-width: 92%;
  }

  .opening .lede {
    max-width: 94%;
  }

  .vision-list {
    grid-template-columns: 1fr;
  }

  .vpoint:nth-child(odd) {
    padding-right: 0;
    border-right: 0;
  }

  .vpoint:nth-child(even) {
    padding-left: 0;
  }

  .final-form-grid {
    grid-template-columns: 1fr;
  }

  .founding-offers {
    grid-template-columns: 1fr;
  }

  .offer:first-child {
    padding-right: 0;
    border-right: 0;
  }

  .offer:last-child {
    padding-left: 0;
  }

  .footer-inner {
    align-items: flex-start;
  }
}

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

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