/* Original Sea Buckthorn — originalseabuckthorn.com
   One stylesheet, no framework.

   The palette is the berry: vivid fruit orange against the deep green of the
   Ladakh shrub. Light and dark are both first-class — the dark set is not a
   filter over the light one, it is its own set of values. */

/* ------------------------------------------------------------------ tokens */

:root {
  color-scheme: light dark;

  /* light */
  --bg:         #fbfaf7;
  --bg-sunk:    #f4f2ec;
  --surface:    #ffffff;
  --surface-2:  #faf8f4;
  --ink:        #12150f;
  --ink-2:      #3a4136;
  --muted:      #6d7566;
  --line:       #e6e2d8;
  --line-soft:  #efece4;

  --berry:      #ef6511;
  --berry-2:    #ff8a3d;
  --berry-deep: #b74704;
  --berry-wash: #fef1e6;

  --green:      #276b3b;
  --green-2:    #3f9155;
  --green-deep: #1a4c28;
  --green-wash: #ecf4ee;

  --on-accent:  #ffffff;

  --shadow-sm: 0 1px 2px rgb(18 21 15 / .05), 0 2px 8px -4px rgb(18 21 15 / .08);
  --shadow:    0 2px 4px rgb(18 21 15 / .04), 0 12px 32px -14px rgb(18 21 15 / .18);
  --shadow-lg: 0 4px 10px rgb(18 21 15 / .05), 0 32px 70px -26px rgb(18 21 15 / .3);
  --glow:      0 20px 60px -24px rgb(239 101 17 / .55);

  --display: "Instrument Serif", ui-serif, Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --wrap: 1200px;
  --r-sm: 12px;
  --r:    18px;
  --r-lg: 28px;
  --r-xl: 36px;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #0b0e0a;
    --bg-sunk:   #0f130e;
    --surface:   #151a13;
    --surface-2: #1b211a;
    --ink:       #f1f4ee;
    --ink-2:     #c3cbbc;
    --muted:     #8d9786;
    --line:      #29311f;
    --line-soft: #202719;

    --berry:      #ff7a29;
    --berry-2:    #ffa45e;
    --berry-deep: #ff9448;
    --berry-wash: #2a1a0d;

    --green:      #4aa564;
    --green-2:    #67c082;
    --green-deep: #8ed6a3;
    --green-wash: #14231a;

    --on-accent:  #10140e;

    --shadow-sm: 0 1px 2px rgb(0 0 0 / .5);
    --shadow:    0 2px 4px rgb(0 0 0 / .4), 0 14px 34px -16px rgb(0 0 0 / .8);
    --shadow-lg: 0 4px 10px rgb(0 0 0 / .45), 0 36px 80px -30px rgb(0 0 0 / .9);
    --glow:      0 24px 70px -26px rgb(255 122 41 / .45);
  }
}

:root[data-theme="dark"] {
  --bg:        #0b0e0a;
  --bg-sunk:   #0f130e;
  --surface:   #151a13;
  --surface-2: #1b211a;
  --ink:       #f1f4ee;
  --ink-2:     #c3cbbc;
  --muted:     #8d9786;
  --line:      #29311f;
  --line-soft: #202719;

  --berry:      #ff7a29;
  --berry-2:    #ffa45e;
  --berry-deep: #ff9448;
  --berry-wash: #2a1a0d;

  --green:      #4aa564;
  --green-2:    #67c082;
  --green-deep: #8ed6a3;
  --green-wash: #14231a;

  --on-accent:  #10140e;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / .5);
  --shadow:    0 2px 4px rgb(0 0 0 / .4), 0 14px 34px -16px rgb(0 0 0 / .8);
  --shadow-lg: 0 4px 10px rgb(0 0 0 / .45), 0 36px 80px -30px rgb(0 0 0 / .9);
  --glow:      0 24px 70px -26px rgb(255 122 41 / .45);
}

/* ------------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }

/* An author `display` beats the UA sheet's [hidden] rule, and .p-card sets
   display:flex — without this the filter marks cards hidden and they stay put. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.62 var(--sans);
  font-feature-settings: "cv05" 1, "ss03" 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: var(--green-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--berry-deep); }

h1, h2, h3, h4 {
  font-family: var(--display); font-weight: 400; line-height: 1.02;
  letter-spacing: -.018em; margin: 0 0 .42em; text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 1.5rem + 4.6vw, 5.2rem); }
h2 { font-size: clamp(1.95rem, 1.35rem + 2.5vw, 3.1rem); }
h3 { font-size: clamp(1.25rem, 1.08rem + .75vw, 1.6rem); }
h4 { font-size: 1rem; font-family: var(--sans); font-weight: 600; letter-spacing: 0; }
p  { margin: 0 0 1.05em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.wrap { width: min(100% - 48px, var(--wrap)); margin-inline: auto; }
@media (max-width: 560px) { .wrap { width: min(100% - 32px, var(--wrap)); } }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 0 0 10px 0;
}
.skip:focus { left: 0; }

:where(a, button, summary, input):focus-visible {
  outline: 2.5px solid var(--berry); outline-offset: 3px; border-radius: 6px;
}

::selection { background: var(--berry); color: var(--on-accent); }

/* scroll-reveal — set by JS once observed, so no-JS shows everything */
.reveal { opacity: 0; transform: translateY(22px); }
.reveal.is-in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

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

