/* COLIBRI landing — page layout. Values come from tokens.css; type sizes follow the brand scale only. */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

/* nothing may push the page sideways on a phone; clip (not hidden) keeps the sticky header working */
html, body { max-width: 100%; overflow-x: clip; }

h1, h2, h3, h4, p, li, summary { overflow-wrap: break-word; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--teal-text); }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

h1, h2, h3, h4, p { margin: 0; }

/* type scale */
h1 { font-size: 40px; line-height: 46px; font-weight: 600; letter-spacing: .02em; }
h2, .h2 { font-size: 28px; line-height: 34px; font-weight: 600; }
h3, h4 { font-size: 18px; line-height: 28px; font-weight: 600; }
.lead { font-size: 18px; line-height: 28px; }
.small { font-size: 13px; line-height: 18px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.muted { color: var(--ink-muted); }
.measure { max-width: 680px; }
.eyebrow {
  font-size: 13px; line-height: 16px; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; color: var(--teal-text);
}

.skip {
  position: absolute; left: var(--space-4); top: -100px; z-index: 20;
  padding: var(--space-2) var(--space-4); background: var(--ink); color: var(--on-ink);
  border-radius: var(--radius-pill);
}
.skip:focus { top: var(--space-2); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 10; }
main, .site-footer { position: relative; z-index: 1; }
.site-header__logo { flex: 0 1 auto; min-width: 0; border-radius: var(--radius-md); }
.site-header__logo img { height: 56px; max-width: 100%; object-fit: contain; object-position: left center; }
.site-header nav { flex: none; flex-wrap: nowrap; }
.lang { display: flex; gap: var(--space-1); }
.lang button {
  min-width: 40px; min-height: 40px; padding: 0 var(--space-2);
  border: 0; border-radius: var(--radius-pill); background: transparent;
  font: 600 13px/18px var(--font-sans); letter-spacing: .1em; color: var(--ink-muted); cursor: pointer;
}
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { color: var(--ink); background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--line); }

/* one buy button per screen: the header one shows once the hero's is out of view */
.site-header__buy { transition: opacity .2s, visibility .2s; }
.site-header__buy.is-hidden { opacity: 0; visibility: hidden; }

/* ---------- layout ---------- */
.hero, .section, .offer__inner, .site-footer {
  width: 100%; max-width: 1200px; margin: 0 auto; padding-left: var(--space-5); padding-right: var(--space-5);
}
.section { padding-top: var(--space-9); }
.section > h2 { margin-top: var(--space-3); max-width: 680px; }
.section > .lead { margin-top: var(--space-4); }

/* ---------- 1. hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-7); align-items: center;
  padding-top: var(--space-8); padding-bottom: var(--space-4);
  min-height: min(calc(100vh - 81px), 760px); min-height: min(calc(100svh - 81px), 760px);
}
.hero__text { display: flex; flex-direction: column; gap: var(--space-5); max-width: 560px; }
.hero__text h1 { margin-top: calc(var(--space-3) * -1); }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.hero__art svg { width: 100%; height: auto; }

.f-teal { fill: var(--teal); }
.f-classic { fill: var(--classic); }
.f-spiced { fill: var(--spiced); }
.f-jasmine { fill: var(--jasmine); }
.f-mango { fill: var(--mango); }
.f-coral { fill: var(--coral); }
.f-tint-classic, .f-tint-spiced, .f-tint-jasmine { opacity: .45; }
.f-tint-classic { fill: var(--classic-tint); }
.f-tint-spiced { fill: var(--spiced-tint); }
.f-tint-jasmine { fill: var(--jasmine-tint); }

/* the one allowed animation: bubbles slowly rising */
.rise circle { animation: rise 8s ease-in-out infinite; transform-box: fill-box; }
.rise circle:nth-child(2) { animation-duration: 9s; animation-delay: -2s; }
.rise circle:nth-child(3) { animation-duration: 7s; animation-delay: -4s; }
.rise circle:nth-child(4) { animation-duration: 10s; animation-delay: -1s; }
.rise circle:nth-child(5) { animation-duration: 6s; animation-delay: -3s; }
@keyframes rise {
  0%   { transform: translateY(24px); opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(-24px); opacity: 0; }
}

