/* Be-Grin — be-grin.com
   Tokens, then layout, then components. Edit colours at the top. */

:root {
  --navy: #383286;      /* brand wordmark: C100 M100 Y0 K0 */
  --blue: #0068b1;      /* leaf: C100 M54 Y0 K0 */
  --green: #8fbf2f;     /* vein: C53 M0 Y100 K0 */
  --red: #e41e25;       /* underline: C0 M100 Y100 K0 */
  --wa: #1fa855;        /* WhatsApp button */
  --wa-dark: #168a44;

  --ink: #1b1740;
  --ink-soft: #4a4766;
  --line: #d8deea;
  --wash: #eef3fa;
  --mist: #f7f9fd;
  --white: #ffffff;

  --serif: "EB Garamond", "Garamond", "Georgia", "Times New Roman", serif;
  --sans: "Manrope", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
  --radius: 14px;
  --shadow-pack: drop-shadow(0 30px 40px rgba(40, 22, 111, 0.22)) drop-shadow(0 6px 10px rgba(40, 22, 111, 0.10));
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
html:not(.lenis) { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; margin: 0 0 .5em; color: var(--navy); letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 5.6vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.35rem; font-weight: 600; }
p { margin: 0 0 1em; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.head-row { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.brand img { width: 150px; height: auto; }
.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .98rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a.is-current { border-bottom-color: var(--green); color: var(--navy); }
.head-cta { white-space: nowrap; }
.nav-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: 999px;
  font: 600 .98rem/1 var(--sans); text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn .ico { width: 20px; height: 20px; fill: currentColor; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: #2a2566; color: #fff; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: var(--wa-dark); color: #fff; }
.btn-lg { padding: 16px 26px; font-size: 1.05rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin: 1.6rem 0 1rem; }

/* ---------- Sections ---------- */
.band { padding: clamp(64px, 9vw, 112px) 0; }
.band-wash { background: var(--wash); }
.section-intro { max-width: 60ch; font-size: 1.12rem; color: var(--ink-soft); margin-bottom: 2.6rem; }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(48px, 7vw, 96px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.lead { font-size: 1.22rem; color: var(--ink-soft); max-width: 46ch; }
.hero-note { font-size: .95rem; color: var(--ink-soft); }

.hero-art { position: relative; aspect-ratio: 1; max-width: 560px; margin-inline: auto; width: 100%; }
.drum { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring { fill: none; stroke: var(--navy); }
.ring-outer { stroke-width: 1.5; opacity: .45; }
.ring-inner { stroke-width: 2; opacity: .55; }
.shirt { fill: none; stroke: var(--navy); stroke-width: 1.3; opacity: .22; }
.paddles path { fill: none; stroke: var(--navy); stroke-width: 1.5; opacity: .35; }
.drum-spin { transform-origin: 300px 300px; animation: spin 2.8s cubic-bezier(.22,.8,.3,1) 1 both; }
@keyframes spin { from { transform: rotate(-200deg); } to { transform: rotate(0deg); } }
.hero-pack { position: absolute; left: 50%; top: 51%; transform: translate(-50%, -50%); width: 64%; }
.hero-pack img { width: 100%; filter: drop-shadow(0 18px 28px rgba(40, 22, 111, 0.16)); animation: settle 1.4s cubic-bezier(.2,.7,.2,1) 1 both; }
@keyframes settle { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .drum-spin, .hero-pack img { animation: none; } }

/* ---------- Problem trio ---------- */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 48px); }
.trio article { padding-top: 22px; border-top: 2px solid var(--navy); }
.trio h3 { margin-top: 18px; }
.trio p { color: var(--ink-soft); margin: 0; }
.line-ico { width: 56px; height: 56px; fill: none; stroke: var(--navy); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- How it works ---------- */
.how-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 6vw, 88px); align-items: center; }
.how-art { position: relative; max-width: 360px; margin-inline: auto; width: 100%; }
.machine { width: 100%; fill: none; stroke: var(--navy); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.machine .door { stroke-width: 2.4; }
.machine .hair { stroke-width: 1; opacity: .25; }
.machine .tray { stroke: var(--green); }
.pour { position: absolute; left: 20%; top: 11%; width: 10%; }
.pour span { display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--green); margin: 4px auto; opacity: 0; animation: drop 2.4s ease-in infinite; }
.pour span:nth-child(2) { animation-delay: .5s; }
.pour span:nth-child(3) { animation-delay: 1s; }
@keyframes drop { 0% { opacity: 0; transform: translateY(-6px); } 15% { opacity: .9; } 60% { opacity: .6; transform: translateY(26px); } 100% { opacity: 0; transform: translateY(40px); } }
@media (prefers-reduced-motion: reduce) { .pour { display: none; } }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 1.5rem; }
.steps li { position: relative; padding-left: 64px; margin-bottom: 1.6rem; counter-increment: step; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 2px;
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  font: 500 1.25rem var(--serif); color: var(--navy);
  border: 2px solid var(--navy); background: #fff;
}
.steps h3 { margin-bottom: .3em; }
.steps p { color: var(--ink-soft); margin: 0; }
.how-note { padding: 16px 20px; border-left: 3px solid var(--green); background: #fff; border-radius: 0 10px 10px 0; color: var(--ink-soft); }

/* ---------- Product ---------- */
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.gallery { position: sticky; top: 96px; }
.gallery-main { background: var(--mist); border-radius: var(--radius); aspect-ratio: 1; display: grid; place-items: center; padding: 10%; }
.gallery-main img { max-height: 100%; width: auto; max-width: 100%; height: auto; object-fit: contain; filter: drop-shadow(0 14px 22px rgba(40, 22, 111, 0.14)); transition: opacity .2s; }
.gallery-thumbs { display: flex; gap: 12px; margin-top: 14px; }
.thumb { flex: 1; background: var(--mist); border: 2px solid transparent; border-radius: 10px; padding: 10px 8px 8px; cursor: pointer; display: grid; gap: 6px; justify-items: center; font: 600 .82rem var(--sans); color: var(--ink-soft); }
.thumb img { height: 64px; width: auto; max-width: 100%; object-fit: contain; }
.thumb.is-active, .thumb:hover { border-color: var(--navy); color: var(--navy); }

.price { font-family: var(--serif); font-size: 1.35rem; color: var(--ink-soft); margin: -.3rem 0 1.2rem; }
.price .amount { font-size: 2.2rem; color: var(--navy); font-weight: 600; margin-right: .3em; }
.specs { margin: 1.8rem 0; padding: 0; border-top: 1px solid var(--line); }
.specs div { display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.specs dt { font-weight: 600; color: var(--navy); }
.specs dd { margin: 0; color: var(--ink-soft); }
.order-note { color: var(--ink-soft); font-size: .98rem; max-width: 50ch; }

/* ---------- Range ---------- */
.range-list { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.range-list li { display: flex; align-items: center; gap: 16px; background: #fff; border-radius: 12px; padding: 16px 18px; border: 1px solid var(--line); font-weight: 500; }
.range-list .line-ico { width: 44px; height: 44px; flex: none; }
.range-note { color: var(--ink-soft); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(24px, 5vw, 72px); }
.about-copy p { font-family: var(--serif); font-size: 1.3rem; line-height: 1.5; color: var(--ink); max-width: 58ch; }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 44px 20px 0; position: relative; font-family: var(--serif); font-size: 1.3rem; font-weight: 500; color: var(--navy); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; border-right: 2px solid var(--navy); border-bottom: 2px solid var(--navy); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq details p { margin: 0 0 22px; color: var(--ink-soft); max-width: 66ch; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(32px, 6vw, 88px); }
address { font-style: normal; color: var(--ink-soft); line-height: 1.7; }
.contact-form { background: var(--mist); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); }
.form-intro { color: var(--ink-soft); margin-bottom: 1.2rem; }
.contact-form label { display: block; font-weight: 600; font-size: .92rem; color: var(--navy); margin-bottom: 14px; }
.contact-form input, .contact-form textarea {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px;
  font: 1rem var(--sans); color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 8px;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 88, 157, .15); }
.form-error { color: var(--red); font-size: .92rem; margin: 0; }
.contact-form .cta-row { margin-top: .6rem; }

/* ---------- Footer ---------- */
.site-foot { background: var(--navy); color: #cfd3ea; padding: 48px 0 36px; }
.foot-grid { display: grid; gap: 20px; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-foot a { color: #fff; text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.foot-copy { font-size: .9rem; margin: 0; }

/* ---------- Legal pages ---------- */
.legal { max-width: 760px; padding: clamp(40px, 6vw, 72px) 0; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.legal h2 { font-size: 1.4rem; margin-top: 2.2rem; }
.legal p, .legal li { color: var(--ink-soft); }
.legal .updated { font-size: .92rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .how-grid, .product-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 440px; }
  .gallery { position: static; }
  .trio, .range-list { grid-template-columns: 1fr 1fr; }
  .how-art { max-width: 280px; }
}
@media (max-width: 760px) {
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0; background: #fff; border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: none; }
  .head-cta { display: none; }
  .nav-toggle {
    display: grid; gap: 5px; margin-left: auto; background: none; border: 0; padding: 10px; cursor: pointer;
  }
  .nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); transition: transform .2s, opacity .2s; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .trio, .range-list { grid-template-columns: 1fr; }
  .specs div { grid-template-columns: 1fr; gap: 2px; }
  .hero-pack { width: 58%; }
}

/* Logo is always shown in its original colours; on dark backgrounds it sits on a white panel. */
.foot-logo { display: inline-block; background: #fff; padding: 12px 16px; border-radius: 10px; justify-self: start; }
.foot-logo img { width: 150px; height: auto; }

/* ---------- Lenis smooth scroll (MIT) ---------- */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis:not(.lenis-autoToggle).lenis-stopped {
  overflow: clip;
}

.lenis [data-lenis-prevent],
.lenis [data-lenis-prevent-wheel],
.lenis [data-lenis-prevent-touch],
.lenis [data-lenis-prevent-vertical],
.lenis [data-lenis-prevent-horizontal] {
  overscroll-behavior: contain;
}

.lenis.lenis-smooth iframe {
  pointer-events: none;
}

.lenis.lenis-autoToggle {
  transition-property: overflow;
  transition-duration: 1ms;
  transition-behavior: allow-discrete;
}

/* ---------- Motion ---------- */
:root { --ease-out: cubic-bezier(.22, .8, .3, 1); --ease-io: cubic-bezier(.65, 0, .35, 1); }

/* Header: compacts and gains a shadow once you scroll */
.site-head { transition: box-shadow .35s var(--ease-out), background-color .35s; }
.head-row { transition: min-height .35s var(--ease-out); }
.brand img { transition: width .35s var(--ease-out); }
.site-head.is-scrolled { box-shadow: 0 6px 24px rgba(56, 50, 134, .10); }
.site-head.is-scrolled .head-row { min-height: 60px; }
.site-head.is-scrolled .brand img { width: 128px; }

/* Nav: a single indicator that glides to the current section */
.nav { position: relative; }
.nav a { border-bottom: 0 !important; transition: color .2s; }
.nav-ink {
  position: absolute; bottom: 0; left: 0; height: 2px; width: 0;
  background: var(--green); border-radius: 2px; pointer-events: none;
  transition: transform .45s var(--ease-out), width .45s var(--ease-out), opacity .3s;
  opacity: 0;
}
.nav a:hover { color: var(--navy); }

/* Scroll progress hairline under the header */
.progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--blue), var(--green)); }

/* Mobile menu: slides and fades instead of popping */
@media (max-width: 760px) {
  .nav { position: absolute; display: flex; visibility: hidden; opacity: 0; transform: translateY(-8px); transition: opacity .25s, transform .3s var(--ease-out), visibility 0s .3s; }
  .nav.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity .25s, transform .3s var(--ease-out); }
  .nav a { opacity: 0; transform: translateY(-6px); transition: opacity .25s, transform .3s var(--ease-out); }
  .nav.is-open a { opacity: 1; transform: none; }
  .nav.is-open a:nth-child(2) { transition-delay: .03s; } .nav.is-open a:nth-child(3) { transition-delay: .06s; }
  .nav.is-open a:nth-child(4) { transition-delay: .09s; } .nav.is-open a:nth-child(5) { transition-delay: .12s; }
  .nav-ink { display: none; }
}

/* Reveal on scroll: content rises gently into place, once */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); transition-delay: var(--d, 0s); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* Gallery: thumbnails track with a sliding frame; main image cross-fades with a slight zoom */
.gallery-thumbs { position: relative; }
.thumb { border-color: transparent !important; position: relative; z-index: 1; transition: color .2s, transform .2s; }
.thumb:hover { transform: translateY(-2px); }
.thumb-frame { position: absolute; top: 0; left: 0; border: 2px solid var(--navy); border-radius: 10px; pointer-events: none; transition: transform .45s var(--ease-out), width .45s var(--ease-out), height .45s var(--ease-out); }
.gallery-main { position: relative; overflow: hidden; }
.gallery-main img { transition: opacity .35s var(--ease-out), transform .6s var(--ease-out); }
.gallery-main img.is-leaving { opacity: 0; transform: scale(.96) translateX(-12px); }
.gallery-main img.is-entering { opacity: 0; transform: scale(1.03) translateX(12px); transition: none; }

/* FAQ: answers open with a smooth height animation */
.faq .faq-body { overflow: hidden; height: 0; transition: height .4s var(--ease-io); }
.faq details[open] .faq-body { height: auto; }
.js .faq .faq-body p { opacity: 0; transform: translateY(-4px); transition: opacity .3s .05s, transform .35s var(--ease-out); }
.js .faq details.is-open .faq-body p { opacity: 1; transform: none; }

/* Buttons: soft lift */
.btn { transition: background .15s, color .15s, border-color .15s, transform .25s var(--ease-out), box-shadow .25s var(--ease-out); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(56, 50, 134, .16); }
.btn:active { transform: translateY(0); box-shadow: none; }

/* Hero pack: slow float, and a parallax hook driven by scroll */
.hero-pack { will-change: transform; }
.hero-pack img { animation: settle 1.4s var(--ease-out) 1 both, float 7s ease-in-out 1.4s infinite; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.drum { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .faq .faq-body p { opacity: 1; transform: none; transition: none; }
  .hero-pack img { animation: none; }
  .nav-ink, .thumb-frame, .gallery-main img, .faq .faq-body, .faq .faq-body p, .btn, .site-head, .head-row, .brand img { transition: none !important; }
  .btn:hover { transform: none; }
}
