/* ==========================================================================
   Singing Coach AI — v2 design system
   Duolingo-style chunk (rounded, flat, saturated, 3D-edge buttons)
   × Cal AI conversion structure. Type: Nunito variable.
   ========================================================================== */

/* ---------- Fonts ---------- */
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 300 1000;
  font-display: swap;
  src: url('/assets/fonts/nunito-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Nunito';
  font-style: italic;
  font-weight: 300 1000;
  font-display: swap;
  src: url('/assets/fonts/nunito-italic-var.woff2') format('woff2');
}

/* ---------- Tokens ---------- */
:root {
  --sky: #00B6F3;
  --sky-edge: #0090C6;
  --sky-deep: #009BD6;
  --sky-tint: #E9F8FF;
  --leaf: #58CC02;
  --leaf-edge: #46A302;
  --coral: #FF4B5B;
  --coral-edge: #D8394C;
  --bee: #FFC800;
  --bee-edge: #E0A500;
  --grape: #CE82FF;
  --ink: #3F464B;
  --ink-strong: #2B3135;
  --muted: #79838A;
  --line: #E5E5E5;
  --line-strong: #D8DDE0;
  --paper: #FFFFFF;
  --tint: #F7FBFE;

  --font: 'Nunito', -apple-system, 'Segoe UI', system-ui, sans-serif;
  --r-sm: 12px;
  --r: 16px;
  --r-lg: 24px;
  --container: 1120px;
  --nav-h: 74px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
main a:not([class]) { color: var(--sky-deep); font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 3px; }
main a:not([class]):hover { color: var(--ink-strong); }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }
::selection { background: #BDEBFF; color: var(--ink-strong); }

h1, h2, h3, h4 {
  font-weight: 900;
  color: var(--ink-strong);
  line-height: 1.12;
  margin: 0 0 0.9rem;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 5.6vw, 4.3rem); line-height: 1.03; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
h3 { font-size: 1.28rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 5.5rem 0; }
.section--tint { background: var(--tint); }
.section--sky-tint { background: var(--sky-tint); }
.lead { font-size: 1.25rem; line-height: 1.6; color: var(--muted); font-weight: 600; max-width: 44em; }
.section-head { max-width: 680px; margin: 0 auto 3.25rem; text-align: center; }
.section-head .lead { margin-inline: auto; }
.kicker {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sky-deep);
  margin-bottom: 0.9rem;
}

/* ---------- Buttons: the 3D press ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: var(--sky);
  border: 0;
  border-radius: var(--r);
  padding: 0.95rem 1.9rem;
  box-shadow: 0 4px 0 var(--sky-edge);
  cursor: pointer;
  position: relative;
  top: 0;
  transition: filter 0.15s ease, top 0.08s ease, box-shadow 0.08s ease;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { top: 4px; box-shadow: 0 0 0 var(--sky-edge); }
.btn--leaf { background: var(--leaf); box-shadow: 0 4px 0 var(--leaf-edge); }
.btn--leaf:active { box-shadow: 0 0 0 var(--leaf-edge); }
.btn--coral { background: var(--coral); box-shadow: 0 4px 0 var(--coral-edge); }
.btn--coral:active { box-shadow: 0 0 0 var(--coral-edge); }
.btn--white {
  background: #fff;
  color: var(--sky-deep);
  border: 2px solid var(--line);
  box-shadow: 0 4px 0 var(--line);
  padding: calc(0.95rem - 2px) 1.9rem;
}
.btn--white:hover { filter: none; background: var(--tint); }
.btn--white:active { box-shadow: 0 0 0 var(--line); }
.btn--big { font-size: 1.05rem; padding: 1.15rem 2.4rem; border-radius: 18px; }
.btn--ghost-dark {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.55);
  box-shadow: none;
}
.btn--ghost-dark:active { top: 0; }

/* Store badges */
.store-buttons { display: flex; gap: 0.8rem; flex-wrap: wrap; align-items: center; }
.store-badge { display: inline-block; border-radius: 13px; line-height: 0; transition: transform 0.12s ease; }
.store-badge:hover { transform: translateY(-3px); }
.store-badge:active { transform: translateY(2px); }
.store-badge img { height: 54px; width: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--line);
}
.nav { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; }
.brand img { width: 42px; height: 42px; border-radius: 12px; }
.brand b { font-size: 1.28rem; font-weight: 900; color: var(--ink-strong); letter-spacing: -0.01em; white-space: nowrap; }
.nav-links { display: flex; align-items: center; gap: 0.4rem; }
.nav-links a {
  font-weight: 800;
  font-size: 0.86rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--muted);
  text-decoration: none;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-links a:hover { color: var(--sky-deep); background: var(--sky-tint); }