.site-head {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, background .25s;
}
.site-head.is-stuck {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
}

.head-inner { display: flex; align-items: center; gap: 18px; min-height: 76px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; margin-right: auto; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 50%; flex: none; position: relative;
  background: radial-gradient(circle at 33% 28%, var(--berry-2), var(--berry) 55%, var(--berry-deep));
  box-shadow: 0 0 0 1px rgb(0 0 0 / .05), 0 6px 18px -8px var(--berry);
}
.brand-mark::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--berry) 34%, transparent), transparent 70%);
  z-index: -1;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.18; }
.brand-name { font-family: var(--display); font-size: 1.32rem; letter-spacing: -.02em; }
.brand-tag {
  font-size: .625rem; color: var(--muted); letter-spacing: .13em; text-transform: uppercase;
  font-weight: 500;
}
@media (max-width: 420px) { .brand-tag { display: none; } }

.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  padding: 9px 13px; border-radius: 99px; font-size: .92rem; font-weight: 500;
  color: var(--ink-2); text-decoration: none; white-space: nowrap; transition: .18s var(--ease);
}
.nav a:hover { background: var(--bg-sunk); color: var(--ink); }
.nav a.is-active { color: var(--green-deep); background: var(--green-wash); }
.nav a.nav-cta {
  background: var(--ink); color: var(--bg); margin-left: 8px; padding-inline: 18px;
}
.nav a.nav-cta:hover { background: var(--berry); color: var(--on-accent); }

.theme-btn {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 99px; background: var(--surface);
  color: var(--ink-2); cursor: pointer; padding: 0; transition: .18s var(--ease);
}
.theme-btn:hover { color: var(--berry); border-color: var(--berry); transform: rotate(-18deg); }
.theme-btn svg { width: 17px; height: 17px; }
.theme-btn .i-moon { display: none; }
:root[data-theme="dark"] .theme-btn .i-moon { display: block; }
:root[data-theme="dark"] .theme-btn .i-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .i-moon { display: block; }
  :root:not([data-theme="light"]) .theme-btn .i-sun { display: none; }
}

.nav-toggle {
  display: none; width: 42px; height: 42px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface); cursor: pointer; padding: 0;
}
.nav-toggle span { display: block; width: 17px; height: 1.8px; background: var(--ink); margin: 3.6px auto; border-radius: 2px; transition: transform .24s var(--ease), opacity .18s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.4px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle { display: block; order: 3; }
  .theme-btn { order: 2; }
  .nav {
    position: absolute; inset: 76px 0 auto; flex-direction: column; align-items: stretch;
    gap: 2px; background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 14px 24px 22px; box-shadow: var(--shadow); display: none; order: 4;
  }
  .nav.is-open { display: flex; animation: drop .28s var(--ease); }
  @keyframes drop { from { opacity: 0; transform: translateY(-10px); } }
  .nav a { padding: 12px 14px; border-radius: 12px; }
  .nav a.nav-cta { margin: 8px 0 0; text-align: center; }
}

/* reading progress */
.progress {
  position: fixed; top: 0; left: 0; height: 2.5px; width: 0; z-index: 70;
  background: linear-gradient(90deg, var(--green), var(--berry));
  transition: width .1s linear;
}

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

.section { padding: clamp(60px, 7vw, 116px) 0; }
.section-tight { padding: clamp(34px, 4vw, 56px) 0; }
.section-cream { background: var(--bg-sunk); }
.section-paper { background: var(--surface); }
.section-dark {
  background: var(--ink); color: #e6eae2;
  --ink: #f4f7f1; --ink-2: #c8d1c2; --muted: #96a08d; --line: #2a3225; --surface: #1a2017;
}
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark a { color: var(--berry-2); }

.kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .7rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--berry-deep); margin: 0 0 1.1em;
}
.kicker::before {
  content: ""; width: 22px; height: 1.5px; background: currentColor; opacity: .5;
}

.lead {
  font-size: clamp(1.06rem, 1rem + .35vw, 1.3rem); color: var(--ink-2); line-height: 1.55;
  letter-spacing: -.005em;
}
.lead-wide { max-width: 66ch; }
.measure { max-width: 68ch; }

