/* ============================================================
   That's it. — design system
   Signature: the red square period. White packaging world,
   ink logo box, per-fruit color floods driven by scroll.
   ============================================================ */

@font-face { font-family: 'Bricolage'; src: url('../assets/fonts/bricolage-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Bricolage'; src: url('../assets/fonts/bricolage-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Sora'; src: url('../assets/fonts/sora-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Sora'; src: url('../assets/fonts/sora-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root {
  --paper: #FFFDF8;
  --ink: #111111;
  --red: #E8332A;
  --grey: #6E6A64;
  --line: rgba(17, 17, 17, 0.12);
  --display: 'Bricolage', 'Arial Black', sans-serif;
  --body: 'Sora', 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --wrap: min(92vw, 1800px);
  --r: 20px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.6s ease;
}

::selection { background: var(--red); color: #fff; }
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---------- the period, as a system ---------- */
.dot-square {
  display: inline-block;
  width: 0.16em; height: 0.16em;
  background: var(--red);
  margin-left: 0.08em;
  vertical-align: baseline;
  flex: none;
}
.dot-pulse { animation: dotpulse 1.6s ease-in-out infinite; }
@keyframes dotpulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.7); } }

/* ---------- type ---------- */
.display {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.6rem, 7.2vw, 7.2rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.display .dot-square { width: 0.14em; height: 0.14em; }
.display-light { color: #fff; }
.display-dark { color: var(--ink); }
.h2 {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 4.4vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin-bottom: 0.6em;
}
.eyebrow {
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  display: flex;
  align-items: center;
  gap: 0.6em;
  margin-bottom: 1.2em;
}
.eyebrow::before { content: ''; width: 8px; height: 8px; background: var(--red); flex: none; }
.eyebrow-light { color: #fff; }
.body-lg { font-size: 1.08rem; color: var(--grey); max-width: 46ch; margin-bottom: 1.6em; }
.fineprint { font-size: 0.72rem; color: rgba(255,255,255,0.45); margin-top: 1.4em; }
.center { text-align: center; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.95em 1.9em;
  border-radius: 999px;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.25s ease, color 0.25s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px) scale(1.03); }
.btn:active { transform: translateY(0) scale(0.99); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: #c9241c; }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #000; }
.btn-ghost { border-color: currentColor; background: transparent; }

/* ---------- logo ---------- */
.logo { text-decoration: none; }
.logo-box {
  display: inline-flex;
  align-items: baseline;
  background: var(--ink);
  color: #fff;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1;
  padding: 0.5em 0.7em 0.55em;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.logo-dot { display: inline-block; width: 0.18em; height: 0.18em; background: var(--red); margin-left: 0.12em; }
.logo-box-lg { font-size: 2rem; }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 2.2rem;
  padding: 1rem clamp(1.2rem, 4vw, 3rem);
  transition: background 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
}
.nav.scrolled { background: rgba(255, 253, 248, 0.92); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); padding-top: 0.6rem; padding-bottom: 0.6rem; }
.nav-links { display: flex; gap: 1.8rem; margin-left: auto; }
.nav-links a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  position: relative;
  padding-bottom: 2px;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 2px; background: var(--red);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.65, 0, 0.35, 1);
}
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); transform-origin: left; }
.nav.over-hero:not(.scrolled) .nav-links a { color: #fff; }
.nav-cta { flex: none; }
.nav-burger { display: none; }

/* ---------- hero ---------- */
.hero { height: 380vh; position: relative; }
.hero-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; background: #C8102E; }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.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;
}
.hero-cue {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 0.6em;
  color: #fff; font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.25em;
}
.hero-cue .dot-square { width: 9px; height: 9px; margin: 0; }

