/* =========================================================================
   Pupae Studio — design tokens
   Palette measured directly from the brand mark; button/text combinations
   checked against WCAG AA (contrast ratios noted alongside each token).
   ========================================================================= */
:root {
  --sage: #85B29B;        /* decorative — large display type, icon fills, shapes. 2.4:1 on white: display-only */
  --forest: #4D7C61;      /* interactive — buttons, links, small headings. 4.8:1 on white: AA for text */
  --forest-deep: #3A5F49; /* hover/active state for forest */
  --mint: #DCEFE1;        /* section tint background */
  --mint-pale: #F3FAF5;   /* page background wash */
  --ink: #1B2621;         /* primary text. 15.6:1 on white */
  --caption: #5C6E66;     /* secondary/muted text. 5.4:1 on white */
  --white: #FFFFFF;
  --hairline: #CFE1D6;
  --tp-clay: #B0603F;     /* ThreadPrint's own accent — used only within the product section */
  --tp-ink: #1B2624;

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --container: 1180px;
  --radius: 14px;
  --shadow-soft: 0 4px 24px rgba(27, 38, 33, 0.06);
  --shadow-lift: 0 12px 40px rgba(27, 38, 33, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--mint-pale);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--forest); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--forest); outline-offset: 3px;
}

.wrap { max-width: var(--container); margin: 0 auto; padding: 0 28px; }

h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); margin: 0 0 0.5em; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.6rem, 5vw, 4.4rem); line-height: 1.04; font-weight: 600; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); line-height: 1.1; }
h3 { font-size: 1.4rem; line-height: 1.25; }
p { margin: 0 0 1em; }
.lede { font-size: 1.2rem; color: var(--caption); max-width: 640px; }

.eyebrow {
  font-family: var(--sans); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--forest); margin-bottom: 14px; display: block;
}
.eyebrow.on-dark { color: var(--sage); }

.mono-stat { font-family: var(--mono); }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-weight: 600; font-size: 0.95rem;
  padding: 13px 26px; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; text-decoration: none; transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--forest); color: var(--white); box-shadow: var(--shadow-soft); }
