/* ==========================================================================
   Blue Pumpkin — site styles
   Design source: "Blue Pumpkin Brand & Site" canvas → page "Site — Midnight"
   No build step. Tokens first, then base, components, pages.
   ========================================================================== */

:root {
  /* Color */
  --midnight: #0B1433;   /* page background */
  --panel:    #121D45;   /* cards, panels, orb */
  --line:     #2A3870;   /* borders on panel */
  --hair:     #1A2552;   /* header/footer rules */
  --rule:     #1F2B5C;   /* list dividers */
  --blue:     #3366FF;   /* primary buttons, focus */
  --royal:    #1F47D6;   /* pumpkin shading (logo only) */
  --sky:      #8FB0FF;   /* mono eyebrows, code accents */
  --mist:     #A3B0D3;   /* supporting text on panels */
  --soft:     #B8C3E0;   /* lede / nav text */
  --dim:      #8FA0C8;   /* footer meta */
  --muted:    #7C8AB8;   /* de-emphasised headline halves */
  --gold:     #F2C14E;   /* ONE accent per view */
  --pumpkin:  #E8772E;   /* hero animation start state only */
  --pumpkin-light: #F7A24B;
  --stem:     #4F8A3C;
  --white:    #FFFFFF;

  /* Type */
  --font-sans: "Sora", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --fs-display: clamp(4rem, 2.2rem + 7.6vw, 7.5rem);      /* 64 → 120 */
  --fs-display-md: clamp(3.25rem, 1.9rem + 5.6vw, 6.5rem); /* 52 → 104 */
  --fs-h2: clamp(2.125rem, 1.4rem + 3vw, 4rem);           /* 34 → 64 */
  --fs-h3: clamp(1.375rem, 1.1rem + 0.9vw, 1.875rem);     /* 22 → 30 */
  --fs-lede: clamp(1.0625rem, 0.95rem + 0.45vw, 1.3125rem); /* 17 → 21 */
  --fs-body: 1rem;
  --fs-mono: 0.875rem;

  /* Space & shape */
  --gutter: clamp(20px, 4.5vw, 64px);
  --section: clamp(64px, 8vw, 120px);
  --radius-lg: clamp(24px, 2.2vw, 32px);
  --radius-md: 20px;
  --max: 1440px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--midnight);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
img, svg { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
a:hover { opacity: 0.85; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
del { text-decoration-thickness: 1.5px; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.skip-link { position: absolute; left: 16px; top: -60px; background: var(--white); color: var(--midnight); padding: 10px 16px; border-radius: 8px; z-index: 100; font-weight: 600; }
.skip-link:focus { top: 16px; }

/* ---------- Type helpers ---------- */
.mono { font-family: var(--font-mono); font-size: var(--fs-mono); font-weight: 500; }
.eyebrow { font-family: var(--font-mono); font-size: var(--fs-mono); font-weight: 500; color: var(--sky); }
.display { font-size: var(--fs-display); font-weight: 600; line-height: 0.95; letter-spacing: -0.055em; }
.display-md { font-size: var(--fs-display-md); line-height: 0.98; }
.h2 { font-size: var(--fs-h2); font-weight: 600; line-height: 1; letter-spacing: -0.045em; }
.h2-sm { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); font-weight: 600; letter-spacing: -0.04em; }
.lede { font-size: var(--fs-lede); line-height: 1.5; color: var(--soft); max-width: 34ch; }
.gold { color: var(--gold); }
.muted { color: var(--muted); }
.mist { color: var(--mist); }
.dim { color: var(--dim); }
.sky { color: var(--sky); }
.tag { font-size: 0.8125rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  align-self: flex-start;
  min-height: 52px; padding: 16px 28px; border-radius: 999px;
  font: 600 1.0625rem/1 var(--font-sans); white-space: nowrap;
  border: 0; cursor: pointer; transition: opacity .15s ease, transform .15s ease;
}
.btn:hover { opacity: 0.9; }
.btn:active { transform: translateY(1px); }
.btn-blue { background: var(--blue); color: var(--white); }
.btn-white { background: var(--white); color: var(--midnight); min-height: 44px; padding: 12px 22px; font-size: 0.9375rem; }
.btn-ghost { background: transparent; color: var(--white); border: 1px solid #3A4A80; min-height: 44px; padding: 12px 22px; font-size: 0.9375rem; }
.btn .icon { width: 20px; height: 20px; flex: none; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--hair); position: relative; z-index: 10; }
.header-inner { height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 1.25rem; letter-spacing: -0.02em; }
.brand img { width: 52px; height: auto; }
.site-nav { display: flex; align-items: center; gap: 40px; font-size: 0.9375rem; color: var(--soft); }
.site-nav a[aria-current="page"] { color: var(--white); box-shadow: inset 0 -2px 0 var(--gold); padding-bottom: 4px; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--panel); color: var(--white); align-items: center; justify-content: center; cursor: pointer; }

@media (max-width: 860px) {
  .header-inner { height: 72px; }
  .brand { font-size: 1.0625rem; gap: 8px; }
  .brand img { width: 44px; }
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; inset: 72px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--midnight); border-bottom: 1px solid var(--hair);
    padding: 8px var(--gutter) 24px; font-size: 1.125rem;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a:not(.btn) { padding: 16px 0; border-bottom: 1px solid var(--rule); }
  .site-nav a[aria-current="page"] { box-shadow: none; color: var(--gold); padding-bottom: 16px; }
  .site-nav .btn { margin-top: 20px; align-self: stretch; min-height: 52px; font-size: 1rem; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--hair); margin-top: var(--section); }