/* ------------------------------------------------------------------ hero */

.hero {
  position: relative; isolation: isolate; overflow: hidden;
  padding: clamp(60px, 8vw, 132px) 0 clamp(56px, 7vw, 112px);
}
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto; height: 150%; z-index: -2;
  background:
    radial-gradient(48% 42% at 78% 14%, color-mix(in srgb, var(--berry) 26%, transparent), transparent 68%),
    radial-gradient(42% 40% at 12% 78%, color-mix(in srgb, var(--green) 22%, transparent), transparent 66%),
    radial-gradient(35% 30% at 52% 4%,  color-mix(in srgb, var(--berry-2) 16%, transparent), transparent 70%);
  filter: blur(8px);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 9%, transparent) 1px, transparent 0);
  background-size: 28px 28px;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 40%, #000, transparent 76%);
          mask-image: radial-gradient(70% 60% at 50% 40%, #000, transparent 76%);
}
.hero h1 { max-width: 15ch; margin-bottom: .3em; }
.hero .lead { max-width: 54ch; }
.hero .lead + .lead { margin-top: .85em; }
.hero-grid {
  display: grid; grid-template-columns: 1.02fr .98fr;
  gap: clamp(32px, 5vw, 80px); align-items: center;
}
/* The hero animates on load rather than on scroll — it is already on screen,
   so there is nothing to wait for. */
.hero-grid > * { animation: rise .85s var(--ease) both; }
.hero-grid > *:nth-child(2) { animation-delay: .12s; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }
@media (prefers-reduced-motion: reduce) { .hero-grid > * { animation: none; } }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.hero-figure {
  position: relative; border-radius: var(--r-xl); padding: clamp(24px, 3.4vw, 46px);
  background:
    linear-gradient(155deg,
      color-mix(in srgb, var(--berry-2) 26%, var(--surface)),
      color-mix(in srgb, var(--berry) 14%, var(--surface)) 55%,
      var(--surface));
  border: 1px solid color-mix(in srgb, var(--berry) 24%, transparent);
  box-shadow: var(--shadow-lg), var(--glow);
}
.hero-figure img {
  border-radius: var(--r); margin-inline: auto;
  filter: drop-shadow(0 26px 44px rgb(0 0 0 / .22));
  animation: float 7s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-11px); } }
.hero-figure figcaption {
  margin-top: 18px; font-size: .84rem; color: var(--berry-deep); font-weight: 500;
  text-align: center;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

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

.btn {
  display: inline-flex; align-items: center; gap: 9px; padding: 14px 26px; border-radius: 99px;
  font: 500 .96rem/1 var(--sans); text-decoration: none; border: 1px solid transparent;
  cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s var(--ease),
    background .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn span { transition: transform .2s var(--ease); }
.btn:hover span { transform: translateX(3px); }

.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--green); color: #fff; box-shadow: 0 14px 30px -14px var(--green); }

.btn-berry {
  background: linear-gradient(135deg, var(--berry-2), var(--berry)); color: var(--on-accent);
  box-shadow: 0 10px 26px -14px var(--berry);
}
.btn-berry:hover { color: var(--on-accent); box-shadow: 0 18px 38px -14px var(--berry); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); background: var(--surface); }
.btn-block { width: 100%; justify-content: center; }

.more-link {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: .95rem;
  text-decoration: none; padding-bottom: 3px; background: none; border: 0; cursor: pointer;
  box-shadow: inset 0 -1.5px 0 currentColor; color: var(--green-deep); font-family: var(--sans);
}
.more-link:hover { color: var(--berry-deep); }
.more-link span { transition: transform .2s var(--ease); }
.more-link:hover span { transform: translateX(4px); }

/* ------------------------------------------------------------------ page head */

.page-head {
  position: relative; overflow: hidden;
  padding: clamp(42px, 5.5vw, 84px) 0 clamp(32px, 4vw, 54px);
  border-bottom: 1px solid var(--line-soft);
}
.page-head::before {
  content: ""; position: absolute; inset: -60% -20% auto; height: 190%; z-index: -1;
  background: radial-gradient(44% 46% at 82% 12%, color-mix(in srgb, var(--berry) 15%, transparent), transparent 70%);
}
.page-head h1 { max-width: 19ch; }
.page-head .lead { max-width: 64ch; }

.crumbs {
  font-size: .82rem; color: var(--muted); margin: 0 0 1.6em;
  display: flex; flex-wrap: wrap; gap: 7px; align-items: center;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--berry-deep); }
.crumbs span { opacity: .4; }

