/* GlowStack marketing site. Tokens mirror the app (see src/index.css). */

:root {
  --ink: #14121A;
  --plum-dark: #241E2E;
  --plum-mid: #2A2237;
  --gold: #C9A24E;
  --gold-light: #EBD28F;
  --gold-hover: #B8913D;
  --gold-glow: rgba(201, 162, 78, 0.25);

  --ivory: #FAF8F5;
  --paper: #FFFFFF;
  --outer-bg: #EDE9E4;

  --teal: #0E9C86;
  --coral: #D9584A;

  --text-body: #1E1A25;
  --text-muted: #625D6B;
  --line: #E8E3DE;
  --border-strong: #D8D2C9;

  --primary-700: #8A6A22;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;

  --shadow-card: 0 4px 20px rgba(20, 18, 26, 0.08);
  --shadow-lift: 0 14px 34px rgba(20, 18, 26, 0.14);
  --shadow-device: 0 30px 60px -20px rgba(20, 18, 26, 0.45);
  --shadow-glow: 0 0 25px rgba(201, 162, 78, 0.3);

  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-heading: 'Manrope', 'Inter', system-ui, -apple-system, sans-serif;

  --transition-fast: 0.15s ease;
  --transition-smooth: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

  --gutter: 16px;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--ivory);
  color: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.6em;
  color: var(--ink);
}
h1 { font-size: clamp(1.9rem, 4.6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.2rem); }
h3 { font-size: 1.1rem; margin-bottom: 0.4em; font-weight: 700; }

p { margin: 0 0 1em; color: var(--text-body); }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.wrap--narrow { max-width: 720px; }

.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  background: var(--ink);
  color: var(--gold-light);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 100;
  transition: top var(--transition-fast);
}
.skip-link:focus { top: 8px; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible, video:focus-visible {
  outline: 3px solid var(--primary-700);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
.section--dark a:focus-visible, .cta-final a:focus-visible { outline-color: var(--gold-light); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: saturate(1.1) blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header__row {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
}
.brand__mark { display: inline-flex; }
.site-footer .brand__name { font-family: var(--font-heading); font-weight: 800; font-size: 1.1rem; color: var(--ink); }
.site-nav { display: none; gap: 20px; margin-left: 8px; }
@media (min-width: 1024px) { .site-nav { display: flex; } }
.site-nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--text-body);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color var(--transition-fast);
}
.site-nav a:hover { border-bottom-color: var(--gold); }
.site-header__cta { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.site-header__signin { text-decoration: none; font-weight: 600; font-size: 0.92rem; color: var(--ink); padding: 8px 4px; }
.site-header__signin:hover { color: var(--primary-700); }
.site-header__signin[hidden] { display: none; }
#nav-demo-link { display: none; }
@media (min-width: 720px) { #nav-demo-link { display: inline-flex; } }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--gold); color: var(--ink); box-shadow: 0 2px 10px var(--gold-glow); }
.btn--primary:hover { background: var(--gold-hover); box-shadow: var(--shadow-glow); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.btn--ghost:hover { border-color: var(--gold); }
.btn--lg { padding: 13px 24px; font-size: 1rem; }
.btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn[aria-disabled="true"]:hover { transform: none; }

/* Sections */
.section { padding: 64px 0; }
.section--muted { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section h2 { text-align: center; margin-bottom: 0.4em; }
.section__lead { text-align: center; color: var(--text-muted); max-width: 640px; margin: 0 auto 32px; }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-700);
  margin: 0 0 12px;
}

/* Hero */
.hero {
  padding: 40px 0 56px;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(201,162,78,0.22), transparent 60%),
    linear-gradient(180deg, var(--ivory), var(--outer-bg));
  overflow: hidden;
}
.hero__grid { display: grid; gap: 36px; align-items: center; }
@media (min-width: 960px) { .hero__grid { grid-template-columns: 1fr 1.25fr; gap: 48px; } .hero { padding: 64px 0 80px; } }
.hero__sub { font-size: 1.05rem; color: var(--text-muted); max-width: 52ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 16px; }
.hero__note { font-size: 0.88rem; color: var(--text-muted); margin: 0; }
.hero__media { min-width: 0; }

/* Device frames and clips */
.clip { margin: 0; min-width: 0; }
.clip figcaption { font-size: 0.85rem; color: var(--text-muted); margin-top: 10px; text-align: center; }
.device {
  background: var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-device);
  overflow: hidden;
  border: 1px solid var(--plum-mid);
}
.device video { width: 100%; height: auto; background: var(--ivory); }
.device__bar { display: flex; gap: 6px; padding: 9px 12px; background: var(--plum-dark); }
.device__bar span { width: 10px; height: 10px; border-radius: var(--radius-full); background: #4a4158; }
.device__bar span:first-child { background: var(--coral); }
.device__bar span:nth-child(2) { background: var(--gold); }
.device__bar span:nth-child(3) { background: var(--teal); }
.clip--hero .device { transform: perspective(1400px) rotateY(-4deg) rotateX(1.5deg); transition: transform 0.6s ease; }
.clip--hero .device:hover { transform: none; }
@media (max-width: 959px) { .clip--hero .device { transform: none; } }
.clip--phone { max-width: 280px; margin: 0 auto; }
.clip--phone .device { border-radius: 32px; border: 8px solid var(--ink); background: var(--ink); }
.clip--phone .device video { border-radius: 22px; }
.device__notch { width: 70px; height: 5px; border-radius: 3px; background: var(--plum-mid); margin: 0 auto 6px; }

/* Trust strip */
.strip { background: var(--ink); padding: 18px 0; }
.strip__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; }
.strip__list li { display: flex; align-items: center; gap: 8px; color: var(--ivory); font-size: 0.88rem; font-weight: 500; }
.strip__ico {
  min-width: 28px; height: 28px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full);
  background: rgba(201,162,78,0.18); color: var(--gold-light);
  font-size: 0.72rem; font-weight: 700;
}

