/* FILE: assets/css/style.css */

/* ============================================================
   TMM — Trench Made Millionaire
   Mobile-first, accessible, no build step required.
   ============================================================ */

:root {
  --near-black: #090807;
  --cream: #F7F1E7;
  --gold: #F6A91A;
  --rust: #8F3E16;
  --tan: #B9AA96;

  --bg: var(--near-black);
  --bg-alt: #120f0c;
  --text: var(--cream);
  --text-muted: var(--tan);
  --accent: var(--gold);
  --accent-dark: var(--rust);

  --font-display: 'Oswald', 'Arial Narrow', Impact, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --max-width: 1180px;

  --shadow-lift: 0 20px 50px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 0.6em; }
p { margin: 0 0 1em; }
code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.95em;
  word-break: break-all;
}

/* ---------- Accessibility helpers ---------- */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute;
  left: 1rem; top: -60px;
  background: var(--gold);
  color: var(--near-black);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 1000;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* ---------- Layout helpers ---------- */
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.wrap--narrow { max-width: 760px; }

.section { padding: 4rem 0; }
.section--alt { background: var(--bg-alt); }
.section h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--accent);
  margin-bottom: 1rem;
}
.section h3 { font-size: 1.25rem; color: var(--cream); }
.section-note { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn--primary { background: var(--gold); color: var(--near-black); }
.btn--primary:hover { transform: translateY(-2px); }
.btn--secondary { background: transparent; border-color: var(--gold); color: var(--gold); }
.btn--secondary:hover { background: rgba(246, 169, 26, 0.12); }
.btn--ghost { background: transparent; border-color: var(--tan); color: var(--cream); padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn--small { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn--card {
  flex-direction: column;
  align-items: flex-start;
  background: var(--bg-alt);
  border-color: rgba(185, 170, 150, 0.25);
  color: var(--cream);
  border-radius: var(--radius-sm);
  width: 100%;
  padding: 1.25rem;
}
.btn--disabled,
.btn.btn--disabled {
  background: rgba(185, 170, 150, 0.12);
  color: var(--text-muted);
  border-color: rgba(185, 170, 150, 0.2);
  cursor: not-allowed;
  pointer-events: none;
}
.btn__soon { font-weight: 400; opacity: 0.8; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 8, 7, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(246, 169, 26, 0.18);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  gap: 1rem;
}
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1.1; }
.brand__mark { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--gold); letter-spacing: 0.03em; }
.brand__sub { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid rgba(246, 169, 26, 0.4);
  border-radius: var(--radius-sm);
  color: var(--cream);
}
.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  content: '';
  display: block;
  width: 20px; height: 2px;
  background: var(--cream);
  position: relative;
}
.nav-toggle__bar::before { position: absolute; top: -6px; width: 20px; height: 2px; background: var(--cream); }
.nav-toggle__bar::after { position: absolute; top: 6px; width: 20px; height: 2px; background: var(--cream); }

.site-nav {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(320px, 85vw);
  background: var(--bg-alt);
  border-left: 1px solid rgba(246, 169, 26, 0.2);
  padding: 5rem 1.5rem 2rem;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
}
.site-nav.is-open { transform: translateX(0); }
.site-nav ul { list-style: none; display: flex; flex-direction: column; gap: 1.25rem; margin-bottom: 2rem; }
.site-nav a { text-decoration: none; font-weight: 600; font-size: 1.05rem; }
.site-nav__social { display: flex; flex-direction: column; gap: 0.75rem; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav {
    position: static;
    width: auto;
    background: transparent;
    border-left: none;
    padding: 0;
    transform: none;
    display: flex;
    align-items: center;
    gap: 2rem;
    overflow: visible;
  }
  .site-nav ul { flex-direction: row; margin-bottom: 0; gap: 1.5rem; }
  .site-nav a { font-size: 0.95rem; }
  .site-nav__social { flex-direction: row; }
}

/* ---------- Pre-launch ribbon ---------- */
.prelaunch-ribbon {
  background: var(--rust);
  color: var(--cream);
  text-align: center;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
}
.prelaunch-ribbon p { margin: 0; }

/* ---------- Hero ---------- */
.hero { padding: 3.5rem 0 2rem; overflow: hidden; }
.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.hero h1 { display: flex; flex-direction: column; gap: 0.1em; font-size: clamp(2.5rem, 9vw, 4.5rem); }
.hero__ticker { color: var(--gold); }
.hero__name { color: var(--cream); font-size: 0.42em; text-transform: uppercase; letter-spacing: 0.08em; }
.hero__lede { font-size: 1.2rem; color: var(--cream); }
.hero__support { color: var(--text-muted); max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin: 1.5rem 0 1rem; }
.hero__notice {
  font-size: 0.85rem;
  color: var(--text-muted);
  border-left: 3px solid var(--gold);
  padding-left: 0.85rem;
}
.hero__notice a { color: var(--gold); }
.hero__art {
  filter: drop-shadow(0 25px 40px rgba(0,0,0,0.6));
  justify-self: center;
}
.hero__art img { max-width: 320px; width: 100%; }

