/* ============================================================================
   FLOE — Premium sugar-free mints. Single-page experiential site.
   Design system + layout. Brand: retro-modern, "quiet luxury", Olipop-energy.
   ========================================================================== */

@font-face {
  font-family: 'Hanken Grotesk';
  src: url('../fonts/hanken-var-latin.woff2') format('woff2');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---- Brand palette (from Floe guidelines §4.1) ---- */
  --frost:      #F9F4E8;
  --sandy:      #F4E9D3;
  --cool:       #8FC4D6;
  --iceberg:    #6CABBC;
  --ink:        #0B0B0C;
  --watermelon: #CE0B22;
  --mint:       #28704E;
  --lemon:      #F29B00;
  --rose:       #DD4B75;

  /* ---- Semantic ---- */
  --bg:      var(--frost);
  --fg:      var(--ink);
  --accent:  var(--watermelon);
  --stage:   var(--frost);        /* JS animates this to match the WebGL clear colour */

  /* ---- Type ---- */
  --sans: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* ---- Rhythm ---- */
  --gutter: clamp(20px, 5vw, 84px);
  --maxw: 1600px;
  --radius: 26px;

  --ease-out: cubic-bezier(.16,1,.3,1);
  --ease-in-out: cubic-bezier(.76,0,.24,1);
}

/* ---------- reset ---------- */
*,*::before,*::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  font-weight: 500;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img,svg,canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
::selection { background: var(--accent); color: var(--frost); }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }

/* ---------- typography ---------- */
.display {
  font-weight: 900;
  text-transform: uppercase;
  line-height: .9;
  letter-spacing: -.025em;
  font-size: clamp(2.3rem, 6.6vw, 6.2rem);
}
.h1 { font-weight: 900; text-transform: uppercase; line-height: .95; letter-spacing: -.02em;
      font-size: clamp(2.4rem, 6.6vw, 6rem); }
.h2 { font-weight: 900; text-transform: uppercase; line-height: .96; letter-spacing: -.015em;
      font-size: clamp(2rem, 5vw, 4.4rem); }
.h3 { font-weight: 800; line-height: 1.05; letter-spacing: -.01em;
      font-size: clamp(1.3rem, 2.4vw, 2rem); }
.eyebrow { font-weight: 800; text-transform: uppercase; letter-spacing: .16em;
           font-size: clamp(.7rem, .9vw, .82rem); }
.lead { font-weight: 600; font-size: clamp(1.05rem, 1.7vw, 1.5rem); line-height: 1.5; }
.body { font-weight: 500; font-size: clamp(1rem, 1.2vw, 1.15rem); line-height: 1.6; }
.small { font-size: .82rem; font-weight: 600; letter-spacing: .02em; }

/* ---------- layout helpers ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; z-index: 2; }
.pad { padding-block: clamp(80px, 12vh, 180px); }

/* ============================================================================
   WORDMARK / MONOGRAM (recoloured via CSS mask so one asset = any colour)
   ========================================================================== */
.wordmark {
  display: inline-block;
  background-color: currentColor;
  -webkit-mask: url('../assets/floe_wordmark.svg') no-repeat center / contain;
          mask: url('../assets/floe_wordmark.svg') no-repeat center / contain;
  aspect-ratio: 3448 / 1545;
}
.monogram {
  display: inline-block;
  background-color: currentColor;
  -webkit-mask: url('../assets/floe_monogram.svg') no-repeat center / contain;
          mask: url('../assets/floe_monogram.svg') no-repeat center / contain;
  aspect-ratio: 838 / 749;
}

/* ============================================================================
   FLOE FRAME — the signature concave-bottom "tab" (double outline).
   The SVG path is injected by JS; these are the styling hooks.
   ========================================================================== */
.frame { position: relative; isolation: isolate; }
.frame > svg.frame-svg { position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: -1; overflow: visible; }
.frame > .frame-content { position: relative; z-index: 1; }

/* chip / eyebrow tab */
.tab {
  position: relative; display: inline-flex; align-items: center; gap: .55em;
  padding: .7em 1.3em 1.05em; color: var(--fg);
}
.tab .eyebrow { position: relative; z-index: 1; }

/* ============================================================================
   BUTTONS
   ========================================================================== */