/* ---------- 2. pains ---------- */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); margin-top: var(--space-7); }
.card {
  display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-5); background: var(--surface-raised);
  border: 1px solid var(--line); border-radius: var(--radius-md);
}
.card p { color: var(--ink-muted); }
.icon {
  width: 24px; height: 24px; flex: none;
  fill: none; stroke: var(--teal); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- 3. benefits ---------- */
.benefits {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-6);
  margin: var(--space-7) 0 0; padding: var(--space-6) 0 0; list-style: none; border-top: 1px solid var(--line);
}
.benefits li { display: flex; flex-direction: column; gap: var(--space-3); }
.benefits p { color: var(--ink-muted); }
.dot { width: 24px; height: 24px; border-radius: 50%; }
.dot--mango { background: var(--mango); }
.dot--coral { background: var(--coral); }
.dot--teal { background: var(--teal); }

/* ---------- 4. product ---------- */
.cb-flavor__body { flex: 1; }
.flavour__taste { color: var(--ink-muted); margin-top: var(--space-2); }
.cb-flavor__meta { margin-top: auto; padding-top: var(--space-3); }

.block { margin-top: var(--space-9); }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-6); margin: var(--space-6) 0 0; padding: 0; list-style: none; }
.steps li {
  position: relative; display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-5); background: var(--surface-raised);
  border: 1px solid var(--line); border-radius: var(--radius-md);
}
.steps p { color: var(--ink-muted); }
/* the line between cards reads the four steps as one process */
.steps li:not(:last-child)::after {
  content: ""; position: absolute; top: calc(var(--space-5) + 24px); right: calc(-1 * var(--space-6) - 1px);
  width: var(--space-6); border-top: 2px dashed var(--line);
}
.steps__n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; margin-bottom: var(--space-2); border-radius: 50%;
  background: var(--ink); color: var(--on-ink);
  font-size: 18px; font-weight: 700;
}

.block + .block--care { margin-top: var(--space-8); }
.care {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: var(--space-6);
  background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md);
}
.care__item { display: flex; gap: var(--space-4); padding: var(--space-6); }
.care__item + .care__item { border-left: 1px solid var(--line); }
.care__item p { color: var(--ink-muted); margin-top: var(--space-1); }
.care__item .icon {
  box-sizing: content-box; padding: var(--space-3); border-radius: 50%;
  background: var(--cream); border: 1px solid var(--line);
}

.faq { max-width: 680px; }
.faq h3 { margin-bottom: var(--space-5); }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-4);
  padding: var(--space-4) 0; font-weight: 600; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; font-size: 18px; color: var(--teal-text); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding-bottom: var(--space-4); color: var(--ink-muted); }

/* ---------- 5. offer ---------- */
.offer { margin-top: var(--space-9); background: var(--ink); color: var(--on-ink); border-radius: var(--radius-none); }
.offer :focus-visible { outline-color: var(--cream); }
.offer__inner {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--space-7); align-items: center;
  padding-top: var(--space-9); padding-bottom: var(--space-9);
}
.offer__text { display: flex; flex-direction: column; gap: var(--space-5); align-items: flex-start; }
.eyebrow--on-ink { color: var(--on-ink); }
.howto { margin: 0; padding-left: var(--space-5); display: flex; flex-direction: column; gap: var(--space-1); }
.offer__logo img { width: 100%; max-width: 320px; height: auto; margin-left: auto; }

/* ---------- footer ---------- */
.site-footer {
  display: flex; align-items: center; gap: var(--space-6);
  padding-top: var(--space-8); padding-bottom: var(--space-8);
}
.site-footer img { width: 120px; height: auto; flex: none; }
.site-footer__text { display: flex; flex-direction: column; gap: var(--space-2); max-width: 680px; }
.site-footer__text .small { text-transform: none; letter-spacing: 0; }
.site-footer__text .small:last-child { text-transform: uppercase; letter-spacing: .12em; }

