/* Deaf STEM Hub — custom styles, no frameworks */

:root {
  --bg-deep: #0c1222;
  --bg-card: #121a2e;
  --bg-elevated: #1a2540;
  --accent: #3dd6c3;
  --accent-dim: #2a9d8f;
  --accent-warm: #f4a261;
  --accent-violet: #7c6cf0;
  --text: #e8edf7;
  --text-muted: #94a3c8;
  --border: rgba(255, 255, 255, 0.08);
  --glow: rgba(61, 214, 195, 0.35);
  --radius: 16px;
  --radius-sm: 10px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Cascadia Code", "Consolas", ui-monospace, monospace;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Ambient background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 100% 80% at 10% -20%, rgba(124, 108, 240, 0.25), transparent 50%),
    radial-gradient(ellipse 80% 60% at 100% 10%, rgba(61, 214, 195, 0.18), transparent 45%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(244, 162, 97, 0.12), transparent 50%),
    linear-gradient(180deg, #0c1222 0%, #0a0f1a 100%);
  pointer-events: none;
}

a {
  color: var(--accent);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--bg-deep);
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: rgba(12, 18, 34, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand__mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-violet) 100%);
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  box-shadow: 0 8px 24px var(--glow);
}

.brand__text h1 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand__text p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Nav */
.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.nav-btn {
  appearance: none;
  border: 1px solid transparent;
  background: var(--bg-elevated);
  color: var(--text);
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.nav-btn:hover {
  background: rgba(61, 214, 195, 0.12);
  border-color: rgba(61, 214, 195, 0.35);
}

.nav-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav-btn.is-active {
  background: linear-gradient(135deg, rgba(61, 214, 195, 0.25), rgba(124, 108, 240, 0.2));
  border-color: rgba(61, 214, 195, 0.5);
  color: #fff;
}

/* Main */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.panel {
  display: none;
  animation: panelIn 0.45s ease forwards;
}

.panel.is-active {
  display: block;
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow);
}

.card + .card {
  margin-top: 1.25rem;
}

.card__title {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #fff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
  max-width: 62ch;
}

/* Hero strip on home */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.stat {
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.stat__value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.stat__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.feature {
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(160deg, rgba(26, 37, 64, 0.9) 0%, rgba(18, 26, 46, 0.95) 100%);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.feature::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(61, 214, 195, 0.15), transparent 70%);
  pointer-events: none;
}

.feature h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.feature p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Buttons */
.btn {
  appearance: none;
  border: 1px solid rgba(61, 214, 195, 0.4);
  background: linear-gradient(180deg, rgba(61, 214, 195, 0.2) 0%, rgba(61, 214, 195, 0.08) 100%);
  color: var(--text);
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, border-color 0.2s;
  font-family: inherit;
}

.btn:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 28px rgba(61, 214, 195, 0.2);
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 2px solid var(--accent-warm);
  outline-offset: 2px;
}

.btn--ghost {
  background: transparent;
  border-color: var(--border);
}

.btn--ghost:hover {
  border-color: var(--text-muted);
  box-shadow: none;
}

.btn--wide {
  min-width: 160px;
}

/* Motivation */
.quote-wrap {
  text-align: center;
  padding: 2rem 1rem;
}

.quote-icon {
  font-size: 2rem;
  opacity: 0.5;
  margin-bottom: 0.5rem;
}

#quote {
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  font-weight: 600;
  line-height: 1.45;
  margin: 0 0 1.5rem;
  min-height: 3.5em;
  color: var(--text);
}

.quote-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Learn flow */
.flow-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-warm);
  margin: 1.25rem 0 0.5rem;
}

.flow-label:first-of-type {
  margin-top: 0;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.note {
  margin-top: 1.25rem;
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(124, 108, 240, 0.12) 0%, rgba(61, 214, 195, 0.08) 100%);
  border: 1px solid rgba(124, 108, 240, 0.25);
  line-height: 1.75;
  white-space: pre-line;
  font-size: 0.95rem;
}

.note:empty {
  display: none;
}

/* Test center */
.form-section {
  margin-bottom: 2rem;
}

.form-section h3 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  color: var(--accent);
}

.form-section h4 {
  margin: 1rem 0 0.75rem;
  font-size: 0.95rem;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}

input::placeholder {
  color: var(--text-muted);
}

input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(61, 214, 195, 0.2);
}

#teacherPanel {
  margin-top: 1rem;
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(244, 162, 97, 0.4);
  background: rgba(244, 162, 97, 0.06);
}

.teacher-q-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-top: 1rem;
}

.question-block {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.question-block:last-of-type {
  border-bottom: none;
}

.question-block p {
  margin: 0 0 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.q-inputs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
}

@media (min-width: 640px) {
  .q-inputs {
    grid-template-columns: 1fr 1fr;
  }
}

#studentQuiz {
  margin-top: 1.25rem;
}

.quiz-q {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.quiz-q p {
  margin: 0 0 0.75rem;
  font-weight: 600;
}

.quiz-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.quiz-options .btn {
  text-align: left;
  border-radius: var(--radius-sm);
}

.quiz-options .btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

#resultsBox {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  background: rgba(61, 214, 195, 0.08);
  border: 1px solid rgba(61, 214, 195, 0.25);
}

#resultsBox h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

#resultsBox p {
  margin: 0.35rem 0;
  font-size: 0.9rem;
}

.site-footer {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}

.site-footer kbd {
  font-family: var(--mono);
  font-size: 0.75rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}