.btn {
  --b: var(--ink); --t: var(--frost);
  position: relative; display: inline-flex; align-items: center; gap: .6em;
  padding: 1.05em 1.6em; border-radius: 100px; background: var(--b); color: var(--t);
  font-weight: 800; letter-spacing: .01em; font-size: .95rem;
  overflow: hidden; will-change: transform; transition: transform .5s var(--ease-out);
}
.btn span { position: relative; z-index: 1; transition: color .45s var(--ease-out); }
.btn::after {
  content:""; position: absolute; inset: 0; border-radius: inherit;
  background: var(--accent); transform: translateY(101%); border-radius: 50% 50% 0 0/22% 22% 0 0;
  transition: transform .55s var(--ease-out);
}
.btn:hover::after { transform: translateY(0); border-radius: 0; }
.btn:hover span { color: var(--frost); }
.btn--ghost { --b: transparent; --t: var(--fg); box-shadow: inset 0 0 0 2px currentColor; }
.btn--ghost span { mix-blend-mode: normal; }
.btn .arrow { width: .9em; height: .9em; }

/* ============================================================================
   CUSTOM CURSOR + floating shapes
   ========================================================================== */
.cursor {
  position: fixed; top: 0; left: 0; width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); pointer-events: none; z-index: 9999; mix-blend-mode: multiply;
  transform: translate(-50%,-50%); transition: width .3s var(--ease-out), height .3s var(--ease-out),
    background .4s; will-change: transform;
}
.cursor.is-hover { width: 58px; height: 58px; background: color-mix(in srgb, var(--accent) 22%, transparent); }
@media (hover: none) { .cursor { display: none; } }

.floaty { position: absolute; pointer-events: none; z-index: 1; will-change: transform; }

/* ============================================================================
   PRELOADER
   ========================================================================== */
#preloader {
  position: fixed; inset: 0; z-index: 10000; background: var(--frost);
  display: grid; place-items: center; gap: 26px;
}
#preloader .pl-mark { width: min(42vw, 320px); color: var(--ink); }
#preloader .pl-bar { width: min(42vw,320px); height: 3px; background: color-mix(in srgb, var(--ink) 12%, transparent);
  border-radius: 3px; overflow: hidden; }
#preloader .pl-bar i { display:block; height:100%; width:0%; background: var(--watermelon); }
#preloader .pl-num { font-weight: 800; letter-spacing:.1em; font-size:.8rem; color: color-mix(in srgb,var(--ink) 55%, transparent); }

/* ============================================================================
   NAV
   ========================================================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(14px,2vh,26px) var(--gutter);
  mix-blend-mode: normal; transition: transform .5s var(--ease-out);
}
.nav { color: var(--ink); transition: transform .5s var(--ease-out), color .45s ease; }
.nav.on-dark { color: var(--frost); }
.nav .brand { width: 96px; color: inherit; }
.nav .nav-links a { color: inherit; }
.nav .nav-links { display: flex; gap: clamp(14px,2vw,38px); align-items: center; }
.nav .nav-links a { font-weight: 800; font-size: .82rem; letter-spacing: .04em; text-transform: uppercase;
  position: relative; padding: 4px 0; }
.nav .nav-links a::after { content:""; position:absolute; left:0; bottom:0; height:2px; width:0;
  background: currentColor; transition: width .4s var(--ease-out); }
.nav .nav-links a:hover::after { width: 100%; }
.nav .nav-cta { display: inline-flex; }
.nav-burger { display: none; width: 44px; height: 44px; border-radius: 50%;
  align-items:center; justify-content:center; box-shadow: inset 0 0 0 2px currentColor; }
.nav-burger i { display:block; width:18px; height:2px; background: currentColor; position: relative; }
.nav-burger i::before,.nav-burger i::after{content:"";position:absolute;left:0;width:18px;height:2px;background:currentColor;}
.nav-burger i::before{top:-6px;} .nav-burger i::after{top:6px;}

.nav.hide { transform: translateY(-140%); }

/* mobile menu overlay */
.menu {
  position: fixed; inset: 0; z-index: 290; background: var(--ink); color: var(--frost);
  display: grid; place-content: center; gap: 8px; text-align: center;
  clip-path: circle(0% at calc(100% - 46px) 40px); transition: clip-path .7s var(--ease-in-out);
}
.menu.open { clip-path: circle(150% at calc(100% - 46px) 40px); }
.menu a { font-weight: 900; text-transform: uppercase; font-size: clamp(2rem,9vw,3.4rem); line-height: 1; letter-spacing:-.02em; }
.menu a:hover { color: var(--cool); }

