:root {
  color-scheme: dark;
  --bg: #07111f;
  --bg-soft: #0d1a2d;
  --panel: rgb(10 20 36 / 72%);
  --panel-strong: rgb(13 27 46 / 88%);
  --text: #f3f7ff;
  --muted: #9eb0cb;
  --line: rgb(160 183 221 / 16%);
  --line-strong: rgb(160 183 221 / 24%);
  --accent: #7c9cff;
  --accent-strong: #9c7cff;
  --glow: rgb(124 156 255 / 30%);
  --shadow: 0 30px 80px rgb(0 0 0 / 34%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgb(75 123 255 / 0.28), transparent 28rem),
    radial-gradient(circle at top right, rgb(167 93 255 / 0.18), transparent 24rem),
    linear-gradient(180deg, #0b1424 0%, var(--bg) 52%, #050c17 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

body.theme-submit {
  --accent: #73e0b7;
  --accent-strong: #37c9c6;
  --glow: rgb(83 220 180 / 30%);
}

body.theme-download {
  --accent: #63c7ff;
  --accent-strong: #4b8dff;
  --glow: rgb(99 199 255 / 28%);
}

.page {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

/* ─── Header ─── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  padding: 16px 18px;
  backdrop-filter: blur(18px);
  background: rgb(7 17 31 / 58%);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 12px 36px rgb(0 0 0 / 18%);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 750;
  letter-spacing: -0.03em;
  font-size: 1.05rem;
}

.brand-mark {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 0 28px var(--glow);
}

nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 0.92rem;
}

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

nav a {
  padding: 10px 14px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 999px;
  transition: 180ms ease;
}

nav a:hover {
  color: var(--text);
  border-color: var(--line);
  background: rgb(255 255 255 / 4%);
}

/* ─── Hero (main page) ─── */

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
  gap: 24px;
  margin-bottom: 28px;
  padding: 42px;
  background:
    linear-gradient(135deg, rgb(255 255 255 / 0.06), transparent 45%),
    linear-gradient(180deg, rgb(12 23 40 / 0.92), rgb(8 16 29 / 0.84));
  border: 1px solid var(--line-strong);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -60px -60px auto;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, var(--glow), transparent 68%);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 8px 14px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid rgb(255 255 255 / 8%);
  border-radius: 999px;
  background: rgb(255 255 255 / 4%);
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentcolor;
  box-shadow: 0 0 18px currentcolor;
}

h1 {
  margin: 0;
  max-width: 11ch;
  font-size: clamp(3.4rem, 8vw, 6.6rem);
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.lead {
  margin: 24px 0 0;
  max-width: 620px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 30px;
}

.hero-panel {
  display: grid;
  gap: 14px;
  align-content: start;
}

.metric {
  padding: 18px 18px 16px;
  background: rgb(255 255 255 / 4%);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.metric strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.8rem;
  letter-spacing: -0.05em;
}

.metric span {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ─── Cards (main page) ─── */

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 24px;
}

.card,
section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 18px 50px rgb(0 0 0 / 12%);
}

.card {
  padding: 24px;
}

.card-label {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgb(255 255 255 / 8%);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.08rem;
  letter-spacing: -0.03em;
}

.card p,
section p {
  margin: 0;
  color: var(--muted);
}

section {
  padding: 32px;
  margin-bottom: 16px;
}

h2 {
  margin: 0 0 12px;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
}

.section-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.split {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 26px;
  align-items: start;
}

/* ─── Submit page: sidebar + form ─── */

.submit-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}

.submit-sidebar {
  position: sticky;
  top: 100px;
  padding: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
}

.submit-sidebar h2 {
  margin: 0 0 12px;
}

.submit-sidebar p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.92rem;
}

.sidebar-links {
  display: grid;
  gap: 10px;
}

.sidebar-links a {
  display: block;
  padding: 10px 14px;
  color: var(--accent);
  font-size: 0.88rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: 180ms ease;
}

.sidebar-links a:hover {
  background: rgb(255 255 255 / 4%);
  border-color: var(--line-strong);
}

.form-section {
  padding: 32px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 18px 50px rgb(0 0 0 / 12%);
}

.intake-form {
  display: grid;
  gap: 20px;
}

.form-row {
  display: grid;
  gap: 8px;
}

.form-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.form-input {
  padding: 12px 16px;
  background: rgb(255 255 255 / 4%);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 180ms ease;
}

.form-input::placeholder {
  color: var(--muted);
}

.form-input:focus {
  border-color: var(--accent);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 120px;
  padding: 24px;
  border: 2px dashed var(--line-strong);
  border-radius: 18px;
  color: var(--muted);
  font-size: 0.92rem;
  cursor: pointer;
  transition: border-color 180ms ease;
}

.upload-area:hover {
  border-color: var(--accent);
}

.upload-icon {
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--accent);
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

/* ─── Download page: banner + file list ─── */

.download-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  padding: 28px 36px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 24px;
}

.download-banner h2 {
  margin: 0 0 4px;
  font-size: 1.6rem;
  letter-spacing: -0.04em;
}

.download-banner p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.table-section {
  padding: 32px;
  margin-bottom: 16px;
}

.table-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.table-header h2 {
  margin: 0;
  font-size: 1.15rem;
}

.file-list {
  display: grid;
  gap: 6px;
}

.file-item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: background 180ms ease;
}

.file-item:hover {
  background: rgb(255 255 255 / 4%);
}

.file-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgb(255 255 255 / 5%);
  color: var(--accent);
  font-size: 1.1rem;
}

.file-info {
  min-width: 0;
}

.file-info strong {
  display: block;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.file-info span {
  color: var(--muted);
  font-size: 0.82rem;
}

.file-badge {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.download-note {
  padding: 20px 24px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.download-note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.download-note a {
  color: var(--accent);
}

/* ─── Shared components ─── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
  transition: 180ms ease;
}

.button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 16px 36px var(--glow);
}

.button.secondary {
  background: rgb(255 255 255 / 4%);
}

.button:hover {
  transform: translateY(-1px);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 34px;
  padding-top: 22px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

/* ─── Responsive ─── */

@media (width <= 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .submit-layout {
    grid-template-columns: 1fr;
  }

  .submit-sidebar {
    position: static;
  }

  .download-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .file-item {
    grid-template-columns: 36px 1fr;
  }

  .file-badge {
    display: none;
  }
}

@media (width <= 760px) {
  .page {
    width: min(100%, calc(100% - 28px));
    padding-top: 16px;
  }

  .site-header,
  footer {
    align-items: flex-start;
  }

  .site-header {
    position: static;
    flex-direction: column;
    margin-bottom: 22px;
  }

  nav {
    justify-content: flex-start;
  }

  .hero,
  section {
    padding: 24px;
  }

  .split {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  h1 {
    max-width: none;
    font-size: clamp(2.7rem, 13vw, 4.2rem);
  }
}
