/* nuff — Surplus tokens (Shared/Surplus.swift), light default, dark by preference */
:root {
  --ground: #EDEBE4; --raised: #E4E0D2; --ink: #111311; --primary: #1A1A3A;
  --sage: #8A8F72; --accent: #FF3B1F; --body: #2B2E27; --rule: rgba(17,19,17,.2);
  --build: #7CB518; --quit: #FF3B1F; --lime: #B6F53F; --navy: #1A1A3A; --bone: #EDEBE4;
  --grain-blend: multiply; --grain-opacity: .2;
  --ease: cubic-bezier(.2,.8,.2,1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #111211; --raised: #1A1C1A; --ink: #E9E9E4; --primary: #BFC4B6;
    --sage: #7F8A7A; --accent: #B6F53F; --body: #C9CEC2; --rule: rgba(233,233,228,.2);
    --build: #B6F53F; --quit: #FF6A1A; --grain-blend: screen; --grain-opacity: .1;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Unbounded", system-ui, sans-serif; font-weight: 300; font-size: 1rem;
  line-height: 1.7; letter-spacing: .01em; color: var(--body); background: var(--ground);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body::before {                                   /* drifting paper grain */
  content: ""; position: fixed; inset: -80px; z-index: 100; pointer-events: none;
  background: url(img/grain.png) repeat; background-size: 220px;
  mix-blend-mode: var(--grain-blend); opacity: var(--grain-opacity);
  animation: drift 9s steps(6) infinite;
}
@keyframes drift { 0%{transform:translate(0,0)} 25%{transform:translate(-120px,40px)} 50%{transform:translate(-40px,-80px)} 75%{transform:translate(60px,20px)} 100%{transform:translate(0,0)} }

a { color: var(--primary); text-decoration: none; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem); }
section { padding: clamp(4rem, 10vw, 8rem) 0; }

h1, h2, h3, .statement { font-weight: 500; color: var(--ink); letter-spacing: -.01em; }
h1 { font-size: clamp(2.5rem, 7vw, 5.5rem); line-height: 1.08; max-width: 12em; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.5rem); font-weight: 600; line-height: 1.2; max-width: 18em; }
h3 { font-size: 1.125rem; line-height: 1.3; }
.statement { font-size: clamp(1.25rem, 2.8vw, 2rem); line-height: 1.2; max-width: 22em; }
.lead { font-size: 1.25rem; line-height: 1.6; max-width: 34em; }
p { max-width: 38em; }
.label { font-size: .6875rem; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--ink); }  /* nuffHeader: ink, medium */
.cap { background: var(--lime); color: var(--navy); border-radius: 999px; padding: 0 .22em;
       -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* living capsule: the one interaction vocabulary */
.cap-link { position: relative; display: inline-block; padding: .35em .9em; }
.cap-link::after { content: ""; position: absolute; inset: 0; border-radius: 999px;
  border: 1.5px solid var(--sage); opacity: 0; transform: scale(.92);
  transition: opacity .45s var(--ease), transform .45s var(--ease); }
.cap-link:hover::after, .cap-link:focus-visible::after { opacity: 1; transform: scale(1); }
:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; border-radius: 6px; }

/* header */
header { padding: 1.25rem 0; }
header .wrap { display: flex; align-items: center; justify-content: space-between; }
.wordmark { display: flex; align-items: center; gap: .55rem; font-weight: 500; font-size: 1.25rem; letter-spacing: -.01em; color: var(--primary); }
.wordmark .logo { height: 1.6rem; width: auto; display: block; }
nav { display: flex; gap: .25rem; font-size: .875rem; }

/* hero */
.hero { padding-top: clamp(2rem, 6vw, 5rem); }
.hero .wrap { display: grid; grid-template-columns: 7fr 5fr; gap: 2rem; align-items: center; }
.hero .lead { margin: 1.5rem 0 2.25rem; }
.badge { display: inline-flex; align-items: center; gap: .6rem; height: 56px; padding: 0 1.4rem;
  border-radius: 999px; background: var(--ink); color: var(--ground); font-weight: 500; font-size: 1rem; }
.badge small { display: block; font-weight: 300; font-size: .625rem; letter-spacing: .06em; text-transform: uppercase; opacity: .8; line-height: 1.1; }
.badge span { line-height: 1.15; }
.hero .note { margin-top: 1rem; font-size: .8125rem; }
.demo { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.demo svg { width: min(280px, 70vw); height: auto; overflow: visible; }
.demo .ring { transform-origin: 50% 50%; transition: transform .35s cubic-bezier(.3,1.6,.5,1); }
.demo .ring.pulse { transform: scale(1.06); }
.demo .num { font-variant-numeric: tabular-nums; font-weight: 500; fill: var(--primary); }
.demo .sub { font-weight: 300; fill: var(--body); }
.demo .said { font-weight: 500; font-size: 1.25rem; color: var(--navy); background: var(--lime); border-radius: 999px; padding: 0 .6em; opacity: 0; transition: opacity .4s var(--ease); min-height: 1.6em; }
.demo .said.on { opacity: 1; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 3rem; }
.step .n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  border: 1.5px solid var(--sage); font-size: .75rem; font-weight: 500; color: var(--primary); margin-bottom: 1rem; }
.step p { margin-top: .5rem; }