@media (min-width: 860px) {
  .hero__inner { grid-template-columns: 1.1fr 0.9fr; }
  .hero__art { justify-self: end; }
  .hero__art img { max-width: 460px; }
}

/* ---------- Parallax story ---------- */
.story { position: relative; background: linear-gradient(180deg, var(--near-black), #050403); }
.story__track { height: 300vh; }
.story__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.story__stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.story__rocks {
  position: absolute;
  top: 0; bottom: 0;
  width: 30%;
  background: radial-gradient(ellipse at center, rgba(143,62,22,0.35), transparent 70%),
              linear-gradient(180deg, #1a140f, #050403);
  filter: blur(1px);
}
.story__rocks--left { left: 0; clip-path: polygon(0 0, 100% 0, 70% 100%, 0 100%); }
.story__rocks--right { right: 0; clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 100%); }

.story__graveyard {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-evenly;
  padding-bottom: 8%;
  opacity: 1;
  transition: opacity 0.6s ease;
}
.tombstone {
  background: #1c1712;
  border: 1px solid rgba(185,170,150,0.35);
  border-radius: 6px 6px 2px 2px;
  color: var(--tan);
  font-family: var(--font-display);
  font-size: 0.7rem;
  text-align: center;
  padding: 0.6rem 0.5rem;
  width: 90px;
  box-shadow: var(--shadow-lift);
}
.tombstone span { display: block; color: var(--rust); font-size: 0.65rem; letter-spacing: 0.1em; margin-bottom: 0.2em; }

.story__art {
  position: relative;
  z-index: 2;
  width: min(70vw, 420px);
  filter: brightness(0.55) saturate(0.6);
  transform: scale(0.82) translateY(30px);
  transition: filter 0.6s ease, transform 0.6s ease;
}
.story__art img { width: 100%; filter: drop-shadow(0 20px 35px rgba(0,0,0,0.65)); }

.story__captions {
  position: absolute;
  left: 0; right: 0;
  bottom: 6%;
  text-align: center;
  z-index: 3;
  padding: 0 1.25rem;
}
.story__caption {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 4vw, 2.1rem);
  color: var(--cream);
  text-shadow: 0 4px 18px rgba(0,0,0,0.8);
  position: absolute;
  left: 0; right: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  margin: 0;
}
.story__caption[data-beat="1"] { opacity: 1; }

/* JS-enhanced beat states */
.story[data-beat="1"] .story__caption[data-beat="1"] { opacity: 1; }
.story[data-beat="1"] .story__caption[data-beat="2"],
.story[data-beat="1"] .story__caption[data-beat="3"] { opacity: 0; }

.story[data-beat="2"] .story__caption[data-beat="2"] { opacity: 1; }
.story[data-beat="2"] .story__caption[data-beat="1"],
.story[data-beat="2"] .story__caption[data-beat="3"] { opacity: 0; }
.story[data-beat="2"] .story__art { filter: brightness(0.85) saturate(0.85); transform: scale(0.95) translateY(10px); }
.story[data-beat="2"] .story__graveyard { opacity: 0.5; }

.story[data-beat="3"] .story__caption[data-beat="3"] { opacity: 1; }
.story[data-beat="3"] .story__caption[data-beat="1"],
.story[data-beat="3"] .story__caption[data-beat="2"] { opacity: 0; }
.story[data-beat="3"] .story__art { filter: brightness(1) saturate(1); transform: scale(1.05) translateY(-10px); }
.story[data-beat="3"] .story__graveyard { opacity: 0.15; }

/* No-JS / reduced-motion fallback: stack the three beats as normal content */
.story:not(.has-parallax) .story__track { height: auto; }
.story:not(.has-parallax) .story__sticky { position: static; height: auto; padding: 4rem 0; }
.story:not(.has-parallax) .story__stage { flex-direction: column; gap: 2rem; padding: 2rem 0; }
.story:not(.has-parallax) .story__art { filter: none; transform: none; position: static; }
.story:not(.has-parallax) .story__captions { position: static; }
.story:not(.has-parallax) .story__caption {
  position: static;
  opacity: 1;
  margin-bottom: 0.5rem;
}
.story:not(.has-parallax) .story__graveyard { position: static; padding: 1rem 0; flex-wrap: wrap; }
.story:not(.has-parallax) .story__rocks { display: none; }

@media (prefers-reduced-motion: reduce) {
  .story__art,
  .story__caption,
  .story__graveyard {
    transition: none !important;
  }
}

/* ---------- Story copy ---------- */
.story-copy__tagline { color: var(--gold); font-family: var(--font-display); font-size: 1.1rem; }

/* ---------- Token table ---------- */
.table-card {
  background: var(--bg-alt);
  border: 1px solid rgba(185,170,150,0.15);
  border-radius: var(--radius);
  padding: 0.5rem 1.25rem;
  margin-bottom: 2rem;
}
.token-grid__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.2rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(185,170,150,0.12);
}
.token-grid__row:last-child { border-bottom: none; }
.token-grid__row dt { color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
.token-grid__row dd { margin: 0; font-weight: 600; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }

@media (min-width: 640px) {
  .token-grid__row { grid-template-columns: 260px 1fr; align-items: center; }
}

.pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25em 0.65em;
  border-radius: 999px;
}
.pill--pending { background: rgba(246,169,26,0.15); color: var(--gold); }
.pill--not-launched { background: rgba(143,62,22,0.35); color: var(--tan); }