/* ---------- promo price + countdown ---------- */
.price-new, .price-old { white-space: nowrap; }
.price-new { font-weight: 700; }
.price-old { margin-left: var(--space-1); font-weight: 500; color: var(--ink-muted); }
.promo {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); align-self: flex-start;
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-pill);
  background: var(--surface-raised); border: 1px solid var(--line);
  font-size: 15px; line-height: 22px; font-weight: 500;
}
.promo[hidden] { display: none; }
.promo__time { font-weight: 700; font-variant-numeric: tabular-nums; }
.promo--on-ink { background: var(--mango); border-color: var(--mango); color: var(--ink); }
.offer .price-old { color: var(--on-ink); opacity: .75; }

.brew__intro { margin-top: var(--space-4); }

.footer-flavours { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); }
.footer-flavours a { font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); text-decoration: none; }
.footer-flavours a:hover { color: var(--teal-text); }

/* ---------- bubbles rising on scroll ---------- */
/* .motion is set by JS only when motion is allowed; .is-in when the block scrolls into view */
.motion .cb-flavor__band circle,
.motion .benefits .dot {
  transform: translateY(56px); opacity: 0;
  transition: transform 1.8s cubic-bezier(.2, .7, .2, 1), opacity 1.8s ease-out;
  transition-delay: calc(var(--rise-delay, 0ms) + var(--i, 0) * 120ms);
}
.motion .cb-flavor__band circle { transform-box: fill-box; }
.motion .cb-flavor__band circle:nth-child(2) { --i: 1; }
.motion .cb-flavor__band circle:nth-child(3) { --i: 2; }
.motion .cb-flavor__band circle:nth-child(4) { --i: 3; }
.motion .cb-flavor__band circle:nth-child(5) { --i: 4; }
.motion .is-in .cb-flavor__band circle { transform: none; opacity: .45; }
.motion .benefits .dot { transform: translateY(24px); }
.motion .benefits li.is-in .dot { transform: none; opacity: 1; }

/* a little extra fizz when pointing at a flavour */
@media (hover: hover) {
  .motion .cb-flavor.is-in:hover .cb-flavor__band circle {
    transform: translateY(-6px);
    transition-duration: .9s; transition-delay: calc(var(--i, 0) * 60ms);
  }
}

/* ---------- page-edge bubbles (js/bubbles.js) ---------- */
.page-bubbles { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.page-bubble { position: absolute; top: 0; left: 0; border-radius: 50%; opacity: .45; will-change: transform; }
.page-bubble--mango { background: var(--mango); }
.page-bubble--coral { background: var(--coral); }
.page-bubble--teal { background: var(--teal); }

/* ---------- 2. flavour story (js/story.js) ---------- */
.story { margin-top: var(--space-7); }
.story__visual { display: none; }
.story__steps { display: grid; gap: var(--space-5); }
.story__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (min-width: 961px) {
  .story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-7); align-items: start; }
  .story__visual {
    display: block; position: sticky; top: calc(50vh - 180px); height: 400px; overflow: hidden;
    border-radius: var(--radius-none);
  }
  .story__band {
    position: absolute; inset: 0; display: flex; align-items: flex-end; padding: var(--space-6);
    opacity: 0; transition: opacity .6s ease;
  }
  .story__band.is-active { opacity: 1; }
  .story__band svg { position: absolute; top: 0; right: 0; width: 55%; height: 100%; }
  .story__band circle { opacity: .45; }
  .story__band--classic { background: var(--classic); } .story__band--classic circle { fill: var(--classic-tint); }
  .story__band--spiced { background: var(--spiced); } .story__band--spiced circle { fill: var(--spiced-tint); }
  .story__band--jasmine { background: var(--jasmine); } .story__band--jasmine circle { fill: var(--jasmine-tint); }
  .story__name {
    position: relative; margin: 0; color: var(--on-fill);
    font-size: 56px; line-height: 60px; font-weight: 600; letter-spacing: .12em;
  }

  .story__steps { gap: 0; }
  .story__step {
    min-height: 72vh; justify-content: center; background: transparent; border: 0; border-radius: 0;
    opacity: .35; transition: opacity .5s ease;
  }
  .story__step.is-active { opacity: 1; }
  .story__step .cb-flavor__band { display: none; }
  .story__step .cb-flavor__body { flex: none; gap: var(--space-3); padding: 0; }
  .story__title {
    position: static; width: auto; height: auto; overflow: visible; clip-path: none; white-space: normal;
    font-size: 32px; line-height: 36px; font-weight: 700; letter-spacing: .1em;
  }
  .story__step--classic .story__title, .cb-flavor--classic .story__title { color: var(--classic-deep); }
  .cb-flavor--spiced .story__title { color: var(--spiced-deep); }
  .cb-flavor--jasmine .story__title { color: var(--jasmine-deep); }
  .story__step .flavour__taste { font-size: 18px; line-height: 28px; }
  .story__step .cb-flavor__meta { margin-top: var(--space-2); }

  /* bubbles rise into the band when it becomes the current flavour */
  .motion .story__band circle {
    transform: translateY(56px); opacity: 0; transform-box: fill-box;
    transition: transform 1.6s cubic-bezier(.2, .7, .2, 1), opacity 1.6s ease-out;
    transition-delay: calc(var(--i, 0) * 120ms);
  }
  .motion .story__band circle:nth-child(2) { --i: 1; }
  .motion .story__band circle:nth-child(3) { --i: 2; }
  .motion .story__band circle:nth-child(4) { --i: 3; }
  .motion .story__band circle:nth-child(5) { --i: 4; }
  .motion .story__band.is-active circle { transform: none; opacity: .45; }
}