.nav-cta { display: flex; align-items: center; gap: 0.7rem; }
.nav-cta .btn { font-size: 0.82rem; padding: 0.7rem 1.1rem; white-space: nowrap; }

.menu-toggle {
  display: none;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 3px 0 var(--line);
  padding: 0.5rem 0.85rem;
  font: inherit;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--muted);
  cursor: pointer;
}
.menu-toggle:active { transform: translateY(3px); box-shadow: none; }
.mobile-menu {
  display: none;
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  background: #fff;
  z-index: 99;
  padding: 1.5rem 24px;
  overflow-y: auto;
}
.mobile-menu.is-open { display: block; }
.mobile-menu a {
  display: block;
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--ink-strong);
  text-decoration: none;
  padding: 1.05rem 1.3rem;
  margin-bottom: 0.7rem;
  border: 2px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 4px 0 var(--line);
}
.mobile-menu a:active { transform: translateY(4px); box-shadow: none; }

/* ---------- Hero ---------- */
.hero { padding: 4.75rem 0 5.5rem; overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 3.5rem;
  align-items: center;
}
.hero h1 { margin-bottom: 1.1rem; }
.hero .lead { margin-bottom: 2rem; }
.hero-ctas { display: flex; gap: 0.9rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.4rem; }
.hero-note { font-size: 0.92rem; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 0.45rem; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, auto));
  gap: 2.4rem;
  justify-content: start;
  margin-top: 2.4rem;
  padding-top: 1.9rem;
  border-top: 2px solid var(--line);
}
.stat b { display: block; font-size: 1.75rem; font-weight: 900; color: var(--ink-strong); letter-spacing: -0.01em; }
.stat span { font-size: 0.88rem; font-weight: 700; color: var(--muted); }

.hero-visual { position: relative; }
.hero-visual .phones { position: relative; z-index: 2; }
.hero-visual .blob {
  position: absolute;
  inset: 4% -4% 0 -4%;
  background: var(--sky-tint);
  border-radius: 48px;
  z-index: 1;
}
.hero-visual .bird {
  position: absolute;
  z-index: 3;
  width: clamp(120px, 14vw, 190px);
  bottom: -3%;
  left: -5%;
  animation: bob 5s ease-in-out infinite;
}
.note-chip {
  position: absolute;
  z-index: 3;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 4px 0 var(--line);
  padding: 0.55rem 0.9rem;
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--ink-strong);
  display: flex;
  align-items: center;
  gap: 0.45rem;
  animation: bob 6s ease-in-out infinite;
}
.note-chip--tr { top: 5%; right: -3%; animation-delay: 1.4s; }
.note-chip--br { bottom: 14%; right: -6%; animation-delay: 2.6s; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-11px); }
}

/* ---------- Proof strip ---------- */
.proof-strip { background: var(--sky-tint); padding: 2.4rem 0; }
.proof-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.2rem;
  flex-wrap: wrap;
  text-align: center;
}
.proof-inner img.trio { width: 168px; }
.proof-inner .line { font-size: 1.3rem; font-weight: 900; color: var(--ink-strong); max-width: 22em; }
.stars { color: var(--bee); font-size: 1.15rem; letter-spacing: 0.12em; }

/* ---------- Feature rows ---------- */
.feature-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 4rem;
  align-items: center;
  padding: 3.4rem 0;
}
.feature-row .art { position: relative; }
.feature-row .art .bird-badge {
  position: absolute;
  width: clamp(110px, 12vw, 170px);
  bottom: -6%;
  right: -3%;
  z-index: 3;
  animation: bob 5.5s ease-in-out infinite;
}
.feature-row h2 { margin-bottom: 0.8rem; }
.feature-row p { color: var(--muted); font-weight: 600; font-size: 1.12rem; }
.feature-row ul { list-style: none; margin: 1.2rem 0 0; padding: 0; }
.feature-row li { padding: 0.42rem 0 0.42rem 2.1rem; position: relative; font-weight: 700; color: var(--ink); }
.feature-row li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--leaf) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/11px no-repeat;
}
@media (min-width: 901px) {
  .feature-row--flip .art { order: 2; }
  .feature-row--flip .copy { order: 1; }
}

