/* Phoenix landing — brand tokens mirrored from mobile constants/theme.ts.
   Dark-first: the site renders in dusk regardless of OS theme, matching the app. */

:root {
  --dusk: #241e2e;
  --dusk-raised: #332b40;
  --dusk-deep: #1b1624;
  --dusk-border: #453a55;
  --ember: #f2884b;
  --ember-soft: rgba(242, 136, 75, 0.14);
  --glow: #ffc98a;
  --glow-soft: rgba(255, 201, 138, 0.16);
  --moss: #9db891;
  --moss-soft: rgba(157, 184, 145, 0.16);
  --dawn: #c9a7c7;
  --dawn-soft: rgba(201, 167, 199, 0.16);
  --ash: #8e8797;
  --cream: #f5efe6;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Figtree", -apple-system, "Segoe UI", Roboto, sans-serif;

  --maxw: 1080px;
  --maxw-text: 720px;
}

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

html {
  scroll-behavior: smooth;
}

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

/* Ambient ember glow behind the hero. */
body::before {
  content: "";
  position: fixed;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 700px;
  background: radial-gradient(closest-side, rgba(242, 136, 75, 0.12), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--glow);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ── Header ─────────────────────────────────────────── */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 20px 24px;
  position: relative;
  z-index: 2;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--cream);
}
.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  gap: 22px;
  align-items: center;
  font-size: 15px;
}
.site-nav a {
  color: var(--ash);
}
.site-nav a:hover {
  color: var(--glow);
}
.site-nav .nav-cta {
  padding: 8px 18px;
  border-radius: 10px;
  border: 1px solid var(--dusk-border);
  color: var(--cream);
}
.site-nav .nav-cta:hover {
  border-color: var(--ember);
  text-decoration: none;
}

/* ── Buttons ────────────────────────────────────────── */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 34px;
  border-radius: 14px;
  background: linear-gradient(120deg, var(--ember), var(--glow));
  color: var(--dusk);
  font-weight: 600;
  font-size: 16px;
  box-shadow: 0 8px 28px rgba(242, 136, 75, 0.32);
  border: none;
  cursor: pointer;
}
.cta:hover {
  text-decoration: none;
  filter: brightness(1.05);
  transform: translateY(-1px);
  transition: all 0.15s ease;
}
.cta.ghost {
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--dusk-border);
  box-shadow: none;
}
.cta.ghost:hover {
  border-color: var(--ember);
  filter: none;
}

/* ── Hero ───────────────────────────────────────────── */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 72px 24px 40px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--ember-soft);
  border: 1px solid var(--ember);
  color: var(--glow);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(38px, 6.5vw, 64px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  max-width: 820px;
  margin: 0 auto;
}

.hero p.sub {
  color: var(--ash);
  font-size: clamp(18px, 2.4vw, 21px);
  max-width: 560px;
  margin: 24px auto 0;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
}

.hero .note {
  margin-top: 18px;
  font-size: 14px;
  color: var(--ash);
}

/* Store badges (App Store / Google Play — both coming soon) */
.store-badges {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 11px 20px 11px 18px;
  border-radius: 14px;
  background: var(--dusk-raised);
  border: 1px solid var(--dusk-border);
  color: var(--cream);
  min-width: 190px;
}
.store-badge:hover {
  text-decoration: none;
  border-color: var(--ember);
  transform: translateY(-1px);
  transition: all 0.15s ease;
}
.store-badge svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}
.store-badge span {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: left;
}
.store-badge small {
  font-size: 11px;
  color: var(--ash);
  letter-spacing: 0.02em;
}
.store-badge strong {
  font-size: 18px;
  font-weight: 600;
  font-family: var(--font-display);
}

.hero-phone {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 28px;
  margin: 64px auto 0;
  flex-wrap: wrap;
}
/* Match both hero mockups to one height so they align regardless of content. */
.hero-phone .phone {
  width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}
.hero-phone .phone-screen {
  min-height: 560px;
  flex: 1;
}

/* ── Sections ───────────────────────────────────────── */
section.block {
  padding: 72px 0;
  position: relative;
  z-index: 1;
}

.section-head {
  text-align: center;
  max-width: var(--maxw-text);
  margin: 0 auto 56px;
}
.section-head .kicker {
  color: var(--ember);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  margin-top: 10px;
}
.section-head p {
  color: var(--ash);
  font-size: 18px;
  margin-top: 14px;
}

