/* Shared styles for the generated app pages (tools/build_site.py).
   Design tokens mirror the landing page (index.html). */
:root {
  --bg: #06060e;
  --bg-soft: #0b0b18;
  --ink: #eef0ff;
  --ink-dim: #9aa0c0;
  --cyan: #37e6ff;
  --purple: #b46bff;
  --lime: #a8ff3e;
  --coral: #ff6a4d;
  --panel: rgba(255,255,255,0.04);
  --panel-border: rgba(255,255,255,0.09);
  --radius: 20px;
  --acc: #37e6ff;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  line-height: 1.6;
}
h1, h2, h3 { font-family: 'Space Grotesk', sans-serif; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
strong { font-weight: 600; }

/* ---------- Background ---------- */
.aurora {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px 600px at 12% -10%, color-mix(in srgb, var(--acc) 22%, transparent), transparent 60%),
    radial-gradient(1000px 700px at 88% 6%, rgba(180,107,255,0.14), transparent 60%),
    radial-gradient(800px 800px at 50% 115%, rgba(55,230,255,0.08), transparent 60%);
}
header, main, footer { position: relative; z-index: 1; }

/* ---------- Header ---------- */
header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 28px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(6,6,14,0.62);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.brand img { height: 40px; width: auto; }
nav.links { display: flex; gap: 24px; font-size: 0.86rem; color: var(--ink-dim); font-weight: 400; }
nav.links a:hover { color: var(--ink); }
@media (max-width: 760px) { nav.links { display: none; } header { padding: 10px 16px; } }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: 999px;
  font-size: 0.85rem; font-weight: 500; font-family: 'Space Grotesk', sans-serif;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  transition: transform .15s, background .2s;
}
.btn:hover { transform: translateY(-2px); background: rgba(255,255,255,0.08); }
.btn.primary {
  background: linear-gradient(92deg, var(--cyan), var(--purple));
  color: #050510; border: none; font-weight: 600;
}
.btn.small { padding: 7px 16px; font-size: 0.78rem; }

/* ---------- Layout ---------- */
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }
section { padding: 72px 0; }
.kicker {
  font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase;
  font-weight: 500; color: var(--acc);
}
h2.sec-title { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; letter-spacing: -0.01em; margin: 8px 0 18px; }

.crumbs { font-size: 0.78rem; color: rgba(255,255,255,0.45); padding-top: 26px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: 0.6; }
.crumbs a:hover { color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center;
  padding: 40px 0 64px;
}
.hero.landscape { grid-template-columns: 1fr 1.1fr; }
.app-id { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.app-id img {
  width: 84px; height: 84px; border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 12px 34px rgba(0,0,0,0.5), 0 0 44px color-mix(in srgb, var(--acc) 30%, transparent);
}
.hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em;
}
.hero .headline {
  font-family: 'Space Grotesk', sans-serif; font-weight: 600;
  font-size: clamp(1.1rem, 2vw, 1.4rem); line-height: 1.35; margin: 18px 0 14px;
  background: linear-gradient(92deg, var(--ink), color-mix(in srgb, var(--acc) 80%, white));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { color: var(--ink-dim); font-size: 1.02rem; max-width: 560px; }
.badges { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 28px; }
.badges img { height: 48px; width: auto; }
.badges .pill {
  font-size: 0.74rem; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--panel-border); color: var(--ink-dim); background: rgba(0,0,0,0.25);
}
.hero-media { position: relative; display: flex; justify-content: center; }
.hero-media::before {
  content: ""; position: absolute; inset: 8% 10%; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--acc) 32%, transparent), transparent 70%);
  filter: blur(40px);
}
.hero-media img {
  position: relative; border-radius: 26px;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 30px 70px rgba(0,0,0,0.6);
}
.hero-media .phone { height: min(560px, 72vh); width: auto; max-width: 78vw; object-fit: contain; }
.hero-media .wide { width: 100%; height: auto; border-radius: 16px; }
@media (max-width: 880px) {
  .hero, .hero.landscape { grid-template-columns: 1fr; gap: 40px; padding-top: 26px; }
}