/* ------------------------------------------------------------------ stats */

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
@media (max-width: 800px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat {
  background: var(--surface); padding: 26px 24px; border: 1px solid var(--line);
  border-radius: var(--r); position: relative; overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s;
}
.stat::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 2px;
  background: linear-gradient(90deg, var(--berry), transparent);
  transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease);
}
.stat:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--berry) 40%, var(--line)); }
.stat:hover::after { transform: scaleX(1); }
.stat-n {
  font-family: var(--display); font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.8rem);
  color: var(--ink); line-height: 1; letter-spacing: -.02em;
}
.stat-l { font-size: .85rem; color: var(--muted); margin-top: 9px; line-height: 1.45; }

/* ------------------------------------------------------------------ cards */

.grid { display: grid; gap: 18px; }
.grid > * { min-width: 0; }
.split > *, .split-side > *, .hero-grid > *, .foot-top > *, .foot-cols > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1020px) { .grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 840px)  { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px)  { .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 440px)  { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 30px; display: flex; flex-direction: column;
}
.card h3 { margin-bottom: .34em; }
.card p { font-size: .95rem; color: var(--ink-2); }
.card-link {
  text-decoration: none; color: inherit; position: relative; overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.card-link::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .35s;
  background: radial-gradient(70% 60% at 50% 0%, color-mix(in srgb, var(--berry) 9%, transparent), transparent 70%);
}
.card-link:hover {
  transform: translateY(-4px); box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--berry) 42%, var(--line)); color: inherit;
}
.card-link:hover::before { opacity: 1; }
.card .card-more {
  margin-top: auto; padding-top: 18px; font-size: .9rem; font-weight: 500;
  color: var(--berry-deep);
}

/* product card */

.p-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.p-card:hover {
  transform: translateY(-5px); box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--berry) 45%, var(--line)); color: inherit;
}
/* A definite height, not aspect-ratio. Under aspect-ratio the box's height is
   indefinite, so `max-height:100%` on the image resolves to none and a portrait
   shot (one product photo is 640x1116) stretches the card out of line. */
/* The product shots are white-background PNGs, so the tile behind them stays
   light in both themes and `multiply` can drop that white away. Inverting the
   tile for dark mode would leave every photo sitting in its own white box. */
