/* Learn MetaMask — educational single page
   Palette: warm charcoal + MetaMask orange. Tokens below. */

:root {
  --ink: #14100d;
  --ink-soft: #3b322b;
  --paper: #fbf7f2;
  --paper-alt: #f2ece4;
  --card: #ffffff;
  --line: #e2d8cb;
  --accent: #e2761b;
  --accent-deep: #b2540c;
  --accent-soft: #fdeadd;
  --danger: #b3261e;
  --danger-soft: #fbe6e3;
  --ok: #1c6b4b;
  --ok-soft: #e2f1e9;
  --shadow: 0 1px 2px rgba(20, 16, 13, 0.06), 0 12px 30px -18px rgba(20, 16, 13, 0.35);
  --radius: 14px;
  --display: "Space Grotesk", "Trebuchet MS", sans-serif;
  --body: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
.brand-text {
  font-family: var(--display);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

.mono {
  font-family: var(--mono);
  font-size: 0.95em;
}

.wrap {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 0;
  z-index: 20;
}

.skip:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* ---------- header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff8f2;
}

.nav {
  display: flex;
  gap: 1.35rem;
  font-size: 0.92rem;
  font-weight: 500;
}

.nav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.nav a:hover {
  color: var(--ink);
}

.nav a.is-current {
  color: var(--accent-deep);
  border-bottom-color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 42px;
  height: 38px;
  cursor: pointer;
  place-items: center;
}

.bars,
.bars::before,
.bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  content: "";
}

.bars::before {
  transform: translateY(-6px);
}

.bars::after {
  transform: translateY(4px);
}

/* ---------- hero ---------- */

.hero {
  padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3rem, 6vw, 5rem);
  border-bottom: 1px solid var(--line);
  background: radial-gradient(
      900px 420px at 88% -10%,
      var(--accent-soft),
      transparent 70%
    ),
    var(--paper);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-deep);
}

.hero h1 {
  font-size: clamp(2.4rem, 5.4vw, 3.9rem);
  margin-top: 1rem;
  font-weight: 700;
}

.accent {
  color: var(--accent);
}

.lede {
  margin-top: 1.25rem;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 46ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.9rem;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2.2rem;
  margin: 2.6rem 0 0;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}

.stats dt {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
}

.stats dd {
  margin: 0.2rem 0 0;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
}

.hero-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}

.flow {
  list-style: none;
  margin: 0;
  padding: 0;
}

.flow li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 0.8rem;
  padding: 0.85rem 0;
}

.flow li + li {
  border-top: 1px dashed var(--line);
}

.flow p {
  font-size: 0.93rem;
  color: var(--ink-soft);
}

.flow-num {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-family: var(--display);
  font-size: 0.85rem;
  font-weight: 700;
}

/* ---------- bands ---------- */

.band {
  padding: clamp(3.2rem, 7vw, 5.5rem) 0;
  border-bottom: 1px solid var(--line);
}

.band-alt {
  background: var(--paper-alt);
}

.band-head {
  max-width: 62ch;
  margin-bottom: 2.4rem;
}

.kicker {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.band-head h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.6rem);
  font-weight: 600;
  margin-top: 0.6rem;
}

.band-sub {
  margin-top: 0.9rem;
  color: var(--ink-soft);
}

/* ---------- what it is ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

.prose p + p {
  margin-top: 1.05rem;
}

.prose .note {
  margin-top: 1.4rem;
  padding: 0.9rem 1.1rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  font-size: 0.95rem;
}

.spec {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.spec li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.2rem 1rem;
  padding: 1.05rem 1.25rem;
}

.spec li + li {
  border-top: 1px solid var(--line);
}

.spec-k {
  font-weight: 600;
}

.spec-v {
  color: var(--accent-deep);
  justify-self: end;
}

.spec-d {
  grid-column: 1 / -1;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

/* ---------- concept cards ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.1rem;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
}

.card h3 {
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--accent-deep);
}

.card p {
  margin-top: 0.55rem;
  font-size: 0.93rem;
  color: var(--ink-soft);
}

/* ---------- setup steps ---------- */

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.15rem;
}

.step {
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 1.2rem;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
}