/* ---------- 4. swirl the bottle (js/swirl.js) ---------- */
.swirl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-7); align-items: center; }
.swirl__text { display: flex; flex-direction: column; gap: var(--space-5); align-items: flex-start; }
.swirl__picks { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.swirl__pick {
  min-height: 40px; padding: 0 var(--space-4); border-radius: var(--radius-pill);
  border: 2px solid var(--line); background: var(--surface-raised); color: var(--ink);
  font: 700 13px/18px var(--font-sans); letter-spacing: .1em; cursor: pointer;
}
.swirl__pick[aria-pressed="true"] { color: var(--on-fill); border-color: transparent; }
.swirl__pick--classic[aria-pressed="true"] { background: var(--classic); }
.swirl__pick--spiced[aria-pressed="true"] { background: var(--spiced); }
.swirl__pick--jasmine[aria-pressed="true"] { background: var(--jasmine-deep); }
.swirl__status { min-height: 28px; font-size: 18px; line-height: 28px; font-weight: 600; color: var(--ink); }
.swirl__stage {
  display: flex; justify-content: center; padding: var(--space-5);
  background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-md);
  cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.swirl__stage.is-dragging { cursor: grabbing; }
.swirl__stage svg { width: auto; height: 420px; max-height: 60vh; overflow: visible; }

.bottle__shadow { fill: var(--ink); opacity: .08; }
/* the gold screw lid of the real bottle */
.bottle__lid { fill: var(--mango); stroke: var(--ink); stroke-width: 2.5; }
.bottle__ridges { fill: none; stroke: var(--ink); stroke-width: 1.5; opacity: .3; }
.bottle__glass { fill: var(--on-fill); opacity: .6; }
.bottle__outline { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.bottle__shine { fill: none; stroke: var(--on-fill); stroke-width: 4; stroke-linecap: round; opacity: .35; }
.bottle__base { fill: none; stroke: var(--on-fill); stroke-width: 3; stroke-linecap: round; opacity: .45; }
.bottle__paper { fill: var(--cream); }
.bottle__name { fill: var(--on-fill); font: 700 15px var(--font-sans); letter-spacing: .1em; }
.bottle__place { fill: var(--teal-text); font: 600 7px var(--font-sans); letter-spacing: .2em; }
.bottle__foam { fill: var(--on-fill); opacity: .8; }
.bottle__bubble { opacity: .6; }
svg[data-flavour="classic"] .bottle__liquid, svg[data-flavour="classic"] .bottle__band { fill: var(--classic); }
svg[data-flavour="spiced"] .bottle__liquid, svg[data-flavour="spiced"] .bottle__band { fill: var(--spiced); }
svg[data-flavour="jasmine"] .bottle__liquid { fill: var(--jasmine); }
/* small white text on jasmine is not allowed: the label band uses jasmine-deep */
svg[data-flavour="jasmine"] .bottle__band { fill: var(--jasmine-deep); }
svg[data-flavour="classic"] .bottle__bubble { fill: var(--classic-tint); }
svg[data-flavour="spiced"] .bottle__bubble { fill: var(--spiced-tint); }
svg[data-flavour="jasmine"] .bottle__bubble { fill: var(--jasmine-tint); }

/* ---------- 1. set builder ---------- */
.builder {
  display: flex; flex-direction: column; gap: var(--space-4); width: 100%; max-width: 480px;
  padding: var(--space-5); background: var(--surface-raised); color: var(--ink); border-radius: var(--radius-md);
}
.builder :focus-visible { outline-color: var(--ink); }
.builder__title { font-size: 28px; line-height: 34px; font-weight: 600; }
.builder__unit { font-size: 15px; line-height: 22px; font-weight: 500; color: var(--ink-muted); }
.builder__unit .price-old { color: var(--ink-muted); opacity: 1; }
.builder__list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.builder__row {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) 0; border-bottom: 1px solid var(--line);
}
.builder__dot { width: 16px; height: 16px; flex: none; border-radius: 50%; }
.builder__dot--classic { background: var(--classic); }
.builder__dot--spiced { background: var(--spiced); }
.builder__dot--jasmine { background: var(--jasmine); }
.builder__name { flex: 1; min-width: 0; font-size: 15px; line-height: 20px; font-weight: 700; letter-spacing: .1em; }
.qty { display: inline-flex; align-items: center; gap: var(--space-2); }
.qty__btn {
  width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--ink); background: transparent; color: var(--ink);
  font: 600 18px/1 var(--font-sans); cursor: pointer;
}
.qty__btn:hover:not(:disabled) { background: var(--ink); color: var(--on-ink); }
.qty__btn:disabled { opacity: .35; cursor: default; }
.qty__value { min-width: 24px; text-align: center; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.builder__total { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-2); font-size: 18px; font-weight: 600; }
.builder__total .price-new { font-size: 28px; line-height: 34px; }
.builder__total .price-old { color: var(--ink-muted); opacity: 1; }
.builder__order { align-self: stretch; }
.builder__order[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.builder__empty { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink-muted); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; min-height: 0; gap: var(--space-6); }
  .hero__art { max-width: 420px; }
  .benefits, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .care { grid-template-columns: 1fr; }
  .care__item + .care__item { border-left: 0; border-top: 1px solid var(--line); }
  .steps li:not(:last-child)::after { display: none; }
  .offer__inner { grid-template-columns: minmax(0, 1fr); }
  .offer__logo { display: none; }
  .swirl { grid-template-columns: 1fr; gap: var(--space-5); }
  .swirl__stage svg { height: 360px; }
}

