/* ================================================================
   SPEAKTRUE — MODERNIST LANDING PAGE
   Design: Mies van der Rohe × Dieter Rams
   Theme: Pear Meadow — vibrant yellow-green on warm near-black
   "Less but better." — Every element earns its place.
   ================================================================ */

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Subtle grain texture — adds warmth without decoration */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.025;
  pointer-events: none;
  z-index: 9999;
}

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

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

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

/* === LAYOUT === */
.container {
  width: min(1120px, calc(100% - 4rem));
  margin: 0 auto;
}

/* === HEADER — glass bar, minimal, precise === */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(28, 27, 23, 0.72);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border-bottom: 1px solid var(--border);
  transition: border-color var(--t-base) var(--ease);
}

.site-header.scrolled { border-bottom-color: var(--border-mid); }

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

/* Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: opacity var(--t-fast) var(--ease);
}
.brand:hover { opacity: 0.7; }

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  object-fit: cover;
  border: 1px solid var(--border-mid);
  display: block;
}

/* Nav */
.header-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
}

/* Auth nav container */
.auth-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

/* Auth pill base */
.auth-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-mid);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  background: var(--bg-raised);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    background var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease);
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  text-decoration: none;
}

.auth-pill:hover {
  background: var(--bg-card);
  border-color: var(--border-mid);
}

/* User pill */
.auth-pill--user {
  cursor: default;
}

.auth-pill__avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.65rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-pill__label {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sign-in buttons */
.auth-pill--signin {
  padding: 0.35rem 0.65rem;
}

.auth-pill--signin svg {
  flex-shrink: 0;
}

/* Logout button */
.auth-pill--logout {
  color: var(--text-secondary);
  padding: 0.35rem 0.6rem;
}

.auth-pill--logout:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.header-nav a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  transition: color var(--t-fast) var(--ease);
  position: relative;
}

.header-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  bottom: -3px; left: 0; right: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-fast) var(--ease);
}

.header-nav a:not(.btn):hover { color: var(--text-primary); }
.header-nav a:not(.btn):hover::after { transform: scaleX(1); }

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-md);
  padding: 0.55rem 1.1rem;
  background: var(--bg-raised);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease),
    transform var(--t-fast) var(--ease);
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}

.btn:hover { background: var(--bg-card); border-color: var(--border-mid); }
.btn:active { transform: translateY(1px); }

.btn.primary {
  background: var(--accent);
  color: var(--bg);
  border-color: transparent;
}

.btn.primary:hover {
  background: #e8f550;
  border-color: transparent;
}

/* Store pills */
.store-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: not-allowed;
}

/* === HERO — bold, quiet, arresting through scale === */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--sp-10) + 64px) 0 var(--sp-9);
  position: relative;
}

/* Subtle ambient gradient — architectural, not decorative */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 20% 0%, rgba(220, 237, 49, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 100%, rgba(125, 133, 112, 0.05) 0%, transparent 55%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--sp-8);
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--accent);
  opacity: 0.6;
}

h1 {
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
  margin-bottom: var(--sp-5);
  max-width: 18ch;
}

.lead {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: var(--sp-7);
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-7);
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

/* Hero media panel */
.hero-media {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--t-base) var(--ease);
}

.hero-media:hover { border-color: var(--border-mid); }

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-fallback {
  display: none;
  padding: var(--sp-6);
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

[data-media-panel].is-missing [data-required-media] { display: none; }
[data-media-panel].is-missing .media-fallback { display: block; }

/* ================================================================
   SCREENSHOT SLIDESHOW
   ================================================================ */
.screenshots-slideshow {
  position: absolute;
  inset: 0;
}

.screenshots-slideshow .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--t-slow) var(--ease-out);
  pointer-events: none;
}

.screenshots-slideshow .slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.screenshots-slideshow .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Dot indicators */
.slideshow-dots {
  position: absolute;
  bottom: var(--sp-4);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  z-index: 2;
}

