/* ============================================================
   Bitcoin is Vegan: Digital Emblem landing page
   Self-contained, vanilla CSS. No build step, no external fonts,
   no trackers. Mobile-first; min-width media queries scale up.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --bg:        #121212;   /* deep charcoal */
  --bg-raised: #1a1a1a;   /* cards / panels */
  --bg-sunken: #0e0e0e;   /* wells */
  --ink:       #f5f5f0;   /* crisp off-white */
  --ink-dim:   #b8b8b0;   /* muted off-white */
  --ink-faint: #909089;   /* labels, captions (WCAG AA: >=4.5:1 on every bg used) */
  --orange:    #ff9900;   /* Bitcoin accent */
  --green:     #2ecc71;   /* organic accent */
  --line:      rgba(245, 245, 240, 0.10);
  --line-bold: rgba(245, 245, 240, 0.18);

  --maxw: 1120px;
  --radius: 14px;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

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

body {
  margin: 0;
  background-color: var(--bg);
  /* subtle depth, pure CSS so the page stays self-contained */
  background-image:
    radial-gradient(1200px 600px at 50% -10%, rgba(255, 153, 0, 0.10), transparent 60%),
    radial-gradient(900px 500px at 100% 110%, rgba(46, 204, 113, 0.08), transparent 60%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { line-height: 1.1; margin: 0; }

a { color: inherit; }

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

/* ---------- Shared layout ---------- */
.section__head {
  max-width: 720px;
  margin: 0 auto 2.5rem;
  text-align: center;
}
.section__title {
  font-size: clamp(1.6rem, 5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.section__lede {
  margin: 1rem auto 0;
  color: var(--ink-dim);
  font-size: 1.05rem;
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: var(--line-bold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  min-height: 48px;            /* comfortable tap target */
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1.5px solid var(--btn-bd);
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease,
              background-color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  --btn-bg: var(--orange);
  --btn-fg: #121212;
  --btn-bd: var(--orange);
  box-shadow: 0 8px 24px rgba(255, 153, 0, 0.22);
}
.btn--primary:hover { box-shadow: 0 12px 32px rgba(255, 153, 0, 0.32); }

.btn--green {
  --btn-bg: var(--green);
  --btn-fg: #0c1a10;
  --btn-bd: var(--green);
  box-shadow: 0 8px 24px rgba(46, 204, 113, 0.20);
}
.btn--green:hover { box-shadow: 0 12px 32px rgba(46, 204, 113, 0.30); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: var(--line-bold);
}
.btn--ghost:hover { --btn-bd: var(--orange); --btn-fg: var(--orange); }

/* Placeholder CTAs (backend not wired yet): truly inert, not just announced so. */
.btn[aria-disabled="true"] { pointer-events: none; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero {
  padding: clamp(2.5rem, 8vw, 5rem) 1.25rem clamp(2rem, 6vw, 3.5rem);
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.hero__inner { max-width: 760px; margin: 0 auto; }

.hero__emblem {
  width: clamp(150px, 42vw, 240px);
  height: auto;
  margin: 0 auto 1.75rem;
  border-radius: 24px;
  filter: drop-shadow(0 14px 40px rgba(0, 0, 0, 0.55));
}

.hero__title {
  font-size: clamp(2.2rem, 9vw, 4.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  background: linear-gradient(180deg, var(--ink) 60%, #c9c9c2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__subtitle {
  margin: 1rem auto 0;
  max-width: 34ch;
  color: var(--orange);
  font-size: clamp(1rem, 3.4vw, 1.25rem);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
  margin-top: 2.25rem;
}

/* ---------- Section frame ---------- */
.essays, .claim {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3rem, 9vw, 5.5rem) 1.25rem;
}

/* ---------- Essay series (shown once a second chapter is live) ---------- */
.series__head { margin: 0 0 1.25rem; }
.card-grid + .series__head { margin-top: 3rem; }
.series__title {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--orange);
}
.series__lede { margin: 0.4rem 0 0; color: var(--ink-dim); font-size: 0.98rem; }

/* ---------- Essay cards ---------- */
.card-grid {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: 1.1rem;
  grid-template-columns: 1fr;
}
.card {
  position: relative;
  padding: 1.6rem 1.5rem 1.5rem;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(var(--orange), var(--green));
  opacity: 0.7;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--line-bold);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.card__img {
  display: block;
  width: calc(100% + 3rem);
  max-width: none;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin: -1.6rem -1.5rem 1.25rem;
  border-bottom: 1px solid var(--line);
}
.card__num {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--orange);
  letter-spacing: 0.08em;
}
.card__title {
  margin: 0.6rem 0 0.6rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.card__desc {
  margin: 0;
  color: var(--ink-dim);
  font-size: 0.98rem;
}

/* ---------- Claim: two modes ---------- */
.modes {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: stretch;
}
.mode {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.75rem 1.6rem;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.mode--easy     { border-top: 3px solid var(--green); }
.mode--sovereign{ border-top: 3px solid var(--orange); }

.mode__head { margin-bottom: 0.9rem; }
.mode__tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--line-bold);
  color: var(--ink-faint);
}
.mode--easy .mode__tag      { color: var(--green);  border-color: rgba(46, 204, 113, 0.4); }
.mode--sovereign .mode__tag { color: var(--orange); border-color: rgba(255, 153, 0, 0.4); }

.mode__title {
  margin-top: 0.7rem;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.mode__copy { color: var(--ink-dim); font-size: 0.98rem; }
.mode__rail {
  margin-top: auto;
  padding-top: 1rem;
  color: var(--ink-faint);
  font-size: 0.85rem;
}
.mode__rail strong { color: var(--ink-dim); font-weight: 600; }

/* Easy-mode form */
.claim-form { display: flex; flex-direction: column; gap: 0.7rem; margin: 0.4rem 0 0.2rem; }
.claim-form__input {
  width: 100%;
  padding: 0.8rem 1rem;
  min-height: 48px;
  font: inherit;
  color: var(--ink);
  background: var(--bg-sunken);
  border: 1.5px solid var(--line-bold);
  border-radius: 10px;
}
.claim-form__input::placeholder { color: var(--ink-faint); }
.claim-form__input:focus-visible { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.45); }
.claim-form__btn { width: 100%; }

/* Sovereign-mode QR placeholder */
.qr {
  position: relative;
  width: 168px;
  max-width: 100%;
  margin: 0.2rem auto 1.1rem;
  padding: 12px;
  background: #f5f5f0;
  border-radius: 12px;
}
.qr__svg { display: block; width: 100%; height: auto; border-radius: 4px; }
.qr__badge {
  position: absolute;
  bottom: -10px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.2rem 0.55rem;
  color: #121212;
  background: var(--orange);
  border-radius: 999px;
  white-space: nowrap;
}
.mode__btn { width: 100%; margin-top: 0.4rem; }

/* Bridge connector (custodial -> self-custody) */
.bridge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.25rem 0.5rem;
  color: var(--ink-faint);
}
.bridge__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--green), var(--orange));
  opacity: 0.6;
}
.bridge__label {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

/* ---------- Provenance footer ---------- */
.provenance {
  border-top: 1px solid var(--line);
  background: var(--bg-sunken);
  padding: clamp(2.75rem, 8vw, 4.5rem) 1.25rem;
}
.provenance__inner { max-width: 760px; margin: 0 auto; text-align: center; }
.provenance__title {
  font-size: clamp(1.3rem, 4.5vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.provenance__body {
  margin: 1rem auto 1.75rem;
  color: var(--ink-dim);
  font-size: 1rem;
}
.provenance__ledger {
  margin: 0 auto;
  display: grid;
  gap: 0.5rem;
  text-align: left;
  max-width: 520px;
}
.provenance__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.provenance__row dt {
  margin: 0;
  color: var(--ink-faint);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}
.provenance__row dd { margin: 0; }
.provenance__row code {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--orange);
  word-break: break-all;
}
.provenance__row a { text-decoration: none; }
.provenance__row a:hover code { text-decoration: underline; text-underline-offset: 3px; }
.provenance__body a { color: var(--orange); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.provenance__body a:hover { color: var(--ink); }

.chain { margin: 1.75rem auto 0; max-width: 560px; }
.chain__svg { display: block; width: 100%; height: auto; }

.provenance__cta {
  margin: 1.5rem 0 0.9rem;
  color: var(--ink);
  font-weight: 700;
}
.provenance__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2.25rem;
}
.provenance__links .btn { padding: 0.6rem 1.25rem; min-height: 42px; font-size: 0.95rem; }


.provenance__foot {
  margin: 2rem 0 0;
  color: var(--ink-faint);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

/* Whole card is the click target for its essay. */
.card__link { text-decoration: none; }
.card__link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card:hover .card__title { color: var(--orange); }
.card:focus-within { border-color: var(--orange); }
.card__link:focus-visible { outline: none; }

.provenance__foot a { color: var(--ink-dim); text-decoration: none; }
.provenance__foot a:hover { color: var(--orange); }

/* ---------- Essay pages ---------- */
.topbar {
  max-width: 720px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 0;
}
.topbar__home {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.topbar__home img { width: 36px; height: 36px; border-radius: 50%; }
.topbar__home:hover { color: var(--orange); }

.essay {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(2rem, 7vw, 4rem) 1.25rem clamp(3rem, 8vw, 5rem);
}
.essay__head { margin-bottom: 2.5rem; }
.essay__title {
  margin-top: 0.75rem;
  font-size: clamp(2rem, 7vw, 3.25rem);
  font-weight: 900;
  letter-spacing: -0.025em;
}
.essay__dek { margin: 1rem 0 0; color: var(--orange); font-size: 1.15rem; font-weight: 600; }
.essay__byline { margin: 1rem 0 0; color: var(--ink-faint); font-size: 0.9rem; }

.essay__body {
  font-family: ui-serif, Charter, "Iowan Old Style", Georgia, serif;
  font-size: clamp(1.08rem, 2.6vw, 1.2rem);
  line-height: 1.75;
  color: #e8e8e1;
}
.essay__body p { margin: 0 0 1.4em; }
.essay__quote {
  margin: 2em 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 3px solid var(--orange);
  font-size: 1.15em;
  font-style: italic;
  color: var(--ink);
}
.essay__quote p { margin: 0; }
.essay__fig { margin: 2.25em auto; max-width: 520px; }
.essay__fig--wide { max-width: none; }
.essay__cover { margin: 0 0 2rem; }
.essay__cover img { display: block; width: 100%; height: auto; border-radius: var(--radius); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45); }
.essay__fig img { width: 100%; height: auto; border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45); }

.essay__more {
  margin: 3rem 0 0;
  padding: 1.75rem 1.6rem;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-top: 3px solid var(--orange);
  border-radius: var(--radius);
  color: var(--ink-dim);
}
.essay__more p { margin: 0 0 1.1rem; }
.essay__more-title { color: var(--ink); font-weight: 800; font-size: 1.2rem; }

.essay__nav {
  display: grid;
  gap: 0.9rem;
  margin-top: 2.5rem;
}
.essay__navlink {
  display: block;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
}
.essay__navlink:hover { border-color: var(--orange); }
.essay__navlink--next { text-align: right; }
.essay__navlabel {
  display: block;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.essay__navtitle { display: block; margin-top: 0.3rem; font-weight: 700; }

/* ============================================================
   Responsive scale-up
   ============================================================ */
@media (min-width: 600px) {
  .card-grid { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
  .essay__nav { grid-template-columns: 1fr 1fr; }
  .essay__navlink--next:only-child { grid-column: 2; }
}

@media (min-width: 860px) {
  .modes { flex-direction: row; align-items: stretch; }
  .bridge {
    flex-direction: column;
    padding: 0 0.25rem;
    align-self: stretch;
  }
  .bridge__line {
    width: 1px; height: auto; flex: 1;
    background: linear-gradient(180deg, var(--green), var(--orange));
  }
  .bridge__label { writing-mode: vertical-rl; text-orientation: mixed; }
}

/* ============================================================
   Motion & contrast preferences
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .btn:hover, .card:hover { transform: none; }
}

@media (prefers-contrast: more) {
  :root { --ink-dim: #e6e6df; --ink-faint: #cfcfc7; --line: rgba(245,245,240,0.25); }
}
