/* Dakota Forge — styles
   Dark by default; light follows the OS unless the visitor toggles. */

:root {
  --bg: #121110;
  --bg-raised: #1b1917;
  --bg-sunk: #0d0c0b;
  --line: #2e2a26;
  --text: #f1ece4;
  --muted: #a39b90;
  --ember: #e8662b;
  --ember-hot: #ffb347;
  --ember-soft: rgba(232, 102, 43, 0.14);
  --steel: #7f93a8;
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);

  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --radius: 18px;
  --gutter: 16px;
  --header-h: 64px;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f6f3ee;
    --bg-raised: #ffffff;
    --bg-sunk: #ece7df;
    --line: #ddd5ca;
    --text: #1c1a17;
    --muted: #686057;
    --ember: #c94f17;
    --ember-hot: #e8862b;
    --ember-soft: rgba(201, 79, 23, 0.1);
    --steel: #4f6478;
    --shadow: 0 30px 60px -36px rgba(60, 40, 20, 0.35);
    color-scheme: light;
  }
}

:root[data-theme="light"] {
  --bg: #f6f3ee;
  --bg-raised: #ffffff;
  --bg-sunk: #ece7df;
  --line: #ddd5ca;
  --text: #1c1a17;
  --muted: #686057;
  --ember: #c94f17;
  --ember-hot: #e8862b;
  --ember-soft: rgba(201, 79, 23, 0.1);
  --steel: #4f6478;
  --shadow: 0 30px 60px -36px rgba(60, 40, 20, 0.35);
  color-scheme: light;
}

/* ---------- Base ---------- */

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 0.5em;
}

h2 { font-size: clamp(1.9rem, 5vw, 2.75rem); }

p { margin: 0 0 1em; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--ember-hot);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (min-width: 720px) {
  :root { --gutter: 32px; }
}

/* Keep anchored sections clear of the sticky header */
section[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
}
.skip:focus {
  left: var(--gutter);
  top: 12px;
  z-index: 100;
  background: var(--ember);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.8em 1.3em;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.975rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--ember);
  color: #fff;
  box-shadow: 0 10px 30px -12px var(--ember);
}
.btn-primary:hover { background: color-mix(in srgb, var(--ember) 85%, var(--ember-hot)); }

.btn-ghost {
  color: var(--muted);
  border-color: var(--line);
}
.btn-ghost:hover { color: var(--text); border-color: var(--muted); }

.btn-outline {
  color: var(--text);
  border-color: var(--text);
}
.btn-outline:hover { background: var(--text); color: var(--bg); }

.btn-lg { padding: 1em 1.6em; font-size: 1.05rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
/* Logo sits in a dark tile in both themes, matching the artwork's own black */
.brand-mark {
  display: block;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  overflow: hidden;
  background: #040508;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ember-hot) 22%, transparent), 0 6px 16px -8px rgba(0, 0, 0, 0.6);
}
.brand-mark img { display: block; width: 100%; height: 100%; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  display: none;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.925rem;
  text-decoration: none;
}
.nav a:hover { color: var(--text); background: var(--bg-raised); }

@media (min-width: 640px) {
  .nav a { display: inline-block; }
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-left: 6px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.theme-toggle:hover { color: var(--text); border-color: var(--muted); }
.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: clamp(72px, 14vw, 150px) 0 clamp(96px, 16vw, 180px);
  overflow: hidden;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 0.8rem/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 28px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ember-hot);
  box-shadow: 0 0 0 4px var(--ember-soft), 0 0 18px var(--ember);
}

.hero h1 {
  font-size: clamp(3.4rem, 15vw, 8.5rem);
  letter-spacing: -0.045em;
  line-height: 0.92;
  margin-bottom: 28px;
  background: linear-gradient(180deg, var(--text) 55%, color-mix(in srgb, var(--text) 55%, var(--ember)) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 34ch;
  font-size: clamp(1.15rem, 2.6vw, 1.45rem);
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 36px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* A low prairie horizon with forge glow */
.horizon {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46%;
  pointer-events: none;
  background:
    radial-gradient(60% 90% at 78% 100%, color-mix(in srgb, var(--ember) 38%, transparent), transparent 70%),
    repeating-linear-gradient(0deg, transparent 0 22px, color-mix(in srgb, var(--line) 70%, transparent) 22px 23px);
  -webkit-mask-image: linear-gradient(to top, #000 0%, transparent 100%);
  mask-image: linear-gradient(to top, #000 0%, transparent 100%);
  opacity: 0.85;
}
.horizon::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ember) 60%, transparent);
}

/* ---------- Section label ---------- */

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 500 0.78rem/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 24px;
}
.section-label span { color: var(--ember); }
.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ---------- Featured: Energy ---------- */

.featured { padding: 24px 0 96px; }