/* ---------- ticker ---------- */
.ticker { background: var(--ink); color: #fff; overflow: hidden; padding: 1.1rem 0; position: relative; z-index: 2; }
.ticker-track {
  display: flex; align-items: center; gap: 2.4rem;
  width: max-content;
  font-family: var(--display); font-weight: 700;
  font-size: 1.05rem; white-space: nowrap;
}
.ticker-track .dot-square { width: 9px; height: 9px; margin: 0; }

/* ---------- sections ---------- */
.section { padding: clamp(4.5rem, 9vw, 8rem) 0; position: relative; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(1.2rem, 4vw, 3rem); }

/* ---------- best sellers ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.2rem; margin-top: 2.4rem; }
.pcard {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.4rem 1.4rem 1.6rem;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
}
.pcard:hover { transform: translateY(-6px); box-shadow: 0 24px 48px -24px rgba(17, 17, 17, 0.25); }
.pcard::before {
  content: ''; position: absolute; inset: 0;
  background: var(--accent, var(--red));
  transform: translateY(101%);
  transition: transform 0.45s cubic-bezier(0.65, 0, 0.35, 1);
}
.pcard:hover::before { transform: translateY(0); }
.pcard > * { position: relative; }
.pcard-img { aspect-ratio: 1; object-fit: contain; margin-bottom: 1rem; transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }
.pcard:hover .pcard-img { transform: scale(1.06) rotate(-2deg); }
.pcard-title { font-family: var(--display); font-weight: 700; font-size: 1.02rem; line-height: 1.15; transition: color 0.3s ease; }
.pcard-line { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.16em; color: var(--grey); margin-bottom: 0.4rem; transition: color 0.3s ease; }
.pcard:hover .pcard-title, .pcard:hover .pcard-line { color: #fff; }

/* ---------- lines: diagonal card marquee ---------- */
.lines { position: relative; }
.lines-sticky {
  position: sticky; top: 0; height: 100vh;
  overflow: clip;
  display: flex; align-items: center;
}
.lines-track {
  display: flex; flex: none; align-items: center;
  gap: 7vw;
  padding-left: 112vw; padding-right: 16vw;
  will-change: transform;
}
.line-card {
  position: relative;
  flex: none;
  width: clamp(340px, 30vw, 560px);
  aspect-ratio: 3 / 4;
  background: #fff;
  border-radius: var(--r);
  text-decoration: none;
  color: var(--ink);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  will-change: transform;
}
.line-card:hover { box-shadow: 0 60px 110px -40px rgba(0, 0, 0, 0.45); }
.line-card img {
  position: absolute; inset: 6% 6% 22% 6%;
  width: 88%; height: 72%;
  object-fit: contain;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.line-card:hover img { transform: scale(1.05) rotate(-1.5deg); }
.line-card-label {
  position: absolute; left: 1.4rem; bottom: 1.3rem; right: 4.5rem;
}
.line-card-label strong {
  display: block;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.3rem, 1.7vw, 2rem); line-height: 1.02;
  letter-spacing: -0.01em;
}
.line-card-label strong .dot-square { width: 0.18em; height: 0.18em; }
.line-card-label span {
  display: block;
  font-size: 0.8rem; font-weight: 600; color: var(--grey);
  margin-top: 0.35rem;
}
.line-card-plus {
  position: absolute; right: 1.2rem; bottom: 1.2rem;
  width: 2.6rem; height: 2.6rem;
  border: 1.5px solid var(--ink); border-radius: 50%;
  display: grid; place-items: center;
  font-size: 1.4rem; font-weight: 400; line-height: 1;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease, color 0.3s ease;
}
.line-card:hover .line-card-plus { transform: rotate(90deg); background: var(--ink); color: #fff; }
.lines-progress {
  position: absolute; bottom: 2.2rem; left: 50%; transform: translateX(-50%);
  display: flex; gap: 0.55rem;
}
.lines-progress span { width: 9px; height: 9px; background: rgba(255, 255, 255, 0.35); transition: background 0.3s, transform 0.3s; }
.lines-progress span.on { background: #fff; transform: scale(1.35); }
/* mobile + reduced motion: plain vertical stack, no marquee */
@media (max-width: 960px) {
  .lines-sticky { position: static; height: auto; display: block; overflow: visible; }
  .lines-track { flex-direction: column; gap: 1.4rem; padding: 3.5rem clamp(1.2rem, 4vw, 3rem); }
  .line-card { width: 100%; max-width: 560px; margin: 0 auto; aspect-ratio: 4 / 5; }
  .lines-progress { display: none; }
}

/* ---------- math / pillars ---------- */
.math { color: #fff; }
.math-eq { display: flex; flex-direction: column; margin-bottom: 1.6rem; }
.eq-line { display: block; }
.eq-result { color: var(--red); -webkit-text-stroke: 0; }
.math .eq-result { color: #FF6A5E; }
.math-note { max-width: 52ch; color: rgba(255, 255, 255, 0.72); margin-bottom: 3rem; }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; list-style: none; }
.pillar {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--r);
  padding: 1.5rem 1.3rem;
  display: flex; flex-direction: column; gap: 0.35rem;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.pillar:hover { border-color: var(--red); transform: translateY(-4px); }
.pillar strong { font-family: var(--display); font-weight: 700; font-size: 1.12rem; }
.pillar span { font-size: 0.85rem; color: rgba(255, 255, 255, 0.6); }

/* ---------- story ---------- */
.story-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.story-stat {
  border: 2px solid var(--ink);
  border-radius: var(--r);
  padding: 2.6rem 2.2rem;
  text-align: center;
  background: #fff;
  transform: rotate(2deg);
}
.stat-num { font-family: var(--display); font-weight: 800; font-size: clamp(4rem, 8vw, 7rem); line-height: 1; display: block; }
.stat-num::after { content: 'M'; color: var(--red); }
.stat-label { font-size: 0.92rem; color: var(--grey); }

/* ---------- flavor films (per-fruit scrub + scroll stops) ---------- */
.flavors { position: relative; }
.flavors-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; background: var(--ink); }
.flavors-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.flavors-ui { position: absolute; inset: 0; pointer-events: none; }
.flavor-cta {
  position: absolute; left: 50%; bottom: 12vh; transform: translateX(-50%);
  opacity: 0; visibility: hidden;
  pointer-events: auto;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.4);
}
@media (max-width: 960px) {
  .flavors-mobile { display: flex; flex-direction: column; }
  .flavors-mobile figure { position: relative; margin: 0; }
  .flavors-mobile img { width: 100%; display: block; aspect-ratio: 16 / 9; object-fit: cover; background: #111; }
  .flavors-mobile .btn { position: absolute; left: 50%; bottom: 1.4rem; transform: translateX(-50%); white-space: nowrap; }
}

/* ---------- retailers ---------- */
.retailer-marquee { overflow: hidden; margin: 2.5rem 0 3rem; border-top: 1px solid rgba(255, 255, 255, 0.16); border-bottom: 1px solid rgba(255, 255, 255, 0.16); padding: 1.6rem 0; }
.retailer-track {
  display: flex; align-items: center; gap: 3rem;
  width: max-content;
  font-family: var(--display); font-weight: 800;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  white-space: nowrap;
  color: #fff;
}
.retailer-track .dot-square { width: 0.32em; height: 0.32em; margin: 0; }

/* ---------- footer ---------- */
.footer { background: var(--ink); color: #fff; padding: 4.5rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 3.5rem; }
.footer-tag { margin-top: 1.2rem; color: rgba(255, 255, 255, 0.55); font-size: 0.92rem; }
.footer-col { display: flex; flex-direction: column; gap: 0.55rem; }
.footer-col h3 { font-family: var(--body); font-weight: 600; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.2em; color: rgba(255, 255, 255, 0.45); margin-bottom: 0.5rem; }
.footer-col a { text-decoration: none; font-size: 0.92rem; color: rgba(255, 255, 255, 0.85); }
.footer-col a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 4px; }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 1.6rem; font-size: 0.78rem; color: rgba(255, 255, 255, 0.4); }

/* ---------- fruit ninja canvas ---------- */
.fruit-canvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 90;
  pointer-events: none;
  transform: translateZ(0); /* own compositing layer: never sinks behind transformed sections */
}

/* ---------- reveal utility ---------- */
.reveal { opacity: 0; transform: translateY(28px); }

/* ---------- interior pages ---------- */
.page-head { padding: clamp(8rem, 14vw, 11rem) 0 clamp(2.5rem, 5vw, 4rem); }
.page-head .display { font-size: clamp(2.6rem, 6vw, 5rem); }
.filter-chips { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.8rem 0 2.4rem; }
.chip {
  font-family: var(--body); font-weight: 600; font-size: 0.82rem;
  padding: 0.55em 1.3em; border-radius: 999px;
  border: 1.5px solid var(--line); background: transparent; color: var(--ink);
  cursor: pointer; transition: all 0.25s ease;
}
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.2rem; padding-bottom: 6rem; }

