/* =========================================================
   D.E.L.E.T.E. Your Phone — Design tokens (True North Brand Kit)
   ========================================================= */
:root {
  --black: #000000;
  --cloud: #efeee8;
  --zion-red: #3f0a26;
  --ember-gold: #f5d62e;
  --cosmic-blue: #43ebd0;
  --ocean-blue: #010951;
  --graphite: #12121a;
  --text-secondary: #c9c7bd;
  --text-muted: #a9a79c;
  --text-fine: #8a887f;
  --hairline: #26262c;

  --font-head: 'Oswald', 'Arial Black', Arial, sans-serif;
  --font-body: 'Cardo', Georgia, serif;

  --radius: 6px;
  --radius-lg: 14px;
  --gutter: 20px;
  --max-w: 640px;

  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--black);
  color: var(--cloud);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.12;
  margin: 0 0 .5em;
  letter-spacing: .01em;
}
h1 { font-size: clamp(2rem, 8vw, 2.9rem); }
h2 { font-size: clamp(1.5rem, 6vw, 2.1rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }
a { color: var(--cosmic-blue); }

.eyebrow {
  font-family: var(--font-head);
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cosmic-blue);
  margin: 0 0 .6em;
  display: block;
}

.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-fine { color: var(--text-fine); font-size: .82rem; }

/* ---------- App shell ---------- */
#app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.progress-rail {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--hairline);
  z-index: 50;
}
.progress-rail__fill {
  height: 100%;
  background: var(--ember-gold);
  width: 0%;
  transition: width .5s var(--ease);
}

.topbar {
  position: fixed;
  top: 3px; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--gutter);
  z-index: 40;
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.topbar__logo { height: 22px; opacity: .9; }
.topbar__map-btn {
  background: rgba(18,18,26,.7);
  border: 1px solid var(--hairline);
  color: var(--cloud);
  font-family: var(--font-head);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 8px 12px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.screen {
  flex: 1;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 74px var(--gutter) 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  animation: screen-in .5s var(--ease);
}
@keyframes screen-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.screen--top {
  justify-content: flex-start;
}

.stack { display: flex; flex-direction: column; gap: 14px; }
.stack--lg { gap: 26px; }

/* ---------- Cards ---------- */
.card {
  background: var(--graphite);
  border-left: 4px solid var(--zion-red);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: 18px 20px;
}
.card + .card { margin-top: 12px; }
.card--tight { padding: 14px 16px; }
.card--flush { border-radius: var(--radius-lg); border-left: 4px solid var(--zion-red); }

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-head);
  font-size: .9rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius);
  padding: 16px 24px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  transition: transform .15s var(--ease), filter .15s var(--ease), opacity .15s var(--ease);
  text-decoration: none;
}
.btn:active { transform: scale(.98); }
.btn-primary {
  background: var(--ember-gold);
  color: #0a0a0a;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary {
  background: var(--zion-red);
  color: var(--ember-gold);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--hairline);
}
.btn-plain {
  background: none;
  color: var(--text-muted);
  text-decoration: underline;
  width: auto;
  padding: 8px 0;
  font-family: var(--font-body);
  text-transform: none;
  letter-spacing: 0;
  font-size: .95rem;
}
.btn[disabled] { opacity: .4; pointer-events: none; }

.btn-row { display: flex; gap: 10px; }
.btn-row .btn { width: auto; flex: 1; }

/* ---------- Inputs ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label {
  font-family: var(--font-head);
  font-size: .74rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
input[type="text"],
input[type="number"],
textarea {
  background: #1b1b24;
  border: 1px solid var(--hairline);
  color: var(--cloud);
  font-family: var(--font-body);
  font-size: 1.05rem;
  padding: 14px 14px;
  border-radius: var(--radius);
  width: 100%;
  outline: none;
}
input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus { border-color: var(--cosmic-blue); }
textarea { resize: vertical; min-height: 88px; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--text-fine); }

/* number stepper */
.stepper {
  display: flex;
  align-items: center;
  gap: 12px;
}
.stepper__btn {
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: #1b1b24;
  color: var(--cloud);
  font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.stepper__btn:active { transform: scale(.94); }
.stepper__value {
  font-family: var(--font-head);
  font-size: 1.3rem;
  min-width: 74px;
  text-align: center;
}

/* ---------- Dragon app grid ---------- */
.app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 6px 0 18px;
}
.app-chip {
  background: #1b1b24;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-align: center;
  transition: border-color .15s, background .15s;
}
.app-chip__glyph {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-size: 1rem;
  color: #0a0a0a;
  flex-shrink: 0;
}
.app-chip__label { font-size: .74rem; color: var(--text-secondary); line-height: 1.2; }
.app-chip.is-selected {
  border-color: var(--ember-gold);
  background: rgba(245,214,46,.08);
}
.app-chip.is-selected .app-chip__label { color: var(--cloud); }

.dragon-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
}
.dragon-row:last-child { border-bottom: none; }
.dragon-row__name { display: flex; align-items: center; gap: 10px; font-size: .95rem; }
.dragon-row__glyph {
  width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-size: .74rem; color: #0a0a0a;
}

