/* ==========================================================================
   SW4K PLAY — product site
   Palette lifted directly from the app's own AppColors (lib/core/theme/
   app_colors.dart) so the site reads as the same product, not a template.
   The app has no light theme, so this commits to one dark visual world on
   purpose rather than bolting on a toggle that doesn't reflect the product.
   ========================================================================== */

:root {
  --bg: #070c16;
  --bg-deep: #04070d;
  --surface: #0e1626;
  --surface-elevated: #16213a;
  --surface-highlight: #1e2c4a;
  --divider: #23304a;

  --primary: #1e88e5;
  --primary-light: #29b6f6;
  --primary-dark: #0d3d6b;

  --accent: #ffb300;
  --accent-deep: #ff7a1a;

  --text-primary: #f5f7fa;
  --text-secondary: #a7b3c8;
  --text-muted: #6b7a96;

  --success: #2ecc71;
  --live: #e5484d;

  --font-display: "Sora", "Segoe UI", sans-serif;
  --font-body: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --container: 1120px;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
  margin: 0;
}

p { margin: 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary-light);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary-light);
  box-shadow: 0 0 10px var(--primary-light);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(7, 12, 22, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--divider);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--text-primary);
}

.brand img { height: 30px; width: 30px; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  row-gap: 6px;
}

@media (min-width: 720px) {
  .main-nav { gap: 30px; }
}

.main-nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.94rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] { color: var(--text-primary); }

.main-nav a[aria-current="page"] { color: var(--primary-light); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 10px;
  padding: 12px 22px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  color: #041018;
  box-shadow: 0 8px 24px -8px rgba(30, 136, 229, 0.65);
}

.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 28px -8px rgba(30, 136, 229, 0.8); }

.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #241000;
  box-shadow: 0 8px 24px -8px rgba(255, 122, 26, 0.55);
}

.btn-accent:hover { transform: translateY(-1px); box-shadow: 0 12px 28px -8px rgba(255, 122, 26, 0.7); }

.btn-ghost {
  background: var(--surface-elevated);
  color: var(--text-primary);
  border-color: var(--divider);
}

.btn-ghost:hover { border-color: var(--primary-light); background: var(--surface-highlight); }

.header-cta { display: none; }
@media (min-width: 720px) { .header-cta { display: inline-flex; } }

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

.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 96px;
  background:
    radial-gradient(880px 420px at 50% -10%, rgba(30, 136, 229, 0.28), transparent 65%),
    linear-gradient(135deg, #0a162b 0%, #10233f 55%, #0d3d6b 100%);
  border-bottom: 1px solid var(--divider);
}

.hero .wrap {
  display: grid;
  gap: 40px;
  justify-items: center;
  text-align: center;
}

.hero-mark { width: 132px; height: auto; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.45)); }

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  max-width: 15ch;
}

.hero h1 .accent-word {
  background: linear-gradient(120deg, var(--primary-light), #7fd8ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  max-width: 56ch;
  color: var(--text-secondary);
  font-size: 1.12rem;
}

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

.platform-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 6px;
}

.platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--divider);
  border-radius: 999px;
  padding: 7px 14px;
}

/* --------------------------------------------------------------- section */

.section { padding: 88px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider); }

.section-head {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
  display: grid;
  gap: 14px;
  justify-items: center;
}

.section-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); }
.section-head p { color: var(--text-secondary); font-size: 1.02rem; }

/* ----------------------------------------------------------- feature grid */

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--surface-elevated);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 26px 24px;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-light), var(--accent));
  opacity: 0;
  transition: opacity 0.2s ease;
}

.card:hover::before { opacity: 1; }

.card .icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--surface-highlight);
  margin-bottom: 16px;
  font-size: 1.25rem;
}

.card h3 {
  font-size: 1.08rem;
  margin-bottom: 8px;
}

.card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* --------------------------------------------------------------- gallery */

.screenshot-strip {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 6px 6px 20px;
  scroll-snap-type: x proximity;
}

.screenshot-strip::-webkit-scrollbar { height: 8px; }
.screenshot-strip::-webkit-scrollbar-thumb { background: var(--surface-highlight); border-radius: 4px; }
.screenshot-strip::-webkit-scrollbar-track { background: transparent; }