.line-hero { padding: clamp(8rem, 14vw, 11rem) 0 clamp(3rem, 6vw, 5rem); color: #fff; }
.product-hero { padding-bottom: clamp(4rem, 7vw, 6rem); }
.product-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.product-media { background: #fff; border-radius: var(--r); padding: clamp(1.5rem, 3vw, 3rem); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.35); }
.product-media img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.product-hero .display { font-size: clamp(2.4rem, 5vw, 4.6rem); }
.product-price { font-family: var(--display); font-weight: 800; font-size: 1.6rem; margin-top: 1rem; }
.product-ctas { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.8rem; }
@media (max-width: 960px) { .product-grid { grid-template-columns: 1fr; } }
.line-hero .display { font-size: clamp(2.8rem, 7vw, 6rem); }
.line-hero .tagline { font-size: 1.2rem; font-weight: 600; margin-top: 1rem; }
.line-hero .claim { opacity: 0.85; max-width: 52ch; margin-top: 0.5rem; }

.prose { max-width: 62ch; }
.prose p { margin-bottom: 1.2em; color: #3d3a36; font-size: 1.05rem; }
.prose .lede { font-size: 1.3rem; line-height: 1.5; color: var(--ink); }

.form { display: grid; gap: 1rem; max-width: 540px; }
.form label { font-weight: 600; font-size: 0.85rem; display: grid; gap: 0.4rem; }
.form input, .form textarea, .form select {
  font-family: var(--body); font-size: 0.95rem;
  padding: 0.85em 1em; border: 1.5px solid var(--line); border-radius: 12px;
  background: #fff; transition: border-color 0.25s ease;
}
.form input:focus, .form textarea:focus, .form select:focus { outline: none; border-color: var(--red); }

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .card-grid, .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .story-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav-links {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; justify-content: center; align-items: center; gap: 2rem;
    background: var(--paper);
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
  }
  .nav-links a { font-size: 1.4rem; font-family: var(--display); font-weight: 700; color: var(--ink) !important; }
  .nav.menu-open .nav-links { opacity: 1; pointer-events: auto; z-index: 99; }
  .nav-cta { display: none; }
  .nav-burger {
    display: flex; flex-direction: column; gap: 5px;
    margin-left: auto; background: none; border: none; cursor: pointer; padding: 6px;
  }
  .nav-burger span { width: 24px; height: 2.5px; background: currentColor; transition: transform 0.3s, opacity 0.3s; }
  .nav.over-hero:not(.scrolled):not(.menu-open) .nav-burger { color: #fff; }
  .nav.menu-open .nav-burger span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav.menu-open .nav-burger span:nth-child(2) { opacity: 0; }
  .nav.menu-open .nav-burger span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  .hero { height: 300vh; }
  .film { height: 240vh; }
  .card-grid { grid-template-columns: 1fr 1fr; gap: 0.8rem; }
  .pcard { padding: 1rem 1rem 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .dot-pulse { animation: none; }
  .reveal { opacity: 1; transform: none; }
  .fruit-canvas { display: none; }
}
