/* ─────────────────────────────────────────────────────────────
   SpeakOnline — design tokens & global styles
   ───────────────────────────────────────────────────────────── */

:root {
  /* Palette: Aurora (default) — overridden by Tweaks */
  --bg: #07070b;
  --bg-2: #0c0c14;
  --bg-3: #11111c;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #f4f4f7;
  --text-2: #a8a8b8;
  --text-3: #6c6c7c;
  --accent: #7c5cff;
  --accent-2: #4ad7d1;
  --accent-soft: rgba(124, 92, 255, 0.14);
  --grid: rgba(124, 92, 255, 0.06);

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Geist', system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, monospace;
  --font-cyr: 'Manrope', system-ui, sans-serif;

  --maxw: 1240px;
  --pad: clamp(20px, 4vw, 56px);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: #fff; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

img { max-width: 100%; display: block; }

/* ─── layout ─── */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.section {
  position: relative;
  padding: clamp(80px, 10vw, 140px) 0;
}

.section--tight { padding: clamp(60px, 7vw, 100px) 0; }

/* ─── type ─── */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 6vw, 80px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 0;
}

.h1 em {
  font-style: normal;
  font-family: var(--font-cyr);
  font-weight: 300;
  font-style: italic;
  background: linear-gradient(120deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* italic glyphs (y, e) overhang their box — pad right so overflow:hidden parents don't clip the ink */
  padding-right: 0.08em;
  margin-right: -0.04em;
}

.h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(34px, 4.4vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}

.h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0;
}

.lead {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.5;
  color: var(--text-2);
  max-width: 60ch;
  text-wrap: pretty;
  margin: 0;
}

.mono { font-family: var(--font-mono); }

/* ─── buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--ghost {
  background: transparent;
  border-color: var(--line-2);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--text); }

.btn--store {
  height: 60px;
  padding: 0 22px;
  background: #fff;
  color: #000;
  border-radius: 14px;
  position: relative;
}
.btn--store .small {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.55);
  margin-bottom: 1px;
}
.btn--store .big {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.btn--store .badge {
  position: absolute;
  top: -8px; right: -8px;
  padding: 3px 8px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 6px;
  font-weight: 500;
}

/* ─── card ─── */
.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
}

.card--hover { transition: border-color .2s ease, transform .2s ease; }
.card--hover:hover { border-color: var(--line-2); transform: translateY(-2px); }

/* ─── grid background ─── */
.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 0%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

.glow {
  position: absolute;
  width: 800px; height: 800px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, transparent 60%);
  filter: blur(80px);
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}

/* ─── nav ─── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  background: rgba(7, 7, 11, 0.7);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-links {
  display: flex;
  gap: 32px;
  font-size: 14px;
  color: var(--text-2);
}
.nav-links a { transition: color .15s ease; }
.nav-links a:hover { color: var(--text); }

@media (max-width: 760px) { .nav-links { display: none; } }

/* ─── logo ─── */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.logo-mark {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  position: relative;
  overflow: hidden;
}
.logo-mark::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 4px;
  border: 1.5px solid rgba(255,255,255,0.85);
  border-bottom-color: transparent;
  border-left-color: transparent;
  transform: rotate(45deg);
}

/* ─── chip / tag ─── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--text-2);
}

/* ─── divider line styles ─── */
.hairline {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-2) 50%, transparent);
}

/* ─── animations ─── */
@keyframes pulse-soft {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}

@keyframes wave {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

@keyframes orb-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes orb-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.02); }
}

@keyframes blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95%, 97% { transform: scaleY(0.1); }
}

@keyframes typewriter-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ─── phone scaling ─── */
.phone-scale { transform: scale(0.88); }

/* ─────────────────────────────────────────────────────────────
   Responsive — tablet & phones
   ───────────────────────────────────────────────────────────── */

/* Tablet / small laptop — stack hero + demo, shrink phone */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }
  .demo-grid {
    grid-template-columns: 1fr !important;
    gap: 48px !important;
  }
  .hero-phone-wrap {
    min-height: 640px !important;
  }
  .phone-scale { transform: scale(0.78); }
}

/* Phones */
@media (max-width: 560px) {
  :root { --pad: 18px; }

  .nav-inner { height: 60px; }
  .logo { font-size: 16px; }
  .logo-mark { width: 26px; height: 26px; }

  .hero-phone-wrap { min-height: 560px !important; }
  .phone-scale { transform: scale(0.66); }

  /* Store buttons stack neatly and don't blow out width */
  .btn--store { height: 56px; padding: 0 16px; flex: 1 1 auto; min-width: 0; }
  .btn--store .big { font-size: 17px; }
  .btn--store .small { font-size: 9.5px; }

  /* Section padding tightens on small viewports */
  .section { padding: clamp(56px, 12vw, 100px) 0; }

  /* Forms & inputs — keep within viewport, friendlier tap targets */
  .btn { height: 48px; padding: 0 18px; font-size: 14px; }
}

/* Tiny phones (≤380px) — extra crunch */
@media (max-width: 380px) {
  .hero-phone-wrap { min-height: 500px !important; }
  .phone-scale { transform: scale(0.58); }
}
