/* Oggino landing — tokens lifted from Oggino/Theme/Theme.swift and the Figma file. */

@font-face { font-family: "Commissioner"; src: url("fonts/Commissioner-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Commissioner"; src: url("fonts/Commissioner-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Commissioner"; src: url("fonts/Commissioner-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Commissioner"; src: url("fonts/Commissioner-BlackItalic.ttf") format("truetype"); font-weight: 900; font-style: italic; font-display: swap; }

:root {
  --bg: #fef8f8;
  --subtle: #f2e7e7;
  --ink: #470707;
  --secondary: #a37373;
  --brand: #f24c2f;
  --white: #ffffff;
  --kb-bg: #d5d7dd;
  --kb-key: #fcfcfe;
  --kb-shadow: #898a8d;

  --phone-w: 402px;
  --phone-h: 874px;
  --phone-scale: 0.8;            /* set by JS to fit the viewport */
  --radius-photo: 56px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  margin: 0;
  font-family: "Commissioner", system-ui, sans-serif;
  color: var(--ink);
  background: var(--subtle);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 18px 28px; border-radius: 100px;
  background: var(--brand); color: var(--bg);
  font-weight: 600; font-size: 17px; line-height: 1.2;
  white-space: nowrap;
  transition: transform .18s ease, filter .18s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn:active { transform: translateY(0) scale(.98); }
.btn--small { padding: 12px 22px; font-size: 15px; }
.link { font-weight: 500; font-size: 17px; }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 28px clamp(20px, 8.3vw, 120px);
  /* Transparent on purpose: the story scrolls underneath. */
  pointer-events: none;
}
.nav > * { pointer-events: auto; }
.nav__logo img { width: 139px; height: 32px; }
.nav__tag { flex: 1; margin: 0; text-align: right; font-weight: 500; font-size: 15px; }
@media (max-width: 720px) { .nav__tag { display: none; } .nav { padding-block: 16px; } }

/* ---------- Story ---------- */
.story {
  /* intro + 3 days, doubled: the story wants slow scrolling to be felt. */
  height: calc(2 * (100vh + 3 * 86vh));
  position: relative;
}
.stage {
  position: sticky; top: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--subtle);
}

/* Intro copy sits in the top half of the stage; the phone starts below it. */
.intro {
  position: absolute; left: 0; right: 0; top: 0; margin-inline: auto;
  width: min(594px, 92vw);
  padding-top: clamp(96px, 14vh, 178px);
  text-align: center;
  z-index: 3;
  will-change: transform, opacity;
}
.intro__h1 {
  margin: 0;
  font-weight: 600;
  font-size: clamp(40px, 5.3vw, 76px);
  line-height: 1;
  letter-spacing: -0.035em;
}
.intro__sub {
  margin: 32px auto 0;
  max-width: 449px;
  font-size: clamp(18px, 1.7vw, 24px);
  line-height: 1.34;
}
.intro__ctas {
  display: flex; flex-direction: column; align-items: center; gap: 24px;
  margin-top: 32px;
}

/* Phone */
.phone-wrap {
  position: absolute; left: 50%; top: 50%;
  width: var(--phone-w); height: var(--phone-h);
  /* Centred with margins so the transform is free for GSAP (scale + y). */
  margin: calc(var(--phone-h) / -2) 0 0 calc(var(--phone-w) / -2);
  transform: scale(var(--phone-scale));
  transform-origin: center;
  z-index: 4;
  will-change: transform;
}
.phone {
  width: 100%; height: 100%;
  border: 10px solid var(--ink);
  border-radius: 56px;
  background: var(--bg);
  overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(71, 7, 7, .35);
}
.screen { position: relative; width: 100%; height: 100%; }

.days { position: absolute; top: 40px; left: 0; right: 0; text-align: center; }
.days__label { font-size: 13px; }
.days__row {
  display: flex; align-items: center; justify-content: center; gap: 24px;
  margin-top: 16px;
}
.day {
  width: 40px; height: 40px; border-radius: 100px;
  display: grid; place-items: center;
  background: var(--subtle); color: var(--ink);
  font-size: 17px;
  transition: background .25s ease, color .25s ease;
}
.day.is-active { background: var(--brand); color: var(--bg); }
.dot { width: 8px; height: 8px; border-radius: 100px; background: var(--subtle); margin-inline: -8px; }
.dot + .dot { margin-left: 16px; }

.prompt {
  position: absolute; left: 24px; right: 24px; top: 134px;
  margin: 0; font-size: 13px; color: var(--secondary);
  min-height: 16px;
}
.entry {
  position: absolute; left: 24px; right: 24px; top: 158px;
  margin: 0; font-size: 24px; line-height: 1.2;
}
.entry__text .w--gap .en { display: inline; }
.entry__text .w--gap .it { display: none; color: var(--brand); }
.caret {
  display: inline-block; width: 1px; margin-left: 1px;
  color: var(--brand);
  animation: blink 1s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }

.toolbar {
  position: absolute; left: 16px; right: 16px; top: 472px;
  display: flex; gap: 8px; align-items: center;
}
.tool { height: 56px; border-radius: 100px; background: var(--subtle); display: inline-flex; align-items: center; justify-content: center; }
.tool--round { width: 56px; }
.tool--controlla {
  flex: 1; gap: 10px; background: var(--brand); color: var(--white);
  font-weight: 500; font-size: 15px;
  transform-origin: center;
}
.tool--type { padding: 4px 12px 4px 16px; gap: 4px; }

/* Keyboard. Drawn in CSS so it stays crisp; system font on purpose, it is a system element. */
.keyboard {
  position: absolute; left: -10px; right: -10px; bottom: -10px; height: 312px;
  background: var(--kb-bg);
  font-family: -apple-system, "SF Pro Text", system-ui, sans-serif;
  color: #000;
  padding-top: 9px;
}
.kb-row { display: flex; justify-content: center; gap: 6px; margin-bottom: 17px; padding-inline: 4px; }
.kb-row i {
  font-style: normal; font-size: 24px; letter-spacing: -0.02em;
  width: 34px; height: 45px; border-radius: 4.6px;
  background: var(--kb-key); box-shadow: 0 1px 0 var(--kb-shadow);
  display: grid; place-items: center;
}
.kb-row--mid { padding-inline: 24px; }
.kb-row .kb-wide { width: 45px; margin-inline: 4px; font-size: 18px; }
.kb-row .kb-fn { width: 93px; font-size: 17px; }
.kb-row .kb-space { width: 195px; font-size: 17px; }
.kb-row .kb-dim { background: #acb0bb; }
.kb-row--sys { justify-content: space-between; padding-inline: 32px; font-size: 26px; margin-top: -6px; }
.kb-home { position: absolute; bottom: 8px; left: 50%; width: 144px; height: 5px; border-radius: 100px; background: #000; transform: translateX(-50%); }

/* Photos */
.layer { position: absolute; inset: 0; pointer-events: none; }
.layer--back { z-index: 1; }
.layer--front { z-index: 5; }
.photo {
  position: absolute; margin: 0;
  top: 50%; left: 50%;
  translate: 0 -50%;            /* vertical centring; GSAP owns `transform` */
  border-radius: var(--radius-photo);
  overflow: hidden;
  opacity: 0;
  will-change: transform, opacity;
  box-shadow: 0 30px 60px -30px rgba(71, 7, 7, .45);
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo--day { width: min(360px, 24vw); aspect-ratio: 9 / 10; }
.photo--spritz { aspect-ratio: 278 / 309; width: min(300px, 20vw); }
.photo--back { width: min(300px, 20vw); aspect-ratio: 1; filter: saturate(.85); opacity: 0; }

/* Desktop placement: beside the phone. `left` carries the x, GSAP owns the transform. */
.photo[data-side="left"]  { left: calc(50% - var(--phone-w) * var(--phone-scale) / 2 - 15vw); }
.photo[data-side="right"] { left: calc(50% + var(--phone-w) * var(--phone-scale) / 2 + 15vw); }
.photo--back[data-side="left"]  { left: calc(50% - var(--phone-w) * var(--phone-scale) / 2 - 2vw); }
.photo--back[data-side="right"] { left: calc(50% + var(--phone-w) * var(--phone-scale) / 2 + 2vw); }

/* Mobile: photos go behind the phone, big. The front layer drops behind too. */
@media (max-width: 767px) {
  .layer--front { z-index: 2; }
  .photo--day, .photo--spritz { width: 72vw; aspect-ratio: 4 / 5; }
  .photo--back { width: 56vw; }
  .photo[data-side="left"]  { left: calc(50% - 26vw); }
  .photo[data-side="right"] { left: calc(50% + 26vw); }
  .photo--back[data-side="left"]  { left: calc(50% - 34vw); }
  .photo--back[data-side="right"] { left: calc(50% + 34vw); }
  .intro { padding-top: 96px; }
}

/* ---------- Below the story ---------- */
.h2 {
  margin: 0;
  font-weight: 600;
  font-size: clamp(34px, 3.6vw, 52px);
  line-height: 1;
  letter-spacing: -0.03em;
}
.h2--center { text-align: center; }
.accent { color: var(--brand); }
.body { margin: 0; font-size: 19px; line-height: 1.55; }
.btn--block { justify-content: center; width: 100%; }
.btn--inverse { background: var(--bg); color: var(--brand); }
.btn--large { padding: 22px 32px; font-size: 21px; gap: 12px; }

/* Prompt feature: gradient hand-off from the story's cream into the page */
.prompt-feature {
  background: linear-gradient(to bottom, var(--subtle), var(--bg));
  padding: clamp(80px, 8.3vw, 120px) clamp(20px, 8.3vw, 120px);
  display: grid; justify-items: center;
}
.prompt-feature__copy { display: grid; justify-items: center; gap: 28px; text-align: center; }
.prompt-feature .h2 { max-width: 624px; }
.prompt-feature .body { max-width: 480px; }

/* Feature rows */
.feature {
  background: var(--bg);
  display: flex; align-items: center; gap: clamp(40px, 6.6vw, 96px);
  padding: clamp(80px, 8.3vw, 120px) clamp(20px, 8.3vw, 120px);
}
.feature .copy { flex: 1 1 320px; min-width: 0; display: grid; gap: 28px; }
.feature .h2 { max-width: 520px; }
.feature .body { max-width: 480px; }
/* The visual may shrink between 1024 and 1440; its card follows (max-width, never a fixed width). */
.visual {
  flex: 0 1 560px; min-width: 0; max-width: 100%;
  background: var(--subtle); border-radius: 32px;
  padding: clamp(24px, 4vw, 56px);
  display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; align-items: center;
}
.visual--square { aspect-ratio: 1; }

/* The check tray */
.tray {
  width: 100%; max-width: 402px;
  background: var(--bg); border-radius: 32px;
  padding: 32px 24px 40px;
  display: grid; gap: 24px; align-content: start;
}
.tray__tabs { display: flex; align-items: center; gap: 16px; font-size: 15px; color: var(--secondary); }
.tray__tab.is-active { color: var(--brand); }
.tray__play { width: 48px; height: 48px; border-radius: 40px; background: var(--brand); display: grid; place-items: center; padding-left: 4px; }
.tray__sentence { margin: 0; font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5; display: flex; flex-wrap: wrap; gap: 4px; }
.tray__sentence span { padding: 2px 8px; border-radius: 10px; }
.tray__sentence .hl { background: var(--subtle); }
.tray__h { margin: 0; font-weight: 600; font-size: 17px; }
.tray__h + * { margin-top: -12px; }
.tray__muted { margin: 0; font-size: 17px; line-height: 1.4; color: var(--secondary); }
.tray__pairs { margin: 0; display: grid; gap: 12px; font-size: 17px; }
.tray__pairs div { display: grid; grid-template-columns: 132px 1fr; gap: 16px; }
.tray__pairs dt { color: var(--secondary); }
.tray__pairs dd { margin: 0; }

/* Listening card */
.listening {
  width: 100%; max-width: 440px;
  background: var(--brand); color: var(--bg);
  border-radius: 28px; padding: 36px 32px;
  display: grid; justify-items: center; gap: 28px; text-align: center;
}
.listening__label { margin: 0; font-weight: 500; font-size: 15px; }
.waveform { display: flex; align-items: center; gap: 6px; height: 64px; }
.waveform i { display: block; width: 6px; border-radius: 3px; background: var(--bg); }
.listening__quote { margin: 0; font-size: clamp(18px, 2vw, 22px); line-height: 1.4; max-width: 360px; }
.listening__done { background: var(--bg); color: var(--brand); font-weight: 600; font-size: 15px; padding: 14px 24px; border-radius: 100px; }

/* Manifesto */
.manifesto {
  background: var(--brand); color: var(--bg);
  padding: clamp(96px, 9.7vw, 140px) clamp(20px, 8.3vw, 120px);
  display: grid; gap: 48px;
}
.manifesto__statement {
  margin: 0; max-width: 981px;
  font-weight: 600; font-size: clamp(40px, 5vw, 72px); line-height: 1.05; letter-spacing: -0.035em;
}
.manifesto__body { margin: 0; max-width: 520px; font-size: 22px; line-height: 1.5; }

/* Pricing */
.pricing {
  background: var(--bg);
  padding: clamp(96px, 9.7vw, 140px) clamp(20px, 8.3vw, 120px);
  display: grid; gap: 64px;
}
.pricing__head { display: flex; align-items: flex-end; justify-content: space-between; gap: clamp(40px, 6.6vw, 96px); }
.pricing__h2 { margin: 0; font-weight: 500; font-size: clamp(48px, 5.3vw, 76px); line-height: 1; letter-spacing: -0.03em; max-width: 520px; }
.pricing__head .body { max-width: 480px; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.plan {
  border-radius: 32px; padding: 40px;
  display: grid; gap: 28px; align-content: start;
}
.plan--prova { background: var(--bg); border: 1px solid rgba(71, 7, 7, .12); }
.plan--learn { background: var(--brand); color: var(--bg); }
.plan__name { margin: 0; font-weight: 600; font-size: 17px; }
.plan__price { margin: 0; display: flex; align-items: flex-end; gap: 8px; }
.plan__amount { font-weight: 500; font-size: 64px; line-height: 1; letter-spacing: -0.03em; }
.plan__per { font-size: 17px; color: var(--secondary); padding-bottom: 4px; }
.plan--learn .plan__per { color: var(--bg); }
.plan__sub { margin: 0; font-size: 16px; line-height: 1.5; color: var(--secondary); max-width: 400px; }
.plan--learn .plan__sub { color: var(--bg); }
.plan__rule { width: 100%; height: 1px; border: 0; margin: 0; background: rgba(71, 7, 7, .15); }
.plan--learn .plan__rule { background: rgba(255, 255, 255, .15); }
.plan__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; font-size: 16px; }
.plan__list li { display: flex; gap: 12px; align-items: center; }
.plan__list li::before { content: "✓"; font-weight: 600; font-size: 15px; color: var(--brand); }
.plan--learn .plan__list li::before { color: var(--bg); }

/* FAQ */
.faq {
  background: var(--bg);
  padding: clamp(96px, 9.7vw, 140px) clamp(20px, 8.3vw, 120px);
  display: flex; align-items: flex-start; justify-content: space-between; gap: clamp(40px, 6.6vw, 96px);
}
.faq__h2 { margin: 0; font-weight: 500; font-size: clamp(44px, 4.4vw, 64px); line-height: 1; letter-spacing: -0.03em; max-width: 520px; }
.faq__list { width: min(560px, 100%); }
.faq__item { border-bottom: 1px solid rgba(71, 7, 7, .12); }
.faq__item summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 24px 0; font-weight: 500; font-size: 20px;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__plus { color: var(--brand); font-weight: 400; font-size: 24px; line-height: 1; transition: transform .2s ease; }
.faq__item[open] .faq__plus { transform: rotate(45deg); }
.faq__item p { margin: 0 0 24px; font-size: 17px; line-height: 1.55; color: var(--secondary); max-width: 480px; }

/* Closing CTA + footer */
.closing {
  background: var(--ink); color: var(--bg);
  padding: clamp(96px, 9.7vw, 140px) clamp(20px, 8.3vw, 120px) 120px;
  display: grid; gap: 56px;
}
.closing__h2 { margin: 0; font-weight: 500; font-size: clamp(56px, 8.3vw, 120px); line-height: .95; letter-spacing: -0.04em; }
.closing__row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.closing__note { font-size: 17px; }

.footer { background: var(--ink); color: var(--bg); padding: 48px clamp(20px, 8.3vw, 120px); display: grid; gap: 40px; }
.footer__rule { width: 100%; height: 1px; border: 0; margin: 0; background: rgba(255, 255, 255, .15); }
.footer__row { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer__mark { font-weight: 900; font-style: italic; font-size: 30px; letter-spacing: -0.01em; color: var(--brand); }
.footer__links { display: flex; gap: 32px; font-size: 15px; opacity: .7; }
.footer__links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.footer__copy { font-size: 13px; opacity: .7; }

@media (max-width: 1024px) {
  .feature { flex-direction: column; align-items: stretch; }
  .feature--controlla { flex-direction: column-reverse; }
  .visual { flex-basis: auto; width: 100%; }
  .visual--square { aspect-ratio: auto; padding-block: 48px; }
  .pricing__head { flex-direction: column; align-items: flex-start; }
  .plans { grid-template-columns: 1fr; }
  .faq { flex-direction: column; }
  .footer__row { flex-direction: column; align-items: flex-start; gap: 20px; }
}
@media (max-width: 480px) {
  .visual { padding: 16px; border-radius: 24px; }
  .tray { padding: 24px 16px 32px; border-radius: 24px; }
  .listening { padding: 28px 20px; }
  .tray__pairs div { grid-template-columns: 1fr; gap: 2px; }
  .plan { padding: 28px 24px; }
  .plan__amount { font-size: 52px; }
  .footer__links { flex-wrap: wrap; gap: 16px 24px; }
}

/* ---------- Static composition: reduced motion (JS adds .is-static), day 1 done ---------- */
.is-static .caret, .reduced-motion .caret { animation: none; }
.is-static .story { height: auto; }
.is-static .stage { position: relative; height: auto; overflow: visible; padding-bottom: 96px; }
.is-static .intro { position: relative; margin: 0 auto; }
.is-static .phone-wrap {
  position: relative; left: auto; top: auto; margin: 64px auto 0; width: var(--phone-w);
  transform: scale(var(--phone-scale)); transform-origin: top center;
  height: calc(var(--phone-h) * var(--phone-scale));
}
.is-static .phone { height: var(--phone-h); }
.is-static .layer { position: static; display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; padding: 32px 20px 0; }
.is-static .layer--back { display: none; }
.is-static .photo { position: static; opacity: 1; transform: none; translate: none; box-shadow: none; }