/* ============================================================================
   WEBGL STAGE (fixed, behind content). Revealed by transparent sections.
   ========================================================================== */
#stage {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: var(--stage); transition: none;
}
#stage canvas { width: 100% !important; height: 100% !important; }
#stage.grab { pointer-events: auto; cursor: grab; }
#stage.grab:active { cursor: grabbing; }
#stage::after { content:""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(135% 100% at 50% 36%, transparent 50%, rgba(0,0,0,.17) 100%); }
.no-webgl #stage { display: none; }

/* ============================================================================
   HERO
   ========================================================================== */
#hero { min-height: 100svh; display: flex; align-items: center; background: transparent;
  padding-top: clamp(92px, 12vh, 140px); padding-bottom: clamp(24px, 5vh, 60px); }
#hero .hero-grid {
  display: grid; grid-template-columns: 1.02fr .98fr; align-items: center; gap: 30px;
  width: 100%;
}
#hero .hero-copy { position: relative; z-index: 3; padding-right: clamp(0px, 3vw, 50px); }
#hero .hero-tag { margin-bottom: 24px; }
#hero h1 { margin: 0 0 20px; }
#hero h1 .ln { display: block; overflow: hidden; }
#hero h1 .ln > span { display: inline-block; will-change: transform; }
#hero .hero-sub { max-width: 30ch; margin-bottom: 24px; color: color-mix(in srgb, var(--ink) 82%, transparent); }
#hero .hero-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
#hero .hero-stage-hole { position: relative; min-height: 60svh; } /* the visual seat of the 3D tin */

/* flavour dots (hero + flavours) */
.flav-dots { display: inline-flex; gap: 10px; align-items: center; }
.flav-dots button { width: 15px; height: 15px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--ink);
  transition: transform .3s var(--ease-out); }
.flav-dots button[data-flav="0"]{ background: var(--watermelon); }
.flav-dots button[data-flav="1"]{ background: var(--mint); }
.flav-dots button[data-flav="2"]{ background: var(--lemon); }
.flav-dots button[data-flav="3"]{ background: var(--rose); }
.flav-dots button.on { transform: scale(1.5); }

.scrollcue { position: absolute; left: var(--gutter); bottom: 26px; display: flex; align-items: center; gap: 10px;
  font-weight: 800; letter-spacing:.14em; text-transform: uppercase; font-size:.68rem; z-index: 3; }
.scrollcue .line { width: 44px; height: 2px; background: currentColor; overflow: hidden; position: relative; }
.scrollcue .line::after{content:"";position:absolute;inset:0;background:var(--frost);animation:cue 1.8s var(--ease-in-out) infinite;}
@keyframes cue{0%{transform:translateX(-100%)}60%,100%{transform:translateX(100%)}}

/* ============================================================================
   MARQUEE
   ========================================================================== */
.marquee { background: var(--ink); color: var(--frost); overflow: hidden; padding: 22px 0;
  position: relative; z-index: 2; }
.marquee .track { display: flex; gap: 0; width: max-content; will-change: transform; }
.marquee .item { display: inline-flex; align-items: center; gap: 34px; padding-right: 34px;
  font-weight: 900; text-transform: uppercase; font-size: clamp(1.4rem,3vw,2.6rem); letter-spacing:-.01em; white-space: nowrap; }
.marquee .item .star { color: var(--watermelon); }

/* ============================================================================
   STORY
   ========================================================================== */
#story { background: var(--frost); }
.story-lead { max-width: 18ch; }
.story-body { max-width: 46ch; margin-top: 28px; }
.reveal-words span { display: inline-block; will-change: transform, opacity; }

.story-figs { display: grid; grid-template-columns: repeat(12,1fr); gap: 20px; margin-top: clamp(50px,8vh,110px); }
.story-figs .fig { position: relative; overflow: visible; will-change: transform; }
.story-figs .fig img { width: 100%; height: 100%; object-fit: cover; }
.story-figs .fig--a { grid-column: 1 / 6; aspect-ratio: 4/5; transform: translateY(0); }
.story-figs .fig--b { grid-column: 7 / 13; aspect-ratio: 16/12; align-self: end; }

