:root {
  --rose: #c7243d;
  --rose-dark: #9f1730;
  --rose-soft: #f9e9eb;
  --ink: #24191a;
  --muted: #756467;
  --line: #e8d9d9;
  --paper: #fffdfb;
  --cream: #f8f3ee;
  --surface: #ffffff;
  --header-bg: rgba(255, 253, 251, 0.93);
  --halo-core: #ffffff;
  --halo-ring: #f7dedf;
  --connected-bg: #24191a;
  --success-bg: #edf8f2;
  --success-line: #b9dfca;
  --success-ink: #087b46;
  --roadmap-bg: #24191a;
  --roadmap-surface: #2a1e20;
  --roadmap-line: #4f3e40;
  --roadmap-muted: #c9babb;
  --gold: #d79b43;
  --shadow: 0 24px 70px rgba(93, 42, 48, 0.1);
  font-family: "DM Sans", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

:root[data-theme="dark"] {
  --rose: #ff637b;
  --rose-dark: #df3d58;
  --rose-soft: #351b23;
  --ink: #f8eef0;
  --muted: #bcaeb1;
  --line: #3b3034;
  --paper: #100f13;
  --cream: #17151b;
  --surface: #211d24;
  --header-bg: rgba(16, 15, 19, 0.93);
  --halo-core: #2a2229;
  --halo-ring: #431f29;
  --connected-bg: #363039;
  --success-bg: #102b20;
  --success-line: #295c43;
  --success-ink: #7ee2ad;
  --roadmap-bg: #08070a;
  --roadmap-surface: #171419;
  --roadmap-line: #3b3034;
  --roadmap-muted: #bcaeb1;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); overflow-x: hidden; transition: background 180ms ease, color 180ms ease; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { display: block; max-width: 100%; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  min-height: 72px;
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  align-items: center;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  z-index: 20;
}

.brand {
  font-family: "Gaegu", cursive;
  font-weight: 700;
  font-size: 2rem;
  text-decoration: none;
  color: var(--rose);
  padding: 0 30px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.brand span { font-family: sans-serif; font-size: 1.05rem; }

.topbar nav { display: flex; align-self: stretch; }
.topbar nav a {
  display: flex;
  align-items: center;
  padding: 0 24px;
  border-left: 1px solid var(--line);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.67rem;
}
.topbar nav a:hover { background: var(--cream); color: var(--rose); }

.network-pill {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-right: 18px;
  color: var(--muted);
}
.network-pill span, .status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #27aa68;
  margin-right: 7px;
  box-shadow: 0 0 0 4px rgba(39, 170, 104, 0.12);
}

.wallet-button, .launch-button, .chat-form button, .theme-toggle {
  border: 0;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}
.theme-toggle {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  margin-right: 10px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: var(--surface);
  font-size: 1.1rem;
}
.theme-toggle:hover { border-color: var(--rose); color: var(--rose); transform: rotate(8deg); }
.theme-toggle:focus-visible, .wallet-button:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--rose-soft); outline-offset: 3px; }
.wallet-button {
  min-height: 46px;
  margin-right: 24px;
  padding: 0 20px;
  color: white;
  background: var(--rose);
}
.wallet-button:hover, .launch-button:hover, .chat-form button:hover { transform: translateY(-1px); background: var(--rose-dark); }
.wallet-button.connected { background: var(--connected-bg); }

.hero {
  min-height: 720px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.9fr);
  align-items: center;
  overflow: hidden;
  max-width: 1500px;
  margin: auto;
  padding: 80px clamp(28px, 6vw, 100px);
}

.hero-copy { max-width: 690px; position: relative; z-index: 2; }
.eyebrow {
  color: var(--rose);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  font-weight: 600;
  text-transform: uppercase;
}
h1, h2 {
  font-family: "Gaegu", cursive;
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: -0.03em;
  margin: 20px 0;
}
h1 { font-size: clamp(4.2rem, 7vw, 7.8rem); }
h2 { font-size: clamp(3.3rem, 5.5vw, 6rem); }
h1 em, h2 em { color: var(--rose); font-style: normal; }
.hero-intro { max-width: 620px; color: var(--muted); font-size: 1.08rem; line-height: 1.8; }
.hero-actions { display: flex; gap: 24px; align-items: center; margin: 36px 0; }
.primary-link {
  background: var(--rose);
  color: white;
  text-decoration: none;
  padding: 16px 22px;
  display: inline-flex;
  gap: 28px;
  align-items: center;
}
.text-link { color: var(--rose); text-underline-offset: 5px; }
.trust-row { display: flex; gap: 14px; flex-wrap: wrap; }
.trust-row span { border: 1px solid var(--line); padding: 8px 12px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }

