/* The home page: hero, atlas, history, fields, vote. */

.home-nav { display: flex; gap: 4px; margin-left: 18px; font-size: 0.86rem; }
.home-nav a { color: var(--ink-3); text-decoration: none; padding: 6px 10px; border-radius: 999px; }
.home-nav a:hover { color: var(--ink); background: var(--surface); }
@media (max-width: 860px) { .home-nav { display: none; } }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.band { padding: clamp(80px, 12vw, 150px) 0 0; }
.section-head {
  display: grid; gap: 18px 60px; align-items: end; margin-bottom: 40px;
  grid-template-columns: 1fr;
}
@media (min-width: 900px) { .section-head { grid-template-columns: 1.1fr 0.9fr; } }
.section-head h2 { margin: 12px 0 0; }
.lede.small { font-size: 1.12rem; margin: 0; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-sky { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.9; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 18% 20%, color-mix(in oklab, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(50% 40% at 90% 90%, color-mix(in oklab, var(--gold) 10%, transparent), transparent 70%),
    linear-gradient(to bottom, transparent 60%, var(--bg));
}
.hero-inner {
  position: relative; z-index: 1;
  max-width: 1240px; margin: 0 auto;
  padding: clamp(56px, 10vw, 120px) var(--gutter) clamp(64px, 9vw, 110px);
  display: grid; gap: 56px; align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 1060px) { .hero-inner { grid-template-columns: 1.25fr 0.85fr; } }
.hero-copy .kicker { margin-bottom: 26px; }
.hero-copy .display { font-size: clamp(3.1rem, 7.4vw, 6.6rem); }
.hero-copy .lede { max-width: 36rem; margin: 30px 0 34px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 14px 40px; margin: 48px 0 0; }
.hero-stats div { display: flex; flex-direction: column-reverse; }
.hero-stats dt { font-size: 0.78rem; color: var(--ink-3); }
.hero-stats dd { margin: 0; font: 400 2.4rem/1 var(--f-display); color: var(--ink); }

.feature {
  display: block; padding: 22px 24px 24px; text-decoration: none; color: var(--ink);
  position: relative; overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.3s;
}
.feature::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, var(--accent), transparent 40%, transparent 60%, var(--gold));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0.7;
}
.feature:hover { transform: translateY(-4px); text-decoration: none; }
.feature-top { display: flex; justify-content: space-between; align-items: center; }
.badge {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em;
  padding: 4px 10px; border-radius: 999px; color: var(--gold); background: var(--gold-soft);
}
.feature-art { margin: 18px -8px 8px; }
.feature-art svg { width: 100%; height: auto; overflow: visible; }
.feature-title { font: 400 2.3rem/1 var(--f-display); margin: 6px 0 8px; }
.feature-sub { font-size: 0.8rem; color: var(--ink-3); margin: 0 0 14px; }
.feature-desc { font-size: 1.02rem; color: var(--ink-2); margin: 0 0 18px; }
.feature-go { font-size: 0.9rem; font-weight: 500; color: var(--accent-ink); }

/* the little attention animation */
.arc-word { font: 400 21px var(--f-body); fill: var(--ink-3); transition: fill 0.4s; }
.arc-word.src { fill: var(--ink); font-style: italic; }
.arc-word.hot { fill: var(--ink); }
.arc { fill: none; stroke: var(--accent); stroke-linecap: round; transition: opacity 0.5s; }