.step-num {
  font-family: var(--display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.step h3 {
  font-size: 1.12rem;
  font-weight: 600;
}

.step p {
  margin-top: 0.4rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ---------- fee demo ---------- */

.demo {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.4rem;
  align-items: stretch;
}

.demo-controls {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: grid;
  gap: 1.05rem;
}

.demo-controls label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.86rem;
  font-weight: 500;
}

.demo-controls input {
  font-family: var(--mono);
  font-size: 1rem;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  color: var(--ink);
}

.demo-controls input:focus {
  border-color: var(--accent);
}

.demo-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  font: inherit;
  font-size: 0.84rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-soft);
  cursor: pointer;
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
}

.demo-readout {
  display: grid;
  align-content: center;
  gap: 0.35rem;
  padding: 1.8rem;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
}

.readout-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--paper) 60%, transparent);
}

.readout-usd {
  font-family: var(--display);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1.05;
}

.readout-eth {
  font-family: var(--mono);
  font-size: 0.95rem;
  color: color-mix(in srgb, var(--paper) 78%, transparent);
}

.readout-foot {
  margin-top: 0.9rem;
  font-size: 0.82rem;
  color: color-mix(in srgb, var(--paper) 62%, transparent);
}

/* ---------- phishing quiz ---------- */

.quiz {
  display: grid;
  gap: 1rem;
  max-width: 720px;
}

.quiz-stage {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem;
  box-shadow: var(--shadow);
}

.quiz-count {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.quiz-url {
  margin-top: 0.8rem;
  font-size: clamp(1.15rem, 3vw, 1.6rem);
  word-break: break-all;
  background: var(--paper-alt);
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 0.9rem 1rem;
}

.quiz-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.quiz-feedback {
  margin-top: 1.1rem;
  font-size: 0.95rem;
  min-height: 1.5em;
}

.quiz-feedback.ok {
  color: var(--ok);
}

.quiz-feedback.bad {
  color: var(--danger);
}

.quiz-score {
  font-family: var(--mono);
  font-size: 0.86rem;
  color: var(--ink-soft);
}

/* ---------- safety ---------- */

.band-safety {
  background: var(--ink);
  color: var(--paper);
  border-bottom: none;
}

.band-safety .kicker {
  color: var(--accent);
}

.band-safety .band-sub {
  color: color-mix(in srgb, var(--paper) 70%, transparent);
}

.rules {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.1rem;
}

.rules li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 0.9rem;
  align-items: start;
  padding: 1.25rem;
  border: 1px solid color-mix(in srgb, var(--paper) 18%, transparent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--paper) 5%, transparent);
}

.rules p {
  font-size: 0.95rem;
  color: color-mix(in srgb, var(--paper) 85%, transparent);
}

.rule-num {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #21150b;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.9rem;
}

/* ---------- faq ---------- */

.faq {
  display: grid;
  gap: 0.7rem;
  max-width: 820px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  overflow: hidden;
}

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font: inherit;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.02rem;
  text-align: left;
  padding: 1.05rem 1.2rem;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--ink);
}

.faq-q:hover {
  color: var(--accent-deep);
}

.chev {
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex: none;
}

.faq-q[aria-expanded="true"] .chev {
  transform: rotate(-135deg);
}

.faq-a {
  padding: 0 1.2rem 1.15rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ---------- footer ---------- */

.site-foot {
  background: var(--paper-alt);
  border-top: 1px solid var(--line);
  padding: 2.2rem 0;
}

.foot-inner {
  display: grid;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.foot-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
}

.foot-top {
  justify-self: start;
  margin-top: 0.6rem;
  text-decoration: none;
  color: var(--accent-deep);
  font-weight: 500;
}

.foot-top:hover {
  text-decoration: underline;
}

/* ---------- reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.hidden {
  display: none;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.94rem;
  padding: 0.72rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, background 0.15s ease, color 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: #fffaf5;
}

.btn-primary:hover {
  background: var(--accent-deep);
}

.btn-ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
}

.btn-danger {
  background: var(--danger);
  color: #fff8f7;
}

.btn-danger:hover {
  background: #8c1c16;
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero-grid,
  .split,
  .demo {
    grid-template-columns: 1fr;
  }

  .nav {
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 0.4rem 1.25rem 1rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    display: none;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-toggle {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