/* build / quit */
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 3rem; }
.card { background: var(--raised); border-radius: 16px; padding: 2rem; position: relative; overflow: hidden; }
.card::before { content: ""; position: absolute; inset: 0; opacity: .08; }
.card.build::before { background: var(--build); } .card.quit::before { background: var(--quit); }
.card > * { position: relative; }
.card .chip { display: inline-block; font-size: .6875rem; letter-spacing: .08em; padding: .1em .7em; border-radius: 999px; border: 1px solid; margin-bottom: 1.25rem; }
.card.build .chip { color: var(--primary); border-color: var(--build); }
.card.quit .chip { color: var(--primary); border-color: var(--quit); }
.card .row { display: flex; gap: 1.5rem; align-items: center; }
.card svg { flex: none; width: 110px; height: 110px; }
.card p { margin-top: .5rem; font-size: .9375rem; }

/* gallery */
.gallery { display: flex; gap: 1.25rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2.5rem 0 1rem;
  scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery img { flex: none; width: min(260px, 62vw); height: auto; border-radius: 22px; scroll-snap-align: start;
  border: 1px solid var(--rule); }

/* private */
.private { background: var(--navy); color: #C9CEC2; }
.private .label { color: var(--bone); }
.private h2, .private .statement { color: var(--bone); }
.private ul { list-style: none; margin: 2.5rem 0; display: grid; gap: 1rem; }
.private li { display: flex; gap: 1rem; align-items: flex-start; }
.private li::before { content: ""; flex: none; width: .4em; height: .4em; border-radius: 50%; background: var(--lime); margin-top: .4em; }
.private p { color: #C9CEC2; }

/* plus */
.plus-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 3rem; }
.tier { border: 1px solid var(--rule); border-radius: 16px; padding: 2rem; }
.tier.paid { background: var(--raised); border-color: transparent; }
.tier .note { margin-top: 1.25rem; font-size: .8125rem; }
.tier .price { font-variant-numeric: tabular-nums; font-weight: 500; font-size: 2rem; color: var(--ink); margin: .5rem 0 1rem; letter-spacing: -.01em; }
.tier ul { list-style: none; display: grid; gap: .6rem; font-size: .9375rem; }
.tier li { display: flex; gap: .75rem; }
.tier li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: .6em; border-radius: 50%; background: var(--build); }
.tier.free li::before { background: var(--sage); }

/* faq */
.faq { margin-top: 2.5rem; border-top: 1px solid var(--rule); }
details { border-bottom: 1px solid var(--rule); }
summary { cursor: pointer; list-style: none; padding: 1.25rem 0; font-weight: 500; color: var(--ink); display: flex; justify-content: space-between; gap: 1rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--sage); transition: transform .45s var(--ease); }
details[open] summary::after { transform: rotate(45deg); }
details p { padding-bottom: 1.25rem; font-size: .9375rem; }

/* footer */
footer { padding: 3rem 0 4rem; border-top: 1px solid var(--rule); font-size: .875rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; }
footer .links { display: flex; flex-wrap: wrap; gap: .25rem; }
.signoff { font-weight: 500; color: var(--primary); }

/* prose pages */
.prose { padding: 3rem 0 6rem; }
.prose h1 { font-size: clamp(2rem, 5vw, 3.25rem); margin-bottom: 1rem; }
.prose h2 { font-size: 1.25rem; margin: 2.5rem 0 .75rem; }
.prose p, .prose li { font-size: .9375rem; margin-bottom: .75rem; max-width: 42em; }
.prose ul { padding-left: 1.25rem; }
.prose .label { margin-bottom: 2rem; }

/* entrances: opacity, blur, lift, 1° — once, on the way down */
.reveal { opacity: 0; filter: blur(5px); transform: translateY(.3em) rotate(1deg);
  transition: opacity .4s var(--ease), filter .4s var(--ease), transform .4s var(--ease); }
.reveal.in { opacity: 1; filter: none; transform: none; }

@media (max-width: 800px) {
  .hero .wrap, .steps, .modes, .plus-grid { grid-template-columns: 1fr; }
  .demo { order: -1; }
  nav .hide-sm { display: none; }
  .card .row { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
  .reveal { filter: none; transform: none; transition: opacity .2s linear; }
  .demo .ring { transition: none; }
}
