/* ==========================================================================
   MagicBox landing page.
   No external fonts, no CDNs, no trackers: everything here is self hosted, so
   the page loads on one connection and leaks nothing about the visitor.
   ========================================================================== */

:root {
  --ink:        #05060d;
  --ink-2:      #0a0c18;
  --panel:      #10131f;
  --panel-2:    #161a2b;
  --line:       #242a41;
  --line-soft:  #1b2033;
  --text:       #e8eaf6;
  --text-dim:   #9aa0c7;
  --text-faint: #6b7194;
  --brand:      #818cf8;
  --brand-2:    #a78bfa;
  --accent:     #22d3ee;
  --good:       #34d399;
  --warn:       #fbbf24;
  --radius:     14px;
  --shell:      1180px;
  --sans: "Segoe UI", Inter, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Code", "JetBrains Mono", Consolas, "SF Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-2); }

.shell { width: min(var(--shell), calc(100% - 48px)); margin-inline: auto; }

/* ---- shared bits --------------------------------------------------------- */

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 12px/1 var(--mono); letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--brand); padding: 7px 13px; border-radius: 100px;
  border: 1px solid rgba(129, 140, 248, .28);
  background: rgba(129, 140, 248, .09);
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--good); box-shadow: 0 0 0 3px rgba(52, 211, 153, .18);
}

h1, h2, h3 { line-height: 1.12; letter-spacing: -.022em; margin: 0; font-weight: 700; }
h1 { font-size: clamp(38px, 5.6vw, 66px); }
h2 { font-size: clamp(28px, 3.6vw, 42px); }
h3 { font-size: 19px; letter-spacing: -.01em; }

.lede { font-size: clamp(17px, 1.7vw, 20px); color: var(--text-dim); }