.slideshow-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(244, 241, 232, 0.28);
  border: none;
  padding: 0;
  cursor: pointer;
  transition:
    background var(--t-base) var(--ease),
    transform var(--t-base) var(--ease),
    width var(--t-base) var(--ease);
  font-size: 0;
  line-height: 0;
}

.slideshow-dot.is-active {
  background: var(--accent);
  width: 16px;
  border-radius: 3px;
  transform: none;
}

.slideshow-dot:hover:not(.is-active) {
  background: rgba(244, 241, 232, 0.55);
  transform: scale(1.2);
}

/* Responsive — show slideshow on smaller screens too */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--sp-7); }
  .hero-media { max-width: 520px; margin: 0 auto; }
  /* Don't hide hero-media on tablet — slideshow is the content */
}

@media (max-width: 768px) {
  .hero-media { max-width: 340px; }
  .slideshow-dots { bottom: var(--sp-3); }
}

/* === SECTION SHARED === */
.section {
  padding: var(--sp-9) 0;
  scroll-margin-top: 80px;
}

.section-divider {
  width: 100%;
  height: 1px;
  background: var(--border);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-label::after {
  content: "";
  flex: 1;
  max-width: 48px;
  height: 1px;
  background: var(--border-mid);
}

.section-header {
  max-width: 560px;
  margin-bottom: var(--sp-8);
}

.section-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: var(--sp-4);
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.7;
}

/* === FEATURES — grid, typographic hierarchy === */
.feature-grid {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.feature-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
}

.feature-row:nth-child(2),
.feature-row:nth-child(3) {
  grid-template-columns: repeat(2, 1fr);
}

.feature-card {
  background: var(--bg);
  padding: var(--sp-7) var(--sp-6);
  transition: background var(--t-base) var(--ease);
  position: relative;
}

.feature-card:hover { background: var(--bg-raised); }

.feature-tag {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--sp-5);
  display: block;
}

.feature-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: var(--sp-3);
  line-height: 1.3;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.65;
}

.feature-card .icon-wrap {
  width: 40px;
  height: 40px;
  margin-bottom: var(--sp-5);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--accent);
}

/* Voice Cloning — full width card */
.feature-card.wide {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-8);
  align-items: center;
  background: var(--bg-raised);
}

.feature-card.wide .wide-content h3 {
  font-size: 1.4rem;
  margin-bottom: var(--sp-4);
}

.feature-card.wide .wide-content p {
  font-size: 0.95rem;
}

/* === PRICING === */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  transition: border-color var(--t-base) var(--ease);
}

.pricing-card:hover { border-color: var(--border-mid); }

.pricing-card.featured {
  border-color: rgba(220, 237, 49, 0.35);
  background: linear-gradient(160deg, rgba(220, 237, 49, 0.04) 0%, var(--bg-card) 60%);
}

.pricing-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-2);
}

.pricing-card > p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.55;
  margin-bottom: var(--sp-5);
  flex-grow: 1;
}

.pricing-limits {
  list-style: none;
  margin-bottom: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.pricing-limits li {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.pricing-limits li::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 1px solid var(--border-mid);
  border-radius: 50%;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 24 24' fill='none' stroke='%23dced31' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 8px;
}

.pricing-note {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: auto;
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
}

/* === FAQ === */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.faq-item {
  background: var(--bg);
  transition: background var(--t-base) var(--ease);
}

.faq-item:hover { background: var(--bg-raised); }

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-5) var(--sp-6);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  list-style: none;
  line-height: 1.45;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item .faq-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-mid);
  border-radius: 50%;
  transition: transform var(--t-base) var(--ease), background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

.faq-item[open] .faq-icon {
  transform: rotate(45deg);
  background: var(--accent);
  border-color: var(--accent);
}

.faq-item[open] .faq-icon svg { stroke: var(--bg); }

.faq-answer {
  padding: 0 var(--sp-6) var(--sp-5);
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.75;
}