/* ---------- Reveal numbers ---------- */
.reveal-number {
  font-family: var(--font-head);
  font-size: clamp(3rem, 18vw, 4.6rem);
  color: var(--ember-gold);
  line-height: 1;
  margin: 4px 0;
}
.reveal-number small {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-family: var(--font-body);
}
.reveal-line { font-size: 1.05rem; color: var(--text-secondary); margin-bottom: 22px; }

/* ---------- Quest map ---------- */
.quest-map {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 10px 0 8px;
}
.quest-node {
  aspect-ratio: 1;
  border-radius: 16px;
  border: 1px solid var(--hairline);
  background: #1b1b24;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  position: relative;
  transition: border-color .2s, background .2s, transform .2s;
}
.quest-node__letter {
  font-family: var(--font-head);
  font-size: 1.8rem;
  color: var(--text-muted);
}
.quest-node__title {
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-fine);
  text-align: center;
  padding: 0 4px;
}
.quest-node.is-done {
  border-color: var(--ember-gold);
  background: rgba(245,214,46,.1);
}
.quest-node.is-done .quest-node__letter,
.quest-node.is-done .quest-node__title { color: var(--ember-gold); }
.quest-node.is-current {
  border-color: var(--cosmic-blue);
  animation: node-pulse 2s ease-in-out infinite;
}
.quest-node.is-locked { opacity: .35; pointer-events: none; }
.quest-node__check {
  position: absolute;
  top: 8px; right: 8px;
  width: 18px; height: 18px;
  border-radius: 999px;
  background: var(--ember-gold);
  display: flex; align-items: center; justify-content: center;
  font-size: .65rem;
  color: #0a0a0a;
  font-weight: bold;
}
@keyframes node-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(67,235,208,.35); }
  50% { box-shadow: 0 0 0 8px rgba(67,235,208,0); }
}

/* ---------- Checklist ---------- */
.checklist { display: flex; flex-direction: column; gap: 10px; }
.check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 4px 0;
}
.check-item__box {
  width: 24px; height: 24px;
  border-radius: 6px;
  border: 1.5px solid var(--text-muted);
  flex-shrink: 0;
  margin-top: 2px;
  display: flex; align-items: center; justify-content: center;
  color: #0a0a0a;
  transition: border-color .15s, background .15s;
}
.check-item__box svg { opacity: 0; transition: opacity .15s; }
.check-item.is-checked .check-item__box {
  background: var(--ember-gold);
  border-color: var(--ember-gold);
}
.check-item.is-checked .check-item__box svg { opacity: 1; }
.check-item.is-checked .check-item__label { color: var(--text-muted); text-decoration: line-through; }
.check-item__label { font-size: .98rem; }

/* ---------- Tool cards ---------- */
.tool-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: #1b1b24;
  border-radius: 10px;
  margin-bottom: 8px;
  text-decoration: none;
  color: var(--cloud);
}
.tool-card__name { font-family: var(--font-head); font-size: .92rem; }
.tool-card__desc { font-size: .8rem; color: var(--text-muted); }
.tool-card__arrow { color: var(--cosmic-blue); flex-shrink: 0; }

/* ---------- Hero imagery ---------- */
.hero-media {
  width: 100%;
  aspect-ratio: 1;
  max-width: 340px;
  margin: 0 auto 18px;
  display: block;
  object-fit: contain;
}
.hero-media--wide { max-width: 420px; }

.machine-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0;
}
.machine-stat {
  background: var(--graphite);
  border-left: 4px solid var(--zion-red);
  border-radius: 0 10px 10px 0;
  padding: 14px;
}
.machine-stat__num {
  font-family: var(--font-head);
  font-size: 1.6rem;
  color: var(--ember-gold);
  line-height: 1;
}
.machine-stat__label { font-size: .76rem; color: var(--text-muted); margin-top: 4px; }

/* framed light card (for the Dragon Apps poster, intentionally light) */
.framed-poster {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 16px 0;
  box-shadow: 0 0 0 1px var(--hairline);
}
.framed-poster img { display: block; width: 100%; }

/* ---------- Badge / seal ---------- */
.badge-seal { width: 130px; height: 130px; margin: 0 auto 10px; display: block; }

/* ---------- Value stack (Seeker breakdown) ---------- */
.value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
}
.value-row:last-child { border-bottom: none; }
.value-row__name { font-family: var(--font-head); font-size: .88rem; }
.value-row__desc { font-size: .8rem; color: var(--text-muted); margin-top: 2px; }
.value-row__price { font-family: var(--font-head); color: var(--cosmic-blue); font-size: .85rem; white-space: nowrap; }

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
}

/* ---------- Modal (Quest Map overlay) ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(3px);
  z-index: 60;
  display: flex;
  align-items: flex-end;
  animation: fade-in .2s var(--ease);
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal-sheet {
  background: var(--black);
  border-top: 1px solid var(--hairline);
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 22px var(--gutter) 30px;
  max-height: 85vh;
  overflow-y: auto;
  animation: sheet-up .28s var(--ease);
}
@keyframes sheet-up { from { transform: translateY(24px); opacity:.5; } to { transform: translateY(0); opacity: 1; } }

footer.app-footer {
  text-align: center;
  padding: 18px var(--gutter) 34px;
  color: var(--text-fine);
  font-size: .78rem;
}

@media (min-width: 560px) {
  .screen { padding-top: 90px; }
}