/* ---------- Screenshots ---------- */
.shots {
  display: flex; gap: 18px; overflow-x: auto; padding: 6px 2px 18px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.2) transparent;
}
.shots figure { flex: 0 0 auto; scroll-snap-align: start; }
.shots img {
  height: 460px; width: auto; border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 18px 44px rgba(0,0,0,0.5);
  background: var(--bg-soft);
}
.shots.landscape img { height: 340px; border-radius: 12px; }
@media (max-width: 640px) {
  .shots img { height: 380px; }
  .shots.landscape img { height: 200px; }
}

/* ---------- About + facts ---------- */
.about { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: start; }
.about p { color: var(--ink-dim); margin-bottom: 16px; font-size: 1rem; }
.facts {
  border: 1px solid var(--panel-border); border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015));
  padding: 8px 22px;
}
.facts dl { display: grid; grid-template-columns: auto 1fr; }
.facts dt, .facts dd { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 0.88rem; }
.facts dt { color: rgba(255,255,255,0.5); padding-right: 18px; white-space: nowrap; }
.facts dd { color: var(--ink); }
.facts dt:last-of-type, .facts dd:last-of-type { border-bottom: 0; }
@media (max-width: 880px) { .about { grid-template-columns: 1fr; } }

/* ---------- Steps ---------- */
ol.steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
ol.steps li {
  counter-increment: s; position: relative;
  padding: 18px 18px 18px 58px; border-radius: 16px;
  border: 1px solid var(--panel-border); background: var(--panel);
  color: var(--ink-dim); font-size: 0.92rem;
}
ol.steps li::before {
  content: counter(s); position: absolute; left: 18px; top: 16px;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 0.85rem;
  color: #050510; background: var(--acc);
}

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.feature {
  border-radius: var(--radius); border: 1px solid var(--panel-border); background: var(--panel);
  padding: 22px;
}
.feature h3 { font-size: 1.02rem; font-weight: 600; margin-bottom: 8px; }
.feature h3::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px;
  background: var(--acc); margin-right: 10px; vertical-align: middle;
  box-shadow: 0 0 12px var(--acc);
}
.feature p { color: var(--ink-dim); font-size: 0.9rem; }

/* ---------- FAQ ---------- */
.faq details {
  border: 1px solid var(--panel-border); border-radius: 16px; background: var(--panel);
  margin-bottom: 12px; padding: 0 20px;
}
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 28px 18px 0; position: relative;
  font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0; top: 14px; font-size: 1.3rem; color: var(--acc);
  transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-dim); padding-bottom: 18px; font-size: 0.94rem; }

/* ---------- CTA band ---------- */
.cta-band {
  text-align: center; border-radius: 28px; border: 1px solid var(--panel-border);
  background:
    radial-gradient(500px 240px at 50% 0%, color-mix(in srgb, var(--acc) 18%, transparent), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.01));
  padding: 56px 24px;
}
.cta-band h2 { font-size: clamp(1.4rem, 2.8vw, 2rem); margin-bottom: 10px; }
.cta-band p { color: var(--ink-dim); margin-bottom: 24px; }
.cta-band .badges { justify-content: center; margin-top: 0; }

