/* Momentum 2026 – Datathon | Design system: ML & data science theme */
:root {
  --bg: #0a0e17;
  --bg-elevated: #111827;
  --bg-card: #1a2234;
  --border: #2d3a4f;
  --text: #e5e7eb;
  --text-muted: #9ca3af;
  --accent: #06b6d4;
  --accent-hover: #22d3ee;
  --accent-soft: rgba(6, 182, 212, 0.15);
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --radius: 8px;
  --radius-lg: 12px;
  --font-sans: "DM Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", monospace;
  --space: 1rem;
  --container: min(1120px, 92vw);
  --header-h: 72px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4 { font-weight: 600; line-height: 1.25; margin: 0 0 0.5em 0; }
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); color: var(--text); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em 0; color: var(--text-muted); }
p:last-child { margin-bottom: 0; }
a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(10, 14, 23, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space);
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 600;
  font-size: 1.1rem;
}
.site-logo img { height: 40px; width: auto; object-fit: contain; }
.site-logo:hover { color: var(--text); }
.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.site-nav a {
  padding: 8px 14px;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}
.site-nav a:hover { color: var(--text); background: var(--accent-soft); }
.site-nav a.active { color: var(--accent); }

/* Main */
main { min-height: calc(100vh - var(--header-h) - 200px); }
main.inner-page { padding: 2.5rem 0; }
main.inner-page .container { max-width: var(--container); margin: 0 auto; padding: 0 var(--space); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-ghost:hover { background: var(--accent-soft); }

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.card h3 { color: var(--text); margin-bottom: 0.5em; }
a.card { display: block; color: inherit; transition: border-color 0.2s, box-shadow 0.2s; }
a.card:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

/* Forms */
input, textarea, select {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--text);
  width: 100%;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea { min-height: 100px; resize: vertical; }

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 3rem 0 2rem;
}
.site-footer .inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space);
  text-align: center;
}
.site-footer p { margin-bottom: 0.5em; font-size: 0.9rem; }
.site-footer .cta { margin-top: 1.5rem; }

/* Hero */
.hero {
  position: relative;
  padding: clamp(3rem, 8vw, 5rem) 0;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, var(--accent-soft) 0%, transparent 60%);
  pointer-events: none;
}
.hero .container {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--space);
}
.hero .eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.hero h1 { margin-bottom: 0.5rem; color: var(--text); }
.hero .tagline { font-size: 1.35rem; color: var(--accent); font-weight: 600; margin-bottom: 1rem; }
.hero .sub { font-size: 1rem; color: var(--text-muted); margin-bottom: 1.5rem; line-height: 1.65; }
.hero .meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; font-size: 0.95rem; color: var(--text-muted); margin-bottom: 1rem; }
.hero .meta span { display: flex; align-items: center; gap: 6px; }
.hero .one-liner { font-size: 0.95rem; color: var(--text-muted); max-width: 560px; margin: 0 auto; line-height: 1.6; }

/* Section blocks */
.section {
  padding: clamp(2.5rem, 6vw, 4rem) 0;
  border-top: 1px solid var(--border);
}
.section:first-of-type { border-top: none; }
.section .container { max-width: var(--container); margin: 0 auto; padding: 0 var(--space); }
.section-head { margin-bottom: 2rem; }
.section-head h2 { margin-bottom: 0.5rem; }
.section-head p { margin: 0; font-size: 1.05rem; max-width: 640px; }
.section-body p { max-width: 68ch; }
.section ul { margin: 1em 0; padding-left: 1.25rem; color: var(--text-muted); }
.section ul li { margin-bottom: 0.5em; }
.section .grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.section .pill { display: inline-block; padding: 6px 12px; background: var(--accent-soft); color: var(--accent); border-radius: 999px; font-size: 0.85rem; font-weight: 500; margin-right: 8px; margin-bottom: 8px; }

