/* ===== VARIABLES ===== */
:root {
  color-scheme: dark;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', monospace;

  --bg: hsl(200, 25%, 6%);
  --card: hsl(200, 22%, 10%);
  --muted: hsl(200, 18%, 16%);
  --text: hsl(190, 15%, 92%);
  --text-muted: hsl(200, 12%, 52%);
  --border: hsl(200, 18%, 18%);
  --brand: hsl(193, 55%, 44%);
  --accent: hsl(160, 65%, 62%);
  --success: hsl(160, 60%, 55%);
  --danger: hsl(0, 84%, 60%);

  --radius: 0.75rem;
  --radius-lg: 1rem;

  --glow: 0 0 60px hsla(193, 55%, 44%, 0.15);
  --glow-strong: 0 0 120px hsla(193, 55%, 44%, 0.25);

  --glass-bg: hsla(200, 22%, 10%, 0.6);
  --glass-border: hsla(200, 18%, 18%, 0.5);
}

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

html {
  scroll-behavior: smooth;
}

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

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

img {
  max-width: 100%;
  height: auto;
}

video {
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -999px;
  z-index: 200;
  border-radius: var(--radius);
  background: var(--brand);
  color: var(--bg);
  padding: 0.5rem 0.75rem;
  font-weight: 600;
}

.skip-link:focus-visible {
  top: 0.75rem;
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--glass-border);
}

.header-inner {
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.125rem;
}

.brand:hover {
  color: var(--text);
}

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

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--text);
}

.nav .nav-cta {
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  background: var(--brand);
  color: var(--bg);
  font-weight: 600;
  box-shadow: var(--glow);
  transition: opacity 0.2s;
}

.nav .nav-cta:hover {
  color: var(--bg);
  opacity: 0.9;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

/* ===== BUTTONS ===== */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: var(--radius);
  padding: 0.625rem 1.25rem;
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--brand);
  color: var(--bg);
  box-shadow: var(--glow);
  cursor: pointer;
  transition: opacity 0.2s;
}

.button:hover {
  color: var(--bg);
  opacity: 0.9;
}

.button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.button-large {
  padding: 0.75rem 2rem;
  font-size: 1rem;
}

.button-small {
  padding: 0.5rem 0.875rem;
  font-size: 0.8125rem;
}

.button-ghost {
  background: transparent;
  border: 1px solid hsla(193, 55%, 44%, 0.3);
  color: var(--text);
  box-shadow: none;
}

.button-ghost:hover {
  background: hsla(193, 55%, 44%, 0.1);
  border-color: hsla(193, 55%, 44%, 0.5);
  color: var(--text);
  opacity: 1;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8rem 0 4rem;
  min-height: 70vh;
}

.hero::before {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  top: 15%;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: hsla(193, 55%, 44%, 0.05);
  filter: blur(120px);
  z-index: -1;
  animation: pulse-glow 3s ease-in-out infinite;
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 2rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.eyebrow-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--brand);
  animation: pulse-glow 3s ease-in-out infinite;
}

.text-gradient {
  background: linear-gradient(to right, var(--brand), var(--accent), var(--brand));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 7vw, 5rem);
  line-height: 1.05;
  margin-bottom: 1.5rem;
}