/* ---------- More apps ---------- */
.more { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.more a {
  display: flex; align-items: center; gap: 14px; padding: 14px;
  border-radius: 16px; border: 1px solid var(--panel-border); background: var(--panel);
  transition: transform .2s, border-color .2s;
}
.more a:hover { transform: translateY(-3px); border-color: rgba(255,255,255,0.25); }
.more img { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.more strong { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 0.92rem; line-height: 1.25; }
.more span { display: block; font-size: 0.76rem; color: var(--ink-dim); line-height: 1.35; margin-top: 2px; }

/* ---------- Guides (articles) ---------- */
.article { max-width: 780px; margin: 0 auto; padding-top: 24px; }
.article-head h1 { font-size: clamp(1.9rem, 4.4vw, 3rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; margin: 10px 0 18px; }
.article-head .lead { color: var(--ink-dim); font-size: 1.08rem; }
.article-head .meta { margin-top: 14px; font-size: 0.8rem; color: rgba(255,255,255,0.45); }
.article-hero { margin: 30px 0 10px; }
.article-hero img { width: 100%; height: auto; border-radius: 16px; border: 1px solid rgba(255,255,255,0.12); box-shadow: 0 24px 60px rgba(0,0,0,0.5); }
.prose { font-size: 1.02rem; }
.prose h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); font-weight: 700; margin: 46px 0 14px; letter-spacing: -0.01em; }
.prose p, .prose li { color: #c4c8e4; }
.prose p { margin-bottom: 16px; }
.prose ul, .prose ol { margin: 0 0 18px 1.3em; }
.prose li { margin-bottom: 9px; padding-left: 4px; }
.prose li::marker { color: var(--acc); font-weight: 600; }
.prose strong { color: var(--ink); }
.prose a { color: var(--acc); text-decoration: underline; text-underline-offset: 3px; }
.prose figure { margin: 30px 0; }
.prose figure img { width: 100%; height: auto; border-radius: 14px; border: 1px solid rgba(255,255,255,0.12); }
.prose figcaption { font-size: 0.82rem; color: rgba(255,255,255,0.5); margin-top: 8px; }
.prose .tip {
  border-left: 3px solid var(--acc); background: color-mix(in srgb, var(--acc) 8%, transparent);
  padding: 14px 18px; border-radius: 0 12px 12px 0; color: var(--ink);
}
.table-wrap { overflow-x: auto; margin: 6px 0 22px; border: 1px solid var(--panel-border); border-radius: 14px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.prose th { font-family: 'Space Grotesk', sans-serif; font-weight: 600; color: var(--ink); background: rgba(255,255,255,0.04); }
.prose td { color: #c4c8e4; }
.prose tr:last-child td { border-bottom: 0; }
.article .faq { padding-top: 40px; }

.cta-box {
  display: flex; gap: 18px; align-items: flex-start; margin: 36px 0;
  padding: 22px; border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--acc) 35%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--acc) 10%, transparent), rgba(255,255,255,0.02));
}
.cta-box img { width: 64px; height: 64px; border-radius: 15px; flex-shrink: 0; object-fit: cover; }
.cta-box strong { font-family: 'Space Grotesk', sans-serif; font-size: 1.1rem; }
.cta-box p { color: var(--ink-dim) !important; margin: 4px 0 14px !important; font-size: 0.92rem; }
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; }
.prose .cta-box a.btn { text-decoration: none; color: var(--ink); }
.prose .cta-box a.btn.primary { color: #050510; }
@media (max-width: 560px) { .cta-box { flex-direction: column; } }

.guide-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.guide-link {
  display: block; padding: 18px 20px; border-radius: 16px;
  border: 1px solid var(--panel-border); background: var(--panel); transition: transform .2s, border-color .2s;
}
.guide-link:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--acc) 50%, transparent); }
.guide-link strong { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 1rem; margin-bottom: 6px; }
.guide-link strong::after { content: " →"; color: var(--acc); }
.guide-link span { display: block; font-size: 0.86rem; color: var(--ink-dim); }

.hub-head { padding: 34px 0 20px; max-width: 760px; }
.hub-head h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700; margin: 8px 0 12px; }
.hub-head .lead { color: var(--ink-dim); font-size: 1.05rem; }
.guide-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; padding-top: 20px; }
.guide-card {
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--panel-border); background: var(--panel);
  transition: transform .2s, border-color .2s;
}
.guide-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--acc) 50%, transparent); }
.guide-card img { width: 100%; height: 190px; object-fit: cover; }
.guide-card div { padding: 18px 20px 22px; }
.guide-card .kicker { color: var(--acc); }
.guide-card h2 { font-size: 1.2rem; font-weight: 700; margin: 6px 0 8px; line-height: 1.25; }
.guide-card p { color: var(--ink-dim); font-size: 0.9rem; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid rgba(255,255,255,0.06); margin-top: 40px;
  padding: 34px 24px; text-align: center; color: rgba(255,255,255,0.35); font-size: 0.78rem;
}
footer .flinks { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
footer a:hover { color: var(--ink); }
footer .devlink { margin-bottom: 20px; }
footer .devlink a { display: inline-block; }
footer .devlink img { height: 40px; width: auto; opacity: 0.8; }
footer .devlink p { margin-top: 9px; font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.3); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .more a { transition: none; }
}