.callout {
  background: rgba(246,169,26,0.08);
  border: 1px solid rgba(246,169,26,0.3);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.callout h3 { color: var(--gold); }

/* ---------- Check list ---------- */
.check-list { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }
.check-list li {
  padding-left: 1.6rem;
  position: relative;
}
.check-list li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: 700;
}
.check-list--warning li::before { content: '\26A0'; color: var(--rust); }

.notice-box, .warning-box {
  background: var(--bg-alt);
  border: 1px solid rgba(185,170,150,0.2);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.warning-box { border-color: rgba(143,62,22,0.5); background: rgba(143,62,22,0.1); }

/* ---------- Status / contract card ---------- */
.status-card {
  background: var(--bg);
  border: 1px solid rgba(246,169,26,0.25);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 2rem;
}
.status-card__head { display: flex; align-items: center; gap: 0.85rem; flex-wrap: wrap; margin-bottom: 1rem; }
.status-card__head h3 { margin: 0; }
.status-pill {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.35em 0.8em;
  border-radius: 999px;
}
.status-pill--prelaunch { background: rgba(143,62,22,0.35); color: var(--tan); }
.status-pill--live { background: rgba(246,169,26,0.2); color: var(--gold); }
.status-pill--graduated { background: rgba(80,160,90,0.2); color: #8fd39a; }

.contract-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
}
.contract-box code { color: var(--gold); flex: 1 1 auto; min-width: 0; }
.contract-box--empty { color: var(--text-muted); }
.contract-box--empty p { margin: 0; }

.copy-btn {
  background: var(--gold);
  color: var(--near-black);
  border: none;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  flex-shrink: 0;
}
.copy-btn[data-copied="true"] { background: #8fd39a; }

.tracker-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}
@media (min-width: 640px) {
  .tracker-grid { grid-template-columns: repeat(3, 1fr); }
}
.tracker-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-alt);
  border: 1px solid rgba(185,170,150,0.2);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  text-decoration: none;
  font-size: 0.9rem;
}
.tracker-card__name { font-weight: 600; }
.tracker-card--unavailable { color: var(--text-muted); }
.tracker-card--unavailable .tracker-card__status { font-size: 0.75rem; }
.tracker-card--live { color: var(--cream); border-color: rgba(246,169,26,0.4); }
.tracker-card--live .tracker-card__status { color: var(--gold); }

/* ---------- Steps ---------- */
.steps { list-style: decimal; padding-left: 1.25rem; display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }

/* ---------- Links grid ---------- */
.links-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}
@media (min-width: 640px) {
  .links-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .links-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid rgba(185,170,150,0.15);
  padding: 2.5rem 0;
  background: var(--bg-alt);
}
.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.site-footer p { margin: 0 0 0.3em; }
.site-footer__muted { color: var(--text-muted); font-size: 0.85rem; }

@media (min-width: 640px) {
  .site-footer__inner { flex-direction: row; justify-content: space-between; }
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 90;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  color: var(--near-black);
  border-radius: 999px;
  text-decoration: none;
  font-size: 1.3rem;
  line-height: 1;
  box-shadow: var(--shadow-lift);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.15s ease;
}
.back-to-top:hover { background: var(--cream); }

/* Only hide-until-scrolled once JS confirms it can drive the toggle;
   without JS the button stays visible and still works via the #top anchor. */
.back-to-top.js-enhanced {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}
.back-to-top.js-enhanced.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: none; }
}