.screenshot-card {
  flex: 0 0 auto;
  width: min(78vw, 340px);
  scroll-snap-align: start;
  background: var(--surface-elevated);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  overflow: hidden;
}

.screenshot-card img {
  width: 100%;
  height: auto;
  display: block;
  border-bottom: 1px solid var(--divider);
}

.screenshot-card .caption {
  padding: 14px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* --------------------------------------------------------------- steps */

.steps {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  counter-reset: step;
}

.step {
  position: relative;
  padding-top: 8px;
}

.step .num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--primary-light);
  display: block;
  margin-bottom: 10px;
}

.step h3 { font-size: 1.05rem; margin-bottom: 8px; }
.step p { color: var(--text-secondary); font-size: 0.94rem; }

/* --------------------------------------------------------------- download */

.download-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.download-card {
  background: var(--surface-elevated);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 28px;
  display: grid;
  gap: 16px;
}

.download-card .platform-icon { font-size: 1.9rem; }

.download-card h3 { font-size: 1.15rem; }

.download-card .status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  width: fit-content;
}

.status-live { background: rgba(46, 204, 113, 0.14); color: var(--success); border: 1px solid rgba(46, 204, 113, 0.35); }
.status-soon { background: rgba(255, 179, 0, 0.14); color: var(--accent); border: 1px solid rgba(255, 179, 0, 0.35); }

.download-card p { color: var(--text-secondary); font-size: 0.92rem; }

/* ------------------------------------------------------------------ note */

.notice {
  background: var(--surface-elevated);
  border: 1px solid var(--divider);
  border-left: 3px solid var(--primary-light);
  border-radius: 10px;
  padding: 18px 22px;
  color: var(--text-secondary);
  font-size: 0.93rem;
  max-width: 720px;
  margin: 32px auto 0;
}

.notice strong { color: var(--text-primary); }

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

.faq-item {
  border-bottom: 1px solid var(--divider);
  padding: 22px 0;
}

.faq-item:first-child { border-top: 1px solid var(--divider); }

.faq-item summary {
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--primary-light);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-item .answer {
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 68ch;
}

/* --------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--divider);
  padding: 56px 0 32px;
  background: var(--bg-deep);
}

.footer-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  margin-bottom: 40px;
}

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

.footer-brand { display: grid; gap: 12px; }
.footer-brand img { height: 32px; }
.footer-brand p { color: var(--text-muted); font-size: 0.88rem; max-width: 32ch; }

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { text-decoration: none; color: var(--text-secondary); font-size: 0.92rem; }
.footer-col a:hover { color: var(--primary-light); }

.footer-bottom {
  border-top: 1px solid var(--divider);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.84rem;
}

/* ------------------------------------------------------------- doc pages */

.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

.doc h1 { font-size: 2.2rem; margin-bottom: 12px; }

.doc .doc-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.doc section { padding: 30px 0; border-bottom: 1px solid var(--divider); }
.doc section:last-of-type { border-bottom: none; }

.doc h2 {
  font-size: 1.3rem;
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 14px;
}

.doc h2 .num { font-family: var(--font-mono); font-size: 0.82rem; color: var(--primary-light); }

.doc p { margin-bottom: 14px; color: var(--text-secondary); max-width: 66ch; }
.doc p:last-child { margin-bottom: 0; }
.doc ul { padding-left: 20px; color: var(--text-secondary); max-width: 62ch; }
.doc li { margin-bottom: 6px; }
.doc code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--surface-elevated);
  border: 1px solid var(--divider);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--text-primary);
}

.summary-box {
  background: var(--surface-elevated);
  border: 1px solid var(--divider);
  border-radius: 12px;
  padding: 22px 24px;
  margin-bottom: 8px;
}

.summary-box h2 { font-size: 1rem; margin-bottom: 12px; }
.summary-box ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.summary-box li { display: flex; gap: 10px; color: var(--text-primary); font-size: 0.95rem; }
.summary-box li::before { content: "\2192"; color: var(--primary-light); font-weight: 700; }

/* ------------------------------------------------------------- utility */

.center { text-align: center; }
.mt-48 { margin-top: 48px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