/* Feature row — text + mockup alternating */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 44px 24px;
}
.feature.reverse .feature-visual {
  order: -1;
}
.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--ember-soft);
  border: 1px solid var(--ember);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.feature h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 3.4vw, 32px);
  line-height: 1.2;
}
.feature p {
  color: var(--ash);
  font-size: 18px;
  margin-top: 14px;
}
.feature ul.ticks {
  margin-top: 20px;
  list-style: none;
}
.feature ul.ticks li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
  color: var(--cream);
  font-size: 16px;
}
.feature ul.ticks svg {
  flex-shrink: 0;
  margin-top: 3px;
}
.feature-visual {
  display: flex;
  justify-content: center;
}

/* ── Phone mockups (CSS reproductions of app screens) ─ */
.phone {
  width: 300px;
  border-radius: 40px;
  background: var(--dusk);
  border: 1px solid var(--dusk-border);
  padding: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}
.phone-screen {
  background: var(--dusk);
  border-radius: 28px;
  padding: 22px 18px;
  min-height: 440px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}
.m-ember {
  width: 108px;
  height: 108px;
  margin: 6px auto 2px;
}
.m-center {
  text-align: center;
}
.m-title {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--cream);
}
.m-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--ember-soft);
  border: 1px solid var(--ember);
  color: var(--glow);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.m-sub {
  color: var(--ash);
  font-size: 13px;
  margin-top: 4px;
}
.m-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--dusk-deep);
  border: 1px solid var(--dusk-border);
  overflow: hidden;
}
.m-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--ember), var(--glow));
}
.m-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.m-tile {
  background: var(--dusk-raised);
  border: 1px solid var(--dusk-border);
  border-radius: 14px;
  padding: 12px 10px;
}
.m-tile .v {
  font-family: var(--font-display);
  font-size: 22px;
}
.m-tile .l {
  color: var(--ash);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 2px;
}
.m-quest {
  display: flex;
  align-items: stretch;
  background: var(--dusk-raised);
  border: 1px solid var(--dusk-border);
  border-radius: 14px;
  overflow: hidden;
}
.m-quest .band {
  width: 4px;
}
.m-quest .body {
  flex: 1;
  padding: 10px 12px;
}
.m-quest .cat {
  color: var(--ash);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.m-quest .qt {
  font-weight: 600;
  font-size: 14px;
  color: var(--cream);
  margin-top: 3px;
}
.m-quest .xp {
  min-width: 52px;
  background: var(--dusk-deep);
  border-left: 1px solid var(--dusk-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.m-quest .xp .n {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--glow);
}
.m-quest .xp .u {
  font-size: 8px;
  color: var(--ash);
  letter-spacing: 0.1em;
}
/* Companion chat header — avatar + title + messages-left pill */
.m-chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--dusk-border);
}
.m-chat-avatar {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}
.m-chat-id {
  flex: 1;
  text-align: left;
  min-width: 0;
}
.m-chat-id .name {
  font-size: 15px;
  font-weight: 600;
  color: var(--cream);
}
.m-chat-id .left {
  color: var(--ash);
  font-size: 11px;
}
.m-chat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--ember);
  background: var(--ember-soft);
  color: var(--glow);
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.m-chat-pill svg {
  width: 13px;
  height: 13px;
}
/* Companion message input */
.m-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px 11px 16px;
  border-radius: 999px;
  border: 1px solid var(--dusk-border);
  background: var(--dusk-raised);
  color: var(--ash);
  font-size: 14px;
}
.m-input span {
  flex: 1;
  text-align: left;
}
.m-input .send {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--dusk-deep);
  border: 1px solid var(--dusk-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.m-bubble {
  max-width: 82%;
  padding: 11px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.45;
}
.m-bubble.them {
  align-self: flex-start;
  background: var(--dusk-raised);
  border: 1px solid var(--dusk-border);
  border-bottom-left-radius: 6px;
}
.m-bubble.you {
  align-self: flex-end;
  background: var(--ember-soft);
  border: 1px solid var(--ember);
  border-bottom-right-radius: 6px;
}
.m-badges {
  display: flex;
  justify-content: space-between;
  background: var(--dusk-raised);
  border: 1px solid var(--dusk-border);
  border-radius: 14px;
  padding: 12px;
}
.m-badge-disc {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 13px;
}
.m-badge-item {
  text-align: center;
}
.m-badge-item .lab {
  color: var(--ash);
  font-size: 9px;
  margin-top: 6px;
}

/* ── Journey / levels ───────────────────────────────── */
.levels {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.level-card {
  background: var(--dusk-raised);
  border: 1px solid var(--dusk-border);
  border-radius: 16px;
  padding: 22px 16px;
  text-align: center;
}
.level-card .dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  margin: 0 auto 12px;
}
.level-card .n {
  color: var(--ash);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.level-card .t {
  font-family: var(--font-display);
  font-size: 18px;
  margin-top: 4px;
}

/* ── Trust strip ────────────────────────────────────── */
.trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.trust-card {
  background: var(--dusk-raised);
  border: 1px solid var(--dusk-border);
  border-radius: 16px;
  padding: 26px 22px;
}
.trust-card .ti {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--moss-soft);
  border: 1px solid var(--moss);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.trust-card h4 {
  font-size: 18px;
  font-weight: 600;
}
.trust-card p {
  color: var(--ash);
  font-size: 15px;
  margin-top: 8px;
}

/* ── Final CTA ──────────────────────────────────────── */
.final {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
  padding: 96px 24px;
}
.final .m-ember {
  width: 90px;
  height: 90px;
}
.final h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.12;
  margin-top: 20px;
}
.final p {
  color: var(--ash);
  font-size: 19px;
  margin-top: 16px;
}

/* ── Legal pages ────────────────────────────────────── */
.legal {
  max-width: var(--maxw-text);
  margin: 0 auto;
  padding: 48px 24px 96px;
  position: relative;
  z-index: 1;
}
.legal h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 36px;
  margin-bottom: 8px;
}
.legal .updated {
  color: var(--ash);
  font-size: 14px;
  margin-bottom: 40px;
}
.legal h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  margin: 40px 0 12px;
}
.legal h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 24px 0 8px;
}
.legal p {
  margin-bottom: 14px;
  color: var(--cream);
}
.legal ul {
  margin: 0 0 14px 22px;
}
.legal li {
  margin-bottom: 8px;
}
.legal .muted {
  color: var(--ash);
}
.callout {
  background: var(--dusk-raised);
  border: 1px solid var(--dusk-border);
  border-left: 3px solid var(--ember);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 20px 0;
}
table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 15px;
}
th,
td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--dusk-border);
  vertical-align: top;
}
th {
  color: var(--ash);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Delete-account form ────────────────────────────── */
.del-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 24px 0 8px;
}
.del-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.del-field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--cream);
}
.del-field .hint {
  font-size: 13px;
  color: var(--ash);
}
.del-field input,
.del-field textarea {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--cream);
  background: var(--dusk-raised);
  border: 1px solid var(--dusk-border);
  border-radius: 10px;
  padding: 12px 14px;
  width: 100%;
  transition: border-color 0.15s ease;
}
.del-field input:focus,
.del-field textarea:focus {
  outline: none;
  border-color: var(--ember);
}
.del-field textarea {
  min-height: 96px;
  resize: vertical;
}
.del-submit {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--dusk-deep);
  background: var(--ember);
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  cursor: pointer;
  align-self: flex-start;
  transition: transform 0.12s ease, opacity 0.15s ease;
}
.del-submit:hover {
  transform: translateY(-1px);
}
.del-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.del-note {
  font-size: 13px;
  color: var(--ash);
  margin-top: 4px;
}

/* ── Footer ─────────────────────────────────────────── */
.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 24px 48px;
  border-top: 1px solid var(--dusk-border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
  color: var(--ash);
  font-size: 14px;
  position: relative;
  z-index: 1;
}
.site-footer a {
  color: var(--ash);
}
.site-footer a:hover {
  color: var(--glow);
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 860px) {
  .feature {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }
  .feature.reverse .feature-visual {
    order: 0;
  }
  .feature-icon {
    margin-left: auto;
    margin-right: auto;
  }
  .feature ul.ticks {
    display: inline-block;
    text-align: left;
  }
  .levels {
    grid-template-columns: repeat(2, 1fr);
  }
  .trust {
    grid-template-columns: 1fr;
  }
}
/* Below the header's comfortable width, drop the in-page anchors and keep
   just the brand + primary CTA so nothing crushes or wraps. */
@media (max-width: 600px) {
  .site-nav {
    gap: 12px;
  }
  .site-nav a:not(.nav-cta) {
    display: none;
  }
}
@media (max-width: 480px) {
  .levels {
    grid-template-columns: 1fr;
  }
  .hero-phone .phone {
    width: 100%;
    max-width: 320px;
  }
}
