/* ================================================================
   Launchcast — Mission Control design system on the web.
   Colors, type, radii ported from iOS DesignSystem.swift.
   ================================================================ */

:root {
  /* Colors (from LCColor) */
  --bg:          #0A0A0C;
  --bg-deep:     #050507;
  --surface:     #141418;
  --surface-2:   #1E1E24;
  --border:      rgba(255, 255, 255, 0.08);
  --border-loud: rgba(255, 255, 255, 0.14);

  --accent:      #FF8C33;
  --accent-glow: #FFB259;
  --accent-dim:  rgba(255, 140, 51, 0.14);

  --live:        #FA4444;
  --go:          #4ADE80;
  --warn:        #FFCC33;

  --text:        #FFFFFF;
  --text-muted:  rgba(255, 255, 255, 0.62);
  --text-faint:  rgba(255, 255, 255, 0.38);

  --data-cyan:   #61C7F2;
  --data-purple: #B78CFF;

  /* Type */
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter",
                  "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono:    "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas,
                  "Liberation Mono", monospace;

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* Space */
  --s-xs: 4px;
  --s-sm: 8px;
  --s-md: 12px;
  --s-lg: 16px;
  --s-xl: 24px;
  --s-2xl: 32px;
  --s-3xl: 48px;
  --s-4xl: 72px;
  --s-5xl: 120px;

  --container: 1160px;
}

/* ------------------------------------------------------------------ */
/* Reset */
* { box-sizing: border-box; }
*::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
img, picture, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ------------------------------------------------------------------ */
/* Base */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #000; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s-xl);
}

/* ------------------------------------------------------------------ */
/* Global ambient starfield background */
.stars {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(255, 140, 51, 0.18), transparent 60%),
    radial-gradient(800px 500px at 10% 10%, rgba(183, 140, 255, 0.08), transparent 60%),
    linear-gradient(180deg, #05050a 0%, #0A0A0C 60%, #050507 100%);
}
.stars::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 17% 22%,  #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 33% 88%,  #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 62% 14%,  #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 82% 74%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 41% 60%,  rgba(255,255,255,0.7) 50%, transparent 51%),
    radial-gradient(1px 1px at 9% 47%,   rgba(255,255,255,0.6) 50%, transparent 51%),
    radial-gradient(1px 1px at 73% 35%,  rgba(255,255,255,0.8) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 55% 92%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 95% 12%,  rgba(255,255,255,0.6) 50%, transparent 51%),
    radial-gradient(1px 1px at 26% 7%,   rgba(255,255,255,0.7) 50%, transparent 51%);
  opacity: 0.6;
  animation: drift 120s linear infinite;
}
@keyframes drift {
  from { transform: translateY(0); }
  to   { transform: translateY(-60px); }
}

/* ------------------------------------------------------------------ */
/* Typography utilities */
.mono  { font-family: var(--font-mono); letter-spacing: 0.04em; }
.upper { text-transform: uppercase; }
.kern  { letter-spacing: 0.12em; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }

h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -0.01em; line-height: 1.08; }
h1 { font-size: clamp(38px, 7vw, 76px); }
h2 { font-size: clamp(28px, 4vw, 44px); }
h3 { font-size: clamp(20px, 2.5vw, 26px); }

p  { margin: 0 0 var(--s-md); color: var(--text-muted); }

/* Section label — terminal style */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--accent-dim);
  border: 1px solid rgba(255, 140, 51, 0.35);
}
.section-label::before {
  content: ">";
  color: var(--accent);
  font-weight: 700;
}

/* ------------------------------------------------------------------ */
/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: var(--s-md) 0;
  backdrop-filter: saturate(140%) blur(18px);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  background: rgba(10, 10, 12, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-lg);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: 0 0 0 1px var(--border-loud), 0 6px 20px rgba(255, 140, 51, 0.25);
}
.nav-links {
  display: flex;
  gap: var(--s-xl);
  align-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-links a { color: var(--text-muted); transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }

@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* ------------------------------------------------------------------ */
/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: var(--r-md);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}
.btn-primary {
  color: #0A0A0C;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-glow) 100%);
  box-shadow: 0 10px 26px rgba(255, 140, 51, 0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(255, 140, 51, 0.5); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-loud);
}
.btn-ghost:hover { background: var(--surface-2); }

.btn-sm { padding: 10px 16px; font-size: 13px; border-radius: var(--r-sm); }

/* ------------------------------------------------------------------ */
/* Hero */
.hero {
  position: relative;
  padding: clamp(var(--s-3xl), 9vw, var(--s-5xl)) 0 var(--s-4xl);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--s-3xl);
  align-items: center;
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--s-2xl); }
}

