/* ---------------------------------------------------------------------------
   shpshp.dev — shared stylesheet

   Deliberately single-theme: the site is dark, like the app. Colours are taken
   straight from the app's UI palette so the two read as one product.
--------------------------------------------------------------------------- */

:root {
  /* From the app's palette — darkColor, black850, black500, black100,
     black300, black800, highlightColor, brightBlue500, mainColor, highColor. */
  --ground:      #0d0f0f;
  --surface:     #16171b;
  --raise:       #1d1f1f;
  --ink:         #f8f8fc;
  --muted:       #97a0a4;
  --faint:       #626a7d;
  --line:        #23262a;

  --accent:      #59d398;   /* highlightColor */
  --accent-ink:  #06140e;
  --accent-soft: rgba(89, 211, 152, .12);
  --accent-line: rgba(89, 211, 152, .28);

  --blue:        #007aff;   /* brightBlue500 */
  --deep:        #253e3a;   /* mainColor */
  --deep-high:   #285244;   /* highColor */
  --purple:      #ac65bf;   /* pastelPurple500 */

  /* Nutri-Score / Eco-Score bands — 'a' deliberately shares the brand mint. */
  --band-a: #59d398;
  --band-b: #a8ce4a;
  --band-c: #f5be42;
  --band-d: #ff8f4d;
  --band-e: #ff6a5c;

  --radius:    16px;
  --radius-sm: 10px;
  --measure:   66ch;
  --page:      74rem;

  color-scheme: dark;
}

/* --- 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; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  padding-bottom: 4.75rem;      /* clears the fixed mobile download bar */
  overflow-x: hidden;
}
@media (min-width: 48rem) { body { padding-bottom: 0; } }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, h4 { margin: 0; letter-spacing: -.028em; text-wrap: balance; line-height: 1.15; }
h1 { font-size: clamp(2.25rem, 6.5vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.8vw, 2.3rem); font-weight: 760; }
h3 { font-size: 1.14rem; font-weight: 700; letter-spacing: -.012em; }
p  { margin: 0; }

.mono, code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}
code { background: var(--raise); padding: .13em .42em; border-radius: 5px; font-size: .88em; }

.eyebrow {
  font-size: .75rem; font-weight: 700; letter-spacing: .13em;
  text-transform: uppercase; color: var(--accent);
}
.lede  { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--muted); max-width: var(--measure); }
.prose { max-width: var(--measure); display: flex; flex-direction: column; gap: 1rem; }
.prose p { color: var(--muted); }
/* Long-form legal pages: headings need to break up a wall of text, and the
   in-page table of contents needs somewhere to land that isn't under the
   sticky header. */
.prose h2 {
  font-size: 1.05rem; line-height: 1.35; margin-top: 1.4rem;
  scroll-margin-top: 5rem;
}
.prose h2:first-child { margin-top: 0; }
.prose ul { margin: 0; padding-left: 1.15rem; display: flex; flex-direction: column; gap: .45rem; }
.prose li { color: var(--muted); }
.prose a { color: var(--accent); }
.prose [id] { scroll-margin-top: 5rem; }
.muted { color: var(--muted); }
.small { font-size: .89rem; }

/* --- layout -------------------------------------------------------------- */

.wrap { max-width: var(--page); margin-inline: auto; padding-inline: 1.25rem; }
@media (min-width: 48rem) { .wrap { padding-inline: 2rem; } }

section.band { padding-block: clamp(3.25rem, 8vw, 6rem); }
section.band + section.band { border-top: 1px solid var(--line); }

.stack    { display: flex; flex-direction: column; gap: 1.15rem; align-items: flex-start; }
.stack-lg { display: flex; flex-direction: column; gap: clamp(2rem, 4vw, 3rem); }