/* Problem */
.problem__grid { display: grid; gap: 20px; margin-top: 28px; }
@media (min-width: 760px) { .problem__grid { grid-template-columns: 1fr 1fr; } }
.problem__col {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}
.problem__col:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.problem__col--value { border-color: var(--gold); box-shadow: var(--shadow-card); }
.check-list li { position: relative; padding: 6px 0 6px 32px; font-size: 0.95rem; }
.check-list li::before {
  content: ''; position: absolute; left: 0; top: 9px; width: 20px; height: 20px; border-radius: var(--radius-full);
}
.check-list--off li::before { background: var(--coral); opacity: 0.18; }
.check-list--off li::after { content: '\00d7'; position: absolute; left: 6px; top: 6px; color: var(--coral); font-weight: 700; }
.check-list--on li::before { background: var(--teal); opacity: 0.18; }
.check-list--on li::after { content: '\2713'; position: absolute; left: 5px; top: 6px; color: var(--teal); font-weight: 700; font-size: 0.85rem; }

/* Feature tour */
.section--tour { padding-bottom: 24px; }
.tour { padding: 40px 0; }
.tour:nth-of-type(even) { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tour__grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) {
  .tour__grid { grid-template-columns: 1fr 1.2fr; gap: 48px; }
  .tour--flip .tour__copy { order: 2; }
}
.tour__copy, .tour__media { min-width: 0; }
.tour__title { font-size: clamp(1.3rem, 2.6vw, 1.75rem); text-align: left; }
.tour__lead { color: var(--text-muted); }
.tour__media { display: grid; gap: 20px; }
.feature-list li { position: relative; padding: 7px 0 7px 22px; font-size: 0.95rem; }
.feature-list li::before {
  content: ''; position: absolute; left: 0; top: 16px; width: 8px; height: 8px; border-radius: var(--radius-full); background: var(--gold);
}
.feature-list li strong { color: var(--ink); font-weight: 600; }

/* Steps */
.steps {
  display: grid; gap: 20px; margin-top: 28px;
}
@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps__item {
  background: var(--ivory); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}