@media (max-width: 720px) {
  .hero, .section, .offer__inner, .site-footer { padding-left: var(--space-4); padding-right: var(--space-4); }
  .section, .block { padding-top: 0; margin-top: var(--space-8); }
  .section { padding-top: 0; }
  .hero { padding-top: var(--space-6); }
  .cards, .benefits, .steps { grid-template-columns: 1fr; gap: var(--space-5); }
  .care__item { padding: var(--space-5) var(--space-4); }
  .offer { margin-top: var(--space-8); }
  .offer__inner { padding-top: var(--space-8); padding-bottom: var(--space-8); }
  .site-header { padding: var(--space-3) var(--space-4); gap: var(--space-3); }
  .site-header__logo img { height: 40px; }
  .site-header nav { gap: var(--space-2); }
  .site-header__buy { padding: 0 var(--space-4); }
  .site-header__buy.is-hidden { display: none; }
  .actions .cb-btn { flex: 1 1 auto; }
  .site-footer { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 400px) {
  .site-header { gap: var(--space-2); }
  .site-header__logo img { height: 32px; }
  .site-header nav { gap: var(--space-1); }
  .lang { gap: 0; }
  .lang button { min-width: 32px; padding: 0 var(--space-1); }
  .site-header__buy { padding: 0 var(--space-3); }
  h1 { font-size: 32px; line-height: 38px; }
  .promo { border-radius: var(--radius-md); }
  .builder { padding: var(--space-4); }
  .builder__row { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise circle { animation: none; }
  .site-header__buy { transition: none; }
}
