@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;700;900&family=Rubik:wght@300;400;500&family=Fira+Code:wght@400;500&display=swap');

:root {
  --font-display:     'Barlow Condensed', sans-serif;
  --font-body:        'Rubik', sans-serif;
  --font-mono:        'Fira Code', monospace;
  /* professor territory — amber/lamplight */
  --ns-amber:         #E8A22A;
  --ns-amber-soft:    #FDF3DC;
  --ns-amber-dim:     rgba(232, 162, 42, 0.15);
  /* fold — petroleum */
  --ns-fold:          #0f2b5b;
  --ns-fold-mid:      #1e4d99;
  /* student territory — green/live */
  --ns-green:         #22C55E;
  --ns-green-soft:    rgba(34, 197, 94, 0.12);
  --ns-lime:          #A3E635;
  /* phosphor graph */
  --ns-phosphor:      rgba(100, 160, 255, 0.07);
  --ns-phosphor-mid:  rgba(100, 160, 255, 0.14);
  /* page / neutrals */
  --bg:               #FAFAF7;
  --bg-deep:          #F0EDE4;
  --surface:          rgba(255, 255, 253, 0.92);
  --surface-strong:   rgba(255, 255, 255, 0.97);
  --surface-muted:    rgba(240, 237, 228, 0.7);
  --text:             #111714;
  --muted:            #4B5563;
  --title:            #0C1F18;
  --border:           rgba(17, 23, 20, 0.1);
  --border-strong:    rgba(17, 23, 20, 0.18);
  --shadow-xl:        0 32px 80px rgba(17, 23, 20, 0.12);
  --shadow-lg:        0 18px 36px rgba(17, 23, 20, 0.08);
  --shadow-panel:     0 8px 24px rgba(17, 23, 20, 0.07), inset 0 1px 0 rgba(255,255,255,0.5);
  --grid:             rgba(100, 160, 255, 0.16);
  --hero-grad:        linear-gradient(135deg, #050d1f 0%, #0b1c3d 52%, #0d2247 100%);
  /* legacy compat */
  --accent:           var(--ns-fold-mid);
  --accent-strong:    var(--ns-fold-mid);
  --accent-glow:      rgba(59, 130, 246, 0.12);
  --success:          var(--ns-green);
  --warning:          var(--ns-amber);
}

body.dark-mode {
  --bg:               #080C18;
  --bg-deep:          #060910;
  --surface:          rgba(10, 14, 30, 0.88);
  --surface-strong:   rgba(12, 18, 38, 0.95);
  --surface-muted:    rgba(8, 12, 22, 0.65);
  --text:             #C4D4EE;
  --muted:            #4A6585;
  --title:            #E4EDFF;
  --border:           rgba(80, 120, 200, 0.12);
  --border-strong:    rgba(80, 120, 200, 0.22);
  --shadow-xl:        0 32px 90px rgba(0, 0, 0, 0.62);
  --shadow-lg:        0 18px 40px rgba(0, 0, 0, 0.44);
  --shadow-panel:     0 10px 28px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255,255,255,0.04);
  --grid:             rgba(100, 160, 255, 0.22);
  --hero-grad:        linear-gradient(135deg, #050d1f 0%, #08142e 52%, #0a1a3a 100%);
  --ns-amber-soft:    rgba(232, 162, 42, 0.1);
  --ns-fold:          #0c1e3e;
  --ns-pink:          #FF2D78;
  --accent-glow:      rgba(255, 45, 120, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at 78% 14%, rgba(56, 189, 248, 0.06), transparent 22%),
    radial-gradient(circle at 16% 84%, rgba(14, 165, 233, 0.1), transparent 26%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  position: relative;
  overflow-x: hidden;
  transition: background-color 260ms ease, color 260ms ease;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px, 56px 56px;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.85), transparent 96%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: -20% auto auto -10%;
  width: 38rem;
  height: 38rem;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.14), transparent 68%);
  pointer-events: none;
  z-index: 0;
}

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

button,
input,
textarea {
  font: inherit;
}

.mockup-app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 24px clamp(16px, 3vw, 36px) 40px;
}

.top-chrome {
  max-width: 1180px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lg);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-badge {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(7, 18, 38, 0.94), rgba(14, 165, 233, 0.82));
  color: #eff6ff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 0 24px var(--accent-glow);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.brand-kicker,
.meta-label,
.section-kicker,
.field-kicker {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.brand-title,
.panel-title,
.hero-title,
.display-title,
.metric-value {
  font-family: var(--font-display);
}

.brand-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--title);
}

.control-cluster {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.chrome-btn {
  height: 32px;
  padding: 0 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.62);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 150ms;
  backdrop-filter: blur(8px);
}

.chrome-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
}

.theme-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  transition: all 150ms;
  backdrop-filter: blur(8px);
}

.theme-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
}

.control-btn,
.icon-btn,
.nav-btn,
.primary-btn,
.secondary-btn,
.ghost-btn {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-strong);
  color: var(--title);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.control-btn,
.ghost-btn,
.secondary-btn,
.primary-btn {
  padding: 0.8rem 1.1rem;
  font-weight: 700;
}

.icon-btn,
.nav-btn {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.control-btn:hover,
.icon-btn:hover,
.nav-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.12);
}

.primary-btn {
  border-color: rgba(56, 189, 248, 0.3);
  background: linear-gradient(135deg, rgba(7, 18, 38, 0.92), rgba(14, 165, 233, 0.82));
  color: #eff6ff;
  box-shadow: 0 18px 36px rgba(14, 165, 233, 0.2);
}

body.dark-mode .primary-btn {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(14, 165, 233, 0.62));
}