.footer-inner { padding-block: 64px; display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-cta { display: flex; flex-direction: column; gap: 14px; }
.footer-email { font-size: clamp(1.375rem, 0.9rem + 2.2vw, 2.75rem); font-weight: 600; letter-spacing: -0.04em; overflow-wrap: anywhere; }
.footer-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; color: var(--dim); }
.site-footer-slim { margin-top: 0; }
.site-footer-slim .footer-meta { flex-direction: row; justify-content: space-between; padding-block: 32px; }
@media (max-width: 640px) {
  .footer-inner { padding-block: 32px; flex-direction: column; align-items: flex-start; }
  .footer-meta { align-items: flex-start; font-size: 0.75rem; }
}

/* ---------- Layout helpers ---------- */
.section { padding-top: var(--section); }
.stack { display: flex; flex-direction: column; gap: 28px; }
.stack-sm { display: flex; flex-direction: column; gap: 14px; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 5vw, 96px); }
@media (max-width: 960px) { .split { grid-template-columns: minmax(0, 1fr); } }
.panel { background: var(--panel); border-radius: var(--radius-lg); padding: clamp(32px, 4.5vw, 72px) clamp(24px, 4.5vw, 64px); }
.page-hero { padding-top: clamp(56px, 8vw, 140px); padding-bottom: clamp(48px, 7vw, 112px); }

/* ---------- Home ---------- */
.hero { min-height: min(780px, 92vh); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 48px; padding-block: 48px; }
.hero-copy { display: flex; flex-direction: column; gap: 32px; }
.hero-copy .eyebrow { font-size: 1rem; }
.hero-mark { display: flex; justify-content: center; }
.orb { width: min(600px, 100%); aspect-ratio: 1; border-radius: 50%; background: var(--panel); display: flex; align-items: center; justify-content: center; }
.orb img { width: 80%; }

/* Hero logo animation: orange pumpkin → Blue Pumpkin. The resting (no-animation) state is the final blue mark. */
.pumpkin-morph { width: 80%; height: auto; overflow: visible; cursor: pointer; }
.pm-lobe { fill: var(--pumpkin); }
.pm-core { fill: var(--pumpkin-light); }
.pm-stem { fill: none; stroke: var(--white); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 100; }
.pm-glow { opacity: 0; }
.pm-reveal, .pm-spark, .pm-glow { transform-box: fill-box; transform-origin: center; }
.pm-body { transform-box: fill-box; transform-origin: 50% 100%; }
.pm-orange { visibility: hidden; }