/* ---------- atlas ---------- */
.atlas-tools { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.legend { display: flex; gap: 18px; font-size: 0.8rem; color: var(--ink-3); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.lg { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.lg-new { background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.lg-primer { background: var(--ink-2); }
.lg-req { border: 1.5px solid var(--ink-3); }

.atlas-frame {
  position: relative; max-width: 1240px; margin: 0 auto;
  margin-inline: max(var(--gutter), calc((100% - 1240px) / 2));
  border-radius: var(--r-3); overflow: hidden;
  background:
    radial-gradient(80% 60% at 50% 0%, color-mix(in oklab, var(--accent) 7%, transparent), transparent),
    var(--bg-2);
}
.atlas-scroll { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
#atlas-map { min-width: 980px; width: 100%; height: auto; }
.atlas-band-label { font: 500 11.5px var(--f-ui); fill: var(--ink-3); letter-spacing: 0.01em; }
.atlas-band { fill: transparent; }
.atlas-band.alt { fill: color-mix(in oklab, var(--ink) 2.2%, transparent); }
.atlas-year { font: 10.5px var(--f-mono); fill: var(--ink-3); }
.atlas-tick { stroke: var(--line); }
.atlas-edge { fill: none; stroke: var(--line-2); stroke-width: 1; transition: opacity 0.3s, stroke 0.3s; }
.atlas-edge.on { stroke: var(--c); stroke-width: 1.8; opacity: 1; }
.atlas-node { cursor: pointer; transition: opacity 0.3s; }
.atlas-node circle { transition: r 0.2s var(--ease); }
.atlas-node .core { fill: var(--c); }
.atlas-node.req .core { fill: var(--bg-2); stroke: var(--c); stroke-width: 1.4; opacity: 0.75; }
.atlas-node.new .halo { fill: var(--gold); opacity: 0.25; animation: pulse 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.atlas-node.new .core { fill: var(--gold); }
.atlas-node:focus-visible { outline: none; }
.atlas-node:focus-visible .core, .atlas-node.focus .core { stroke: var(--ink); stroke-width: 2; }
.atlas-node .lbl { font: 500 11px var(--f-ui); fill: var(--ink); pointer-events: none; paint-order: stroke; stroke: var(--bg-2); stroke-width: 4px; }
svg.dim .atlas-node:not(.lit) { opacity: 0.18; }
svg.dim .atlas-edge:not(.on) { opacity: 0.12; }
@keyframes pulse { 50% { transform: scale(1.7); opacity: 0; } }

.atlas-card {
  position: absolute; z-index: 3; width: 290px; padding: 16px 18px;
  pointer-events: none; font-family: var(--f-ui);
  animation: rise 0.2s var(--ease);
}
.atlas-card .t { font: 400 1.35rem/1.12 var(--f-display); color: var(--ink); margin: 6px 0 6px; }
.atlas-card .m { font-size: 0.8rem; color: var(--ink-3); }
.atlas-card .s { margin-top: 10px; font-size: 0.8rem; font-weight: 500; }
.atlas-card .rel { margin-top: 8px; font-size: 0.78rem; color: var(--ink-2); }
.scroll-hint { font-size: 0.8rem; margin-top: 12px; }
@media (min-width: 1000px) { .scroll-hint { display: none; } }

/* ---------- history ---------- */
.eras {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(290px, 1fr); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px var(--gutter) 20px;
  max-width: 1240px; margin: 0 auto; scrollbar-width: thin;
}
.era {
  scroll-snap-align: start; padding: 24px 22px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 12px;
}
.era .yrs { font: 400 3rem/1 var(--f-display); color: var(--ink); letter-spacing: -0.02em; }
.era .yrs span { color: var(--ink-3); }
.era h3 { margin: 0; font-size: 1.05rem; }
.era p { font-size: 1rem; color: var(--ink-2); margin: 0; }
.era ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.era li a {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px;
  font: 500 0.76rem var(--f-ui); text-decoration: none; color: var(--ink-2);
  background: var(--surface-2); border: 1px solid var(--line);
}
.era li a:hover { color: var(--ink); border-color: var(--c); }
.era::after {
  content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, var(--era-c), transparent 70%); opacity: 0.25; pointer-events: none;
}

/* ---------- fields ---------- */
.field-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.field-card {
  padding: 22px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink);
  position: relative; overflow: hidden; transition: transform 0.35s var(--ease), border-color 0.3s;
  cursor: pointer; text-align: left; font: inherit;
}
.field-card:hover { transform: translateY(-3px); border-color: var(--c); }
.field-card .n { font: 400 2.6rem/1 var(--f-display); color: var(--c); }
.field-card h3 { margin: 0; font-size: 1rem; }
.field-card p { margin: 0; font-size: 0.98rem; color: var(--ink-2); }
.field-card .few { font: 0.78rem/1.5 var(--f-ui); color: var(--ink-3); margin-top: auto; }
.field-card .bar { height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
.field-card .bar i { display: block; height: 100%; background: var(--c); }

/* ---------- vote ---------- */
.vote-wrap { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 960px) { .vote-wrap { grid-template-columns: 0.9fr 1.1fr; align-items: start; } }
.vote-copy h2 { margin-top: 12px; }
.preview-note { margin-top: 20px; font-size: 0.82rem; color: var(--ink-3); padding-left: 12px; border-left: 2px solid var(--gold); }
.vote-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: v; }
.vote-item {
  display: grid; grid-template-columns: 34px 1fr auto; gap: 14px; align-items: center;
  padding: 14px 16px; counter-increment: v;
}
.vote-item::before { content: counter(v, decimal-leading-zero); font: 0.8rem var(--f-mono); color: var(--ink-3); }
.vote-item .t { font: 400 1.25rem/1.15 var(--f-display); }
.vote-item .m { font: 0.78rem var(--f-ui); color: var(--ink-3); display: flex; align-items: center; gap: 7px; margin-top: 3px; }
.vote-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface-2); cursor: pointer; font: 500 0.82rem var(--f-ui); color: var(--ink-2);
  transition: all 0.2s;
}
.vote-btn:hover { border-color: var(--gold); color: var(--ink); }
.vote-btn[aria-pressed="true"] { background: var(--gold-soft); border-color: var(--gold); color: var(--gold); }
.vote-btn svg { width: 14px; height: 14px; }

/* ---------- every paper ---------- */
.paper-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.paper-row {
  display: grid; grid-template-columns: 52px 1fr auto; gap: 2px 14px; align-items: baseline;
  padding: 12px 8px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); transition: background 0.2s;
}
.paper-row:hover { background: var(--surface); text-decoration: none; }
.paper-row .y { color: var(--ink-3); grid-row: span 2; font-size: 0.8rem; }
.paper-row .t { font: 400 1.2rem/1.2 var(--f-display); }
.paper-row .m { grid-column: 2; font-size: 0.8rem; color: var(--ink-3); display: flex; align-items: center; gap: 7px; }
.paper-row .s { grid-row: 1; grid-column: 3; font-size: 0.76rem; color: var(--ink-3); white-space: nowrap; }
.paper-row .s.rumblr { color: var(--gold); }
.paper-row .s.primer { color: var(--good); }
@media (max-width: 640px) { .paper-row { grid-template-columns: 44px 1fr; } .paper-row .s { grid-row: auto; grid-column: 2; } }