/* Outlined image crop (Floe rounded-rectangle device §6.2) */
.crop { position: relative; border-radius: 22px; overflow: hidden;
  box-shadow: 0 0 0 3px var(--cool), 0 0 0 7px var(--frost), 0 0 0 10px var(--cool); }
.crop img { width:100%; height:100%; object-fit: cover; }
.crop--ink { box-shadow: 0 0 0 3px var(--ink), 0 0 0 7px var(--frost), 0 0 0 10px var(--ink); }

/* Floe FRAME image device (the signature concave shape as a photo container, §6.3).
   The concave clip-path + double packaging outline are built in JS. */
.frame-img { position: relative; overflow: visible; }
.frame-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.frame-img .frame-outline { position: absolute; inset: 0; width: 100%; height: 100%;
  overflow: visible; pointer-events: none; z-index: 2; }

/* placeholder art (until generated imagery drops in) */
.ph { position: relative; background: var(--sandy); display: grid; place-items: center; overflow: hidden; }
.ph[data-tone="cool"]{ background: var(--cool); } .ph[data-tone="mint"]{ background: var(--mint); }
.ph[data-tone="lemon"]{ background: var(--lemon); } .ph[data-tone="rose"]{ background: var(--rose); }
.ph[data-tone="melon"]{ background: var(--watermelon); }
.ph .ph-mark { width: 46%; opacity: .5; color: var(--frost); }

/* ============================================================================
   FLAVOURS (pinned colour-wash sequence around the choreographed 3D tin)
   ========================================================================== */
#flavours { position: relative; background: transparent; }
#flavours .flav-pin { height: 100svh; position: sticky; top: 0; display: grid;
  grid-template-columns: 1fr 1fr; align-items: center; }
#flavours .flav-txt { position: relative; z-index: 3; padding-left: var(--gutter); max-width: 620px; }
#flavours .flav-slide { position: absolute; left: var(--gutter); right: auto; top: 0; opacity: 0; max-width: min(46vw, 560px); }
#flavours .flav-num { font-weight: 900; font-size: .9rem; letter-spacing:.2em; opacity:.6; }
#flavours .flav-name { font-size: clamp(2.6rem, 6vw, 5.2rem); line-height: .92; }
#flavours .flav-desc { margin-top: 16px; max-width: 20ch; font-weight: 700; }
#flavours .flav-notes { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; }
#flavours .flav-notes span { border-radius: 100px; padding: .5em 1em; font-weight: 800; font-size:.76rem;
  text-transform: uppercase; letter-spacing:.06em; box-shadow: inset 0 0 0 2px currentColor; }
#flavours .flav-progress { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 14px; z-index: 3; }
#flavours .flav-progress button { width: 12px; height: 44px; border-radius: 100px;
  background: color-mix(in srgb, currentColor 25%, transparent); position: relative; overflow: hidden; }
#flavours .flav-progress button i { position:absolute; inset:0; background: currentColor; transform: scaleY(0);
  transform-origin: top; }

/* the flavours section themes text colour to contrast the wash */
#flavours .flav-pin { color: var(--frost); }

/* ============================================================================
   RITUAL / MOMENTS
   ========================================================================== */
#ritual { background: var(--sandy); overflow: hidden; }
.ritual-head { display: flex; justify-content: space-between; align-items: end; gap: 30px; flex-wrap: wrap; }
.ritual-gallery { display: grid; grid-template-columns: repeat(12,1fr); gap: clamp(16px,2vw,28px);
  margin-top: clamp(44px,7vh,90px); }
.ritual-gallery .m { position: relative; will-change: transform; }
.ritual-gallery .m .cap { margin-top: 12px; display:flex; justify-content: space-between; font-weight: 800;
  text-transform: uppercase; letter-spacing:.08em; font-size:.72rem; }
.ritual-gallery .m--1 { grid-column: 1/5; }
.ritual-gallery .m--2 { grid-column: 5/9; margin-top: clamp(40px,7vw,90px); }
.ritual-gallery .m--3 { grid-column: 9/13; }
.ritual-gallery .m .crop,
.ritual-gallery .m .frame-img { aspect-ratio: 3/4; }

/* ============================================================================
   WHY FLOE (benefit cards using Floe Frame)
   ========================================================================== */
