/* BOBU Milano. Written for the phone first; the wide layout is at the bottom. */
@font-face {
  font-family: "BOBU Signature";
  src: url("assets/fonts/BOBUSignature-Regular.woff2") format("woff2"),
       url("assets/fonts/BOBUSignature-Regular.otf") format("opentype");
  font-display: swap;
}
@font-face {
  font-family: "Belleza";
  src: url("assets/fonts/Belleza-Regular.woff2") format("woff2");
  font-display: swap;
}
:root {
  --paper: #0C0808;
  --blush: #430B10;
  --mint: #0E1936;
  --butter: #B08A45;
  --sky: #101F4A;
  --lilac: #8E7A9E;
  --accent: #E9A0AC;
  --ink: #E2C488;
  --text: #F2E7DC;
  --hero: var(--blush);
  --orn: 0.17;
  --rule: rgba(226, 196, 136, 0.32);
  --body: Optima, "Optima nova", Belleza, Candara, "Segoe UI", sans-serif;
  --display: "BOBU Signature", Optima, sans-serif;
  --gutter: 20px;
  --nav: 58px;
  --card: min(84vw, 400px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav); -webkit-text-size-adjust: 100%; background: var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 400; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

/* Type */
.display {
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(32px, 9.6vw, 56px);
  line-height: 1.04;
  text-transform: uppercase;
  margin-bottom: 0.3em;
  text-wrap: balance;
}
.eyebrow {
  font-weight: 700; font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px;
}
.small { font-size: 14px; margin-bottom: 0; }
.brand { font-family: var(--display); font-size: 28px; line-height: 1; text-decoration: none; color: var(--ink); }
.seal-text { font-family: var(--body); font-weight: 700; letter-spacing: 0.08em; }

/* Buttons */
.pill {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 50px; padding: 0 26px; border-radius: 999px;
  background: var(--accent); color: var(--paper);
  font-weight: 700; font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; text-decoration: none;
  transition: transform 0.25s cubic-bezier(.3,0,.1,1);
}
.pill:active { transform: scale(0.97); }
.pill-small { min-height: 38px; padding: 0 16px; font-size: 10.5px; }
.pill-muted { background: transparent; color: var(--text); border: 1px solid var(--ink); padding: 12px 24px; line-height: 1.5; }
.link { font-weight: 700; font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text); text-underline-offset: 5px; }

/* Nav */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 10; height: var(--nav);
  display: flex; align-items: center; gap: 28px; padding: 0 var(--gutter);
  background: var(--paper);
  border-bottom: 1px solid transparent; transition: border-color 0.3s;
}
.nav.scrolled { border-color: var(--rule); }
.nav .brand { margin-right: auto; }
.nav-links { display: none; gap: 28px; }
.nav-links a { text-decoration: none; font-size: 15px; }

/* The drawings recede: found, not seen. The products and films never do. */
.plate-art, .seal-art, .orn, .orn-img { opacity: var(--orn); }
.spin { transform-box: fill-box; transform-origin: center; animation: spin 90s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* A soft light behind whatever a plate is showing. */
.plate::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(closest-side at var(--lx, 50%) var(--ly, 55%), rgba(255, 236, 214, 0.2), rgba(255, 236, 214, 0));
}

/* The landing: the words on one side, the formula opening in an arch on the other. */
.hero { display: flex; flex-direction: column; padding-top: calc(var(--nav) + 14px); background: var(--hero); }
.hero-words { display: contents; }
.hero .eyebrow { order: 0; display: flex; align-items: center; gap: 12px; margin: 0 var(--gutter) 8px; }
.hero .eyebrow i { width: 34px; height: 1px; background: var(--accent); }
.hero h1 { order: 0; font-size: clamp(36px, 10.6vw, 56px); padding: 0 var(--gutter); margin-bottom: 8px; animation: lift 0.9s cubic-bezier(.16,1,.3,1) both; }
.film-plate { order: 1; }
.hero-foot { order: 2; padding: 16px var(--gutter) 30px; }
.hero-foot .lede { font-size: 19px; line-height: 1.4; max-width: 24em; margin: 0; }
.hero-actions { display: flex; align-items: center; gap: 22px; margin: 18px 0 12px; flex-wrap: wrap; }
.hero-page .idcard { order: 1; margin: 18px var(--gutter) 40px; }
@keyframes lift { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* A line of words always moving. */
.ticker { overflow: hidden; background: var(--paper); border-block: 1px solid var(--rule); padding: 11px 0; }
.ticker-run { display: flex; width: max-content; animation: run 70s linear infinite; }
.ticker span { font-family: var(--display); font-size: 15px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); white-space: pre; }
@keyframes run { to { transform: translateX(-50%); } }