.gradient-text {
  background: linear-gradient(100deg, #fff 8%, var(--brand) 48%, var(--accent) 96%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font: 600 15px/1 var(--sans); padding: 14px 24px; border-radius: 11px;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #0b0d18; box-shadow: 0 8px 26px rgba(129, 140, 248, .3);
}
.button-primary:hover { color: #0b0d18; box-shadow: 0 12px 34px rgba(129, 140, 248, .42); }
.button-ghost {
  background: rgba(255, 255, 255, .04); color: var(--text);
  border-color: var(--line);
}
.button-ghost:hover { background: rgba(255, 255, 255, .08); border-color: #38405e; color: var(--text); }
.button-small { padding: 9px 15px; font-size: 13.5px; border-radius: 9px; }

section { padding: clamp(64px, 8vw, 112px) 0; }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head h2 { margin: 16px 0 14px; }

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

.site-header {
  position: sticky; top: 0; z-index: 90;
  background: rgba(5, 6, 13, .78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .shell { display: flex; align-items: center; gap: 28px; height: 66px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; letter-spacing: -.02em;
         font-size: 17px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px; flex: none;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: grid; place-items: center;
}
.brand-mark span {
  width: 13px; height: 9px; border: 2px solid #0b0d18; border-radius: 2px;
}
.site-nav { display: flex; gap: 26px; margin-left: auto; }
.site-nav a { color: var(--text-dim); font-size: 14.5px; font-weight: 500; }
.site-nav a:hover { color: var(--text); }

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

.hero { position: relative; padding: clamp(56px, 7vw, 96px) 0 clamp(48px, 6vw, 80px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -320px 0 auto 0; height: 760px; z-index: -1;
  background:
    radial-gradient(680px 420px at 22% 42%, rgba(129, 140, 248, .20), transparent 68%),
    radial-gradient(560px 380px at 82% 22%, rgba(34, 211, 238, .13), transparent 68%);
}
.hero-copy { max-width: 780px; }
.hero h1 { margin: 22px 0 20px; }
.hero .lede { max-width: 660px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 32px; align-items: center; }
.hero-note { font-size: 13.5px; color: var(--text-faint); margin-top: 16px; }
.hero-note code { color: var(--text-dim); }

/* ---- the demo rig (hero + playground share this) ------------------------- */

.rig {
  margin-top: 52px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, var(--panel) 0%, var(--ink-2) 100%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
  overflow: hidden;
}
.rig-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 16px; border-bottom: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, .015);
}
.rig-label {
  font: 600 11px/1 var(--mono); letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--text-faint);
}
.size-presets { display: flex; gap: 7px; flex-wrap: wrap; }
.size-preset {
  font: 600 12.5px/1 var(--sans); padding: 7px 12px; border-radius: 8px; cursor: pointer;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
  color: var(--text-dim); transition: all .15s ease;
}
.size-preset:hover { color: var(--text); border-color: #3a4263; background: rgba(255, 255, 255, .08); }
.size-preset[aria-pressed="true"] {
  background: rgba(129, 140, 248, .16); border-color: rgba(129, 140, 248, .55); color: #cdd2ff;
}
.rig-readout {
  margin-left: auto; font: 500 12.5px/1 var(--mono); color: var(--text-faint);
  white-space: nowrap;
}
.rig-readout b { color: var(--brand); font-weight: 700; }

.rig-stage {
  position: relative;
  min-height: 300px;
  padding: 26px;
  display: grid; place-items: center;
  background:
    linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px) 0 0 / 100% 26px,
    linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px) 0 0 / 26px 100%;
}
.rig-stage magic-box {
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
  background: #0e1220;
  transition: none;
}
.rig-hint {
  display: flex; align-items: center; gap: 8px; justify-content: center;
  padding: 0 16px 16px; font-size: 13px; color: var(--text-faint);
}
.rig-hint svg { flex: none; }

/* ---- the demo app that lives INSIDE a magic-box -------------------------- */
/* Designed once at 1280x800. Every size below is a fixed pixel value on
   purpose: there is not one media query in this file, and there never will be.
   That is the entire point of the product.                                    */

.app { width: 1280px; height: 800px; display: flex; flex-direction: column;
       background: #0e1220; color: #e8eaf6; font-family: var(--sans); overflow: hidden; }
.app-top {
  height: 58px; flex: none; display: flex; align-items: center; gap: 18px;
  padding: 0 20px; border-bottom: 1px solid #1e2438; background: #121729;
}
.app-logo { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; }
.app-logo i {
  width: 24px; height: 24px; border-radius: 7px; display: block;
  background: linear-gradient(135deg, var(--brand), var(--accent));
}
.app-search {
  width: 300px; height: 32px; border-radius: 8px; background: #0c101c;
  border: 1px solid #232a42; display: flex; align-items: center; padding: 0 11px;
  gap: 8px; color: #6b7194; font-size: 13px;
}
.app-top-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.app-chip {
  font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 100px;
  background: rgba(52, 211, 153, .14); color: var(--good); border: 1px solid rgba(52, 211, 153, .3);
}
.app-bell { position: relative; width: 20px; height: 20px; }
.app-bell b {
  position: absolute; top: -4px; right: -5px; width: 15px; height: 15px; border-radius: 50%;
  background: #f43f5e; color: #fff; font-size: 9px; font-weight: 700;
  display: grid; place-items: center;
}
.app-avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, #f472b6, #a78bfa); color: #0b0d18;
  font-size: 12px; font-weight: 700;
}
.app-body { flex: 1; display: flex; min-height: 0; }
.app-side {
  width: 208px; flex: none; border-right: 1px solid #1e2438; background: #101527;
  padding: 16px 12px; display: flex; flex-direction: column; gap: 3px;
}
.app-side .group {
  font-size: 10.5px; letter-spacing: 1.3px; text-transform: uppercase; color: #565c7e;
  padding: 14px 10px 7px; font-weight: 700;
}
.app-nav {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 8px;
  font-size: 13.5px; color: #9aa0c7; font-weight: 500;
}
.app-nav i { width: 15px; height: 15px; border-radius: 4px; background: #2b3350; flex: none; }
.app-nav.on { background: rgba(129, 140, 248, .14); color: #cdd2ff; }
.app-nav.on i { background: linear-gradient(135deg, var(--brand), var(--accent)); }
.app-upsell {
  margin-top: auto; border-radius: 10px; padding: 13px;
  background: linear-gradient(135deg, rgba(129, 140, 248, .18), rgba(34, 211, 238, .1));
  border: 1px solid rgba(129, 140, 248, .28);
}
.app-upsell b { display: block; font-size: 13px; margin-bottom: 4px; }
.app-upsell span { font-size: 11.5px; color: #9aa0c7; line-height: 1.45; display: block; }

.app-main { flex: 1; padding: 22px 24px; overflow: hidden; }
.app-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; }
.app-head h4 { margin: 0 0 5px; font-size: 22px; letter-spacing: -.02em; }
.app-head p { margin: 0; font-size: 13px; color: #6b7194; }
.app-head-actions { margin-left: auto; display: flex; gap: 9px; }
.app-btn {
  font-size: 12.5px; font-weight: 600; padding: 8px 14px; border-radius: 8px;
  border: 1px solid #2a3150; color: #9aa0c7; background: #141a2e;
}
.app-btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #0b0d18; border-color: transparent;
}

.app-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { background: #131829; border: 1px solid #1e2438; border-radius: 11px; padding: 14px 15px; }
.kpi .label { font-size: 11.5px; color: #6b7194; text-transform: uppercase; letter-spacing: .9px; font-weight: 600; }
.kpi .value { font-size: 26px; font-weight: 700; letter-spacing: -.03em; margin: 7px 0 5px; }
.kpi .delta { font-size: 11.5px; font-weight: 600; }
.kpi .delta.up { color: var(--good); }
.kpi .delta.down { color: #fb7185; }
.kpi svg { display: block; margin-top: 9px; }

.app-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14px; }
.card { background: #131829; border: 1px solid #1e2438; border-radius: 11px; padding: 15px 16px; }
.card h5 {
  margin: 0 0 12px; font-size: 13.5px; font-weight: 700; display: flex; align-items: center; gap: 8px;
}
.card h5 span { margin-left: auto; font-size: 11px; color: #565c7e; font-weight: 500; }

.app-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.app-table th {
  text-align: left; font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase;
  color: #565c7e; padding: 0 0 9px; font-weight: 700; border-bottom: 1px solid #1e2438;
}
.app-table td { padding: 9px 0; border-bottom: 1px solid #191f33; color: #9aa0c7; }
.app-table td:first-child { color: #e8eaf6; font-weight: 600; }
.app-table tr:last-child td { border-bottom: 0; }
.pill { font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 100px; }
.pill.ok { background: rgba(52, 211, 153, .15); color: var(--good); }
.pill.wait { background: rgba(251, 191, 36, .15); color: var(--warn); }
.pill.off { background: rgba(148, 163, 184, .14); color: #94a3b8; }
.who { display: flex; align-items: center; gap: 8px; }
.who i {
  width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center;
  font-size: 9.5px; font-weight: 700; color: #0b0d18;
}

.feed { display: flex; flex-direction: column; gap: 11px; }
.feed-row { display: flex; gap: 10px; font-size: 12px; color: #9aa0c7; line-height: 1.45; }
.feed-row i { width: 7px; height: 7px; border-radius: 50%; margin-top: 5px; flex: none; }
.feed-row b { color: #e8eaf6; font-weight: 600; }
.feed-row time { display: block; color: #565c7e; font-size: 10.5px; margin-top: 2px; }

/* ---- comparison ---------------------------------------------------------- */

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.compare-card { border: 1px solid var(--line); border-radius: 16px; padding: 22px; background: var(--panel); }
.compare-card.bad { border-color: rgba(244, 63, 94, .22); }
.compare-card.good { border-color: rgba(52, 211, 153, .28); }
.compare-card h3 { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.compare-card p { color: var(--text-dim); font-size: 14.5px; margin: 0 0 16px; }
.tag { font: 700 10.5px/1 var(--mono); letter-spacing: 1px; padding: 5px 9px; border-radius: 6px; }
.tag.bad { background: rgba(244, 63, 94, .14); color: #fb7185; }
.tag.good { background: rgba(52, 211, 153, .14); color: var(--good); }
.compare ul { margin: 0; padding-left: 19px; color: var(--text-dim); font-size: 14px; }
.compare li { margin-bottom: 7px; }

/* ---- features ------------------------------------------------------------ */

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
  border: 1px solid var(--line-soft); border-radius: 14px; padding: 22px;
  background: linear-gradient(180deg, var(--panel) 0%, rgba(16, 19, 31, .5) 100%);
}
.feature-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(129, 140, 248, .13); border: 1px solid rgba(129, 140, 248, .26);
  margin-bottom: 14px;
}
.feature h3 { margin-bottom: 8px; }
.feature p { margin: 0; color: var(--text-dim); font-size: 14.5px; }

/* ---- code ---------------------------------------------------------------- */

.code-split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 36px; align-items: center; }
.code-block {
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #0a0d18;
}
.code-head {
  display: flex; align-items: center; gap: 8px; padding: 11px 15px;
  border-bottom: 1px solid var(--line-soft); background: rgba(255, 255, 255, .02);
  font: 600 12px/1 var(--mono); color: var(--text-faint); letter-spacing: .6px;
}
.code-head .lamp { width: 9px; height: 9px; border-radius: 50%; background: #2a3150; }
.code-head .name { margin-left: 6px; }
.code-block pre {
  margin: 0; padding: 18px; overflow-x: auto;
  font: 400 13.5px/1.75 var(--mono); color: #c8cee8; tab-size: 2;
}
.t-tag { color: #f472b6; }
.t-attr { color: var(--brand); }
.t-str { color: #7dd3fc; }
.t-com { color: #4d5476; font-style: italic; }
.steps { counter-reset: step; margin: 0; padding: 0; list-style: none; }
.steps li {
  counter-increment: step; position: relative; padding-left: 44px; margin-bottom: 22px;
}
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: -2px;
  width: 29px; height: 29px; border-radius: 9px; display: grid; place-items: center;
  font: 700 13px/1 var(--mono); color: var(--brand);
  background: rgba(129, 140, 248, .12); border: 1px solid rgba(129, 140, 248, .3);
}
.steps b { display: block; font-size: 16px; margin-bottom: 4px; }
.steps span { color: var(--text-dim); font-size: 14.5px; }

/* ---- pricing ------------------------------------------------------------- */

.price-note {
  display: flex; gap: 10px; align-items: flex-start;
  border: 1px dashed rgba(251, 191, 36, .4); background: rgba(251, 191, 36, .07);
  border-radius: 11px; padding: 13px 16px; margin-bottom: 30px;
  font-size: 13.5px; color: #e6d5a8;
}
.prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.price {
  border: 1px solid var(--line); border-radius: 16px; padding: 26px 24px;
  background: var(--panel); display: flex; flex-direction: column; height: 100%;
}
.price.featured {
  border-color: rgba(129, 140, 248, .55);
  background: linear-gradient(180deg, rgba(129, 140, 248, .11) 0%, var(--panel) 55%);
  box-shadow: 0 22px 60px rgba(129, 140, 248, .13);
}
.price-flag {
  align-self: flex-start; font: 700 10.5px/1 var(--mono); letter-spacing: 1.2px;
  padding: 6px 11px; border-radius: 100px; margin-bottom: 14px;
  background: rgba(129, 140, 248, .18); color: #cdd2ff;
}
.price h3 { font-size: 17px; }
.price .amount { display: flex; align-items: baseline; gap: 5px; margin: 14px 0 6px; }
.price .amount b { font-size: 42px; font-weight: 700; letter-spacing: -.035em; }
.price .amount span { color: var(--text-faint); font-size: 14px; }
.price .who-for { color: var(--text-dim); font-size: 14px; margin: 0 0 20px; min-height: 42px; }
.price ul { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.price li { display: flex; gap: 10px; font-size: 14px; color: var(--text-dim); align-items: flex-start; }
.price li svg { flex: none; margin-top: 4px; }
.price .button { margin-top: auto; width: 100%; }
.price-todo {
  font: 600 10.5px/1.4 var(--mono); color: var(--warn); margin-top: 11px; text-align: center;
  letter-spacing: .4px;
}

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

.faq { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 30px; }
.faq details {
  border: 1px solid var(--line-soft); border-radius: 12px; background: var(--panel);
  padding: 0 18px;
}
.faq details[open] { border-color: var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 17px 0; font-weight: 600; font-size: 15.5px;
  display: flex; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; margin-left: auto; color: var(--brand); font: 400 21px/1 var(--mono);
  transition: transform .18s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 0 0 17px; color: var(--text-dim); font-size: 14.5px; }
.faq p:last-child { margin-bottom: 17px; }

/* ---- closer + footer ----------------------------------------------------- */

.closer {
  border: 1px solid var(--line); border-radius: 22px; padding: clamp(36px, 5vw, 60px);
  text-align: center;
  background:
    radial-gradient(560px 300px at 50% -10%, rgba(129, 140, 248, .22), transparent 70%),
    var(--panel);
}
.closer h2 { margin-bottom: 14px; }
.closer .lede { margin: 0 auto 30px; max-width: 560px; }
.closer .hero-actions { justify-content: center; }

.site-footer { border-top: 1px solid var(--line-soft); padding: 34px 0; margin-top: 40px; }
.site-footer .shell { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.site-footer p { margin: 0; color: var(--text-faint); font-size: 13.5px; }
.footer-links { margin-left: auto; display: flex; gap: 20px; font-size: 13.5px; }
.footer-links a { color: var(--text-dim); }

/* ---- the page's OWN responsive rules ------------------------------------- */
/* Yes, the landing page has media queries. It is a document, not an app: a
   sales page genuinely should reflow on a phone. The product is for the case
   where reflow is the wrong answer, and the demo boxes above prove it.        */

@media (max-width: 900px) {
  .code-split, .compare, .faq { grid-template-columns: 1fr; }
  .features, .prices { grid-template-columns: 1fr; }
  .site-nav { display: none; }
  .rig-readout { margin-left: 0; width: 100%; }
}

/* Keep the three plan headings on one line: the featured card carries a flag
   badge, so the other two reserve exactly the same amount of space. */
.price:not(.featured)::before { content: ""; display: block; height: 37px; }

@media (max-width: 900px) {
  .price:not(.featured)::before { display: none; }
}