.subheadline {
  margin: 0 auto 2.5rem;
  max-width: 40rem;
  color: var(--text-muted);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.trust-note,
.local-trust-line {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.local-trust-line {
  margin: 1.5rem 0 0;
  font-weight: 600;
}

/* ===== SECTIONS ===== */
.section {
  padding: 6rem 0;
  scroll-margin-top: 5rem;
}

.section h2 {
  text-align: center;
  font-size: clamp(1.75rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.section-intro {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.125rem;
  max-width: 36rem;
  margin: 0 auto 3rem;
  line-height: 1.7;
}

/* ===== GLASS PANELS (shared card base) ===== */
.card,
.platform-group,
.permissions-details,
.performance-panel,
.faq-list details,
.contact-form,
.demo-video,
.browser-mock,
.quote,
.privacy-card {
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}

/* ===== CARDS ===== */
.card {
  margin: 0;
  padding: 1.5rem;
  transition: border-color 0.3s;
}

.card:hover {
  border-color: hsla(193, 55%, 44%, 0.3);
}

.card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.7;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.feature-primary-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.feature-secondary-grid {
  margin-top: 1.5rem;
}

/* ===== PROBLEM ===== */
.section-problem {
  padding-top: 3rem;
}

.pain-statements {
  list-style: none;
  margin: 0 auto 2rem;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  max-width: 36rem;
}

.pain-statements li {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
}

.problem-narrative {
  max-width: 36rem;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  text-align: center;
}

/* ===== PROSE SECTIONS (audience, differentiation, founder) ===== */
.audience-body,
.differentiation-body,
.founder-body {
  max-width: 36rem;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
  text-align: center;
}

.audience-body p,
.differentiation-body p,
.founder-body p {
  margin: 0 0 1rem;
}

.differentiation-body p:last-child,
.founder-attribution {
  color: var(--text);
  font-weight: 600;
}

/* ===== HOW IT WORKS ===== */
.how-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.step-kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  color: var(--brand);
  background: hsla(193, 55%, 44%, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  margin-bottom: 0.75rem;
}

/* ===== DEMO ===== */
.demo-video {
  position: relative;
  margin: 0 0 1.5rem;
  overflow: clip;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.demo-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-fallback {
  padding: 0.75rem 1rem 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.browser-mock {
  overflow: clip;
}

.browser-bar {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--glass-border);
  background: hsla(200, 20%, 14%, 0.5);
}

.browser-bar span {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background: hsla(200, 12%, 52%, 0.5);
}

.demo-caption {
  margin: 1rem 0 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ===== MID CTA ===== */
.mid-cta {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.fine-print {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ===== PLATFORMS ===== */
.section-platforms {
  border-top: 1px solid var(--border);
}

.platform-group {
  padding: 1.5rem;
}

.platform-group h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.chip-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip-list li {
  border: 1px solid var(--glass-border);
  border-radius: 9999px;
  padding: 0.375rem 0.75rem;
  background: hsla(200, 20%, 14%, 0.5);
  font-size: 0.875rem;
  font-weight: 600;
}

.platform-note {
  margin: 1rem 0 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ===== PRIVACY ===== */
.section-privacy {
  border-top: 1px solid var(--border);
}

.privacy-grid {
  margin: 0 0 2rem;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.privacy-card {
  padding: 1.25rem;
  text-align: center;
}

.privacy-card strong {
  display: block;
  margin-bottom: 0.375rem;
}

.privacy-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.privacy-sensitive-line {
  max-width: 36rem;
  margin: 0 auto 1.5rem;
  color: var(--text-muted);
  text-align: center;
}

.permissions-details {
  padding: 1rem 1.25rem;
}

.permissions-details summary,
.faq-list summary {
  font-weight: 600;
  cursor: pointer;
}

.permissions-details summary {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.permissions-details[open] summary {
  margin-bottom: 0.75rem;
}

.permissions-list {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
}

.permissions-list li {
  margin: 0.5rem 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.permissions-list strong {
  color: var(--text);
}

.permissions-note {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ===== PERFORMANCE ===== */
.performance-panel {
  padding: 2rem;
}

.performance-panel h2 {
  text-align: left;
  margin-bottom: 0.75rem;
}

.performance-panel p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.performance-short {
  margin-top: 0.75rem;
  color: var(--text);
  font-weight: 600;
}

/* ===== TESTIMONIALS ===== */
.quote p {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.7;
}

.quote footer {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ===== FAQ ===== */
.faq-list {
  display: grid;
  gap: 0.75rem;
  max-width: 48rem;
  margin: 0 auto;
}

.faq-list details {
  padding: 1rem 1.25rem;
}

.faq-list summary {
  font-size: 1rem;
}

.faq-list p {
  margin-top: 0.75rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ===== CONTACT ===== */
.contact-form {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  gap: 1.5rem;
}

.form-row {
  display: grid;
  gap: 0.5rem;
}

.form-row label {
  font-weight: 500;
  font-size: 0.875rem;
}

.form-row input,
.form-row select,
.form-row textarea {
  background: hsla(200, 25%, 6%, 0.6);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  font-size: 0.875rem;
  padding: 0.625rem 0.75rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: var(--brand);
}

.form-row textarea {
  resize: vertical;
}

.form-honeypot {
  position: absolute;
  left: -10000px;
  opacity: 0;
  pointer-events: none;
}

.form-message {
  min-height: 1.3em;
  margin-top: 0.25rem;
  font-size: 0.875rem;
}

.form-message[data-state="error"] {
  color: var(--danger);
}

.form-message[data-state="success"] {
  color: var(--success);
}

/* ===== SIGNUP CTA ===== */
.section-signup {
  padding: 6rem 0;
  border-top: 1px solid var(--border);
}

.signup-inner {
  max-width: 36rem;
  text-align: center;
}

.signup-inner h2 {
  margin-bottom: 0.75rem;
}

.signup-inner p {
  color: var(--text-muted);
}

.signup-inner .button {
  margin-top: 0.75rem;
}

/* ===== FOOTER ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-inner nav a:hover {
  color: var(--text);
}

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

/* ===== POLICY CONTENT ===== */
.policy-content {
  max-width: 48rem;
  line-height: 1.7;
}

.policy-content h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0.5rem;
}

.policy-date {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 3rem;
}

.policy-content h2 {
  margin-block-start: 2.5rem;
  margin-block-end: 0.75rem;
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  text-align: left;
}

.policy-content h3 {
  margin-block-start: 1.5rem;
  margin-block-end: 0.5rem;
  font-size: clamp(1rem, 1.6vw, 1.125rem);
}

.policy-content p {
  margin-block-end: 1rem;
  color: var(--text-muted);
}

.policy-content ul {
  margin-block-end: 1rem;
  padding-inline-start: 1.5rem;
  color: var(--text-muted);
}

.policy-content li {
  margin-block-end: 0.375rem;
}

.policy-content code {
  background: hsla(200, 22%, 10%, 0.8);
  color: var(--text);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* ===== ANIMATIONS ===== */
@keyframes pulse-glow {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    position: absolute;
    top: 4rem;
    right: 1rem;
    width: min(360px, 90vw);
    padding: 1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .nav.open {
    display: flex;
  }

  .nav .nav-cta {
    text-align: center;
  }

  .hero {
    padding-top: 6rem;
  }

  .hero-cta {
    flex-direction: column;
  }

  .button,
  .form-row input,
  .form-row select,
  .form-row textarea,
  .contact-form .button {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 1rem;
  }

  .header-inner {
    min-height: 3.5rem;
  }

  .hero {
    padding: 5rem 0 3rem;
    min-height: auto;
  }

  .section {
    padding: 4rem 0;
  }

  .section h2,
  .demo-caption {
    text-align: left;
  }

  .section-intro {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
  }

  .pain-statements {
    margin-left: 0;
    margin-right: 0;
  }

  .problem-narrative,
  .audience-body,
  .differentiation-body,
  .founder-body,
  .privacy-sensitive-line {
    text-align: left;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