.steps__item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.steps__item p { color: var(--text-muted); margin: 0; font-size: 0.95rem; }
.steps__num {
  display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center;
  border-radius: var(--radius-full); background: var(--ink); color: var(--gold-light);
  font-family: var(--font-heading); font-weight: 800; margin-bottom: 12px;
}

/* Roles */
.role-grid { display: grid; gap: 16px; margin-top: 28px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .role-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .role-grid { grid-template-columns: repeat(4, 1fr); } }
.role-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
}
.role-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: var(--gold); }
.role-card h3 { color: var(--primary-700); }
.role-card p { font-size: 0.92rem; color: var(--text-muted); margin: 0; }
.role-note { text-align: center; color: var(--text-muted); font-size: 0.9rem; margin: 24px 0 0; }

/* Why */
.section--dark { background: var(--ink); color: var(--ivory); }
.section--dark h2, .section--dark h3 { color: var(--ivory); }
.section--dark .section__lead { color: rgba(250,248,245,0.75); }
.why-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .why-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) { .why-grid { grid-template-columns: repeat(4, 1fr); } }
.why-card {
  background: var(--plum-dark); border: 1px solid var(--plum-mid); border-radius: var(--radius-lg); padding: 22px;
  transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}
.why-card:hover { transform: translateY(-4px); border-color: var(--gold); box-shadow: var(--shadow-glow); }
.why-card h3 { color: var(--gold-light); }
.why-card p { margin: 0; font-size: 0.92rem; color: rgba(250,248,245,0.82); }
.pricing {
  margin: 32px auto 0; max-width: 560px; text-align: center; padding: 28px 20px;
  border: 1px solid var(--gold); border-radius: var(--radius-xl); background: rgba(201,162,78,0.08);
}
.pricing p { color: rgba(250,248,245,0.85); }

/* Scroll reveal: only hidden when JS has marked the page */
.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

.steps {
  display: grid;
  gap: 24px;
  margin-top: 32px;
  counter-reset: step;
}
@media (min-width: 800px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}

.steps__item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
  text-align: center;
}

.steps__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-full);
  background: var(--ink);
  color: var(--gold);
  font-weight: 800;
  margin-bottom: 14px;
}

/* Roles */
.role-grid {
  display: grid;
  gap: 20px;
  margin-top: 32px;
}
@media (min-width: 700px) {
  .role-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .role-grid { grid-template-columns: repeat(4, 1fr); }
}

.role-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.role-card h3 { color: var(--primary-700); }
.role-card p { font-size: 0.9rem; color: var(--text-muted); margin: 0; }

.role-note {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 24px;
}

/* FAQ */
.faq-list {
  max-width: 760px;
  margin: 32px auto 0;
  display: grid;
  gap: 10px;
}

.faq-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 4px 20px;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  padding: 16px 0;
  list-style: none;
  position: relative;
  padding-right: 28px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 0; top: 14px;
  font-size: 1.2rem;
  color: var(--gold-hover);
}
.faq-item[open] summary::after { content: '−'; }
.faq-item p { padding-bottom: 16px; color: var(--text-muted); }

/* Final CTA */
.cta-final {
  background: var(--ink);
  color: var(--ivory);
}
.cta-final__inner { text-align: center; }
.cta-final h2 { color: var(--ivory); }
.cta-final p { color: rgba(250,248,245,0.75); max-width: 560px; margin: 0 auto 8px; }
.cta-final .hero__actions { justify-content: center; }
.cta-final .btn--ghost { color: var(--ivory); border-color: rgba(250,248,245,0.35); }

/* Lead form */
.lead-form__intro {
  text-align: center;
  color: var(--text-muted);
}

.lead-form__status {
  min-height: 0;
}
.lead-form__status:not(:empty) {
  margin: 16px 0;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
}
.lead-form__status[data-kind="error"] {
  background: rgba(217,88,74,0.1);
  border: 1px solid var(--coral);
  color: #7a2b22;
}

.lead-form {
  display: grid;
  gap: 18px;
  margin-top: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .lead-form { grid-template-columns: 1fr 1fr; }
  .form-row--full { grid-column: 1 / -1; }
}

.form-row { display: flex; flex-direction: column; gap: 6px; }

.form-row label {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--ink);
}