/* Phone frame for videos/screens */
.phone-frame {
  width: min(305px, 78vw);
  margin-inline: auto;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 34px;
  padding: 12px;
  box-shadow: 0 4px 0 var(--line), 0 24px 48px -24px rgba(43, 49, 53, 0.18);
}
.phone-frame > * { border-radius: 24px; overflow: hidden; }

/* ---------- Small feature cards ---------- */
.grid { display: grid; gap: 1.4rem; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.9rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 6px 0 var(--line); }
.card h3 { margin-bottom: 0.45rem; }
.card p { color: var(--muted); font-weight: 600; font-size: 1rem; }
.icon-dot {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.15rem;
}
.icon-dot svg { width: 28px; height: 28px; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.step-card { text-align: center; padding: 2.1rem 1.6rem; }
.step-card .num {
  width: 44px;
  height: 44px;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  background: var(--sky);
  color: #fff;
  font-weight: 900;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 0 var(--sky-edge);
}
.step-card img { margin: 1.4rem auto 0; }
.step-card .step-shot { width: min(240px, 72vw); }
.step-card p { font-size: 0.99rem; }

/* ---------- Testimonials ---------- */
.testimonial { display: flex; flex-direction: column; gap: 1.1rem; height: 100%; }
.testimonial .stars { font-size: 1rem; }
.testimonial blockquote { margin: 0; font-size: 1.04rem; font-weight: 600; color: var(--ink); flex: 1; }
.testimonial .who { display: flex; align-items: center; gap: 0.85rem; }
.testimonial .who img { width: 54px; height: 54px; border-radius: 50%; border: 2px solid var(--line); background: #fff; object-fit: cover; padding: 4px; }
.testimonial .who b { display: block; font-weight: 900; color: var(--ink-strong); font-size: 0.98rem; }
.testimonial .who span { font-size: 0.85rem; font-weight: 700; color: var(--muted); }

/* ---------- Pricing ---------- */
.pricing-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.3rem; align-items: stretch; }
.plan {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.8rem 1.5rem 1.6rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.plan:hover { transform: translateY(-4px); box-shadow: 0 6px 0 var(--line); }
.plan--popular { border-color: var(--sky); border-width: 3px; box-shadow: 0 6px 0 var(--sky-edge); }
.plan--popular:hover { box-shadow: 0 9px 0 var(--sky-edge); }
.plan-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bee);
  color: var(--ink-strong);
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.32rem 1rem;
  box-shadow: 0 3px 0 var(--bee-edge);
  white-space: nowrap;
}
.plan h3 { font-size: 1.12rem; text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 0.2rem; }
.plan .tier-note { font-size: 0.85rem; font-weight: 700; color: var(--muted); margin-bottom: 0.9rem; }
.plan-price { font-size: 2.3rem; font-weight: 900; color: var(--ink-strong); letter-spacing: -0.02em; }
.plan-price small { font-size: 0.95rem; font-weight: 800; color: var(--muted); }
.plan ul { list-style: none; margin: 1.05rem 0 1.4rem; padding: 0; flex: 1; }
.plan li { padding: 0.38rem 0 0.38rem 1.85rem; position: relative; font-size: 0.94rem; font-weight: 700; color: var(--ink); }
.plan li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--leaf) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/10px no-repeat;
}
.plan .btn { width: 100%; }
.pricing-note { text-align: center; font-size: 0.92rem; font-weight: 600; color: var(--muted); margin-top: 1.6rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin-inline: auto; }
.faq details {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--r);
  padding: 1.15rem 1.4rem;
  margin-bottom: 0.85rem;
  transition: border-color 0.15s ease;
}
.faq details[open] { border-color: var(--sky); }
.faq summary {
  cursor: pointer;
  font-weight: 800;
  font-size: 1.06rem;
  color: var(--ink-strong);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '';
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--sky-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23009BD6' stroke-width='3.4' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center/15px no-repeat;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding-top: 0.75rem; color: var(--muted); font-weight: 600; }

/* ---------- Final CTA ---------- */
.cta-final { padding: 5.5rem 0; }
.cta-band {
  background: var(--sky);
  border-radius: 32px;
  box-shadow: 0 8px 0 var(--sky-edge);
  padding: clamp(2.2rem, 5vw, 3.8rem);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  gap: 2.5rem;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.cta-band h2 { color: #fff; margin-bottom: 0.7rem; }
.cta-band p { color: rgba(255, 255, 255, 0.95); font-weight: 700; font-size: 1.15rem; }
.cta-band .qr {
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.18);
  padding: 1.3rem;
  text-align: center;
  max-width: 225px;
  justify-self: center;
}
.cta-band .qr img { width: 100%; max-width: 158px; margin: 0 auto 0.6rem; image-rendering: pixelated; }
.cta-band .qr span { font-weight: 800; font-size: 0.85rem; color: var(--ink-strong); }
.cta-band .cta-bird {
  position: absolute;
  right: 26%;
  bottom: -6%;
  width: clamp(110px, 12vw, 170px);
  transform: rotate(-4deg);
}

/* ---------- Footer ---------- */
.site-footer { border-top: 2px solid var(--line); padding: 3.6rem 0 2.4rem; background: var(--tint); }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 2.4rem;
  margin-bottom: 2.6rem;
}
.footer-brand p { color: var(--muted); font-weight: 600; font-size: 0.95rem; max-width: 28em; }
.footer-col h4 { font-size: 0.82rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-strong); margin-bottom: 0.95rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 0.55rem; }
.footer-col a { text-decoration: none; font-weight: 700; font-size: 0.95rem; color: var(--muted); }
.footer-col a:hover { color: var(--sky-deep); }
.footer-bottom {
  border-top: 2px solid var(--line);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}