.hero h1 { margin: var(--s-lg) 0 var(--s-lg); }
.hero h1 .accent {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-glow) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lede {
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.55;
  max-width: 560px;
  color: var(--text-muted);
}
.hero-cta {
  display: flex;
  gap: var(--s-md);
  margin-top: var(--s-xl);
  flex-wrap: wrap;
}

.app-store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  background: #000;
  color: #fff;
  border: 1px solid var(--border-loud);
  border-radius: var(--r-md);
  transition: transform 0.18s, border-color 0.18s;
}
.app-store-badge:hover { transform: translateY(-1px); border-color: var(--accent); }
.app-store-badge svg { width: 26px; height: 26px; }
.app-store-badge .asb-small {
  font-size: 11px; font-weight: 500; opacity: 0.75; line-height: 1; text-transform: uppercase; letter-spacing: 0.05em;
}
.app-store-badge .asb-big { font-size: 19px; font-weight: 700; line-height: 1.1; margin-top: 2px; }

/* Hero meta row */
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-lg) var(--s-xl);
  margin-top: var(--s-2xl);
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--go);
  box-shadow: 0 0 12px rgba(74, 222, 128, 0.8);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

/* Phone mockup */
.phone-frame {
  position: relative;
  width: 320px;
  max-width: 100%;
  aspect-ratio: 320 / 640;
  margin: 0 auto;
  border-radius: 48px;
  padding: 14px;
  background: linear-gradient(160deg, #1c1c22 0%, #0a0a0c 70%);
  box-shadow:
    0 0 0 1.5px rgba(255, 255, 255, 0.08),
    0 40px 80px rgba(0, 0, 0, 0.65),
    0 0 120px rgba(255, 140, 51, 0.18);
  transform: rotate(-3deg);
  transition: transform 0.6s cubic-bezier(.2,.8,.2,1);
}
.phone-frame:hover { transform: rotate(0deg) translateY(-6px); }
.phone-frame .screen {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 36px;
  overflow: hidden;
  background: linear-gradient(180deg, #0a0a0c, #16161c);
}
.phone-frame .screen img { width: 100%; height: 100%; object-fit: cover; }
.phone-frame .notch {
  position: absolute;
  top: 22px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 30px;
  background: #000; border-radius: 999px;
  z-index: 2;
}

/* Mission control mini-panel under phone */
.mini-panel {
  margin: var(--s-2xl) auto 0;
  max-width: 340px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-lg);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.mini-panel .mp-row {
  display: flex; justify-content: space-between;
  padding: 4px 0;
}
.mini-panel .mp-row strong { color: var(--text); font-weight: 600; }
.mini-panel .mp-row .go { color: var(--go); }
.mini-panel .mp-row .live { color: var(--live); }

/* ------------------------------------------------------------------ */
/* Section generic */
section { padding: var(--s-5xl) 0; position: relative; }

.section-head { margin-bottom: var(--s-3xl); max-width: 760px; }
.section-head h2 { margin-top: var(--s-md); }
.section-head p  { margin-top: var(--s-md); font-size: 17px; }

/* ------------------------------------------------------------------ */
/* Feature cards */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-lg);
}
@media (max-width: 960px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .features { grid-template-columns: 1fr; } }

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-xl);
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
}
.feature:hover {
  border-color: rgba(255, 140, 51, 0.45);
  transform: translateY(-2px);
}
.feature::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(400px 200px at 0% 0%, rgba(255, 140, 51, 0.10), transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.feature:hover::after { opacity: 1; }

.feature .icon {
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-dim);
  border: 1px solid rgba(255, 140, 51, 0.35);
  border-radius: 10px;
  margin-bottom: var(--s-lg);
  color: var(--accent);
}
.feature h3 { margin-bottom: var(--s-sm); font-size: 20px; font-weight: 700; }
.feature p  { font-size: 14.5px; line-height: 1.6; margin-bottom: 0; }

/* ------------------------------------------------------------------ */
/* Stats strip */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-lg);
  margin: 0;
}
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-xl);
}
.stat .num {
  font-family: var(--font-mono);
  font-size: clamp(32px, 4.5vw, 48px);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-glow) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1;
}
.stat .label {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--text-faint);
}

/* ------------------------------------------------------------------ */
/* Split showcase */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3xl);
  align-items: center;
}
@media (max-width: 960px) { .split { grid-template-columns: 1fr; } }
.split.reverse { direction: rtl; }
.split.reverse > * { direction: ltr; }

.split img, .split .media {
  width: 100%;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}

/* ------------------------------------------------------------------ */
/* Pricing */
.pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-lg);
}
@media (max-width: 960px) { .pricing { grid-template-columns: 1fr; } }

.plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-xl);
  position: relative;
  display: flex; flex-direction: column;
}
.plan.highlight {
  border-color: rgba(255, 140, 51, 0.5);
  background: linear-gradient(180deg, var(--surface), rgba(255, 140, 51, 0.08));
  box-shadow: 0 30px 60px rgba(255, 140, 51, 0.12);
}
.plan .badge {
  position: absolute; top: -10px; right: 18px;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.15em; text-transform: uppercase;
  padding: 5px 10px; border-radius: var(--r-pill);
  background: var(--accent); color: #0a0a0c; font-weight: 700;
}
.plan h3 { font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
.plan .price { font-size: 46px; font-weight: 800; letter-spacing: -0.03em; margin: 10px 0 4px; }
.plan .price small { font-size: 15px; color: var(--text-muted); font-weight: 500; letter-spacing: 0; }
.plan ul { list-style: none; padding: 0; margin: var(--s-lg) 0 var(--s-xl); }
.plan li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 7px 0; font-size: 14.5px; color: var(--text-muted);
}
.plan li::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); margin-top: 9px; flex: 0 0 auto;
}
.plan .cta { margin-top: auto; }

/* ------------------------------------------------------------------ */
/* FAQ */
.faq-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-sm);
  max-width: 860px;
  margin: 0 auto;
}
details.faq {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-lg) var(--s-xl);
  transition: border-color 0.2s;
}
details.faq[open] { border-color: rgba(255, 140, 51, 0.35); }
details.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; font-size: 16px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+";
  font-family: var(--font-mono); font-size: 22px; color: var(--accent); font-weight: 700;
  transition: transform 0.25s;
}
details.faq[open] summary::after { transform: rotate(45deg); }
details.faq p { margin-top: var(--s-md); font-size: 15px; line-height: 1.65; }

/* ------------------------------------------------------------------ */
/* CTA block */
.cta-block {
  position: relative;
  background: linear-gradient(135deg, #1a0d05 0%, #0a0a0c 60%);
  border: 1px solid rgba(255, 140, 51, 0.3);
  border-radius: var(--r-xl);
  padding: clamp(var(--s-2xl), 5vw, var(--s-4xl));
  text-align: center;
  overflow: hidden;
}
.cta-block::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(600px 300px at 50% 0%, rgba(255, 140, 51, 0.25), transparent 60%);
  pointer-events: none;
}
.cta-block h2 { max-width: 640px; margin: var(--s-md) auto 0; }
.cta-block p  { max-width: 560px; margin: var(--s-md) auto var(--s-xl); font-size: 17px; }
.cta-block .btn-primary { padding: 16px 32px; font-size: 16px; }

/* ------------------------------------------------------------------ */
/* Footer */
footer {
  padding: var(--s-3xl) 0 var(--s-2xl);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--s-2xl);
}
@media (max-width: 720px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-grid h4 {
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: var(--s-md);
}
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { padding: 5px 0; }
.foot-grid a:hover { color: var(--accent); }
.foot-bottom {
  margin-top: var(--s-2xl); padding-top: var(--s-lg);
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s-md);
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-faint);
}

/* ------------------------------------------------------------------ */
/* Article pages (privacy, terms, support) */
.page-hero {
  padding: var(--s-4xl) 0 var(--s-xl);
  border-bottom: 1px solid var(--border);
}
.page-hero h1 { font-size: clamp(32px, 5vw, 52px); margin-top: var(--s-md); }
.page-hero p  { max-width: 680px; margin-top: var(--s-md); font-size: 17px; }

.article {
  padding: var(--s-3xl) 0 var(--s-4xl);
  max-width: 820px;
  margin: 0 auto;
}
.article h2 {
  margin: var(--s-2xl) 0 var(--s-md);
  font-size: 24px;
  color: var(--text);
}
.article h2:first-child { margin-top: 0; }
.article h3 { margin: var(--s-xl) 0 10px; font-size: 18px; }
.article p, .article li { color: var(--text-muted); font-size: 16px; line-height: 1.7; }
.article ul { padding-left: 20px; }
.article li { padding: 4px 0; }
.article strong { color: var(--text); }
.article a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article a:hover { color: var(--accent-glow); }

.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
  padding: var(--s-lg) var(--s-xl);
  margin: var(--s-xl) 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--accent); font-family: var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; font-size: 13px; }

/* Support page specific */
.support-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-lg);
  margin: var(--s-xl) 0;
}
@media (max-width: 720px) { .support-grid { grid-template-columns: 1fr; } }
.support-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s-xl);
}
.support-card h3 { margin-bottom: var(--s-sm); }
.support-card a.btn-ghost { margin-top: var(--s-md); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .stars::after { animation: none; }
  .hero-meta .dot { animation: none; }
  * { transition: none !important; }
}