.is-morphing .pm-orange { animation: pm-hide 0.01s linear 2.6s both; }
.is-morphing .pm-stem   { animation: pm-stem 1.1s cubic-bezier(.5, 0, .2, 1) 0.5s both; }
.is-morphing .pm-glow   { animation: pm-glow 0.9s ease-out 1.25s both; }
.is-morphing .pm-reveal { animation: pm-reveal 1s cubic-bezier(.6, 0, .3, 1) 1.35s both; }
.is-morphing .pm-body   { animation: pm-pop 0.7s ease-in-out 1.35s both; }
.is-morphing .pm-spark  { animation: pm-spark 0.6s cubic-bezier(.3, 1.6, .5, 1) both; }
.is-morphing .pm-spark-1 { animation-delay: 1.3s; }
.is-morphing .pm-spark-2 { animation-delay: 1.5s; }
.is-morphing .pm-spark-3 { animation-delay: 1.65s; }

@keyframes pm-hide   { from { visibility: visible; } to { visibility: hidden; } }
@keyframes pm-stem   { 0%, 20% { stroke: var(--stem); stroke-dashoffset: 68; } 100% { stroke: var(--white); stroke-dashoffset: 0; } }
@keyframes pm-glow   { 0% { opacity: 0; transform: scale(.2); } 35% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.8); } }
@keyframes pm-reveal { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes pm-pop    { 0%, 100% { transform: scale(1); } 35% { transform: scale(1.06, .94); } 70% { transform: scale(.98, 1.03); } }
@keyframes pm-spark  { from { opacity: 0; transform: scale(0) rotate(-90deg); } to { opacity: 1; transform: scale(1) rotate(0); } }

@media (prefers-reduced-motion: reduce) {
  .is-morphing .pm-orange, .is-morphing .pm-stem, .is-morphing .pm-glow, .is-morphing .pm-reveal,
  .is-morphing .pm-body, .is-morphing .pm-spark { animation: none; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 24px; padding-block: 40px 48px; }
  .hero-mark { order: -1; }
  .orb { width: min(300px, 78vw); }
  .hero-copy { gap: 22px; }
  .hero-copy .eyebrow { font-size: 0.8125rem; }
  .hero-copy .btn { align-self: stretch; }
}

.how { display: flex; flex-direction: column; gap: clamp(28px, 4vw, 56px); }
.section-head { display: flex; flex-direction: column; gap: 14px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.step { border-top: 1px solid var(--line); padding-top: 28px; display: flex; flex-direction: column; gap: 12px; }
.step h3 { font-size: var(--fs-h3); font-weight: 600; letter-spacing: -0.03em; }
.step p { color: var(--mist); }
.step-num { color: var(--gold); }
@media (max-width: 860px) { .steps { grid-template-columns: minmax(0, 1fr); gap: 20px; } .step { padding-top: 20px; } }

.measure { padding-top: var(--section); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; align-items: end; }
.measure-list li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0; border-top: 1px solid var(--rule); font-size: 1.25rem; }
.measure-list li:last-child { border-bottom: 1px solid var(--rule); }
.measure-list .is-output { color: var(--muted); }
.measure-list .is-outcome { font-weight: 600; }
.measure-list .tag { color: var(--muted); }
.measure-list .tag.gold { color: var(--gold); }
@media (max-width: 860px) { .measure { grid-template-columns: minmax(0, 1fr); gap: 28px; } .measure-list li { font-size: 1.0625rem; padding: 18px 0; } }

.paper-link-wrap { padding-top: clamp(48px, 6vw, 96px); }
.paper-link { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 28px 32px; border: 1px solid var(--line); border-radius: var(--radius-md); }
.paper-link-text { display: flex; align-items: center; gap: 20px; }
.paper-link-title { font-size: 1.375rem; font-weight: 600; letter-spacing: -0.02em; }
.paper-link .icon { width: 24px; height: 24px; }
@media (max-width: 640px) { .paper-link { padding: 22px 20px; } .paper-link-text { flex-direction: column; align-items: flex-start; gap: 6px; } .paper-link-title { font-size: 1.0625rem; } }

/* ---------- White paper ---------- */
.cover-wrap { display: flex; justify-content: center; align-items: center; }
.cover {
  width: min(420px, 100%); aspect-ratio: 420 / 544;
  background: #F7F8FC; color: var(--midnight); border-radius: 6px;
  padding: clamp(28px, 3vw, 44px);
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.35);
}
.cover-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.cover-brand img { width: 40px; }
.cover-title { display: flex; flex-direction: column; gap: 12px; font-size: clamp(2rem, 1.4rem + 2vw, 3rem); line-height: 1; font-weight: 600; letter-spacing: -0.04em; }
.cover-kicker { font-size: 0.6875rem; letter-spacing: 0.08em; color: var(--royal); }
.cover-foot { display: flex; justify-content: space-between; font-size: 0.6875rem; color: #56607A; }

.lessons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.lessons li { display: flex; flex-direction: column; gap: 14px; }
.lessons p { font-size: var(--fs-h3); line-height: 1.15; font-weight: 600; letter-spacing: -0.03em; }
@media (max-width: 860px) { .lessons { grid-template-columns: minmax(0, 1fr); gap: 28px; } }

.table-wrap { margin-top: 32px; overflow-x: auto; }
.compare { width: 100%; min-width: 560px; border-collapse: collapse; }
.compare thead th { text-align: left; font-weight: 500; padding: 0 16px 16px 0; }
.compare tbody th, .compare td { text-align: left; padding: 26px 16px 26px 0; border-top: 1px solid var(--rule); vertical-align: middle; width: 33.33%; }
.compare tbody tr:last-child > * { border-bottom: 1px solid var(--rule); }
.compare tbody th { font-weight: 400; color: var(--mist); font-size: 1rem; }
.compare td { font-size: 1.25rem; }
.compare td:last-child { font-weight: 600; }
.compare thead td { border: 0; }

.inside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; align-self: start; }
.inside li { display: flex; gap: 16px; align-items: baseline; padding: 18px 0; border-top: 1px solid var(--rule); font-size: 1.125rem; }
@media (max-width: 640px) { .inside { grid-template-columns: minmax(0, 1fr); } }