.footer-bottom a { color: inherit; }
.footer-bottom .social { display: flex; gap: 0.55rem; }
.footer-bottom .social a {
  width: 40px;
  height: 40px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 3px 0 var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}
.footer-bottom .social a:hover { color: var(--sky-deep); border-color: var(--sky); }
.footer-bottom .social a:active { transform: translateY(3px); box-shadow: none; }
.footer-bottom .social svg { width: 19px; height: 19px; }

/* ---------- Guide link cards ---------- */
.link-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; }
.link-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--r);
  padding: 0.95rem 1.15rem;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--ink-strong);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.link-card::after { content: '→'; margin-left: auto; color: var(--sky); font-weight: 900; }
.link-card:hover { transform: translateY(-3px); box-shadow: 0 5px 0 var(--line); border-color: var(--sky); }
.link-card:active { transform: translateY(1px); box-shadow: none; }
.link-card--featured { background: var(--sky); border-color: var(--sky-edge); color: #fff; box-shadow: 0 4px 0 var(--sky-edge); }
.link-card--featured::after { color: #fff; }
.link-card--featured:hover { box-shadow: 0 7px 0 var(--sky-edge); border-color: var(--sky-edge); }

.guide-search {
  width: 100%;
  font: inherit;
  font-weight: 700;
  color: var(--ink-strong);
  padding: 1rem 1.3rem;
  border: 2px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 3px 0 var(--line);
  background: #fff;
}
.guide-search::placeholder { color: var(--muted); }
.guide-search:focus { outline: 3px solid var(--sky); outline-offset: 2px; }

@media (max-width: 900px) { .link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .link-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Header language switcher ---------- */
.lang-switch { position: relative; }
.lang-switch > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 42px;
  padding: 0 0.7rem;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 3px 0 var(--line);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--ink-strong);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.lang-switch > summary::-webkit-details-marker { display: none; }
.lang-switch > summary:hover { border-color: var(--sky); color: var(--sky-deep); }
.lang-switch > summary:active { transform: translateY(3px); box-shadow: none; }
.lang-flag { font-size: 1.15rem; line-height: 1; }
.lang-code { font-variant-numeric: tabular-nums; }
.lang-caret { width: 14px; height: 14px; color: var(--muted); transition: transform 0.2s ease; }
.lang-switch[open] > summary { border-color: var(--sky); color: var(--sky-deep); }
.lang-switch[open] .lang-caret { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: 0;
  z-index: 120;
  margin: 0;
  padding: 0.6rem;
  list-style: none;
  width: min(560px, calc(100vw - 32px));
  max-height: min(60vh, 460px);
  overflow-y: auto;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 6px 0 var(--line), 0 22px 44px -18px rgba(43, 49, 53, 0.28);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 0.15rem;
}
.lang-menu a {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.6rem;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lang-menu a:hover { background: var(--sky-tint); color: var(--sky-deep); }
.lang-menu a[aria-current="true"] { background: var(--sky); color: #fff; }
.lang-menu .lang-name { overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 620px) {
  .nav-cta { min-width: 0; flex: 1 1 auto; justify-content: flex-end; gap: 0.4rem; }
  .nav-cta .btn {
    min-width: 0;
    padding: 0.65rem 0.8rem;
    font-size: 0.74rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    line-height: 1.6;
  }
  .brand img { width: 38px; height: 38px; }
  .lang-switch > summary { height: 38px; padding: 0 0.55rem; }
  .lang-switch > summary .lang-code { display: none; }
  .lang-menu { position: fixed; inset-inline: 12px; top: calc(var(--nav-h) + 8px); width: auto; }
}

/* ---------- Footer language picker (legacy) ---------- */
.lang-picker { margin: 0 0 1.4rem; }
.lang-picker > summary {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--ink-strong);
  background: #fff;
  border: 2px solid var(--line);
  border-radius: var(--r);
  box-shadow: 0 3px 0 var(--line);
  padding: 0.55rem 1.1rem;
  list-style: none;
}
.lang-picker > summary::-webkit-details-marker { display: none; }
.lang-picker > summary::after { content: '▾'; color: var(--muted); }
.lang-picker[open] > summary::after { content: '▴'; }
.lang-picker > summary:hover { border-color: var(--sky); color: var(--sky-deep); }
.lang-picker ul {
  list-style: none;
  margin: 0.9rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.4rem 1rem;
}
.lang-picker li { margin: 0; }
.lang-picker a {
  display: block;
  padding: 0.3rem 0.1rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}
.lang-picker a:hover { color: var(--sky-deep); }
.lang-picker a[aria-current="true"] { color: var(--ink-strong); font-weight: 800; }

/* ---------- RTL ---------- */
[dir="rtl"] .hero-visual .bird { left: auto; right: -5%; }
[dir="rtl"] .note-chip--tr { right: auto; left: -3%; }
[dir="rtl"] .note-chip--br { right: auto; left: -6%; }
[dir="rtl"] .feature-row .art .bird-badge { right: auto; left: -3%; }
[dir="rtl"] .cta-band .cta-bird { right: auto; left: 26%; transform: rotate(4deg) scaleX(-1); }
[dir="rtl"] .plan li,
[dir="rtl"] .feature-row li { padding-left: 0; padding-right: 1.85rem; }
[dir="rtl"] .plan li::before,
[dir="rtl"] .feature-row li::before { left: auto; right: 0; }
[dir="rtl"] .link-card::after { content: '←'; margin-left: 0; margin-right: auto; }
[dir="rtl"] .prose ul, [dir="rtl"] .prose ol { padding-left: 0; padding-right: 1.4rem; }
[dir="rtl"] .btn, [dir="rtl"] .kicker { letter-spacing: 0; }
[dir="rtl"] .hero-stats { justify-content: end; }

/* ---------- Legal prose ---------- */
.page-hero { padding: 4rem 0 2.4rem; }
.page-hero .updated { color: var(--muted); font-weight: 700; font-size: 0.95rem; }
.prose { max-width: 740px; }
.prose h2 { font-size: 1.45rem; margin-top: 2.6rem; }
.prose h3 { font-size: 1.1rem; margin-top: 1.9rem; }
.prose p, .prose li { color: var(--ink); font-weight: 500; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-bottom: 0.4rem; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Utilities ---------- */
.center { text-align: center; }
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  /* Offset vertically, not horizontally: a negative `left` becomes scrollable
     width under dir="rtl" and blew the document out to ~11400px. */
  position: absolute;
  inset-inline-start: 0;
  top: -140px;
  z-index: 200;
  background: #fff;
  border: 2px solid var(--line);
  padding: 0.6rem 1rem;
  font-weight: 800;
  border-radius: 0 0 12px 0;
}
.skip-link:focus { top: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .menu-toggle { display: block; }
}
@media (max-width: 900px) {
  .hero { padding-top: 3.2rem; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 3.6rem; }
  .feature-row { grid-template-columns: minmax(0, 1fr); gap: 2.4rem; padding: 2.6rem 0; }
  .grid--3, .steps { grid-template-columns: minmax(0, 1fr); }
  .cta-band { grid-template-columns: minmax(0, 1fr); }
  .cta-band .qr { display: none; }
  .cta-band .cta-bird { display: none; }
}
@media (max-width: 620px) {
  .section { padding: 3.8rem 0; }
  .grid--2, .pricing-grid, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
  .stat b { font-size: 1.3rem; }
  .stat span { font-size: 0.78rem; }
  .note-chip { display: none; }
  .hero-visual .bird { width: 110px; left: 0; }
}
@media (max-width: 460px) {
  .brand b { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-visual .bird, .note-chip, .feature-row .art .bird-badge { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}