.form-row input,
.form-row select,
.form-row textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--paper);
  color: var(--text-body);
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
  outline: none;
}
.form-row input[aria-invalid="true"],
.form-row select[aria-invalid="true"],
.form-row textarea[aria-invalid="true"] {
  border-color: var(--coral);
}

.field-error {
  font-size: 0.82rem;
  color: var(--coral);
  min-height: 1em;
  margin: 0;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

#lead-form-submit {
  width: 100%;
}
@media (min-width: 640px) {
  #lead-form-submit { width: auto; }
}

.btn__spinner {
  width: 16px; height: 16px;
  border-radius: var(--radius-full);
  border: 2px solid rgba(20,18,26,0.25);
  border-top-color: var(--ink);
  display: none;
  animation: spin 0.7s linear infinite;
}

button[data-loading="true"] .btn__spinner { display: inline-block; }
button[data-loading="true"] .btn__label { opacity: 0.75; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

.lead-form__success {
  margin-top: 24px;
  background: var(--paper);
  border: 1px solid var(--teal);
  border-radius: var(--radius-lg);
  padding: 28px;
  text-align: center;
}
.lead-form__success h3 { color: var(--teal); }

/* Footer */
.site-footer {
  background: var(--outer-bg);
  border-top: 1px solid var(--line);
  padding: 40px 0 24px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.site-footer__grid {
  display: grid;
  gap: 24px;
  margin-bottom: 24px;
}
@media (min-width: 700px) {
  .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; align-items: start; }
}

.site-footer__tag { max-width: 40ch; }

.site-footer nav { display: flex; flex-direction: column; gap: 8px; }
.site-footer nav a { text-decoration: none; color: var(--text-body); }
.site-footer nav a:hover { color: var(--primary-700); }

.site-footer__contact a { text-decoration: none; color: var(--primary-700); font-weight: 600; }

.site-footer__legal { margin: 0; padding-top: 16px; border-top: 1px solid var(--border-strong); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .btn:hover, .problem__col:hover, .steps__item:hover, .role-card:hover, .why-card:hover { transform: none; }
  .clip--hero .device { transform: none; }
}

/* Small-screen guarantee: no horizontal scroll at 360px */
@media (max-width: 360px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
}

/* ---------- Multi-page additions ---------- */

/* Audience links under the header on screens too narrow for the full nav */
.subnav { border-top: 1px solid var(--line); }
@media (min-width: 1024px) { .subnav { display: none; } }
.subnav__row { display: flex; gap: 6px; overflow-x: auto; padding-top: 6px; padding-bottom: 6px; scrollbar-width: none; }
.subnav__row::-webkit-scrollbar { display: none; }
.subnav a {
  flex: 0 0 auto;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  color: var(--text-body);
  white-space: nowrap;
}
.subnav a:hover { border-color: var(--gold); }
@media (min-width: 1024px) { .site-nav { gap: 16px; } .site-nav a { font-size: 0.88rem; } }

.breadcrumb { padding-top: 14px; padding-bottom: 0; font-size: 0.85rem; color: var(--text-muted); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: '/'; margin-right: 6px; color: var(--border-strong); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary-700); }
.hero--sub { padding-top: 24px; }

.audience-grid { display: grid; gap: 16px; margin-top: 28px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .audience-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .audience-grid { grid-template-columns: repeat(4, 1fr); } }
.audience-card {
  display: flex; flex-direction: column; gap: 4px; text-decoration: none;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 22px;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
}
.audience-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: var(--gold); }
.audience-card h3 { color: var(--primary-700); }
.audience-card p { font-size: 0.92rem; color: var(--text-muted); margin: 0 0 10px; }
.audience-card__more { margin-top: auto; font-weight: 600; font-size: 0.9rem; color: var(--ink); }
.audience-card__more::after { content: ' \2192'; }

.device img { width: 100%; height: auto; background: var(--ivory); }
.clip--phone .device img { border-radius: 22px; }
.hero__media .clip--phone { max-width: 300px; }
@media (prefers-reduced-motion: reduce) { .audience-card:hover { transform: none; } }