.grid { display: grid; gap: 1.15rem; grid-template-columns: 1fr; align-items: stretch; }
@media (min-width: 40rem) { .grid.two   { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 52rem) { .grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 62rem) { .grid.four  { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* --- header -------------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 15, 15, .82);
  -webkit-backdrop-filter: saturate(170%) blur(14px);
  backdrop-filter: saturate(170%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar { display: flex; align-items: center; gap: 1rem; min-height: 3.85rem; }

.brand {
  display: flex; align-items: center; gap: .6rem;
  font-weight: 800; letter-spacing: -.025em; font-size: 1.06rem;
  color: var(--ink); text-decoration: none; margin-right: auto;
}
.brand img { width: 28px; height: 28px; border-radius: 8px; }

.site-nav { display: none; }
@media (min-width: 62rem) {
  .site-nav { display: flex; gap: 1.6rem; margin-right: 1.5rem; }
  .site-nav a {
    color: var(--muted); text-decoration: none; font-size: .93rem;
    font-weight: 550; padding-block: .4rem;
  }
  .site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
}

/* Horizontal scroll rather than a menu button — no JavaScript needed. */
.nav-scroll {
  display: flex; gap: 1.2rem; overflow-x: auto; padding-block: .6rem;
  border-top: 1px solid var(--line);
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.nav-scroll::-webkit-scrollbar { display: none; }
.nav-scroll a { color: var(--muted); text-decoration: none; font-size: .88rem; font-weight: 550; white-space: nowrap; }
.nav-scroll a[aria-current="page"] { color: var(--accent); }
@media (min-width: 62rem) { .nav-scroll { display: none; } }

/* --- buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: .6rem 1.3rem;
  border-radius: 30px; border: 1px solid transparent;
  font-size: .95rem; font-weight: 660; text-decoration: none; cursor: pointer;
  transition: opacity .15s ease, border-color .15s ease, background .15s ease;
}
.btn-primary { background: linear-gradient(135deg, var(--blue), var(--purple)); color: white; }
.btn-primary:hover { opacity: .88; }
.btn-ghost { background: rgba(255,255,255,.04); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-lg { min-height: 54px; padding: .85rem 1.85rem; font-size: 1.05rem; }
.btn-sm { min-height: 38px; padding: .35rem .95rem; font-size: .87rem; }

.mobile-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom));
  background: rgba(13, 15, 15, .9);
  -webkit-backdrop-filter: saturate(170%) blur(14px);
  backdrop-filter: saturate(170%) blur(14px);
  border-top: 1px solid var(--line);
  display: flex;
}
.mobile-cta .btn { flex: 1; }
@media (min-width: 48rem) { .mobile-cta { display: none; } }

/* --- hero banner (WebGL ribbon) ------------------------------------------ */

.hero-banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  /* Tall enough for the ribbons to have somewhere to go — they fill the box,
     so a short box just crops them back into a stripe. */
  min-height: min(78svh, 46rem);
  display: flex;
  align-items: center;
  padding-block: clamp(4rem, 11vw, 8rem) clamp(3.5rem, 9vw, 6rem);
}
/* Gradient ground — also the fallback if WebGL is unavailable and the canvas
   removes itself. */
.hero-bg {
  position: absolute; inset: 0; z-index: -3;
  /* Blue stays. Gold against blue is complementary contrast, which is why it
     reads as deliberate rather than clashing — the pairing only goes grey if
     the two actually blend, and the ribbon is opaque geometry over the glow
     rather than mixed into it. */
  background:
    radial-gradient(120% 90% at 80% 0%, rgba(0,122,255,.20), transparent 60%),
    linear-gradient(150deg, #0d0f0f 0%, #16211e 45%, #253e3a 100%);
}
#wave-canvas {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; display: block;
}
/* Darkens the ribbon behind the text and dissolves the banner into the page. */
/* Two scrims rather than one: a soft vertical fade that dissolves the banner
   into the page, and a left-weighted wash that keeps the headline legible
   without flattening the ribbon on the right where there is no text.
   The vertical fade starts later and lighter than it used to — the ribbon now
   sits low and right, and the old .55 at 82% was muting exactly the part of it
   that carries the effect. */
.hero-veil {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(100deg, rgba(13,15,15,.86) 0%, rgba(13,15,15,.55) 38%, rgba(13,15,15,0) 72%),
    linear-gradient(to bottom, rgba(13,15,15,.15) 0%, rgba(13,15,15,0) 34%, rgba(13,15,15,.28) 88%, var(--ground) 100%);
}
@media (max-width: 48rem) {
  /* Narrow screens put the text over the middle of the frame, so the wash has
     to be vertical there or the headline sits on top of the brightest fibres. */
  .hero-veil {
    background: linear-gradient(to bottom,
      rgba(13,15,15,.35) 0%, rgba(13,15,15,.62) 45%, rgba(13,15,15,.80) 78%, var(--ground) 100%);
  }
}
/* The banner is a flex container, so its one in-flow child must be told to
   fill it — otherwise .wrap shrinks to its content and the centring breaks. */
.hero-banner > .wrap { width: 100%; position: relative; z-index: 1; }
.hero-banner .actions { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.hero-banner .note { font-size: .88rem; color: var(--muted); }

/* Plain hero for interior pages — no canvas, just the gradient. */
.hero { position: relative; isolation: isolate; overflow: hidden;
  padding-block: clamp(3rem, 8vw, 5rem) clamp(2.5rem, 6vw, 3.5rem); }
.hero .actions { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.hero-tint {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(100% 120% at 10% 0%, rgba(89,211,152,.10), transparent 55%),
    radial-gradient(90% 100% at 90% 0%, rgba(0,122,255,.10), transparent 55%);
}

/* --- components ---------------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex; flex-direction: column; gap: .65rem;
  min-width: 0;
}
.card h3 { color: var(--ink); }
.card p  { color: var(--muted); font-size: .95rem; }
.card .kicker { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }

a.card { text-decoration: none; color: inherit; transition: border-color .15s ease, background .15s ease; }
a.card:hover { border-color: var(--accent-line); background: var(--raise); }
a.card .more { color: var(--accent); font-size: .9rem; font-weight: 640; margin-top: auto; padding-top: .4rem; }

.pillars { display: grid; gap: 1.15rem; grid-template-columns: 1fr; }
@media (min-width: 52rem) { .pillars { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.band-chip {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.8rem; height: 1.8rem; border-radius: 8px;
  font-weight: 800; font-size: .92rem; color: #06140e; text-transform: uppercase;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.band-chip.a { background: var(--band-a); } .band-chip.b { background: var(--band-b); }
.band-chip.c { background: var(--band-c); } .band-chip.d { background: var(--band-d); }
.band-chip.e { background: var(--band-e); }
.band-row { display: flex; gap: .45rem; align-items: center; flex-wrap: wrap; }

.stat { display: flex; flex-direction: column; gap: .2rem; }
.stat .n {
  font-size: clamp(1.75rem, 4.5vw, 2.4rem); font-weight: 800;
  letter-spacing: -.035em; font-variant-numeric: tabular-nums; color: var(--accent);
}
.stat .l { font-size: .88rem; color: var(--muted); }

.shot {
  border: 1px solid var(--line); border-radius: 22px; background: var(--surface);
  aspect-ratio: 9 / 19.5; display: flex; align-items: center; justify-content: center;
  color: var(--faint); font-size: .82rem; text-align: center; padding: 1rem; overflow: hidden;
  margin: 0; position: relative;
}
/* A screenshot fills the frame edge to edge, so the padding that insets a text
   placeholder has to go. The source images are 1242 x 2688, the same 9:19.5 the
   frame is set to, so cover crops nothing. */
.shot:has(img) { padding: 0; }
.shot img {
  width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 21px;
}
/* The caption sits over the foot of the screenshot rather than below it, so the
   four frames stay the same height whatever the label length. */
.shot figcaption {
  position: absolute; inset: auto 0 0 0; padding: 2.4rem .7rem .7rem;
  font-size: .8rem; font-weight: 600; color: var(--ink);
  background: linear-gradient(to top, rgba(13,15,15,.92) 30%, rgba(13,15,15,0));
}

.faq { display: flex; flex-direction: column; }
.faq details { border-bottom: 1px solid var(--line); padding-block: 1.05rem; }
.faq summary {
  cursor: pointer; font-weight: 660; list-style: none;
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 700; font-size: 1.25rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--muted); margin-top: .65rem; max-width: var(--measure); }

.price-grid { display: grid; gap: 1.15rem; grid-template-columns: 1fr; }
@media (min-width: 46rem) { .price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.price {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem;
  background: var(--surface); display: flex; flex-direction: column; gap: 1.15rem;
}
.price.featured {
  border-color: var(--accent-line);
  background: linear-gradient(180deg, var(--accent-soft), var(--surface) 55%);
}
.price .amount { font-size: 2.5rem; font-weight: 800; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.price ul { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .5rem; }
.price li { color: var(--muted); font-size: .95rem; }
.price .btn { margin-top: auto; }

.list-check { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .75rem; }
.list-check li { display: flex; gap: .7rem; align-items: flex-start; color: var(--muted); }
.list-check li::before { content: "✓"; color: var(--accent); font-weight: 700; flex: none; }
.list-check li b { color: var(--ink); font-weight: 640; }

.callout {
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  border-radius: var(--radius); padding: 1.35rem 1.5rem;
  display: flex; flex-direction: column; gap: .55rem;
}

.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; min-width: 32rem; font-size: .94rem; }
th {
  text-align: left; font-size: .74rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--faint); font-weight: 700; padding: 0 1rem .65rem 0; border-bottom: 1px solid var(--line);
}
td { padding: .75rem 1rem .75rem 0; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--muted); }
td b { color: var(--ink); font-weight: 640; }
tr:last-child td { border-bottom: 0; }

/* --- footer -------------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding-block: 3rem; }
.site-footer .cols { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 46rem) { .site-footer .cols { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.site-footer h4 { font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.site-footer ul { list-style: none; margin: .8rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.site-footer a { color: var(--muted); text-decoration: none; font-size: .93rem; }
.site-footer a:hover { color: var(--ink); }
.site-footer .fine {
  margin-top: 2.25rem; padding-top: 1.35rem; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: .86rem; color: var(--faint);
}
