/* ==========================================================================
   SpeakLegends — speaklegends.com marketing landing page
   Self-contained. Zero external deps. Light surface, #1CB0F6 accent.
   Responsive · dark-mode aware · print friendly.
   ========================================================================== */

/* ---- Design tokens ---- */
:root {
  --blue:        #1CB0F6;
  --blue-deep:   #0E6EA8;
  --blue-dark:   #0a4f7a;
  --gold:        #FFC800;
  --ink:         #0d1b2a;
  --ink-soft:    #44525f;
  --surface:     #ffffff;
  --surface-2:   #f3f7fb;
  --surface-3:   #e6eef6;
  --border:      #dce5ee;
  --shadow:      0 10px 30px rgba(13, 27, 42, 0.10);
  --shadow-sm:   0 4px 14px rgba(13, 27, 42, 0.08);
  --radius:      18px;
  --radius-sm:   12px;
  --wrap:        1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:       #eef4fa;
    --ink-soft:  #a7b6c4;
    --surface:   #0e1620;
    --surface-2: #141f2c;
    --surface-3: #1c2a39;
    --border:    #263443;
    --shadow:    0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.40);
  }
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; max-width: 100%; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 24px;
}

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
}
.brand:hover { text-decoration: none; }
.brand-name { font-size: 1.2rem; letter-spacing: -0.02em; }
.owl { flex: none; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.header-nav a {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
}
.header-nav a:hover { color: var(--ink); text-decoration: none; }
.nav-cta {
  background: var(--blue);
  color: #fff !important;
  padding: 9px 18px;
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--blue-dark);
}
.nav-cta:hover { background: var(--blue-dark); }

/* Language switcher (en <-> es) */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-size: 0.9rem;
}
.lang-switch::before {
  content: "";
  width: 14px; height: 14px;
  flex: none;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231CB0F6' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20M12 2a15 15 0 0 1 0 20 15 15 0 0 1 0-20'/%3E%3C/svg%3E");
}
.lang-switch:hover { border-color: var(--blue); text-decoration: none; }

/* ---- Hero ---- */
.hero {
  background:
    radial-gradient(900px 420px at 50% -120px, color-mix(in srgb, var(--blue) 22%, transparent), transparent),
    var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.hero-inner {
  text-align: center;
  padding-block: 84px 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-title {
  font-size: clamp(2.1rem, 5.5vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 800;
  max-width: 16ch;
}
.hero-title .lang-es { display: block; color: var(--blue); }
.hero-title .lang-en { display: block; color: var(--ink); }
.hero-sub {
  margin-top: 22px;
  max-width: 60ch;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: var(--ink-soft);
}
.hero-sub .lang-es { display: block; font-weight: 600; color: var(--ink); }
.hero-sub .lang-en { display: block; margin-top: 6px; }

.hero-actions {
  margin-top: 30px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero-note {
  margin-top: 18px;
  font-size: 0.86rem;
  color: var(--ink-soft);
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 30px;
  border-radius: 999px;
  transition: transform 0.12s ease, background 0.12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: var(--blue-deep);
  color: #fff;
  box-shadow: 0 4px 0 var(--blue-dark);
}
.btn-primary:hover { background: var(--blue-dark); }
.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--border);
}
.btn-ghost:hover { border-color: var(--blue); }

/* ---- Badge ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 7px 15px;
  border-radius: 999px;
}
.badge-spanish {
  background: color-mix(in srgb, var(--blue) 14%, var(--surface));
  color: var(--blue-dark);
  border: 1px solid color-mix(in srgb, var(--blue) 35%, transparent);
  margin-bottom: 26px;
}
@media (prefers-color-scheme: dark) {
  .badge-spanish { color: var(--blue); }
}
.badge .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold);
  flex: none;
}

/* ---- Sections ---- */
.section { padding-block: 84px; }
.section-alt { background: var(--surface-2); border-block: 1px solid var(--border); }
.section-title {
  font-size: clamp(1.7rem, 3.8vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  text-align: center;
}
.section-lead {
  margin: 14px auto 0;
  max-width: 56ch;
  text-align: center;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* ---- Feature grid ---- */
.feature-grid {
  list-style: none;
  margin-top: 48px;
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.feature-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--blue) 14%, var(--surface));
  color: var(--blue);
  margin-bottom: 16px;
}
.feature-card h3 {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.feature-card p {
  color: var(--ink-soft);
  font-size: 0.97rem;
}

/* ---- Screenshots ---- */
.screens-grid {
  margin-top: 48px;
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  justify-items: center;
}
.phone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 260px;
}
.phone-frame {
  position: relative;
  width: 230px;
  aspect-ratio: 9 / 19.5;
  background: var(--ink);
  border-radius: 38px;
  padding: 12px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.phone-notch {
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  width: 92px; height: 22px;
  background: var(--ink);
  border-radius: 0 0 14px 14px;
  z-index: 2;
}
.phone-screen {
  width: 100%; height: 100%;
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.screen-placeholder {
  font-weight: 800;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.02em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
/* Distinct placeholder gradients per screen (swap for real PNGs later) */
.phone-screen--lessons { background: linear-gradient(160deg, #1CB0F6, #1370b8); }
.phone-screen--streak  { background: linear-gradient(160deg, #FF9600, #ff6a3d); }
.phone-screen--league  { background: linear-gradient(160deg, #58CC02, #2f9e3f); }

.phone figcaption {
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
  max-width: 24ch;
}
.screens-note {
  margin-top: 36px;
  text-align: center;
  font-size: 0.84rem;
  color: var(--ink-soft);
}

/* ---- CTA ---- */
.cta {
  background:
    radial-gradient(700px 320px at 50% 120%, color-mix(in srgb, var(--blue) 20%, transparent), transparent),
    var(--surface);
}
.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.appstore-badge {
  margin-top: 30px;
  display: inline-block;
  border-radius: 10px;
  transition: transform 0.12s ease;
}
.appstore-badge:hover { transform: translateY(-2px); }
.cta-note {
  margin-top: 22px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* ---- Footer ---- */
.site-footer {
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  padding-block: 40px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  color: var(--ink);
}
.footer-nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-nav a {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
}
.footer-nav a:hover { color: var(--blue); }
.footer-copy {
  font-size: 0.84rem;
  color: var(--ink-soft);
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .header-nav { gap: 14px; }
  .header-nav a:not(.nav-cta) { display: none; }
  .hero-inner { padding-block: 60px 68px; }
  .section { padding-block: 60px; }
  .btn { width: 100%; max-width: 320px; text-align: center; }
  .hero-actions { width: 100%; }
}

/* ---- Print ---- */
@media print {
  .site-header, .hero-actions, .nav-cta, .appstore-badge { display: none !important; }
  body { background: #fff; color: #000; }
  .hero, .section-alt, .cta, .site-footer { background: #fff !important; }
  .feature-card, .phone-frame { box-shadow: none; border: 1px solid #999; }
  a { color: #000; text-decoration: underline; }
  .hero-title .lang-es, .hero-title .lang-en { color: #000; }
}