.btn-primary:hover { background: var(--forest-deep); box-shadow: var(--shadow-lift); }
.btn-ghost { background: transparent; color: var(--forest); border-color: var(--forest); }
.btn-ghost:hover { background: var(--mint); }
.btn-on-dark { background: var(--white); color: var(--forest-deep); }
.btn-on-dark:hover { background: var(--mint); }
.btn-outline-on-dark { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.5); }
.btn-outline-on-dark:hover { background: rgba(255,255,255,0.1); }
.btn-tp { background: var(--tp-clay); color: var(--white); }
.btn-tp:hover { background: #954f34; }

/* ---------------- nav ---------------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(243, 250, 245, 0.86); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.nav-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-brand img { height: 30px; width: auto; }
.nav-brand span { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; color: var(--ink); }
.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { color: var(--forest); }
.nav-cta { display: flex; gap: 12px; align-items: center; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle svg { width: 26px; height: 26px; color: var(--ink); }

@media (max-width: 860px) {
  .nav-links { position: fixed; inset: 64px 0 0 0; background: var(--mint-pale); flex-direction: column; justify-content: flex-start; padding: 40px 28px; gap: 24px; transform: translateX(100%); transition: transform 0.25s ease; }
  .nav-links.open { transform: translateX(0); }
  .nav-toggle { display: block; }
  .nav-cta .btn-ghost { display: none; }
}

/* ---------------- hero ---------------- */
.hero { position: relative; overflow: hidden; padding: 90px 0 110px; }
.hero-shapes { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-shapes svg { position: absolute; top: -10%; right: -8%; width: 62%; max-width: 780px; height: auto; opacity: 0; transform: scale(0.9) rotate(-6deg); animation: unfurl 1.4s cubic-bezier(.2,.9,.25,1) 0.15s forwards; }
@keyframes unfurl { to { opacity: 1; transform: scale(1) rotate(0deg); } }
.hero .wrap { position: relative; z-index: 1; }
.hero-content { max-width: 640px; }
.hero-content h1 { margin-bottom: 22px; }
.hero-content h1 em { font-style: italic; color: var(--forest); }
.hero-actions { display: flex; gap: 16px; margin-top: 34px; flex-wrap: wrap; }

/* ---------------- sections ---------------- */
section { padding: 100px 0; }
.section-tint { background: var(--mint); }
.section-dark { background: var(--tp-ink); color: var(--white); }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark p { color: rgba(255,255,255,0.72); }
.section-head { max-width: 680px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------------- grids & cards ---------------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--white); border-radius: var(--radius); padding: 32px;
  border: 1px solid var(--hairline);
}
.card-dark { background: #22302E; border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius); padding: 32px; }
.icon-badge {
  width: 48px; height: 48px; border-radius: 50%; background: var(--forest);
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px; flex-shrink: 0;
}
.icon-badge svg { width: 22px; height: 22px; color: var(--white); }
.icon-badge.sage { background: var(--sage); }
.icon-badge.on-dark { background: var(--sage); }

/* ---------------- lifecycle stages ---------------- */
.stages { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin: 48px 0; flex-wrap: wrap; }
.stage { flex: 1; min-width: 90px; text-align: center; position: relative; }
.stage-num { width: 40px; height: 40px; border-radius: 50%; background: var(--mint); border: 1.5px solid var(--forest); color: var(--forest); font-family: var(--mono); font-weight: 600; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.stage-name { font-weight: 700; font-size: 0.92rem; }
.stage-desc { color: var(--caption); font-size: 0.8rem; margin-top: 4px; }
.stage-line { position: absolute; top: 20px; left: 50%; width: 100%; height: 1.5px; background: var(--hairline); z-index: -1; }
.stage:last-child .stage-line { display: none; }

/* ---------------- stat / proof panel ---------------- */
.proof { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 860px) { .proof { grid-template-columns: 1fr; } }
.proof-card { border-radius: var(--radius); padding: 30px; }
.proof-before { background: var(--white); border: 1px solid var(--hairline); }
.proof-after { background: var(--tp-ink); color: var(--white); }
.proof-label { font-family: var(--sans); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.7; }
.proof-num { font-family: var(--mono); font-size: 2.6rem; font-weight: 600; margin: 10px 0 2px; }
.proof-after .proof-num { color: var(--sage); }
.proof-unit { font-size: 0.9rem; opacity: 0.75; }

/* ---------------- pricing ---------------- */
.price-card { border-radius: var(--radius); padding: 32px; background: var(--white); border: 1px solid var(--hairline); position: relative; }
.price-card.featured { background: var(--tp-ink); color: var(--white); border-color: var(--tp-ink); }
.price-card.featured .price-note { color: rgba(255,255,255,0.65); }
.price-badge { position: absolute; top: -14px; left: 32px; background: var(--tp-clay); color: white; font-size: 0.72rem; font-weight: 700; padding: 5px 14px; border-radius: 999px; letter-spacing: 0.04em; }
.price-amount { font-family: var(--mono); font-size: 2.2rem; font-weight: 600; margin: 10px 0; }
.price-amount span { font-size: 1rem; font-weight: 400; opacity: 0.6; }
.price-note { color: var(--caption); font-size: 0.85rem; margin-bottom: 20px; }
.price-features { list-style: none; padding: 0; margin: 0; }
.price-features li { padding: 8px 0; border-top: 1px solid var(--hairline); font-size: 0.92rem; }
.price-card.featured .price-features li { border-top-color: rgba(255,255,255,0.12); }

/* ---------------- footer ---------------- */
footer { background: var(--tp-ink); color: rgba(255,255,255,0.7); padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 48px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
footer h4 { color: var(--white); font-family: var(--sans); font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 16px; }
footer a { color: rgba(255,255,255,0.7); text-decoration: none; }
footer a:hover { color: var(--white); }
footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 24px; display: flex; justify-content: space-between; font-size: 0.85rem; flex-wrap: wrap; gap: 12px; }

/* ---------------- utility ---------------- */
.pill { display: inline-block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; padding: 4px 12px; border-radius: 999px; background: var(--mint); color: var(--forest-deep); }
.pill.on-dark { background: rgba(255,255,255,0.1); color: var(--sage); }
.two-col-text { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
@media (max-width: 860px) { .two-col-text { grid-template-columns: 1fr; gap: 24px; } }
.divider { height: 1px; background: var(--hairline); border: none; margin: 0; }
.badge-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.iso-badge { font-family: var(--mono); font-size: 0.72rem; padding: 4px 10px; border-radius: 8px; background: rgba(255,255,255,0.08); color: var(--sage); }
.iso-badge.light { background: var(--mint); color: var(--forest-deep); }