.hero-art { min-height: 600px; min-width: 0; width: 100%; position: relative; display: grid; place-items: center; }
.hero-art::before {
  content: "";
  width: 390px;
  height: 390px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, var(--halo-core) 0 45%, var(--halo-ring) 46% 65%, transparent 66%);
  position: absolute;
}
.hero-art > img {
  width: min(510px, 86%);
  aspect-ratio: 1;
  object-fit: cover;
  position: relative;
  z-index: 2;
  border-radius: 44%;
  border: 1px solid var(--line);
  box-shadow: 0 30px 70px rgba(90, 24, 31, 0.18);
}
.orbit { position: absolute; border: 1px solid #eac3c7; border-radius: 50%; }
.orbit-one { width: 520px; height: 520px; }
.orbit-two { width: 620px; height: 370px; transform: rotate(-18deg); }
.spark-note {
  position: absolute;
  right: 2%;
  bottom: 14%;
  z-index: 3;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 14px 18px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 3px;
}
.spark-note strong { font-family: "Gaegu", cursive; color: var(--rose); font-size: 1.35rem; }
.spark-note span { color: var(--muted); font-size: 0.7rem; }

.create-section, .steps-section, .roadmap-section, .launches-section { padding: 110px clamp(24px, 6vw, 100px); }
.create-section { background: var(--cream); border-block: 1px solid var(--line); }
.section-heading { max-width: 760px; margin-bottom: 52px; }
.section-heading h2 { margin: 15px 0; }
.section-heading > p:last-child { color: var(--muted); line-height: 1.7; max-width: 650px; }
.section-heading.compact h2 { font-size: clamp(3rem, 4vw, 4.5rem); }

.create-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(480px, 1.1fr); max-width: 1380px; margin: auto; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.chat-panel, .launch-panel { min-width: 0; }
.chat-panel { border-right: 1px solid var(--line); display: grid; grid-template-rows: auto minmax(280px, 1fr) auto auto; }
.launch-panel { padding-bottom: 28px; }
.panel-heading { min-height: 62px; display: flex; justify-content: space-between; align-items: center; padding: 0 24px; border-bottom: 1px solid var(--line); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; }
.model-label, .route-label { color: var(--rose); border: 1px solid #edc8cc; padding: 6px 9px; }

.chat-log { max-height: 510px; overflow-y: auto; padding: 28px; display: flex; flex-direction: column; gap: 22px; }
.message { max-width: 85%; }
.message.user { margin-left: auto; }
.message > span { display: block; color: var(--rose); text-transform: uppercase; font-size: 0.64rem; letter-spacing: 0.15em; margin-bottom: 7px; }
.message p { margin: 0; padding: 14px 17px; background: var(--cream); line-height: 1.6; white-space: pre-wrap; }
.message.user p { background: var(--rose); color: white; }
.message.user > span { text-align: right; color: var(--muted); }
.prompt-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 24px 18px; }
.prompt-chips button { border: 1px solid var(--line); background: var(--surface); padding: 8px 11px; cursor: pointer; color: var(--muted); }
.prompt-chips button:hover { border-color: var(--rose); color: var(--rose); }
.chat-form { border-top: 1px solid var(--line); padding: 18px 24px; }
.chat-form textarea { width: 100%; resize: vertical; border: 0; outline: none; min-height: 82px; background: var(--surface); color: var(--ink); }
.chat-form > div { display: flex; justify-content: space-between; align-items: center; }
.chat-form small { color: var(--muted); }
.chat-form button { background: var(--rose); color: white; padding: 11px 16px; }

.launch-panel > label, .field-row, .launch-summary, .consent, .launch-button, .form-status, .launch-result { margin-inline: 28px; }
.launch-panel label { display: grid; gap: 8px; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.launch-panel label > span:not(.ticker-input):not(.sol-input) { color: var(--muted); font-weight: 400; text-transform: none; letter-spacing: 0; }
.launch-panel input, .launch-panel textarea { width: 100%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 12px 13px; outline: none; border-radius: 0; }
.launch-panel input:focus, .launch-panel textarea:focus { border-color: var(--rose); box-shadow: 0 0 0 3px var(--rose-soft); }
.launch-panel textarea { resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; margin-bottom: 22px; }
.ticker-input, .sol-input { position: relative; display: flex; align-items: center; }
.ticker-input b { position: absolute; left: 13px; color: var(--rose); }
.ticker-input input { padding-left: 28px; }
.sol-input b { position: absolute; right: 13px; color: var(--rose); }
.sol-input input { padding-right: 54px; }
.launch-panel label > small { color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 400; line-height: 1.5; }

.art-upload { margin: 28px; display: grid; grid-template-columns: 118px 1fr; grid-template-rows: auto auto auto; gap: 8px 20px; align-items: center; }
.art-upload img { width: 118px; height: 118px; object-fit: cover; border: 1px solid var(--line); grid-row: 1 / 4; background: var(--cream); }
.art-upload label { color: var(--rose); cursor: pointer; font-weight: 600; }
.art-upload input { padding: 0; border: 0; font-size: 0.72rem; }
.art-upload small { color: var(--muted); }

.launch-summary { margin-top: 25px; border-block: 1px solid var(--line); }
.launch-summary > div { display: flex; justify-content: space-between; padding: 13px 0; font-size: 0.78rem; }
.launch-summary > div + div { border-top: 1px solid var(--line); }
.launch-summary span { color: var(--muted); }
.consent { grid-template-columns: auto 1fr !important; align-items: start; margin-top: 22px; text-transform: none !important; letter-spacing: 0 !important; line-height: 1.5; }
.consent input { width: auto; margin-top: 3px; accent-color: var(--rose); }
.launch-button { width: calc(100% - 56px); padding: 16px; margin-top: 20px; background: var(--rose); color: white; }
.launch-button:disabled, .wallet-button:disabled { cursor: wait; opacity: 0.65; }
.form-status { min-height: 22px; color: var(--muted); font-size: 0.78rem; }
.launch-result { padding: 18px; background: var(--success-bg); border: 1px solid var(--success-line); }
.launch-result p { overflow-wrap: anywhere; }
.launch-result div { display: flex; gap: 16px; flex-wrap: wrap; }
.launch-result a { color: var(--success-ink); font-weight: 600; }

.steps-section { max-width: 1500px; margin: auto; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); }
.steps-grid article { padding: 34px; min-height: 260px; }
.steps-grid article + article { border-left: 1px solid var(--line); }
.steps-grid span { color: var(--rose); font-size: 0.7rem; letter-spacing: 0.18em; }
.steps-grid h3, .roadmap-grid h3 { font-family: "Gaegu", cursive; font-size: 2.25rem; margin: 55px 0 10px; }
.steps-grid p, .roadmap-grid p { color: var(--muted); line-height: 1.7; }

.roadmap-section { background: var(--roadmap-bg); color: white; }
.roadmap-section .section-heading > p:last-child { color: var(--roadmap-muted); }
.roadmap-grid { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 1380px; }
.roadmap-grid article { min-height: 300px; padding: 30px; border: 1px solid var(--roadmap-line); background: var(--roadmap-surface); }
.roadmap-grid article + article { border-left: 0; }
.roadmap-grid article.available { background: var(--rose); border-color: var(--rose); }
.roadmap-grid article > span { font-size: 0.65rem; letter-spacing: 0.16em; }
.roadmap-grid h3 { margin-top: 65px; }
.roadmap-grid p { color: var(--roadmap-muted); }
.roadmap-grid .available p { color: #fde8ea; }
.roadmap-grid strong { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; }

.launches-section { max-width: 1500px; margin: auto; }
.launch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.launch-card { display: grid; grid-template-columns: 110px 1fr; border: 1px solid var(--line); background: var(--surface); text-decoration: none; min-height: 130px; transition: transform 160ms ease, box-shadow 160ms ease; }
.launch-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.launch-card img { width: 110px; height: 100%; object-fit: cover; }
.launch-card div { padding: 16px; display: grid; align-content: center; gap: 4px; }
.launch-card span { font-size: 0.6rem; color: var(--rose); letter-spacing: 0.12em; }
.launch-card h3 { margin: 3px 0; font-family: "Gaegu", cursive; font-size: 1.7rem; }
.launch-card small { color: var(--muted); margin-top: 5px; }
.empty-state { color: var(--muted); border: 1px dashed var(--line); padding: 28px; grid-column: 1 / -1; }

footer { min-height: 150px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-right: 32px; }
footer p { color: var(--muted); }
footer > div { display: flex; gap: 10px; }
footer > div span { border: 1px solid var(--line); padding: 7px 9px; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; }

@media (max-width: 1000px) {
  .topbar { grid-template-columns: auto 1fr auto auto; }
  .topbar nav { display: none; }
  .network-pill { justify-self: end; }
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 65px; }
  .hero-art { min-height: 520px; }
  .create-grid { grid-template-columns: 1fr; }
  .chat-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .steps-grid, .roadmap-grid { grid-template-columns: 1fr; }
  .steps-grid article + article { border-left: 0; border-top: 1px solid var(--line); }
  .roadmap-grid article + article { border-left: 1px solid var(--roadmap-line); border-top: 0; }
  .launch-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .topbar { min-height: 64px; grid-template-columns: 1fr auto auto; }
  .brand { padding: 0 18px; }
  .network-pill { display: none; }
  .wallet-button { margin-right: 12px; padding-inline: 14px; }
  .theme-toggle { margin-right: 8px; }
  .hero { min-height: auto; padding: 60px 22px; }
  .hero-copy { min-width: 0; width: 100%; }
  h1 { font-size: 4rem; }
  .hero-actions { align-items: flex-start; flex-direction: column; }
  .hero-art { min-height: 440px; }
  .hero-art > img { width: min(420px, 100%); }
  .orbit-one { width: 380px; height: 380px; }
  .orbit-two { width: 420px; height: 280px; }
  .spark-note { right: 0; }
  .create-section, .steps-section, .roadmap-section, .launches-section { padding: 75px 18px; }
  .field-row { grid-template-columns: 1fr; }
  .art-upload { grid-template-columns: 92px 1fr; margin: 20px; }
  .art-upload img { width: 92px; height: 92px; }
  .launch-panel > label, .field-row, .launch-summary, .consent, .launch-button, .form-status, .launch-result { margin-inline: 20px; }
  .launch-button { width: calc(100% - 40px); }
  .launch-grid { grid-template-columns: 1fr; }
  footer { flex-direction: column; padding: 35px 20px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
