/*
  JNRexVoice.com styles
  Purpose: simple, readable, accessible, quick-loading presentation site.
  Keep CSS lightweight; avoid framework bloat unless site complexity grows.
*/

:root {
  --font-scale: 1;
  --bg: #0d1320;
  --panel: #151f33;
  --panel-2: #0f1a2c;
  --text: #eaf0ff;
  --muted: #adc0ea;
  --accent: #78b7ff;
  --accent-2: #a0ffd4;
  --border: #2c4066;
}

/* Light mode tokens (default theme is dark unless overridden by saved preference) */
body[data-theme="light"] {
  --bg: #f7f9ff;
  --panel: #ffffff;
  --panel-2: #f2f6ff;
  --text: #172133;
  --muted: #495f85;
  --accent: #235ad8;
  --accent-2: #0b7a66;
  --border: #c8d6f3;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, Segoe UI, system-ui, sans-serif;
  font-size: calc(16px * var(--font-scale));
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--accent-2); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #ffffff;
  color: #0a1020;
  padding: 0.6rem 0.8rem;
  border-radius: 0 0 8px 0;
  z-index: 1000;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 3px solid #a0ffd4;
  outline-offset: 2px;
}

.container {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 52vh;
  max-height: 560px;
  display: grid;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.08) saturate(1.05);
}
.overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(6, 10, 18, 0.68), rgba(10, 27, 48, 0.42));
}
body[data-theme="light"] .overlay {
  background: linear-gradient(120deg, rgba(245, 248, 255, 0.7), rgba(218, 231, 255, 0.55));
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 4rem 0;
  max-width: 680px;
}
.top-controls {
  position: absolute;
  z-index: 2;
  top: 1rem;
  right: 1rem;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-2);
  margin-bottom: 0.2rem;
}
h1 { font-size: clamp(2rem, 4vw, 3.3rem); margin: 0; }
.lead {
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  margin: 0.9rem 0 0.5rem;
}
.hero-sub {
  margin: 0 0 1.4rem;
  font-size: clamp(1.2rem, 2.1vw, 1.7rem);
  font-weight: 800;
  line-height: 1.35;
  max-width: 32ch;
}
.btn {
  display: inline-block;
  text-decoration: none;
  background: linear-gradient(135deg, var(--accent), #6ea0ff);
  color: #07101f;
  font-weight: 800;
  font-size: 1.06em;
  padding: 0.9rem 1.35rem;
  border-radius: 12px;
}

.section { padding: 3.2rem 0; }
.section h2 { margin-top: 0; font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
.section-intro {
  color: var(--muted);
  margin-top: -0.2rem;
  font-size: 1.15em;
  font-weight: 600;
  line-height: 1.5;
}
.section-alt {
  background: linear-gradient(180deg, #10192a, #0c1524);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
body[data-theme="light"] .section-alt {
  background: linear-gradient(180deg, #f4f7ff, #edf3ff);
}

.demo-grid,
.about-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}
.stack ul { margin: 0; padding-left: 1.1rem; }
.stack li { margin: 0.35rem 0; }

audio { width: 100%; margin-top: 0.5rem; }
.contact-card p { margin: 0.4rem 0; }

.contact-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.35fr);
  align-items: stretch;
}

.contact-card h3 {
  margin-top: 0;
}

.contact-points {
  margin: 0.8rem 0 0;
  padding-left: 1.1rem;
}

.contact-points li {
  margin: 0.35rem 0;
}

.contact-form { margin-top: 0; }
.contact-form form { display: grid; gap: 0.55rem; }
.contact-form label { font-weight: 600; font-size: 0.95em; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--panel) 85%, var(--bg) 15%);
  color: var(--text);
  border-radius: 8px;
  padding: 0.7rem 0.75rem;
  font: inherit;
}

.field-help {
  margin: -0.15rem 0 0.2rem;
  font-size: 0.86em;
  color: #ffd2d2;
}

.hp-field {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.turnstile-wrap {
  margin: 0.5rem 0 0.25rem;
}

.form-alert {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  margin: 0 0 0.65rem;
  font-size: 0.95em;
}
.form-alert-success {
  border-color: #2ea86d;
  color: #b8f7d6;
  background: rgba(46, 168, 109, 0.16);
}
.form-alert-error {
  border-color: #d05b5b;
  color: #ffd2d2;
  background: rgba(208, 91, 91, 0.16);
}

.control-btn {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--panel) 80%, var(--bg) 20%);
  color: var(--text);
  padding: 0.55rem 0.8rem;
  font: inherit;
  cursor: pointer;
}

/* Floating accessibility launcher + panel (bottom-right) */
.a11y-fab {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 20;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  background: var(--panel);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}
.a11y-panel {
  position: fixed;
  right: 1rem;
  bottom: 4.4rem;
  width: min(320px, calc(100% - 2rem));
  z-index: 21;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.28);
}
.a11y-panel h2 {
  margin: 0 0 0.6rem;
  font-size: 1.05rem;
}
.a11y-actions { display: grid; gap: 0.65rem; }
.text-size-controls { display: flex; gap: 0.5rem; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 10, 18, 0.65);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100% - 2rem));
  margin: 16vh auto 0;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
}

.modal-card h3 {
  margin-top: 0;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 1.2rem 0 1.8rem;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
}

@media (max-width: 820px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero { min-height: 56vh; }
}