/* ---------- About ---------- */
.principles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.card { background: var(--panel); border-radius: 24px; padding: 36px 32px; min-height: 300px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.card h3 { font-size: 1.625rem; line-height: 1.1; font-weight: 600; letter-spacing: -0.03em; margin-bottom: 12px; }
.card p { color: var(--mist); font-size: 0.9375rem; }
@media (max-width: 1100px) { .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .principles { grid-template-columns: minmax(0, 1fr); } .card { min-height: 0; } }


/* ---------- Contact ---------- */
.contact .stack { height: 100%; }
.contact-direct { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 24px; }
.contact-email { font-size: clamp(1.375rem, 1rem + 1vw, 1.75rem); font-weight: 600; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.contact-form { display: flex; flex-direction: column; gap: 24px; }
.field { display: flex; flex-direction: column; gap: 10px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 640px) { .field-row { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
.field label { font-size: 0.9375rem; font-weight: 600; }
.field input, .field textarea {
  width: 100%; background: var(--panel); color: var(--white);
  border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 20px; font: 400 1.0625rem/1.4 var(--font-sans);
}
.field textarea { resize: vertical; min-height: 140px; }
.field input::placeholder, .field textarea::placeholder { color: var(--dim); }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-color: var(--blue); }
.field [aria-invalid="true"] { border-color: var(--gold); }
.form-error { color: var(--gold); font-size: 0.9375rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-success { display: flex; flex-direction: column; gap: 20px; }
.form-success[hidden], .contact-form[hidden] { display: none; }
.form-success img { width: 120px; }