.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 42px rgba(14, 165, 233, 0.26);
}

.ghost-btn {
  background: transparent;
}

.stage-shell {
  max-width: 1180px;
  margin: 0 auto 18px;
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-xl);
}

.stage-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 36px 36px;
  opacity: 0.7;
  pointer-events: none;
}

.stage-shell::after {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 120px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), transparent);
  pointer-events: none;
}

.stage-shell.stage-hero {
  background: var(--hero-grad);
  color: #f8fafc;
}

.stage-shell.stage-hero::before {
  background:
    radial-gradient(circle at 78% 18%, rgba(56, 189, 248, 0.14), transparent 24%),
    radial-gradient(circle at 16% 78%, rgba(14, 165, 233, 0.12), transparent 28%),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: auto, auto, 36px 36px, 36px 36px;
}

.stage-inner {
  position: relative;
  z-index: 1;
  padding: clamp(28px, 4vw, 54px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.22);
  background: rgba(56, 189, 248, 0.08);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 14px var(--accent-glow);
}

.hero-title,
.display-title {
  margin: 0;
  line-height: 1;
  letter-spacing: -0.04em;
  color: inherit;
}

.hero-title {
  font-size: clamp(2.9rem, 6vw, 5rem);
  font-weight: 900;
}

.display-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--title);
}

.hero-copy,
.body-copy {
  font-size: 1.05rem;
  line-height: 1.75;
}

.hero-copy {
  color: rgba(226, 232, 240, 0.82);
  max-width: 60ch;
}

.body-copy {
  color: var(--muted);
}

.stack {
  display: grid;
  gap: 1rem;
}

.meta-grid,
.card-grid {
  display: grid;
  gap: 1rem;
}

.meta-grid {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.glass-card,
.metric-card,
.module-card,
.input-shell {
  position: relative;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  box-shadow: var(--shadow-panel);
  backdrop-filter: blur(10px);
}

.glass-card,
.module-card,
.input-shell {
  padding: 1.4rem;
}

.metric-card {
  padding: 1rem 1.1rem;
}

.glass-card::before,
.metric-card::before,
.module-card::before,
.input-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 42%);
  pointer-events: none;
}

body.dark-mode .glass-card::before,
body.dark-mode .metric-card::before,
body.dark-mode .module-card::before,
body.dark-mode .input-shell::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 42%);
}

.metric-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--title);
}

.metric-value.accent,
.accent-text {
  color: var(--accent);
}

.panel-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--title);
}

.panel-copy,
.helper-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.chip-row,
.action-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.chip,
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--title);
  font-size: 0.82rem;
  font-weight: 700;
}

.chip::before,
.status-chip::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent-glow);
}

.status-chip.success::before {
  background: var(--success);
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.28);
}

.panel-grid {
  display: grid;
  gap: 1rem;
}

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

.field-label {
  display: block;
  margin-bottom: 0.55rem;
  font-weight: 700;
  color: var(--title);
}

.field-help {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.field-input,
.field-textarea {
  width: 100%;
  border-radius: 16px;
  border: 1.5px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
  padding: 0.95rem 1rem;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.field-textarea {
  min-height: 180px;
  resize: vertical;
}

.field-input:focus,
.field-textarea:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
  background: rgba(255, 255, 255, 0.96);
}

body.dark-mode .field-input:focus,
body.dark-mode .field-textarea:focus {
  background: rgba(15, 23, 42, 0.96);
}

.choice-list {
  display: grid;
  gap: 0.9rem;
}

.choice-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  border: 1.5px solid var(--border);
  background: var(--surface-strong);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.choice-item:hover {
  transform: translateX(4px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.08), 0 0 22px rgba(56, 189, 248, 0.08);
}

.choice-item.selected {
  border-color: rgba(56, 189, 248, 0.55);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(14, 165, 233, 0.08));
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.14), 0 0 30px rgba(56, 189, 248, 0.12);
}

.choice-key {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--title);
  background: var(--surface);
  border: 1px solid var(--border);
}

.choice-item.selected .choice-key {
  color: #eff6ff;
  background: linear-gradient(135deg, rgba(7, 18, 38, 0.94), rgba(14, 165, 233, 0.82));
  border-color: transparent;
}

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.status-line::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.25);
}

.pill-nav {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lg);
  z-index: 10;
}

.dot-row {
  display: flex;
  gap: 0.45rem;
  align-items: center;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.35);
}

.dot.active {
  background: var(--accent);
  box-shadow: 0 0 14px var(--accent-glow);
  transform: scale(1.18);
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
.choice-item:focus-visible,
.nav-btn:focus-visible,
.icon-btn:focus-visible,
.control-btn:focus-visible {
  outline: 2px solid #7EB3FF;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(126, 179, 255, 0.25);
}

@media (max-width: 900px) {
  .top-chrome {
    flex-direction: column;
    align-items: stretch;
  }

  .brand-lockup,
  .control-cluster {
    justify-content: space-between;
  }

  .pill-nav {
    width: calc(100% - 24px);
    justify-content: center;
  }
}

@media (max-width: 720px) {
  .mockup-app {
    padding: 14px 12px 96px;
  }

  .stage-shell,
  .top-chrome {
    border-radius: 24px;
  }

  .stage-inner {
    padding: 22px 18px;
  }

  .hero-title {
    font-size: clamp(2.3rem, 12vw, 3.4rem);
  }

  .display-title {
    font-size: clamp(1.7rem, 9vw, 2.4rem);
  }

  .brand-lockup,
  .control-cluster {
    width: 100%;
  }

  .control-cluster {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}