#why { background: var(--cool); color: var(--ink); }
.why-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: clamp(16px,1.6vw,26px); margin-top: 56px; }
.why-card { position: relative; padding: 34px 28px 46px; color: var(--ink); min-height: 300px;
  display: flex; flex-direction: column; justify-content: space-between; }
.why-card .why-ico { width: 46px; height: 46px; color: var(--watermelon); }
.why-card h3 { margin-top: auto; }
.why-card p { margin-top: 10px; font-weight: 600; font-size: .96rem; color: color-mix(in srgb,var(--ink) 78%,transparent); }
.why-card .why-idx { position: absolute; top: 26px; right: 28px; font-weight: 900; opacity:.35; }

/* ============================================================================
   FIND FLOE (where to buy + signup)
   ========================================================================== */
#find { background: var(--frost); }
.find-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(30px,5vw,80px); align-items: start; }
.stockists { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.stockists .chip { padding: .8em 1.2em; border-radius: 100px; font-weight: 800; box-shadow: inset 0 0 0 2px var(--ink);
  display: inline-flex; align-items: center; gap: .5em; transition: background .35s, color .35s, transform .35s var(--ease-out); }
.stockists .chip:hover { background: var(--ink); color: var(--frost); transform: translateY(-3px); }
.signup { position: relative; padding: 40px 34px 52px; color: var(--ink); }
.signup h3 { margin-bottom: 8px; }
.signup .field { display: flex; gap: 10px; margin-top: 22px; background: var(--frost); border-radius: 100px;
  padding: 7px 7px 7px 20px; box-shadow: inset 0 0 0 2px var(--ink); }
.signup input { flex: 1; border: none; background: none; outline: none; font: inherit; font-weight: 600; }
.signup .note { margin-top: 14px; font-size: .78rem; font-weight: 600; opacity: .7; }

/* ============================================================================
   FOOTER
   ========================================================================== */
#footer { background: var(--ink); color: var(--frost); padding-top: clamp(60px,10vh,120px); }
#footer .foot-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
#footer .foot-links { display: flex; gap: clamp(30px,5vw,90px); flex-wrap: wrap; }
#footer .foot-col h4 { text-transform: uppercase; letter-spacing:.12em; font-size:.72rem; opacity:.6; margin-bottom: 14px; }
#footer .foot-col a { display: block; font-weight: 700; padding: 5px 0; opacity:.9; }
#footer .foot-col a:hover { color: var(--cool); }
#footer .foot-mark { color: var(--frost); width: 100%; margin-top: clamp(40px,8vh,90px); opacity:.98; }
#footer .foot-base { display:flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 30px 0; margin-top: 20px; border-top: 1px solid color-mix(in srgb,var(--frost) 18%, transparent);
  font-size:.78rem; font-weight:600; opacity:.7; }

/* ============================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  #hero .hero-grid { grid-template-columns: 1fr; }
  #hero .hero-stage-hole { order: -1; min-height: 52svh; }
  /* flavours: tin sits up top, flavour text pinned to the bottom */
  #flavours .flav-pin { display: block; }
  #flavours .flav-txt { position: absolute; left: 0; right: 0; bottom: 9vh; max-width: none; padding-right: var(--gutter); }
  #flavours .flav-slide { top: auto; bottom: 0; right: var(--gutter); max-width: none; }
  #flavours .flav-name { font-size: clamp(2.6rem, 13vw, 4.2rem); }
  #flavours .flav-desc { max-width: 30ch; }
  #flavours .flav-progress { right: 14px; }
  .why-grid { grid-template-columns: repeat(2,1fr); }
  .find-grid { grid-template-columns: 1fr; }
  .story-figs .fig--a { grid-column: 1/8; } .story-figs .fig--b { grid-column: 6/13; }
}
@media (max-width: 720px) {
  .nav .nav-links, .nav .nav-cta { display: none; }
  .nav-burger { display: inline-flex; }
  .why-grid { grid-template-columns: 1fr; }
  .ritual-gallery .m--1,.ritual-gallery .m--2,.ritual-gallery .m--3 { grid-column: 1/13; margin-top: 0; }
  .cursor { display: none; }
  #hero .floaty { display: none; }
  .ritual-gallery { gap: 40px; }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation-duration:.001ms !important; transition-duration:.001ms !important; }
}
