/* ===================================================================
   Ottopilot — Lead-gen landing page (getottopilot.ai)
   All colors read from tokens.css. No raw hex outside alpha overlays
   derived from token values.
   =================================================================== */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cloud);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

.zh { font-family: var(--font-sc); }

img { max-width: 100%; }

/* ---------- Motion primitives ---------- */

@keyframes ottoFloat {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50%      { transform: translateY(-14px) rotate(1deg); }
}

@keyframes glowPulse {
  0%, 100% { opacity: .5; }
  50%      { opacity: .95; }
}

@keyframes ctaPulse {
  0%   { box-shadow: 0 8px 20px rgba(247, 67, 116, 0.32), 0 0 0 0 rgba(247, 67, 116, 0.35); }
  70%  { box-shadow: 0 8px 20px rgba(247, 67, 116, 0.32), 0 0 0 14px rgba(247, 67, 116, 0); }
  100% { box-shadow: 0 8px 20px rgba(247, 67, 116, 0.32), 0 0 0 0 rgba(247, 67, 116, 0); }
}

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .6s cubic-bezier(0.16, 1, 0.3, 1), transform .6s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 100px;
  padding: 16px 30px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .18s ease;
}

.btn:active { transform: translateY(1px) scale(0.98); }

.btn:focus-visible {
  outline: 3px solid var(--cyan-deep);
  outline-offset: 3px;
}

.btn--primary {
  color: #fff;
  background: var(--otto-pink);
  box-shadow: 0 8px 20px rgba(247, 67, 116, 0.32);
}

.btn--primary:hover { transform: translateY(-2px); }

.btn--pulse { animation: ctaPulse 2.6s ease-out infinite; }

.btn--ghost {
  color: var(--text-strong);
  background: var(--surface-chip);
  font-weight: 600;
}

.btn--ghost:hover { background: var(--border-pill); }

.btn--compact {
  font-size: 14px;
  padding: 11px 20px;
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--cloud) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  height: 68px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.nav-logo img { height: 34px; width: auto; display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-links a:not(.btn) {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-strong);
  text-decoration: none;
}

.nav-links a:not(.btn):hover { color: var(--otto-pink); }

/* ---------- Hero ---------- */

.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 32px 72px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--otto-pink);
  background: var(--otto-pink-tint);
  border-radius: 100px;
  padding: 8px 15px;
  margin-bottom: 24px;
  font-weight: 500;
}

.hero-headline {
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.06;
  margin: 0 0 18px;
}

.hero-headline .accent { color: var(--otto-pink); }

/* Rotating audience sets: grid-stacked so the container holds the height
   of the tallest set and the layout never shifts between rotations */
.hero-rotator {
  display: grid;
  align-items: start;
}

.hero-set {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity .55s cubic-bezier(0.16, 1, 0.3, 1), transform .55s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-set.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition-delay: .2s;
}

.hero-set.zh .hero-headline {
  font-family: var(--font-sc);
  font-weight: 700;
  letter-spacing: 0;
}

.hero-set.zh .hero-sub {
  font-family: var(--font-sc);
  line-height: 1.7;
}

@media (prefers-reduced-motion: reduce) {
  .hero-set { transition: none; }
}

.hero-sub {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-body);
  max-width: 480px;
  margin: 0 0 30px;
}

.hero-sub strong { color: var(--ink); }

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 320px;
}

.hero-glow {
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(247, 67, 116, 0.16), rgba(16, 196, 224, 0.08) 55%, transparent 72%);
  animation: glowPulse 4s ease-in-out infinite;
}

/* Mount point for the production 3D character (Spline/Lottie/R3F).
   The PNG inside is the placeholder + no-JS/reduced-motion fallback. */
.otto-3d-wrapper {
  position: relative;
  width: min(520px, 100%);
}

.otto-3d-wrapper img,
.otto-3d-wrapper video {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 30px 40px rgba(247, 67, 116, 0.22));
  background: transparent;
  mix-blend-mode: multiply;
}

/* motion lives inside the video itself; only the static fallback floats */
.otto-3d-wrapper img {
  animation: ottoFloat 6s ease-in-out infinite;
}

.otto-3d-wrapper .otto-fallback { display: none; }

@media (prefers-reduced-motion: reduce) {
  .otto-3d-wrapper .otto-video { display: none; }
  .otto-3d-wrapper .otto-fallback { display: block; }
}

/* ---------- Sections ---------- */

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 32px;
}

.section-title {
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0 0 14px;
}

.section-lede {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 0 40px;
}

/* ---------- Trilingual benefit grid ---------- */

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.benefit-card {
  border-radius: 24px;
  padding: 34px;
}

.benefit-card--en {
  grid-column: span 7;
  background: #fff;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
}

.benefit-card--bm {
  grid-column: span 5;
  background: var(--ink);
  color: #fff;
}

