/* Nutrafuel site styles.
   Design tokens live in :root. Change colours, spacing and type here, never as loose values below.
   Breakpoint: 900px (phone layout below it). The JS reads the same breakpoint from --layout. */

@font-face{
  font-family:"Archivo";
  src:url("/assets/fonts/archivo-latin-var.woff2") format("woff2");
  font-weight:100 900;
  font-stretch:62% 125%;
  font-style:normal;
  font-display:swap;
}

:root{
  /* colour */
  --stone:#C8C0B9;      /* page background. Must match the video backdrop, theme-color meta and frames */
  --stone-2:#BFB6AE;
  --ink:#000;
  --ink-2:#4A443E;
  --bone:#ECE8E2;
  --mist:#A39D95;
  --line:rgba(0,0,0,.18);
  --line-dark:rgba(236,232,226,.28);
  --gold:#C9A24A;
  --gold-grad:linear-gradient(100deg,#8E6B22 0%,#E9CF82 42%,#C39A3E 68%,#8E6B22 100%);
  /* space and shape */
  --pad:clamp(20px,5vw,64px);
  --radius:18px;
  --nav-h:76px;
  /* animation layout, read by site.js */
  --layout:desktop;
  --frame-top:0px;      /* bottle starts at the very top and runs under the glass nav */
  --frame-area:1;       /* share of the pin height the bottle may use (sets its size) */
  --frame-offset:0;     /* push the bottle down by this share of the pin height */
  /* text colour inside the story column (switched to white for the phone blend) */
  --fg:var(--ink);
  --fg-2:var(--ink-2);
  --fg-line:var(--line);
  --fg-rule:#000;
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;background:var(--stone);color-scheme:light}
@media (prefers-reduced-motion:no-preference){html{scroll-behavior:smooth}}
body{overflow-x:clip;margin:0;background:var(--stone);color:var(--ink);font-family:Archivo,system-ui,sans-serif;font-size:17px;line-height:1.55}
a{color:inherit}
img,canvas{display:block;max-width:100%}
:focus-visible{outline:2px solid currentColor;outline-offset:3px;border-radius:4px}
h1,h2,h3,p{margin:0}
h1,h2,h3{font-weight:800;letter-spacing:-.015em}
h1{font-size:clamp(50px,6.4vw,104px);line-height:.92}
h1 span{display:block}
h1 .wide{font-stretch:125%}
h1 .narrow{font-stretch:62%;font-weight:300;letter-spacing:-.01em}
h2{font-size:clamp(36px,4.2vw,64px);line-height:.98;font-stretch:112%}
h3{font-size:20px;line-height:1.2;font-stretch:110%;font-weight:700}
.muted{color:var(--ink-2)}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.skip{position:absolute;left:-9999px;top:8px;z-index:30;background:#000;color:var(--bone);padding:10px 16px;border-radius:999px;text-decoration:none}
.skip:focus{left:8px}

/* buttons and links */
.btn{display:inline-flex;align-items:center;padding:15px 28px;border-radius:999px;font-weight:700;font-stretch:110%;font-size:16px;text-decoration:none}
.btn-gold{background:var(--gold-grad);color:#000;box-shadow:inset 0 0 0 1px rgba(0,0,0,.14)}
.btn-gold:hover{filter:brightness(1.06)}
.btn-black{background:#000;color:var(--bone)}
.link{font-weight:600;text-underline-offset:5px;text-decoration-thickness:1px}
.link:hover{text-decoration-thickness:2px}

/* nav */
/* fixed frosted-glass bar across the top: the bottle and softgels pass underneath it, blurred */
.nav{position:fixed;inset:0 0 auto;z-index:20}
.nav-in{
  display:flex;align-items:center;justify-content:space-between;
  height:calc(var(--nav-h) + env(safe-area-inset-top));padding:env(safe-area-inset-top) var(--pad) 0;
  background:linear-gradient(180deg,rgba(236,232,226,.55),rgba(236,232,226,.32));
  -webkit-backdrop-filter:blur(10px) saturate(1.4);backdrop-filter:blur(10px) saturate(1.4);
  border-bottom:1px solid rgba(255,255,255,.5);
  box-shadow:0 8px 24px -16px rgba(40,30,20,.35);
  transition:background .3s
}
.nav.solid .nav-in{background:linear-gradient(180deg,rgba(236,232,226,.66),rgba(236,232,226,.42))}
.mark{font-weight:800;font-stretch:125%;font-size:21px;letter-spacing:.02em;text-decoration:none;line-height:1}
.mark sup{font-size:.4em;font-weight:600;margin-left:2px;vertical-align:1.2em}
.nav ul{display:flex;gap:30px;list-style:none;margin:0;padding:0;align-items:center}
.nav ul a{text-decoration:none;font-weight:500;font-size:15px}
.nav ul a:not(.btn):hover{text-decoration:underline;text-underline-offset:5px}
.nav .btn{padding:11px 20px;font-size:14px}

/* story: text in the left 60%, bottle pinned in the right 40%. Text has no background. */
.story{position:relative;display:grid;grid-template-columns:60fr 40fr}
.copy{grid-column:1;grid-row:1;padding:0 clamp(24px,4vw,72px) 0 clamp(24px,7vw,120px);color:var(--fg)}
.chapter{min-height:100vh;display:flex;flex-direction:column;justify-content:center;gap:24px;padding:110px 0 60px;max-width:620px}
.kicker{font-weight:600;font-size:15px;color:var(--fg-2)}
.lede{font-size:clamp(18px,1.45vw,21px);max-width:34ch}
.actions{display:flex;align-items:center;gap:26px;flex-wrap:wrap}
.pin{grid-column:2;grid-row:1;position:sticky;top:0;height:100vh;overflow:hidden}
#bottle{position:absolute;inset:0;width:100%;height:100%}
.pin-fallback{position:absolute;left:0;right:0;top:calc(var(--frame-top) + 100% * var(--frame-offset));width:100%;height:calc(100% * var(--frame-area) - var(--frame-top));object-fit:contain;object-position:top}
.scroll-cue{position:absolute;left:clamp(24px,7vw,120px);bottom:28px;font-size:13px;color:var(--ink-2);display:flex;align-items:center;gap:10px;z-index:2}
.scroll-cue::before{content:"";width:1px;height:28px;background:currentColor;opacity:.6}
.copy .muted,.note,.fine{color:var(--fg-2)}

/* supplement facts */
.facts{width:100%;border-collapse:collapse;font-size:16px}
.facts th,.facts td{padding:15px 0;border-top:1px solid var(--fg-line);text-align:left;vertical-align:top}
.facts thead th{font-weight:500;font-size:13px;color:var(--fg-2);border-top:0;padding-top:0}
.facts .num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.facts tbody th{font-weight:700}
.facts tbody th span{display:block;font-weight:400;color:var(--fg-2);font-size:14px}
.facts tbody tr:last-child>*{border-bottom:1px solid var(--fg-line)}
.panel{display:flex;flex-direction:column;gap:24px}
.note{font-size:15px;max-width:44ch}
.note-sm{font-size:14px}

.benefits{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.benefits li{padding:18px 0;border-top:2px solid var(--fg-rule);display:flex;flex-direction:column;gap:6px}
.fine{font-size:13px;line-height:1.5;max-width:60ch}

.uses{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.uses li{padding:16px 0;border-top:1px solid var(--fg-line);display:flex;flex-direction:column;gap:2px}
.uses li:last-child{border-bottom:1px solid var(--fg-line)}
.uses strong{font-stretch:110%;font-size:18px}

/* shop */
.dark{background:#000;color:var(--bone)}
.dark .muted{color:var(--mist)}
.shop{padding:clamp(88px,11vw,150px) var(--pad)}
.shop-in{max-width:1180px;margin:0 auto}
.shop-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:clamp(20px,3vw,40px);margin-top:clamp(36px,5vw,60px)}
.card{background:var(--stone);color:#000;border-radius:var(--radius);display:grid;grid-template-columns:.85fr 1.15fr;overflow:hidden}
.card-media{background:#fff;display:flex;align-items:center;justify-content:center;padding:24px;min-height:360px}
.card-media img{width:100%;max-width:340px;height:auto;object-fit:contain}
.card-body{padding:clamp(24px,3vw,40px);display:flex;flex-direction:column;gap:12px;justify-content:center}
.card-title{font-size:28px}
.card-body .size{font-weight:600;color:var(--ink-2)}
.card .muted{color:var(--ink-2)}
.card-body .btn{align-self:flex-start;margin-top:10px}
.next{border:1px solid var(--line-dark);border-radius:var(--radius);padding:clamp(24px,3vw,40px);display:flex;flex-direction:column;justify-content:flex-end;gap:10px}

/* footer */
footer{padding:clamp(56px,7vw,96px) var(--pad) 36px;border-top:1px solid rgba(201,162,74,.45)}
.foot{max-width:1180px;margin:0 auto}
.foot-grid{display:grid;grid-template-columns:1.4fr 1fr 1fr 1fr;gap:36px}
.foot-h{margin:0 0 12px;font-size:14px;font-weight:700;font-stretch:110%;letter-spacing:0;line-height:1.4}
.foot ul{overflow-wrap:anywhere;list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px;font-size:15px;color:var(--mist)}
.foot ul a{text-decoration:none}
.foot ul a:hover{color:var(--bone);text-decoration:underline;text-underline-offset:4px}
.tag{color:var(--mist);margin-top:10px}
.disclaimer{margin-top:52px;border:1px solid rgba(236,232,226,.4);padding:16px 18px;font-size:13px;line-height:1.5;max-width:640px}
.legal{margin-top:26px;display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap;font-size:13px;color:var(--mist)}
.legal a{color:inherit}

/* simple text pages (privacy, 404) */
.page{min-height:100vh;padding:calc(var(--nav-h) + 48px) var(--pad) 80px}
.page-in{max-width:720px;margin:0 auto;display:flex;flex-direction:column;gap:18px}
.page h1{font-size:clamp(40px,6vw,72px);font-stretch:112%;margin-bottom:12px}
.page h2{font-size:24px;margin-top:18px}
.page .actions{margin-top:12px}

@media (max-width:900px){
  :root{
    --layout:phone;
    --frame-top:0px;
    --frame-area:.75;     /* phones: a little larger than before */
    --frame-offset:.10;   /* and lower, so it sits near the middle of the screen */
    --nav-h:64px;
  }
  .nav ul li:not(:last-child){display:none}
  .mark{font-size:18px}
  .story{grid-template-columns:1fr;isolation:isolate}  /* isolation: Safari needs the canvas and blended text in one group */
  .pin{grid-column:1;grid-row:1;top:0;height:100svh;transform:translateZ(0)}
  .copy{
    grid-column:1;grid-row:1;position:relative;padding:0 var(--pad);
    /* text inverts against what is behind it: dark on the backdrop, light on the black bottle */
    --fg:#fff;--fg-2:#fff;--fg-line:rgba(255,255,255,.45);--fg-rule:#fff;
  }
  .copy .panel > :not(.actions), .copy .actions .link{mix-blend-mode:difference;transform:translateZ(0)}
  .chapter{min-height:100svh;max-width:none;justify-content:flex-end;padding:0 0 5svh;gap:14px}
  .panel{gap:16px}
  .chapter h1{font-size:clamp(42px,12vw,64px)}
  .scroll-cue{display:none}
  .fine,.disclaimer,.legal{font-size:14px}
  .shop-grid,.card{grid-template-columns:1fr}
  .foot-grid{grid-template-columns:1fr;gap:28px}
}