.p-shot {
  height: 215px; display: grid; place-items: center; padding: 20px; overflow: hidden;
  background: radial-gradient(70% 70% at 50% 18%, #fde9d6, #f7f4ec 72%);
  border-bottom: 1px solid var(--line-soft);
}
.p-shot img, .pdp-shot img {
  max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
  mix-blend-mode: multiply; transition: transform .45s var(--ease);
}
.p-card:hover .p-shot img { transform: scale(1.06); }

.p-body { padding: 17px 19px 20px; display: flex; flex-direction: column; flex: 1; }
.p-type {
  font-size: .64rem; letter-spacing: .13em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 8px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* Name and note are clamped so every card in a row puts its price on the
   same baseline, whatever the copy length. */
.p-name {
  font-family: var(--display); font-size: 1.18rem; line-height: 1.16; margin: 0 0 9px;
  letter-spacing: -.012em; min-height: 2.32em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.p-note {
  font-size: .85rem; color: var(--muted); line-height: 1.45; margin: 0 0 16px; min-height: 2.9em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.p-foot {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-top: 14px; border-top: 1px solid var(--line-soft);
}
.p-price { font-weight: 600; font-size: 1rem; letter-spacing: -.01em; }
.p-go { font-size: .82rem; font-weight: 500; color: var(--berry-deep); }
.p-card:hover .p-go { color: var(--berry); }

/* ------------------------------------------------------------------ product page */

.pdp { display: grid; grid-template-columns: .92fr 1.08fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.pdp > * { min-width: 0; }
@media (max-width: 940px) { .pdp { grid-template-columns: 1fr; } }

.pdp-shot {
  border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: clamp(26px, 4vw, 52px); display: grid; place-items: center;
  position: sticky; top: 104px;
  background: radial-gradient(62% 58% at 50% 12%, #fde3cb, #f7f4ec 74%);
}
@media (max-width: 940px) { .pdp-shot { position: static; } }
.pdp-shot img { filter: drop-shadow(0 22px 38px rgb(0 0 0 / .16)); }

.pdp-type {
  font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--berry-deep);
  font-weight: 600; margin-bottom: 1em;
}
.pdp h1 { font-size: clamp(2rem, 1.5rem + 2.1vw, 3.2rem); margin-bottom: .28em; }

.pdp-rating { display: flex; align-items: center; gap: 9px; font-size: .88rem; color: var(--muted); margin-bottom: 1.2em; }
.stars { color: var(--berry); letter-spacing: 1.5px; }

.pdp-sizes { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 24px; padding: 0; list-style: none; }
.pdp-size {
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 17px;
  background: var(--surface); font-size: .9rem; line-height: 1.3;
}
.pdp-size b { display: block; font-weight: 600; font-size: 1.06rem; letter-spacing: -.01em; }
.pdp-size span { color: var(--muted); font-size: .78rem; }

.buy-box {
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
  padding: 22px; margin: 26px 0;
}
.buy-box .btn { width: 100%; justify-content: center; }
.buy-note { font-size: .81rem; color: var(--muted); margin: 13px 0 0; text-align: center; }

.spec { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 26px; }
.spec h2 { font-size: clamp(1.3rem, 1.15rem + .5vw, 1.55rem); margin-bottom: .65em; }
.spec p { font-size: .97rem; color: var(--ink-2); }

.ings { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
.ing {
  display: flex; align-items: center; gap: 10px; border: 1px solid var(--line);
  border-radius: 99px; padding: 5px 17px 5px 5px; background: var(--surface);
  font-size: .87rem; font-weight: 500; transition: border-color .2s, transform .2s var(--ease);
}
.ing:hover { border-color: var(--berry); transform: translateY(-2px); }
.ing img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; }

.nut { width: 100%; border-collapse: collapse; font-size: .92rem; }
.nut caption { text-align: left; font-size: .81rem; color: var(--muted); padding-bottom: 11px; }
.nut td { padding: 9px 4px; border-bottom: 1px solid var(--line-soft); }
.nut td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.nut tr:last-child td { border-bottom: 0; }
.nut-wrap { overflow-x: auto; }

.nut-spec td:first-child { color: var(--muted); width: 38%; }
.nut-spec td:last-child { text-align: left; font-weight: 400; }

.cmp td { vertical-align: top; padding: 13px 4px; }
.cmp td:first-child { padding-right: 14px; }
.cmp td:last-child { white-space: nowrap; font-weight: 600; }
.cmp a { font-weight: 500; text-decoration: none; }
.cmp a:hover { text-decoration: underline; }
.cmp-note { display: block; color: var(--muted); font-size: .83rem; font-weight: 400; margin-top: 4px; }
.cmp-size { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.cmp-this {
  font-size: .62rem; letter-spacing: .11em; text-transform: uppercase; font-weight: 600;
  color: var(--berry-deep); background: var(--berry-wash); border-radius: 99px;
  padding: 3px 9px; margin-left: 7px; white-space: nowrap;
}

.reviews { display: grid; gap: 14px; }
.review {
  border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px;
  background: var(--surface);
}
.review-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.review-who { font-weight: 600; font-size: .91rem; }
.review p { font-size: .93rem; color: var(--ink-2); margin: 0; }

/* ------------------------------------------------------------------ prose */

.prose { max-width: 70ch; font-size: 1.05rem; }
.prose h2 { margin-top: 1.7em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.15em; }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--berry); }
.prose .grid .card p:last-child a { font-weight: 500; }

.callout {
  position: relative; background: var(--berry-wash); padding: 22px 26px;
  border-radius: var(--r); margin: 1.8em 0; border: 1px solid color-mix(in srgb, var(--berry) 22%, transparent);
}
.callout p { font-size: .96rem; }
.callout-green {
  background: var(--green-wash);
  border-color: color-mix(in srgb, var(--green) 24%, transparent);
}

.note {
  border: 1px dashed var(--line); border-radius: var(--r); padding: 18px 22px;
  font-size: .9rem; color: var(--muted); margin: 1.8em 0; background: var(--surface);
}

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; padding: 22px 46px 22px 0; font-family: var(--display);
  font-size: 1.24rem; letter-spacing: -.012em; position: relative; list-style: none;
  transition: color .2s;
}
.faq summary:hover { color: var(--berry-deep); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 10px; top: 50%; width: 11px; height: 11px;
  border-right: 2px solid var(--berry); border-bottom: 2px solid var(--berry);
  transform: translateY(-70%) rotate(45deg); transition: transform .28s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-20%) rotate(-135deg); }
.faq .faq-body { padding: 0 0 24px; color: var(--ink-2); max-width: 70ch; }

.toc {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px 30px;
}
.toc p {
  font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted);
  font-weight: 600; margin-bottom: 1.1em;
}
.toc ol { margin: 0; padding-left: 1.2em; }
.toc li { margin-bottom: .55em; font-size: .96rem; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ misc */

.band {
  position: relative; overflow: hidden; border-radius: var(--r-xl);
  padding: clamp(34px, 5vw, 66px); color: #fff;
  background: linear-gradient(125deg, var(--green-deep), var(--green) 48%, #3f9155);
}
.band::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 60%; height: 200%;
  background: radial-gradient(circle at 70% 30%, rgb(255 138 61 / .38), transparent 62%);
}
.band > * { position: relative; }
.band h2 { color: #fff; max-width: 20ch; }
.band p { color: rgb(255 255 255 / .86); max-width: 58ch; }
.band .btn-ghost { background: rgb(255 255 255 / .1); border-color: rgb(255 255 255 / .34); color: #fff; }
.band .btn-ghost:hover { background: #fff; color: var(--green-deep); border-color: #fff; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 72px); align-items: center; }
.split-side { grid-template-columns: 1.12fr .88fr; }
@media (max-width: 860px) { .split, .split-side { grid-template-columns: 1fr; } }

.tagrow { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 30px; padding: 0; list-style: none; }
.tag {
  display: inline-block; font-size: .85rem; padding: 8px 16px; border-radius: 99px;
  text-decoration: none; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-2); transition: .2s var(--ease);
}
.tag:hover { border-color: var(--berry); color: var(--berry-deep); transform: translateY(-2px); }
.tag.is-active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.tag.is-active:hover { color: var(--bg); }

.count { font-size: .9rem; color: var(--muted); margin: 0 0 22px; }

.seal { display: flex; flex-wrap: wrap; gap: 9px; list-style: none; padding: 0; margin: 0; }
.seal li {
  font-size: .8rem; font-weight: 500; color: var(--green-deep); background: var(--green-wash);
  border: 1px solid color-mix(in srgb, var(--green) 20%, transparent);
  border-radius: 99px; padding: 7px 16px;
}

.concern { padding-top: 10px; margin-bottom: clamp(44px, 5vw, 76px); scroll-margin-top: 100px; }
.concern h2 { margin-bottom: .28em; }
.concern .lead { margin-bottom: 1.5em; }

/* listing filter */
.filter { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 0 0 26px; }
.filter input {
  flex: 1 1 280px; max-width: 420px; font: 400 .96rem var(--sans); color: var(--ink);
  padding: 13px 20px; border: 1px solid var(--line); border-radius: 99px;
  background: var(--surface); transition: border-color .2s, box-shadow .2s;
}
.filter input:focus {
  outline: none; border-color: var(--berry);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--berry) 16%, transparent);
}
.filter input::placeholder { color: var(--muted); }
.filter-count { font-size: .88rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.filter-empty { padding: 30px 0; color: var(--muted); }

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

.site-foot {
  background: var(--ink); color: #aab3a2; padding: clamp(52px, 6vw, 86px) 0 34px;
  position: relative; overflow: hidden;
}
.site-foot::before {
  content: ""; position: absolute; inset: auto -5% -60% auto; width: 55%; height: 130%;
  background: radial-gradient(circle at 60% 40%, rgb(239 101 17 / .14), transparent 62%);
}
.site-foot > * { position: relative; }
.foot-top {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px;
  padding-bottom: 36px; border-bottom: 1px solid rgb(255 255 255 / .09);
}
@media (max-width: 800px) { .foot-top { grid-template-columns: 1fr; } }
.foot-name { font-family: var(--display); font-size: 1.7rem; color: #fff; margin-bottom: .3em; letter-spacing: -.02em; }
.foot-tag { font-size: .94rem; max-width: 44ch; margin: 0; }
.foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 620px) { .foot-cols { grid-template-columns: 1fr 1fr; } }
.foot-h {
  font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: #fff;
  font-weight: 600; margin-bottom: 1.2em;
}
.foot-cols a {
  display: block; color: #aab3a2; text-decoration: none; font-size: .92rem; padding: 5px 0;
  transition: color .18s, transform .18s var(--ease);
}
.foot-cols a:hover { color: var(--berry-2); transform: translateX(3px); }
.foot-legal { font-size: .79rem; color: #7c8574; margin: 28px 0 0; line-height: 1.65; max-width: 90ch; }
.foot-legal a { color: #aab3a2; }

/* ------------------------------------------------------------- the berry

   An explorable berry: tilt it with the pointer, then pick a compound out of
   the ring around it. No library — an inline SVG, CSS transforms and about
   forty lines of JS. Every node is a real <button>, so it tabs and it reads.  */

.berry {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px);
  align-items: center; margin-top: clamp(28px, 4vw, 48px);
}
/* A grid or flex item's min-width defaults to its content size, so the chip row
   below could never shrink and its own overflow-x:auto never engaged — the row
   simply pushed every ancestor wider and took the page with it. */
.berry, .berry-side, .berry-stage, .berry-nodes, .berry-panel { min-width: 0; }
@media (max-width: 900px) { .berry { grid-template-columns: 1fr; gap: 30px; } }

.berry-stage {
  position: relative; aspect-ratio: 1; max-width: 450px; width: 100%;
  margin-inline: auto; display: grid; place-items: center;
  perspective: 900px; touch-action: pan-y;
}

.berry-orb {
  position: relative; width: 56%; will-change: transform; cursor: grab;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .55s var(--ease);
}
.berry-orb.is-dragging { cursor: grabbing; transition: none; }
.berry-orb svg { overflow: visible; filter: drop-shadow(0 26px 40px rgb(168 62 2 / .34)); }
/* the halo takes its colour from whichever compound is selected */
.berry-orb::after {
  content: ""; position: absolute; inset: 14%; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, var(--c, #ff7a1a), transparent 68%);
  opacity: 0; transition: opacity .55s, background .55s; filter: blur(30px);
}
.berry.is-picked .berry-orb::after { opacity: .8; }

/* the ring of compounds */
.berry-nodes { position: absolute; inset: 0; list-style: none; margin: 0; padding: 0; }
.berry-nodes li {
  position: absolute; inset: 0; display: grid; place-items: start center;
  transform: rotate(var(--a)); pointer-events: none;
}
.berry-node {
  pointer-events: auto; transform: rotate(calc(-1 * var(--a)));
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  font: 500 .79rem/1 var(--sans); color: var(--ink); font-family: var(--sans);
  background: var(--surface); border: 1px solid var(--line); border-radius: 99px;
  padding: 8px 14px 8px 9px; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: border-color .22s, box-shadow .22s, transform .3s var(--ease),
              background .22s, color .22s;
}
.berry-node i {
  width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent);
}
.berry-node:hover {
  border-color: var(--c);
  transform: rotate(calc(-1 * var(--a))) scale(1.08);
  box-shadow: 0 10px 24px -12px var(--c);
}
.berry-node[aria-pressed="true"] {
  background: var(--c); border-color: var(--c); color: #fff;
  transform: rotate(calc(-1 * var(--a))) scale(1.08);
  box-shadow: 0 12px 30px -12px var(--c);
}
.berry-node[aria-pressed="true"] i { background: #fff; box-shadow: none; }

.berry-side { display: flex; flex-direction: column; align-items: center; gap: 14px; min-width: 0; }
.berry-hint {
  margin: 0; text-align: center; font-size: .72rem; color: var(--muted);
  letter-spacing: .1em; text-transform: uppercase;
}

/* the panel */
.berry-panel { position: relative; min-height: 290px; }
.berry-card { display: none; }
.berry-card.is-on { display: block; animation: cardin .45s var(--ease) both; }
@keyframes cardin { from { opacity: 0; transform: translateY(14px); } }
.berry-val {
  font-family: var(--display); font-size: clamp(2.5rem, 1.9rem + 3vw, 4.2rem);
  line-height: .95; letter-spacing: -.028em; color: var(--c, var(--berry)); margin: 0;
}
.berry-val small {
  display: block; font-family: var(--sans); font-size: .78rem; font-weight: 500;
  letter-spacing: .05em; color: var(--muted); margin-top: 1em; text-transform: uppercase;
}
.berry-card h3 { margin: .7em 0 .35em; }
.berry-card > p:last-child { color: var(--ink-2); max-width: 46ch; }

/* Below the split the ring becomes a swipeable row — a circle of pills does
   not survive a 375px screen. The nodes are children of the stage, so the
   stage itself becomes the column rather than moving them in the DOM. */
@media (max-width: 900px) {
  .berry-stage {
    aspect-ratio: auto; max-width: 100%; display: flex; flex-direction: column;
    align-items: center; gap: 20px; perspective: none;
  }
  .berry-orb { width: min(210px, 56vw); }
  .berry-nodes {
    position: static; display: flex; gap: 9px; width: 100%; overflow-x: auto;
    padding: 4px 2px 10px; scroll-snap-type: x proximity;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .berry-nodes::-webkit-scrollbar { display: none; }
  .berry-nodes li {
    position: static; inset: auto; display: block; transform: none;
    flex: none; scroll-snap-align: center; pointer-events: auto;
  }
  .berry-node,
  .berry-node:hover,
  .berry-node[aria-pressed="true"] { transform: none; }
  .berry-panel { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .berry-orb { transition: none; }
  .berry-card.is-on { animation: none; }
}

/* ------------------------------------------------------------- sliding rail

   Scroll-snap does the sliding; the arrows only nudge it. That way it still
   drags with a finger or a trackpad when the JS never runs.  */

.rail-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 30px;
}
.rail-head h2 { margin-bottom: .3em; }
.rail-head .more-link { margin-top: 18px; }

.rail-nav { display: flex; gap: 9px; flex: none; }
@media (max-width: 720px) { .rail-nav { display: none; } }
.rail-btn {
  width: 46px; height: 46px; border-radius: 99px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: 1.05rem; cursor: pointer;
  transition: .2s var(--ease);
}
.rail-btn:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); transform: translateY(-2px); }
.rail-btn:disabled { opacity: .3; cursor: default; transform: none; background: var(--surface); color: var(--ink); }

.rail {
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  /* bleed to the window edge so cards run off the side rather than stopping
     dead at the content column — the thing that makes a rail read as a rail */
  padding-inline: max(24px, calc((100vw - var(--wrap)) / 2));
  padding-block: 4px 12px;
}
.rail::-webkit-scrollbar { display: none; }
.rail:focus-visible { outline: 2.5px solid var(--berry); outline-offset: -4px; border-radius: var(--r); }
@media (max-width: 560px) { .rail { padding-inline: 16px; } }

.rail, .rail-track, .nut-wrap, .tagrow { min-width: 0; }
.rail-track { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; }
.rail-track > li { flex: 0 0 clamp(230px, 24vw, 290px); scroll-snap-align: start; display: flex; }
.rail-track .p-card { width: 100%; }
@media (prefers-reduced-motion: reduce) { .rail { scroll-behavior: auto; } }

/* Guide-hub cards are chapter links, so their headings are h2 for hierarchy —
   but they should still read at card size, not section size. */
.card-h { font-size: clamp(1.25rem, 1.08rem + .75vw, 1.6rem); margin-bottom: .34em; }

/* an ingredient chip that links somewhere */
a.ing { text-decoration: none; color: var(--ink); }
a.ing:hover { border-color: var(--berry); color: var(--berry-deep); }

/* ------------------------------------------------------------- touch + small screens

   Everything below is about the phone specifically: targets big enough to hit,
   inputs iOS will not zoom into, and room for the notch.  */

/* iOS zooms the whole page when a focused input's text is under 16px. .96rem
   resolves to 15.4px, so this is the difference between a filter that works and
   one that hijacks the viewport on tap. */
@media (max-width: 900px) {
  .filter input { font-size: 16px; }
}

/* A tap needs ~44px. These are the controls that were under it. */
@media (max-width: 900px) {
  .theme-btn { width: 44px; height: 44px; }
  .nav-toggle { width: 44px; height: 44px; }
  .berry-node { padding: 11px 16px 11px 11px; font-size: .84rem; min-height: 44px; }
  .tag { padding: 11px 17px; min-height: 44px; display: inline-flex; align-items: center; }
  .faq summary { padding-block: 20px; }
  .crumbs { gap: 4px 8px; }
  .crumbs a { padding: 3px 0; }
  .foot-cols a { padding: 8px 0; }
}

/* Tapping should feel deliberate, not flash a blue box over half a card. */
@media (hover: none) {
  a, button, summary, .p-card, .card-link {
    -webkit-tap-highlight-color: color-mix(in srgb, var(--berry) 16%, transparent);
  }
  /* Hover lifts are meaningless on touch and leave cards stuck mid-animation
     after a tap, so they are switched off rather than left to misfire. */
  .p-card:hover, .card-link:hover, .stat:hover, .ing:hover, .tag:hover, .btn:hover {
    transform: none;
  }
  .p-card:hover .p-shot img { transform: none; }
}

/* Notches and home indicators. Only the sides and the footer need it — the
   sticky header sits below the status bar already. */
@supports (padding: env(safe-area-inset-left)) {
  @media (max-width: 900px) {
    .wrap { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
    .site-foot { padding-bottom: calc(34px + env(safe-area-inset-bottom)); }
    .rail { scroll-padding-left: env(safe-area-inset-left); }
  }
}

@media (max-width: 400px) {
  /* Two-line brand pushed the header to 100px; one line keeps it at 64. */
  .brand-name { font-size: 1.12rem; }
  .brand-mark { width: 26px; height: 26px; }
  .head-inner { min-height: 64px; gap: 10px; }
  .nav { inset-block-start: 64px; }
  .pdp-shot { padding: 20px; }
  .card { padding: 24px; }
  .band { padding: 28px 22px; }
}

/* Landscape on a phone is short, not narrow — the hero should not take the
   whole screen with nothing visible under it. */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { padding-block: 40px 36px; }
  .hero h1 { font-size: clamp(1.9rem, 1.2rem + 3vw, 2.6rem); }
  .site-head { position: static; }
}

/* preclinical study charts — the bars take the accent, the rest inherits so the
   chart reads in both themes without a second palette */
.chart { width: 100%; height: auto; min-width: 560px; color: var(--ink); display: block; }
.nut-spec + .chart { margin-top: 1em; }