.benefit-card--zh {
  grid-column: span 12;
  background: var(--cyan-tint);
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 28px;
  align-items: center;
}

.lang-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 100px;
  padding: 6px 13px;
  margin-bottom: 20px;
  font-weight: 500;
}

.benefit-card--en .lang-chip { background: var(--otto-pink-tint); color: var(--otto-pink); }
.benefit-card--bm .lang-chip { background: rgba(255, 255, 255, 0.1); color: var(--autopilot-cyan); }
.benefit-card--zh .lang-chip { background: #fff; color: var(--cyan-deep); }

.benefit-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0 0 12px;
}

.benefit-body {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0;
  max-width: 58ch;
}

.benefit-card--bm .benefit-body { color: rgba(255, 255, 255, 0.78); }
.benefit-card--zh .benefit-body { color: var(--text-strong); line-height: 1.8; }

.benefit-bm-visual {
  margin-top: 22px;
  display: flex;
  justify-content: flex-end;
}

.benefit-bm-visual img {
  width: min(130px, 40%);
  height: auto;
  filter: drop-shadow(0 10px 20px rgba(247, 67, 116, 0.3));
}

.benefit-zh-visual {
  display: flex;
  justify-content: center;
}

.benefit-zh-visual img {
  width: min(190px, 100%);
  height: auto;
}

/* ---------- Otto in Action: Telegram simulator ---------- */

.sim {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: center;
}

.sim-tabs {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sim-tab {
  font-family: inherit;
  text-align: left;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  padding: 18px 22px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: border-color .2s ease, box-shadow .2s ease, transform .18s cubic-bezier(0.16, 1, 0.3, 1);
}

.sim-tab:hover { transform: translateY(-1px); }

.sim-tab:focus-visible {
  outline: 3px solid var(--cyan-deep);
  outline-offset: 2px;
}

.sim-tab[aria-selected="true"] {
  border: 2px solid var(--otto-pink);
  background: #FFF6FB;
  box-shadow: 0 8px 24px rgba(247, 67, 116, 0.12);
  padding: 17px 21px;
}

.sim-tab-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.sim-tab[aria-selected="true"] .sim-tab-title { color: var(--otto-pink); }

.sim-tab-sub {
  font-size: 13px;
  color: var(--text-muted);
}

.sim-phone {
  justify-self: center;
  width: min(400px, 100%);
  background: var(--ink);
  border-radius: 34px;
  padding: 12px;
  box-shadow: 0 24px 60px rgba(23, 24, 28, 0.18);
}

.sim-phone-header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px 14px;
}

.sim-avatar {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  padding: 3px;
}