/* Alert / notice */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.alert-warning { background: rgba(245, 158, 11, 0.12); border: 1px solid var(--warning); color: #fbbf24; }
.alert-info { background: var(--accent-soft); border: 1px solid var(--accent); color: var(--accent); }

/* Page title for inner pages */
.page-head { margin-bottom: 2rem; }
.page-head h1 { margin-bottom: 0.35rem; }
.page-head p { margin: 0; color: var(--text-muted); }

/* Flags page */
.flags-list { margin: 1.5rem 0; }
.flag-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}
.flag-card .flag-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.flag-card h3 { margin: 0; font-size: 1.1rem; color: var(--text); }
.flag-badge { background: var(--accent); color: var(--bg); font-size: 0.75rem; padding: 0.25em 0.6em; border-radius: 999px; font-weight: 600; }
.flag-desc { margin: 0.3em 0 0.75em 0; font-size: 0.95em; color: var(--text-muted); }
.flag-task-desc { margin: 0.5em 0 1rem 0; font-size: 0.95em; color: var(--text); }
.flag-task-desc .flag-task-intro { margin: 0 0 0.5em 0; line-height: 1.45; }
.flag-task-desc .flag-task-bullets { margin: 0.4em 0 0.5em 1.25rem; padding: 0; line-height: 1.5; }
.flag-task-desc .flag-task-footer { margin: 0.4em 0 0.5em 0; color: var(--text-muted); font-size: 0.92em; }
.flag-task-desc .flag-format-note { margin: 0.5em 0 0; font-size: 0.9em; color: var(--text-muted); }
.flag-cleared-msg { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border); color: var(--accent); font-size: 0.95em; }
.flag-submit-form { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--border); }
.flag-submit-form .form-group { margin-bottom: 0.75rem; }
.flag-submit-form label { display: block; font-size: 0.9em; margin-bottom: 0.25rem; color: var(--text-muted); }
.flag-submit-form .btn-submit { margin-top: 0.25rem; }
.retry-note { margin: 0.5rem 0 0; font-size: 0.85em; color: var(--text-muted); }
.submit-result { margin-top: 0.5rem; font-size: 0.9em; min-height: 1.5em; }
.submit-result.success { color: var(--success); }
.submit-result.error { color: var(--error); }
.page-cta { margin-top: 2rem; }
.page-cta a { margin-right: 1rem; }

/* Dataset list */
.ds-list { list-style: none; padding: 0; margin: 0; }
.ds-list li { margin-bottom: 0.75rem; }
.ds-list a { font-weight: 500; }
.ds-list .filename { font-size: 0.9em; color: var(--text-muted); margin-left: 0.25rem; }

/* Unlocked list in Progress */
.unlocked-list .flag-badge { font-size: 0.75rem; }

/* Auth / form pages */
.form-row { margin-bottom: 1rem; }
.form-row label { display: block; font-size: 0.9rem; margin-bottom: 0.35rem; color: var(--text-muted); }
.form-error { color: var(--error); font-size: 0.9rem; margin: 0.5em 0; padding-left: 1.25rem; }
.auth-cta { margin-top: 1.5rem; font-size: 0.95rem; }
.signup-form p, .signup-form .form-row { margin-bottom: 1rem; }
.signup-form label { display: block; font-size: 0.9rem; margin-bottom: 0.35rem; color: var(--text-muted); }
.signup-form .help { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.25rem; display: block; }

/* Resources */
.resource-section { margin-bottom: 2rem; }
.resource-section h3 { margin-bottom: 0.75rem; color: var(--text); }
.resource-section ul { list-style: none; padding: 0; margin: 0; }
.resource-section li { margin-bottom: 0.5rem; }
.resource-section a { font-weight: 500; }

/* Mobile nav */
@media (max-width: 640px) {
  .site-header .inner { flex-wrap: wrap; }
  .site-nav { flex-wrap: wrap; gap: 2px; }
  .site-nav a { padding: 6px 10px; font-size: 0.85rem; }
  .hero .meta { flex-direction: column; gap: 0.5rem; }
  .section .grid-2 { grid-template-columns: 1fr; }
}
