/* Gjallarhorn — a modern, Nordic-inspired documentation theme.
   Frost and midnight, with a quiet aurora. Clean type, generous space. */

:root {
  --midnight:   #0a0e1a;
  --fjord:      #111726;
  --fjord-2:    #161d30;
  --frost:      #e7edf7;
  --frost-dim:  #aeb9cf;
  --frost-mute: #707d99;
  --line:       #222b41;
  --aurora-1:   #5fe3c0;  /* glacial teal */
  --aurora-2:   #6aa0ff;  /* cold blue   */
  --aurora-3:   #b08cff;  /* violet      */
  --gold:       #e7c986;  /* the horn    */
  --radius:     16px;
  --maxw:       1080px;
  --mono: "SF Mono", "JetBrains Mono", "Fira Code", ui-monospace, Menlo, Consolas, monospace;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--midnight);
  color: var(--frost);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Aurora — a slow, soft wash behind the masthead */
.aurora {
  position: fixed;
  inset: -30vh -10vw auto -10vw;
  height: 90vh;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(45% 55% at 20% 30%, rgba(95,227,192,0.18), transparent 70%),
    radial-gradient(40% 50% at 70% 20%, rgba(106,160,255,0.20), transparent 70%),
    radial-gradient(35% 45% at 50% 50%, rgba(176,140,255,0.14), transparent 70%);
  filter: blur(40px);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(3%, 2%, 0) scale(1.08); }
}

/* ---- Masthead ---- */
.masthead { position: relative; z-index: 1; }

.topnav {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand {
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--frost);
  text-decoration: none;
  font-size: 1.05rem;
}
.brand::first-letter { color: var(--gold); margin-right: 4px; }

.topnav .links { display: flex; gap: 22px; flex-wrap: wrap; }
.topnav .links a {
  color: var(--frost-dim);
  text-decoration: none;
  font-size: 0.92rem;
  transition: color 0.2s ease;
}
.topnav .links a:hover { color: var(--aurora-1); }

.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 64px 24px 72px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.74rem;
  color: var(--aurora-1);
  margin: 0 0 18px;
}
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.04;
  margin: 0 0 22px;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, var(--frost) 30%, var(--aurora-2) 70%, var(--aurora-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  max-width: 62ch;
  font-size: 1.16rem;
  color: var(--frost-dim);
  margin: 0 0 32px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn.primary {
  background: linear-gradient(120deg, var(--aurora-1), var(--aurora-2));
  color: #06120f;
  box-shadow: 0 10px 30px -12px rgba(106,160,255,0.7);
}
.btn.primary:hover { transform: translateY(-2px); }
.btn.ghost {
  color: var(--frost);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
}
.btn.ghost:hover { border-color: var(--aurora-1); color: var(--aurora-1); }

/* ---- Sections ---- */
main { position: relative; z-index: 1; }

section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 72px 24px;
  border-top: 1px solid var(--line);
}
section.alt {
  background: linear-gradient(180deg, rgba(255,255,255,0.015), transparent);
}

.section-head { margin-bottom: 28px; }
.kicker {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--frost-mute);
  margin-bottom: 10px;
}
section h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  margin: 0;
  letter-spacing: -0.01em;
}
.prose { max-width: 70ch; color: var(--frost-dim); font-size: 1.04rem; }
.prose strong { color: var(--frost); font-weight: 600; }

/* ---- Cards grid ---- */
.grid {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}
.card {
  background: var(--fjord);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(95,227,192,0.4); }
.card .rune {
  font-size: 1.9rem;
  line-height: 1;
  color: var(--gold);
  margin-bottom: 14px;
}
.card h3 { margin: 0 0 8px; font-size: 1.12rem; }
.card p { margin: 0; color: var(--frost-dim); font-size: 0.96rem; }

/* ---- Timeline ---- */
.timeline {
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.timeline li {
  display: flex;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.timeline li:last-child { border-bottom: none; }
.timeline .step {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-weight: 700;
  color: var(--midnight);
  background: linear-gradient(135deg, var(--aurora-1), var(--aurora-2));
}
.timeline h3 { margin: 4px 0 6px; font-size: 1.1rem; }
.timeline p { margin: 0; color: var(--frost-dim); max-width: 64ch; }

/* ---- Code blocks ---- */
.code {
  margin: 22px 0 0;
  background: var(--fjord-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.88rem;
  line-height: 1.7;
  color: #cdd7ec;
  white-space: pre;
  tab-size: 4;
}
.code .c { color: var(--frost-mute); font-style: italic; }
.code .s { color: var(--aurora-1); }
.code .k { color: var(--aurora-3); }
.code .n { color: var(--gold); }

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: rgba(106,160,255,0.10);
  color: #cfe0ff;
  padding: 2px 7px;
  border-radius: 6px;
}

/* ---- Mímir verb table ---- */
.verb-table {
  margin-top: 34px;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.verb {
  display: grid;
  grid-template-columns: 130px 150px 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 16px 22px;
  background: var(--fjord);
}
.verb b { color: var(--gold); font-family: var(--mono); font-size: 0.98rem; }
.verb span { color: var(--aurora-2); font-family: var(--mono); font-size: 0.82rem; }
.verb em { color: var(--frost-dim); font-style: normal; font-size: 0.95rem; }

/* ---- Note ---- */
.note {
  margin-top: 30px;
  padding: 20px 24px;
  border-left: 3px solid var(--aurora-1);
  background: rgba(95,227,192,0.06);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--frost-dim);
}
.note strong { color: var(--aurora-1); }

/* ---- Endpoints ---- */
.endpoints { margin-top: 42px; }
.endpoints h3 { margin: 0 0 16px; font-size: 1.15rem; }
.endpoints table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.endpoints td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.endpoints tr td:nth-child(2) { font-family: var(--mono); color: var(--frost); }
.endpoints tr td:last-child { color: var(--frost-dim); }
.m {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.74rem;
  text-align: center;
  width: 70px;
  border-radius: 6px;
  letter-spacing: 0.04em;
}
.m.get  { color: #7fe3c0; background: rgba(95,227,192,0.12); }
.m.post { color: #9db8ff; background: rgba(106,160,255,0.14); }
.m.put  { color: #e7c986; background: rgba(231,201,134,0.14); }
.m.del  { color: #ff9ba6; background: rgba(255,120,135,0.12); }
.hint { margin-top: 14px; color: var(--frost-mute); font-size: 0.9rem; }

/* ---- Footer ---- */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  background: var(--fjord);
}
.foot-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 24px 56px;
}
.foot-inner .brand { display: inline-block; margin-bottom: 10px; }
.foot-inner p { margin: 0; color: var(--frost-mute); max-width: 64ch; font-size: 0.95rem; }

@media (max-width: 640px) {
  .topnav .links { display: none; }
  .verb { grid-template-columns: 1fr; gap: 4px; }
  .verb span { font-size: 0.78rem; }
}
