/* =========================================================
   hispeech.ai landing — styles
   © BlueNeyron, LLC
   Clean, documentation-style UI. Mobile-first, no frameworks.
   ========================================================= */

:root {
  --blue: #2355ad;
  --blue-dark: #1a4084;
  --orange: #f0552e;
  --ink: #11151c;
  --body: #3a4250;
  --muted: #6b7280;
  --line: #e6e8ee;
  --bg: #ffffff;
  --bg-alt: #f6f8fc;
  --bg-dark: #0f1623;
  --radius: 14px;
  --radius-sm: 10px;
  --maxw: 1240px;
  --shadow: 0 1px 2px rgba(16,21,28,.06), 0 8px 24px rgba(16,21,28,.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Armenian", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--body);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; letter-spacing: -.01em; margin: 0; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }

p { margin: 0; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.center { text-align: center; }

/* Hidden once the visitor is signed into the app (see main.js refreshAuthUI) */
body.is-signed-in .js-hide-when-signed-in { display: none !important; }
/* "My Account" (the logged-in state of the Log in button) looks like the Sign up button */
body.is-signed-in #login-btn { background: var(--blue); color: #fff; }
body.is-signed-in #login-btn:hover { background: var(--blue-dark); color: #fff; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; font-weight: 600; font-size: .98rem;
  padding: 11px 20px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .08s ease, background .15s ease, border-color .15s ease, color .15s ease;
  white-space: nowrap; text-decoration: none; line-height: 1;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--bg-alt); }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn-outline-light:hover { border-color: #fff; color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; color: var(--ink); flex: none; }
.brand:hover { text-decoration: none; }
.brand img { height: 22px; width: auto; max-height: 22px; max-width: 100%; object-fit: contain; flex: none; }
.site-footer .brand img { height: 28px; width: auto; object-fit: contain; }

.main-nav { display: flex; gap: 22px; margin-left: 14px; flex: 1; }
.main-nav a { color: var(--body); font-size: .96rem; font-weight: 500; }
.main-nav a:hover { color: var(--ink); text-decoration: none; }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.lang-switch { display: inline-flex; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang-btn {
  border: 0; background: transparent; cursor: pointer; font-weight: 700; font-size: .8rem;
  padding: 6px 11px; border-radius: 999px; color: var(--muted);
}
.lang-btn.is-active { background: #fff; color: var(--ink); box-shadow: var(--shadow); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle span { width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: .2s; }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(56px, 9vw, 110px) 0 clamp(40px, 6vw, 72px);
  background:
    radial-gradient(1100px 480px at 50% -160px, rgba(35,85,173,.10), transparent 70%),
    linear-gradient(180deg, #fff 0%, var(--bg-alt) 100%);
  text-align: center;
}
.hero-inner { max-width: 820px; margin: 0 auto; }
.eyebrow { color: var(--blue); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .82rem; margin-bottom: 14px; }
.eyebrow.light { color: #8fb0ff; }
.hero h1 { margin-bottom: 18px; }
.lead { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--body); }
.hero .lead { max-width: 640px; margin: 0 auto 28px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.hero-cta.center { justify-content: center; }
.hero-note { color: var(--muted); font-size: .92rem; margin-top: 16px; }

.platform-pills { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding: 0; margin: 34px 0 0; }
.platform-pills li {
  font-size: .85rem; font-weight: 600; color: var(--body);
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px; box-shadow: var(--shadow);
}

/* ---------- Stats band ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.stats-band { padding: clamp(44px, 6vw, 64px) 0; background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; align-items: start; }
.stat { display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; }
.stat-num-row { display: inline-flex; align-items: center; gap: 8px; }
.stat-num { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; color: var(--blue); line-height: 1; letter-spacing: -.02em; }
.stat-star { color: var(--blue); font-size: clamp(1.5rem, 4vw, 2.2rem); line-height: 1; }
.stat-label { font-weight: 700; color: var(--ink); font-size: 1.05rem; }
.stat-sub { font-size: .9rem; color: var(--muted); max-width: 280px; line-height: 1.5; }

/* ---------- Sections ---------- */
.section { padding: clamp(52px, 8vw, 92px) 0; }
.section-alt { background: var(--bg-alt); }
.section h2 { text-align: center; }
.section-lead { color: var(--body); font-size: 1.12rem; margin: 14px auto 0; max-width: 640px; }
.section-lead.center { text-align: center; }
.section h2 + .section-lead { margin-bottom: 8px; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 44px; }
.step { text-align: center; padding: 8px; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 800; margin-bottom: 14px;
}
.step h3 { margin-bottom: 6px; }
.step p { color: var(--muted); font-size: .88rem; }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  transition: transform .12s ease, box-shadow .12s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card h3 { margin-bottom: 7px; }
.card p { color: var(--muted); font-size: .98rem; }

/* ---------- Platforms ---------- */
.platform-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 44px; }
.platform-card {
  display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 12px; row-gap: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px; color: var(--ink);
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.platform-card:hover { transform: translateY(-3px); border-color: var(--blue); box-shadow: var(--shadow); text-decoration: none; }
.platform-icon { width: 26px; height: 26px; color: var(--blue); flex: none; }
.platform-name { font-weight: 800; font-size: 1.15rem; }
.platform-action { grid-column: 1 / -1; color: var(--blue); font-weight: 600; font-size: .9rem; }
.ptt-note {
  margin: 28px auto 0; max-width: 760px; text-align: left;
  display: flex; align-items: center; gap: 16px;
  background: rgba(35,85,173,.06); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 24px; color: var(--body); font-size: 1.02rem;
}
.ptt-icon { flex: none; width: 32px; height: 32px; color: var(--blue); }

/* ---------- API ---------- */
.section-dark { background: var(--bg-dark); color: #c7cedb; }
.section-dark h2 { color: #fff; }
.section-dark .section-lead { color: #aeb7c7; }
.api-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.api-copy h2 { text-align: left; }
.api-points { list-style: none; padding: 0; margin: 22px 0 26px; display: grid; gap: 11px; }
.api-points li { position: relative; padding-left: 28px; color: #c7cedb; }
.api-points li::before { content: "✓"; position: absolute; left: 0; color: #5cd6a0; font-weight: 800; }
.api-credits { margin-top: 22px; padding: 18px 20px; border: 1px dashed rgba(255,255,255,.22); border-radius: var(--radius); background: rgba(255,255,255,.04); }
.api-credits p { color: #c7cedb; margin-bottom: 14px; font-size: .98rem; }
.api-code { background: #0a0f1a; border: 1px solid #1d2738; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.code-head { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid #1d2738; }
.code-head .dot { width: 11px; height: 11px; border-radius: 50%; }
.dot.r { background: #ff5f56; } .dot.y { background: #ffbd2e; } .dot.g { background: #27c93f; }
.code-title { margin-left: 8px; font-size: .8rem; color: #6b7689; }
.api-code pre { margin: 0; padding: 20px; overflow-x: auto; }
.api-code code { font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace; font-size: .86rem; color: #e6edf3; line-height: 1.7; white-space: pre; }

/* ---------- Pricing / collab ---------- */
.badge { display: inline-block; background: rgba(240,85,46,.12); color: var(--orange); font-weight: 700; font-size: .82rem; padding: 6px 14px; border-radius: 999px; margin-bottom: 16px; }
.price-note { color: var(--muted); font-size: .92rem; margin-top: 10px; }
.collab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 34px 0 30px; text-align: left; }
.collab-card { background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.collab-card h3 { margin-bottom: 7px; }
.collab-card p { color: var(--muted); font-size: .98rem; }

/* ---------- FAQ ---------- */
.faq-item { border: 1px solid var(--line); background: #fff; border-radius: var(--radius-sm); padding: 4px 20px; margin-top: 12px; }
.faq-item summary { cursor: pointer; font-weight: 700; color: var(--ink); padding: 14px 0; list-style: none; position: relative; padding-right: 30px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 0; top: 12px; font-size: 1.4rem; color: var(--muted); font-weight: 400; transition: transform .2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--muted); padding: 0 0 16px; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--blue), var(--blue-dark)); }
.cta-band h2 { color: #fff; margin-bottom: 24px; }
.cta-band .btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.cta-band .btn-outline:hover { background: #fff; color: var(--blue); border-color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #aeb7c7; padding: 56px 0 28px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 2fr; gap: 40px; }
.site-footer .brand { color: #fff; }
.footer-brand p { color: #8b93a3; margin-top: 12px; font-size: .95rem; max-width: 260px; }
.footer-social { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 20px 0 0; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.08); color: #c7cedb;
  transition: background .15s ease, color .15s ease, transform .12s ease;
}
.footer-social a:hover { background: var(--blue); color: #fff; transform: translateY(-2px); text-decoration: none; }
.footer-social svg { width: 18px; height: 18px; }
.footer-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.footer-col a { color: #aeb7c7; font-size: .95rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #232a38; margin-top: 40px; padding-top: 22px; font-size: .9rem; color: #8b93a3; }
.footer-bottom a { color: #c7cedb; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .platform-grid { grid-template-columns: repeat(2, 1fr); }
  .api-inner { grid-template-columns: 1fr; gap: 30px; }
  .api-copy h2 { text-align: center; }
  .footer-inner { grid-template-columns: 1fr; }
}

/* Tablet / iPad Pro portrait: nav still fits, but drop the
   language switch + Log in + Sign up onto a second, right-aligned row. */
@media (min-width: 821px) and (max-width: 1024px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 8px 24px; row-gap: 6px; }
  .header-actions { flex-basis: 100%; justify-content: flex-end; margin-left: 0; }
}

@media (max-width: 820px) {
  .main-nav { display: none; }
  .nav-toggle { display: flex; }
  .main-nav.open {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 64px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: 8px 20px 16px; margin: 0;
  }
  .main-nav.open a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .steps { grid-template-columns: 1fr; gap: 28px; }
  .collab-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .card-grid, .platform-grid { grid-template-columns: 1fr; }
  .footer-nav { grid-template-columns: 1fr 1fr; }
  .hero-cta .btn { flex: 1 1 auto; }
  .brand img { height: 16px; max-height: 16px; }
  .stats-grid { grid-template-columns: 1fr; gap: 32px; }
  /* keep Log in + Sign up + language + menu on one row */
  .header-inner { gap: 8px; }
  .header-actions { gap: 6px; }
  .header-actions .btn { padding: 8px 12px; font-size: .9rem; }
  .lang-btn { padding: 6px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