/* === WAITLIST CTA === */
.waitlist-section {
  padding: var(--sp-9) 0;
}

.waitlist-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-8);
  align-items: center;
  padding: var(--sp-8);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  position: relative;
  overflow: hidden;
}

.waitlist-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 100% 50%, rgba(220, 237, 49, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.waitlist-panel h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: var(--sp-4);
}

.waitlist-panel > div > p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
}

.waitlist-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  position: relative;
  z-index: 1;
}

.waitlist-form input[type="email"] {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border-mid);
  color: var(--text-primary);
  border-radius: var(--r-md);
  padding: 0.8rem 1rem;
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

.waitlist-form input[type="email"]::placeholder { color: var(--text-muted); }

.waitlist-form input[type="email"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.waitlist-form .btn { width: 100%; padding: 0.85rem; font-size: 0.88rem; }

#waitlist-status {
  font-size: 0.82rem;
  min-height: 1.2em;
}

#waitlist-status[data-tone="error"] { color: var(--error); }
#waitlist-status[data-tone="success"] { color: var(--success); }

/* Hidden / accessibility */
.hp, .sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; clip: rect(0,0,0,0);
  overflow: hidden; border: 0; padding: 0;
}

/* === FOOTER === */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--sp-6) 0;
  margin-top: var(--sp-7);
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}

.site-footer p {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.footer-links {
  display: flex;
  gap: var(--sp-5);
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  transition: color var(--t-fast) var(--ease);
}

.footer-links a:hover { color: var(--text-secondary); }

/* === REVEAL ANIMATIONS === */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity var(--t-slow) var(--ease-out),
    transform var(--t-slow) var(--ease-out);
}

.reveal.visible { opacity: 1; transform: translateY(0); }

.feature-grid > .reveal,
.pricing-grid > .reveal {
  transition-delay: calc(var(--i, 0) * 100ms);
}

/* ================================================================
   RESPONSIVE — TABLET (≤1024px)
   ================================================================ */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--sp-7); }
  .hero-media { max-width: 520px; margin: 0 auto; }
  h1 { max-width: none; }

  .feature-grid { flex-direction: column; }
  .feature-row { grid-template-columns: 1fr; }
  .feature-row:nth-child(2),
  .feature-row:nth-child(3) { grid-template-columns: 1fr; }
  .feature-card.wide { grid-template-columns: 1fr; gap: var(--sp-5); }

  .waitlist-panel { grid-template-columns: 1fr; gap: var(--sp-6); padding: var(--sp-6); }
}

/* ================================================================
   RESPONSIVE — MOBILE (≤768px)
   ================================================================ */
@media (max-width: 768px) {
  .container { width: min(1120px, calc(100% - 2rem)); }

  .hero { padding-top: calc(var(--sp-9) + 64px); padding-bottom: var(--sp-8); min-height: auto; }

  .section { padding: var(--sp-8) 0; }

  .nav-row { height: 56px; }

  .header-nav { gap: var(--sp-4); }
  .header-nav a:not(.btn):not([href="#pricing"]):not([href="#faq"]) { display: none; }
  .header-nav .btn { padding: 0.45rem 0.8rem; font-size: 0.78rem; }

  .feature-grid { grid-template-columns: 1fr; }
  .feature-card { padding: var(--sp-6); }

  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
  .pricing-card.featured { order: -1; }

  .faq-item summary { padding: var(--sp-4) var(--sp-5); font-size: 0.88rem; }
  .faq-answer { padding: 0 var(--sp-5) var(--sp-4); }

  .footer-row { flex-direction: column; text-align: center; }

  .reveal { transform: translateY(12px); }
}

/* ================================================================
   RESPONSIVE — SMALL MOBILE (≤480px)
   ================================================================ */
@media (max-width: 480px) {
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .store-row { flex-direction: column; }

  .waitlist-panel { padding: var(--sp-5); }
  .waitlist-form .btn { padding: 0.9rem; }
}