.feature-card {
  display: grid;
  gap: 40px;
  padding: clamp(24px, 5vw, 56px);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--ember), var(--ember-hot));
}

@media (min-width: 900px) {
  .feature-card { grid-template-columns: 1.15fr 1fr; align-items: center; gap: 56px; }
}

.feature-card h2 { font-size: clamp(2.2rem, 6vw, 3.4rem); margin-bottom: 8px; }

.feature-url {
  font: 500 0.9rem/1 var(--font-mono);
  color: var(--ember);
  margin-bottom: 24px;
}

.feature-intro {
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--text);
}

.feature-copy > p:not(.feature-url):not(.feature-intro):not(.fineprint) { color: var(--muted); }

.features {
  list-style: none;
  padding: 0;
  margin: 28px 0 32px;
  display: grid;
  gap: 2px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.features li {
  padding: 14px 16px;
  background: var(--bg);
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}
.features strong {
  display: block;
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
}

@media (min-width: 560px) {
  .features { grid-template-columns: 1fr 1fr; }
}

.fineprint {
  margin: 20px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Illustrative, number-free usage visual */
.feature-visual { position: relative; }

.viz {
  background: var(--bg-sunk);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.viz-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.viz-title {
  font: 500 0.75rem/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.viz-pill {
  font: 500 0.72rem/1 var(--font-mono);
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--ember-soft);
  color: var(--ember);
}

.bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 8px;
  height: 170px;
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(0deg, transparent 0 41px, color-mix(in srgb, var(--line) 60%, transparent) 41px 42px);
}
.bars span {
  height: var(--h);
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--steel), color-mix(in srgb, var(--steel) 45%, transparent));
  opacity: 0.75;
}
.bars span.today {
  background: linear-gradient(180deg, var(--ember-hot), var(--ember));
  opacity: 1;
  box-shadow: 0 0 24px -4px var(--ember);
}
.bar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 8px;
  text-align: center;
  font: 500 0.72rem/1 var(--font-mono);
  color: var(--muted);
}

.projection { margin-top: 26px; }
.track {
  position: relative;
  height: 10px;
  margin-top: 12px;
  border-radius: 999px;
  background: var(--line);
}
.track .fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 58%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ember), var(--ember-hot));
}
.track .marker {
  position: absolute;
  top: -5px;
  left: 78%;
  width: 2px;
  height: 20px;
  background: var(--text);
  opacity: 0.6;
}
.track .marker::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -50px;
  width: 50px;
  height: 2px;
  top: 9px;
  background: repeating-linear-gradient(90deg, var(--muted) 0 4px, transparent 4px 8px);
}

.viz-caption {
  margin: 10px 0 0;
  text-align: right;
  font: 500 0.7rem/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  opacity: 0.7;
}

/* ---------- Secondary: Sports totals ---------- */

.secondary { padding: 0 0 96px; }

.secondary-card {
  display: grid;
  gap: 28px;
  padding: clamp(24px, 4vw, 40px);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

@media (min-width: 820px) {
  .secondary-card { grid-template-columns: 1.6fr 1fr; align-items: end; gap: 48px; }
}

.secondary-card h2 { font-size: clamp(1.6rem, 4vw, 2.1rem); }
.secondary-card p { color: var(--muted); max-width: 58ch; }

.badge {
  display: inline-block;
  margin-bottom: 16px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--steel) 50%, transparent);
  color: var(--steel);
  font: 500 0.75rem/1 var(--font-mono);
  letter-spacing: 0.04em;
}

.leagues {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}
.leagues li {
  padding: 5px 11px;
  border-radius: 8px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--text);
}

.secondary-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
@media (min-width: 820px) { .secondary-cta { align-items: flex-end; text-align: right; } }

.disclaimer {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- About ---------- */

.about {
  padding: 96px 0;
  background: var(--bg-sunk);
  border-top: 1px solid var(--line);
}
.about-inner { display: grid; gap: 8px; align-items: start; }
@media (min-width: 820px) {
  .about-inner { grid-template-columns: 1fr 2fr; gap: 48px; }
  .about-inner .section-label::after { display: none; }
}
.about p {
  font-size: clamp(1.1rem, 2.4vw, 1.3rem);
  line-height: 1.6;
  color: var(--muted);
  max-width: 52ch;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 40px 0;
  border-top: 1px solid var(--line);
  background: var(--bg-sunk);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}
.footer-email {
  color: var(--text);
  text-decoration-color: var(--ember);
  text-underline-offset: 4px;
}
.copyright { margin: 0; font-size: 0.875rem; color: var(--muted); }

/* ---------- Social links ---------- */

.icon { width: 18px; height: 18px; flex: none; }

.social {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.social a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--muted);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.social a:hover { color: var(--text); border-color: var(--muted); }

.about-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.about-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
}
.about-links a:hover { color: var(--text); }
.about-links .icon { width: 16px; height: 16px; }