/* The kit: cards you swipe between. The swipe plays each product's animation. */
.kit { position: relative; padding: 40px 0 44px; background: var(--paper); }
.kit-head { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 10px; align-items: end; padding: 0 var(--gutter) 22px; }
.kit-head-solo { grid-template-columns: minmax(0, 1fr); }
.kit-head p:last-child { margin-bottom: 0; }
.kit-art { width: 100%; height: auto; }
.rail {
  display: flex; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  padding: 4px calc((100% - var(--card)) / 2) 8px; cursor: grab; outline: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail.dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.card {
  flex: 0 0 var(--card); scroll-snap-align: center; scroll-snap-stop: always; position: relative; overflow: hidden;
  background: var(--ground, var(--paper)); border: 1px solid var(--rule);
  transform: scale(calc(0.95 + var(--p, 1) * 0.05)); transform-origin: center bottom;
}
.plate { position: relative; width: 100%; }
.plate-art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.plate canvas, .plate video { position: absolute; }
.plate video { object-fit: cover; border-radius: 50% 50% 0 0 / 28.125% 28.125% 0 0; background: var(--rule); }
.card-copy { padding: 8px 18px 18px; position: relative; }
.card-copy .display { font-size: clamp(28px, 8vw, 38px); margin-bottom: 0.25em; }
.card-copy > p:not(.spec) { font-size: 16px; line-height: 1.42; margin-bottom: 0.5em; min-height: 4.2em; }
.card-step .card-copy > p:not(.spec) { min-height: 0; }
.spec { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.spec i { flex: 0 0 44px; height: 7px; background: repeating-linear-gradient(90deg, var(--accent) 0 1px, transparent 1px 4px); }
.facts { display: grid; grid-template-columns: auto 1fr; margin: 10px 0 0; border-top: 1px solid var(--rule); }
.facts dt, .facts dd { margin: 0; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.facts dt { font-weight: 700; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; padding-right: 20px; display: flex; align-items: center; }
.facts dd { text-align: right; font-weight: 700; font-size: 15.5px; }
.rail-ui { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px var(--gutter) 0; }
.rail-arrow { display: none; width: 44px; height: 44px; border: 1px solid var(--rule); border-radius: 50%; color: var(--ink); align-items: center; justify-content: center; }
.rail-arrow svg { width: 18px; height: 18px; }
.rail-ticks { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.rail-ticks button { width: 38px; height: 38px; font-family: var(--display); font-size: 15px; color: var(--ink); opacity: 0.45; border-bottom: 1px solid transparent; transition: opacity 0.25s, border-color 0.25s; }
.rail-ticks button.on { opacity: 1; border-color: var(--accent); }
.step-still { height: 240px; display: flex; align-items: flex-end; justify-content: center; padding: 22px 20px 10px; background: radial-gradient(closest-side at 50% 62%, rgba(255, 236, 214, 0.2), rgba(255, 236, 214, 0)); }
.step-still img { max-height: 100%; width: auto; max-width: 70%; }

/* The formula film and the box */
.panel { position: relative; background: var(--ground, var(--paper)); padding: 40px 0; }
.film { padding: 44px 0 40px; background: var(--paper); position: relative; }
.copy { padding: 0 var(--gutter); position: relative; }
.film .copy { padding-bottom: 20px; }
.panel .copy { padding-top: 18px; }

/* How it works */
.how { padding: 56px var(--gutter) 48px; }
.steps { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 26px; }
.steps li { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 16px; align-items: start; }
.step-art { width: 100%; height: auto; overflow: visible; }
.step-n { font-family: var(--display); font-size: 24px; line-height: 1; color: var(--accent); margin: 2px 0 6px; }
.steps h3, .points h3 { font-size: 20px; line-height: 1.25; margin-bottom: 6px; color: var(--ink); }
.steps li p:last-child, .points li p:last-child { font-size: 16px; margin-bottom: 0; }
.points { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 22px; }
.points li { border-top: 1px solid var(--rule); padding-top: 16px; }
.qa { margin: 8px 0 0; }
.qa dt { font-size: 20px; color: var(--ink); padding-top: 16px; border-top: 1px solid var(--rule); margin-top: 16px; }
.qa dt:first-child { margin-top: 0; }
.qa dd { margin: 4px 0 0; font-size: 16px; }

/* Formula IDs */
.ids { padding: 56px 0 48px; background: var(--hero); }
.ids .copy { padding-bottom: 26px; }
.ids .idcard { margin: 0 var(--gutter); }
.seal-art { width: 100%; height: auto; overflow: visible; }
.idcard { position: relative; margin: 0; padding: 16px 18px 18px; max-width: 420px; background: var(--paper); border: 1px solid var(--rule); }
.idcard-head { display: flex; justify-content: space-between; font-weight: 700; font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); }
.idcard img { height: 210px; width: auto; margin: 12px auto 12px; }
.idcard-label { font-weight: 700; font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; margin-bottom: 2px; }
.idcard-id { font-family: var(--display); font-size: clamp(34px, 11vw, 46px); line-height: 1.05; color: var(--ink); margin-bottom: 8px; }
.idcard-bars { width: 100%; height: 26px; margin-top: 14px; color: var(--ink); }

/* The app */
.app { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: start; padding: 48px 0 56px; }
.app .copy { padding-right: 0; grid-column: 1 / -1; order: 2; }
.app .copy p:not(.eyebrow) { max-width: 27em; margin-bottom: 20px; }
.app-icon { width: 96px; height: 96px; border-radius: 22px; margin-left: var(--gutter); order: 1; }

/* Footer */
.footer img { width: 100%; height: auto; }
.footer-row { padding: 18px var(--gutter) calc(26px + env(safe-area-inset-bottom)); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.footer-row p { margin: 0; }
.footer-row .small { width: 100%; }

/* Wide screens */
@media (min-width: 821px) {
  :root { --gutter: clamp(32px, 5vw, 72px); --nav: 66px; --card: clamp(340px, 29vw, 440px); }
  body { font-size: 18px; }
  .brand { font-size: 34px; }
  .nav-links { display: flex; }
  .pill:hover { transform: scale(1.03); }
  .display { font-size: clamp(40px, 4.8vw, 76px); }

  .hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: clamp(24px, 4vw, 64px); align-items: center; min-height: 100svh; padding: calc(var(--nav) + 8px) var(--gutter) 0; }
  .hero-words { display: block; padding-bottom: 30px; }
  .hero .eyebrow { margin: 0 0 14px; }
  .hero h1 { font-size: clamp(46px, min(5.6vw, 12svh), 96px); padding: 0; margin-bottom: 20px; }
  .hero-foot { padding: 0; }
  .hero-foot .lede { font-size: clamp(18px, 1.5vw, 22px); }
  .hero-actions { margin: 24px 0 14px; }
  .hero .film-plate { width: min(50vw, calc((100svh - var(--nav) - 12px) * 800 / 960)); align-self: end; max-width: none; }
  .hero-page { min-height: 86svh; padding-bottom: 48px; }
  .hero-page .idcard { margin: 0; width: min(36vw, 400px); }

  .kit { padding: clamp(56px, 6vw, 90px) 0; }
  .kit-head { grid-template-columns: minmax(0, 1fr) minmax(0, 340px); padding: 0 var(--gutter) 30px; gap: 40px; }
  .kit-head-solo { grid-template-columns: minmax(0, 860px); }
  .rail-arrow { display: inline-flex; }
  .rail-steps { padding-inline: var(--gutter); justify-content: safe center; }
  .card-copy .display { font-size: clamp(30px, 2.6vw, 40px); }
  .step-still { height: 300px; }

  .film { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(24px, 5vw, 80px); padding: clamp(60px, 7vw, 110px) var(--gutter); }
  .film .copy { padding: 0; max-width: 32em; order: 2; }
  .film .film-plate { max-width: calc(90svh * 800 / 960); justify-self: center; }

  .panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(24px, 5vw, 80px); padding: clamp(40px, 5vw, 80px) var(--gutter); }
  .panel.flip .plate { order: 2; }
  .panel .plate { max-width: calc(84svh * 800 / 820); justify-self: center; }
  .panel .copy { padding: 0; max-width: 32em; }

  .how { padding: clamp(70px, 8vw, 120px) var(--gutter); }
  .steps, .points { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 64px); margin-top: clamp(28px, 3vw, 48px); }
  .steps li { display: block; }
  .step-art { max-width: 260px; }
  .step-n { font-size: 32px; margin: 20px 0 8px; }
  .steps h3, .points h3 { font-size: 24px; margin-bottom: 10px; }
  .steps li p:last-child, .points li p:last-child { font-size: 18px; }
  .qa { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); column-gap: 40px; max-width: 980px; }
  .qa dt, .qa dd { border-top: 1px solid var(--rule); padding-top: 16px; margin: 16px 0 0; }
  .qa dt:first-child { margin-top: 16px; }

  .ids { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: clamp(32px, 6vw, 96px); padding: clamp(60px, 7vw, 110px) var(--gutter); }
  .ids .copy { padding: 0; max-width: 34em; }
  .ids .idcard { margin: 0 auto; width: 100%; }

  .app { padding: clamp(60px, 7vw, 110px) var(--gutter); grid-template-columns: auto minmax(0, 1fr); gap: 40px; align-items: center; }
  .app .copy { grid-column: auto; order: 2; padding: 0; }
  .app-icon { width: 140px; height: 140px; border-radius: 32px; margin: 0; order: 1; }

  .footer-row .small { width: auto; margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
