/* ============================================================
   WindowsInstaller — design system
   ============================================================ */
:root {
  --bg:        #0a0e1a;
  --bg-2:      #0f1526;
  --surface:   #131a2e;
  --surface-2: #1a2340;
  --border:    #263155;
  --text:      #e8ecf7;
  --muted:     #93a0c2;
  --primary:   #3b82f6;
  --primary-2: #22d3ee;
  --accent:    #7c93ff;
  --ok:        #34d399;
  --warn:      #fbbf24;
  --danger:    #f87171;
  --radius:    16px;
  --radius-sm: 10px;
  --maxw:      1140px;
  --shadow:    0 20px 50px -20px rgba(0,0,0,.6);
  --grad:      linear-gradient(120deg, #22d3ee 0%, #3b82f6 45%, #7c93ff 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: radial-gradient(1200px 600px at 80% -10%, rgba(59,130,246,.14), transparent 60%),
              radial-gradient(900px 500px at 0% 0%, rgba(34,211,238,.10), transparent 55%),
              var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.15; font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
p  { color: var(--text); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; margin-top: 28px; }
.grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.container--narrow { max-width: 760px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: .95rem; padding: 11px 20px;
  border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--grad); color: #04122b; box-shadow: 0 10px 30px -10px rgba(59,130,246,.7); }
.btn--primary:hover { box-shadow: 0 16px 40px -12px rgba(59,130,246,.85); }
.btn--ghost { background: rgba(255,255,255,.03); border-color: var(--border); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); background: rgba(124,147,255,.08); }
.btn--lg { padding: 14px 26px; font-size: 1.02rem; }
.btn--block { width: 100%; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(10,14,26,.72);
  border-bottom: 1px solid var(--border);
}
.nav__inner { display: flex; align-items: center; gap: 20px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.brand__logo {
  width: 30px; height: 30px; display: grid; place-items: center;
  background: var(--grad); color: #04122b; border-radius: 8px; font-size: 18px; font-weight: 900;
}
.brand__name { font-size: 1.08rem; }
.nav__links { display: flex; gap: 26px; margin-left: 18px; }
.nav__links a { color: var(--muted); font-weight: 500; font-size: .95rem; }
.nav__links a:hover { color: var(--text); }
.nav__actions { display: flex; gap: 10px; margin-left: auto; }
.nav__toggle { display: none; background: none; border: 0; color: var(--text); font-size: 1.4rem; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 40px; }
.hero__inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.pill {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: rgba(124,147,255,.10); border: 1px solid var(--border);
  color: var(--accent); font-size: .82rem; font-weight: 600; margin-bottom: 18px;
}
.hero h1 { margin-bottom: 16px; }
.lead { font-size: 1.14rem; color: var(--muted); max-width: 540px; margin-bottom: 26px; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.hero__meta { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---------- Terminal ---------- */
.term {
  background: #0a1020; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
}
.term__bar {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px;
  background: #0d1424; border-bottom: 1px solid var(--border);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot--r { background: #ff5f57; } .dot--y { background: #febc2e; } .dot--g { background: #28c840; }
.term__title { margin-left: 8px; color: var(--muted); font-size: .82rem; font-family: 'JetBrains Mono', monospace; }
.term__body {
  padding: 18px; font-family: 'JetBrains Mono', monospace; font-size: .82rem;
  line-height: 1.7; color: #cdd6f4; overflow-x: auto; white-space: pre-wrap; word-break: break-word;
}
.c-muted { color: #6b7699; } .c-ok { color: var(--ok); } .c-warn { color: var(--warn); } .c-hl { color: var(--primary-2); }

/* ---------- Strip ---------- */
.strip { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: rgba(255,255,255,.015); }
.strip__inner { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; padding: 26px 22px; text-align: center; }
.strip__inner b { display: block; font-size: 1.5rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section--alt { background: linear-gradient(180deg, var(--bg-2), transparent); }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section__head h2 { margin-bottom: 10px; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px;
  transition: transform .18s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.step__n { font-family: 'JetBrains Mono', monospace; font-size: 1.6rem; font-weight: 700; color: var(--primary-2); margin-bottom: 10px; }
.step h3 { font-size: 1.05rem; margin-bottom: 6px; }

/* Profiles */
.profiles { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.profile__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.os-badge { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; font-size: 20px; }
.os-badge--windows { background: rgba(59,130,246,.14); }
.os-badge--linux { background: rgba(52,211,153,.14); }
.profile h3 { font-size: 1.1rem; margin-bottom: 12px; }
.profile__specs { list-style: none; display: flex; flex-direction: column; gap: 3px; }
.tag { font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.tag--free { background: rgba(52,211,153,.15); color: var(--ok); }
.tag--personal { background: rgba(124,147,255,.15); color: var(--accent); }
.tag--lite { background: rgba(34,211,238,.15); color: var(--primary-2); }
.tag--standard { background: rgba(251,191,36,.15); color: var(--warn); }

/* Plans */
.plans { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; align-items: start; }
.plan { position: relative; display: flex; flex-direction: column; }
.plan--hl { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), var(--shadow); }
.plan__ribbon {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--grad); color: #04122b; font-size: .72rem; font-weight: 700;
  padding: 4px 12px; border-radius: 999px; white-space: nowrap;
}
.plan h3 { font-size: 1.2rem; margin-bottom: 10px; }
.plan__price { display: flex; align-items: baseline; gap: 6px; margin-bottom: 18px; }
.plan__amt { font-size: 2rem; font-weight: 800; }
.plan__feats { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; flex: 1; }
.plan__feats li { position: relative; padding-left: 24px; color: var(--muted); font-size: .92rem; }
.plan__feats li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq__item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px 20px; }
.faq__item summary { cursor: pointer; padding: 16px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
.faq__item summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; }
.faq__item[open] summary::after { content: "–"; }
.faq__item p { padding-bottom: 16px; }

/* CTA */
.cta { padding: 90px 0; text-align: center; }
.cta__inner { max-width: 620px; margin: 0 auto; }
.cta h2 { margin-bottom: 12px; }
.cta p { margin-bottom: 24px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 56px 0 24px; background: var(--bg-2); }
.footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; margin-bottom: 34px; }
.footer__brand .brand { margin-bottom: 12px; }
.footer__brand p { max-width: 340px; margin-bottom: 8px; }
.footer__col h4 { margin-bottom: 14px; font-size: .95rem; }
.footer__col a { display: block; color: var(--muted); font-size: .92rem; margin-bottom: 9px; }
.footer__col a:hover { color: var(--text); }
.footer__bottom { display: flex; justify-content: space-between; padding-top: 22px; border-top: 1px solid var(--border); }

/* ---------- Auth / generic page ---------- */
.page { padding: 64px 0; }
.page__head { text-align: center; margin-bottom: 40px; }
.auth { max-width: 420px; margin: 0 auto; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .88rem; margin-bottom: 6px; color: var(--muted); }
.field input {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--bg); border: 1px solid var(--border); color: var(--text); font-size: .95rem;
}
.field input:focus { outline: none; border-color: var(--primary); }

/* code block */
.codeblock {
  background: #0a1020; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 16px; font-family: 'JetBrains Mono', monospace; font-size: .85rem;
  color: #cdd6f4; overflow-x: auto; position: relative;
}

/* table */
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: .92rem; }
.table th { background: var(--surface-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.table tr:last-child td { border-bottom: 0; }

/* ---------- Flash messages ---------- */
.flash-wrap { padding-top: 20px; }
.flash { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 10px; font-size: .92rem; border: 1px solid var(--border); }
.flash--ok { background: rgba(52,211,153,.12); border-color: rgba(52,211,153,.4); color: #a7f3d0; }
.flash--error { background: rgba(248,113,113,.12); border-color: rgba(248,113,113,.4); color: #fecaca; }

/* ---------- Dashboard stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat__val { font-size: 1.8rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Admin form ---------- */
.admin-form { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 12px; align-items: end; }
.admin-form .field { margin-bottom: 0; }
.field select {
  width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--bg); border: 1px solid var(--border); color: var(--text); font-size: .95rem;
}
.field select:focus { outline: none; border-color: var(--primary); }
code { font-family: 'JetBrains Mono', monospace; }

/* profile admin form */
.profile-form { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; align-items: end; }
.profile-form .field { margin-bottom: 0; }
.chk { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; align-self: center; }
.chk input { width: auto; }

/* ---------- Tracking page ---------- */
.track-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.track-top b { font-size: 2rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bar { height: 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.bar--sm { height: 7px; margin-top: 8px; }
.bar__fill { height: 100%; width: 0; background: var(--grad); border-radius: 999px; transition: width .5s ease; }

.stages-track { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.tstage { display: flex; align-items: center; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; opacity: .55; transition: opacity .3s, border-color .3s; }
.tstage--active { opacity: 1; border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.tstage--done { opacity: 1; border-color: rgba(52,211,153,.4); }
.tstage__ico { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); font-weight: 700; }
.tstage--active .tstage__ico { background: var(--grad); color: #04122b; }
.tstage--done .tstage__ico { background: rgba(52,211,153,.15); color: var(--ok); }
.tstage__body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.tstage__body b { font-size: 1.02rem; }
.tstage__state { font-size: 1.3rem; color: var(--muted); }
.tstage--active .tstage__state { color: var(--primary-2); animation: spin 1.4s linear infinite; }
.tstage--done .tstage__state { color: var(--ok); }
@keyframes spin { to { transform: rotate(360deg); } }

.creds__grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.creds__grid > div { display: flex; flex-direction: column; gap: 3px; }
.creds__grid b { font-family: 'JetBrains Mono', monospace; font-size: 1.05rem; word-break: break-all; }

/* deploy cards (dashboard) */
.deploy-card { cursor: pointer; }
.deploy-card__cmd { display: none; margin-top: 14px; }
.deploy-card.open .deploy-card__cmd { display: block; }
.deploy-card.open { border-color: var(--primary); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; }
  .steps, .plans { grid-template-columns: repeat(2,1fr); }
  .profiles { grid-template-columns: repeat(2,1fr); }
  .strip__inner { grid-template-columns: repeat(2,1fr); }
  .stats { grid-template-columns: repeat(2,1fr); }
  .admin-form { grid-template-columns: 1fr 1fr; }
  .profile-form { grid-template-columns: 1fr 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .nav__links, .nav__actions { display: none; }
  .nav__toggle { display: block; }
  .nav__links.open {
    display: flex; flex-direction: column; position: absolute; top: 66px; left: 0; right: 0;
    background: var(--bg-2); padding: 16px 22px; border-bottom: 1px solid var(--border); margin: 0;
  }
}
@media (max-width: 560px) {
  .steps, .plans, .profiles { grid-template-columns: 1fr; }
  .footer__inner, .footer__bottom { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; gap: 8px; }
}
