/* skridthungi — Nordic minimal */

:root {
  --navy-950: #0a1830;
  --navy-900: #0f2449;
  --navy-700: #1e3a6e;
  --ice-50:  #f6f9fd;
  --ice-100: #eef3fa;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --border: #e2e8f0;
  --accent: #2f6feb;
  --accent-light: #eaf1fe;
  --aurora: #2dd4bf;
  --green: #059669;
  --green-bg: #ecfdf5;
  --green-border: #a7f3d0;
  --amber: #b45309;
  --amber-bg: #fffbeb;
  --amber-border: #fde68a;
  --red: #dc2626;
  --red-bg: #fef2f2;
  --red-border: #fecaca;
  --radius: 18px;
  --shadow-card: 0 1px 2px rgba(15, 36, 73, 0.04), 0 12px 32px -12px rgba(15, 36, 73, 0.12);
}

* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  color: var(--navy-950);
  background: var(--ice-50);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  letter-spacing: -0.02em;
}

a { color: inherit; }

/* ── background: aurora wash + mountain horizon ─────────────────────────── */

.aurora-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fafd 0%, #eef3fa 55%, #e7eef8 100%);
}

.aurora-bg::before {
  content: "";
  position: absolute;
  top: -25%;
  left: 50%;
  width: 1400px;
  height: 900px;
  transform: translateX(-50%);
  background:
    radial-gradient(closest-side, rgba(45, 212, 191, 0.16), transparent),
    radial-gradient(closest-side at 30% 40%, rgba(47, 111, 235, 0.14), transparent 70%),
    radial-gradient(closest-side at 70% 30%, rgba(129, 140, 248, 0.12), transparent 70%);
  filter: blur(10px);
}

.horizon {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  opacity: 0.55;
}

/* ── layout shell ───────────────────────────────────────────────────────── */

.shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.topbar {
  width: 100%;
  max-width: 1040px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 24px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--navy-950);
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(155deg, var(--navy-900), var(--navy-700));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-link {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--slate-500);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.nav-link:hover { color: var(--navy-950); background: rgba(15, 36, 73, 0.06); }

main {
  flex: 1;
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 40px 20px 60px;
}

footer {
  width: 100%;
  text-align: center;
  padding: 20px 16px 32px;
  font-size: 12px;
  color: var(--slate-400);
}
footer a { color: var(--slate-500); text-decoration: none; font-weight: 600; }
footer a:hover { color: var(--navy-900); }

/* ── hero (index page) ──────────────────────────────────────────────────── */

.hero {
  width: 100%;
  max-width: 620px;
  text-align: center;
  padding-top: 12px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 6px 12px;
  border-radius: 99px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 700;
  line-height: 1.12;
  margin-bottom: 16px;
}

.hero p.lede {
  font-size: 16px;
  color: var(--slate-500);
  line-height: 1.65;
  max-width: 480px;
  margin: 0 auto 32px;
}

/* ── card ────────────────────────────────────────────────────────────────── */

.card {
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--radius);
  padding: 28px;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  box-shadow: var(--shadow-card);
  text-align: left;
}

.card-eyebrow {
  font-size: 11px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
}

.card h1, .card h2 { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.card p { font-size: 14px; color: var(--slate-500); line-height: 1.6; margin-bottom: 16px; }

.subscribe-form {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

input[type=email] {
  flex: 1;
  width: 100%;
  padding: 13px 16px;
  border-radius: 11px;
  border: 1.5px solid var(--border);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: var(--ice-50);
  transition: border-color .15s, background .15s, box-shadow .15s;
}
input[type=email]:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 4px var(--accent-light);
}

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 13px 18px;
  background: linear-gradient(155deg, var(--navy-900), var(--navy-700));
  color: #fff;
  border: none;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
  box-shadow: 0 6px 16px -6px rgba(15, 36, 73, 0.45);
}
button:hover, .btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -8px rgba(15, 36, 73, 0.5); }
button:active, .btn:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--navy-900);
  box-shadow: none;
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { background: var(--ice-100); box-shadow: none; }

.hero-form {
  display: flex;
  gap: 10px;
  max-width: 440px;
  margin: 0 auto 14px;
}
.hero-form input[type=email] { padding: 14px 18px; }
.hero-form button { width: auto; padding: 14px 24px; white-space: nowrap; }

.note {
  font-size: 12.5px; color: var(--slate-400); margin-top: 16px;
  line-height: 1.6; text-align: center;
}
.note a { color: var(--slate-500); font-weight: 600; text-decoration: none; }
.note a:hover { color: var(--accent); }

.trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--slate-400);
}
.trust-row span { display: inline-flex; align-items: center; gap: 5px; }

/* ── alert boxes ────────────────────────────────────────────────────────── */

.alert {
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}
.alert svg { flex-shrink: 0; margin-top: 1px; }
.alert-success { background: var(--green-bg); border: 1px solid var(--green-border); color: var(--green); }
.alert-error   { background: var(--red-bg);   border: 1px solid var(--red-border);   color: var(--red); }

/* ── status page ────────────────────────────────────────────────────────── */

.status-wrap { max-width: 620px; width: 100%; }

.status-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 8px 16px 8px 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-500);
  box-shadow: var(--shadow-card);
}
.stat-pill .dot {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent-light); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px;
}

.grant-card {
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  margin-bottom: 12px;
}

.grant-row {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--ice-100);
}
.grant-row:last-child { border-bottom: none; }

.grant-name { font-weight: 700; font-size: 14.5px; margin-bottom: 3px; }
.grant-name-is { font-size: 12.5px; color: var(--slate-400); }

.grant-meta { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.grant-deadline { font-size: 12px; color: var(--slate-400); font-weight: 500; white-space: nowrap; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 99px;
  font-size: 11px; font-weight: 700; letter-spacing: .01em;
  white-space: nowrap;
}
.badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.badge-open      { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }
.badge-open::before { background: var(--green); box-shadow: 0 0 0 3px var(--green-bg), 0 0 6px var(--green); }
.badge-upcoming  { background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-border); }
.badge-upcoming::before { background: var(--amber); }
.badge-closed    { background: var(--ice-100); color: var(--slate-400); border: 1px solid var(--border); }
.badge-closed::before { background: var(--slate-400); }

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--slate-400);
  font-size: 14px;
}

/* ── responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 560px) {
  .topbar { padding: 20px 16px 0; }
  main { padding: 28px 14px 48px; }
  .card { padding: 22px; border-radius: 16px; }
  .hero-form { flex-direction: column; }
  .hero-form button { width: 100%; }
  .status-head { align-items: flex-start; }
  .grant-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .grant-meta { width: 100%; justify-content: space-between; }
}