.sim-phone-id {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.sim-phone-name {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.sim-phone-status {
  color: var(--autopilot-cyan);
  font-size: 12px;
  font-weight: 600;
}

.sim-phone-bot {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-label);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 100px;
  padding: 3px 10px;
}

.sim-chat {
  background: var(--cloud);
  border-radius: 22px 22px 0 0;
  padding: 20px 16px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.sim-pane {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sim-pane[hidden] { display: none; }

.sim-msg {
  font-size: 14.5px;
  line-height: 1.55;
  opacity: 0;
  transform: translateY(14px);
  animation: msgIn .5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.sim-pane .sim-msg:nth-child(1) { animation-delay: .15s; }
.sim-pane .sim-msg:nth-child(2) { animation-delay: .7s; }

@keyframes msgIn {
  to { opacity: 1; transform: none; }
}

.sim-msg--user {
  align-self: flex-end;
  max-width: 80%;
  background: var(--otto-pink);
  color: #fff;
  border-radius: 18px 18px 5px 18px;
  padding: 11px 15px;
}

.sim-msg--otto {
  align-self: flex-start;
  max-width: 88%;
  background: #fff;
  border: 1px solid var(--border-soft);
  color: var(--text-strong);
  border-radius: 18px 18px 18px 5px;
  padding: 12px 15px;
  box-shadow: var(--shadow-card);
}

.sim-msg--system {
  align-self: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  background: var(--surface-chip);
  border-radius: 100px;
  padding: 5px 14px;
}

.sim-inputbar {
  background: var(--cloud);
  border-radius: 0 0 22px 22px;
  padding: 10px 14px 14px;
  border-top: 1px solid var(--border-soft);
}

.sim-inputbar span {
  display: block;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 100px;
  padding: 10px 16px;
  color: var(--text-faint);
  font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .sim-msg { animation: none; opacity: 1; transform: none; }
}

/* ---------- Data residency strip ---------- */

.residency-note {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 18px;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  padding: 18px 24px;
}

.residency-flag { font-size: 30px; line-height: 1; }

.residency-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 3px;
}

.residency-note p {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
}

/* ---------- Pricing ---------- */

.billing-toggle {
  display: inline-flex;
  gap: 4px;
  background: var(--surface-chip);
  border-radius: 100px;
  padding: 4px;
  margin-bottom: 28px;
}

.billing-opt {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 100px;
  padding: 9px 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.billing-opt:focus-visible {
  outline: 3px solid var(--cyan-deep);
  outline-offset: 2px;
}

.billing-opt[aria-pressed="true"] {
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(23, 24, 28, 0.08);
}

.billing-save {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--otto-pink);
  border-radius: 100px;
  padding: 3px 9px;
}

.tier-billed {
  font-size: 12.5px;
  color: var(--text-faint);
  margin: 0 0 10px;
  min-height: 18px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  align-items: stretch;
}

.tier-card {
  border: 1px solid var(--border-pill);
  border-radius: 22px;
  padding: 28px 26px;
  background: #fff;
  position: relative;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.tier-card--anchor {
  border: 2px solid var(--otto-pink);
  background: #FFF6FB;
  box-shadow: 0 12px 36px rgba(247, 67, 116, 0.14);
}

.tier-flag {
  position: absolute;
  top: -13px;
  left: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  color: #fff;
  background: var(--otto-pink);
  border-radius: 100px;
  padding: 5px 13px;
}

.tier-name {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text-faint);
  margin-bottom: 14px;
}

.tier-card--anchor .tier-name { color: var(--otto-pink); }

.tier-price {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-bottom: 4px;
}

.tier-price .currency { font-size: 15px; font-weight: 600; color: var(--text-faint); }
.tier-price .amount { font-size: 42px; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); }
.tier-price .period { font-size: 14px; color: var(--text-faint); }

.tier-tokens {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyan-deep);
  margin-bottom: 18px;
}

.tier-features {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.tier-features li {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-muted);
  padding-left: 18px;
  position: relative;
}

.tier-features li::before {
  content: "+";
  position: absolute;
  left: 0;
  font-weight: 700;
  color: var(--cyan-deep);
}

.tier-card--anchor .tier-features li::before { color: var(--otto-pink); }

.tier-card .btn { width: 100%; }

/* ---------- Closing CTA band ---------- */

.closing {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px 72px;
}

.closing-panel {
  background: var(--ink);
  border-radius: 28px;
  padding: 56px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.closing-panel img {
  width: 150px;
  height: auto;
  filter: drop-shadow(0 14px 26px rgba(247, 67, 116, 0.35));
}

.closing-panel h2 {
  color: #fff;
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 10px 0 6px;
}

.closing-panel p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 16px;
  line-height: 1.6;
  max-width: 46ch;
  margin: 0 0 26px;
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--border-soft);
  padding: 36px 32px 46px;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-handles {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.footer-handle .channel {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-label);
  margin-bottom: 4px;
}

.footer-handle .value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-strong);
}

.footer-copyright {
  font-size: 13px;
  color: var(--text-faint);
}

/* ---------- Sticky mobile CTA ---------- */

.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--cloud) 92%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-soft);
  transform: translateY(110%);
  transition: transform .35s cubic-bezier(0.16, 1, 0.3, 1);
  display: none;
}

.sticky-cta.visible { transform: translateY(0); }

.sticky-cta .btn { width: 100%; }

@media (prefers-reduced-motion: reduce) {
  .sticky-cta { transition: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .hero-visual { order: -1; min-height: 0; }
  .otto-3d-wrapper { width: min(400px, 90vw); }
  .hero-glow { width: 380px; height: 380px; }

  .benefit-card--en, .benefit-card--bm { grid-column: span 12; }
  .benefit-card--zh { grid-template-columns: 1fr; }
  .benefit-zh-visual { order: -1; }

  .sim { grid-template-columns: 1fr; gap: 24px; }
  .sim-tabs {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }
  .sim-tab { flex: 0 0 auto; min-width: 180px; }

  .pricing-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-inner { padding: 0 20px; }
  .nav-links a:not(.btn) { display: none; }
  .nav .btn--compact { display: none; }

  .hero, .section, .closing { padding-left: 20px; padding-right: 20px; }
  .hero { padding-top: 24px; gap: 22px; }
  .otto-3d-wrapper { width: min(320px, 82vw); }
  .hero-glow { width: 300px; height: 300px; }
  .hero-headline { font-size: clamp(30px, 8.6vw, 38px); }
  .hero-sub { font-size: 16px; margin-bottom: 22px; }
  .section { padding-top: 56px; padding-bottom: 56px; }

  .pricing-grid { grid-template-columns: 1fr; }
  .benefit-card { padding: 26px; }
  .closing-panel { padding: 44px 24px; }

  .sticky-cta { display: block; }

  /* Reserve space so the sticky bar never covers the footer */
  body { padding-bottom: 86px; }
}
