/*
 * CloudMicroscope website
 * Colours come straight from the Android app (res/values/colors.xml, "neon pixel theme").
 * Pixel font (Silkscreen, the same font the app uses) for brand moments, Inter for reading.
 */

:root {
  /* app: pixel_bg, pixel_panel, pixel_button, pixel_border */
  --bg: #070a10;
  --panel: #0d131c;
  --panel-raised: #121a25;
  --border: #22323f;
  --border-soft: #22323f80;

  /* app: pixel_accent, pixel_accent_dim, pixel_on_accent */
  --accent: #3df5e0;
  --accent-dim: #1f7a72;
  --accent-glow: #3df5e033;
  --on-accent: #04120f;

  /* app: pixel_text; muted is lifted from pixel_text_muted for readable body copy */
  --text: #d7e3ea;
  --text-muted: #8fa3b3;
  --text-faint: #5f7383;

  --font-pixel: "Silkscreen", ui-monospace, monospace;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 14px;
  --radius-lg: 22px;
  --wrap: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--bg); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background:
    radial-gradient(circle at 1px 1px, #ffffff0a 1px, transparent 0) 0 0 / 24px 24px,
    var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 400 13px/1 var(--font-pixel); letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before { content: ""; width: 8px; height: 8px; background: var(--accent); box-shadow: 0 0 12px var(--accent); }

h1, h2, h3 { color: #fff; margin: 0; letter-spacing: -0.02em; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); line-height: 1.15; font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; }
.lede { color: var(--text-muted); font-size: 1.125rem; max-width: 600px; margin: 0; }

section { padding: 112px 0; }
@media (max-width: 800px) { section { padding: 80px 0; } }
.section-head { display: grid; gap: 16px; margin-bottom: 56px; }
.section-head.center { justify-items: center; text-align: center; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 14px 22px; border-radius: 12px;
  font: 600 16px/1 var(--font-body); color: var(--text);
  background: var(--panel-raised); border: 1px solid var(--border);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { text-decoration: none; border-color: var(--accent-dim); transform: translateY(-1px); }
.btn:focus-visible, .faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn svg { width: 20px; height: 20px; flex: none; }

.btn-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); box-shadow: 0 8px 32px -8px var(--accent); }
.btn-primary:hover { background: #6ff8e9; border-color: #6ff8e9; box-shadow: 0 10px 40px -8px var(--accent); }

.btn-play { padding: 10px 22px 10px 18px; }
.btn-play span { display: grid; gap: 3px; text-align: left; }
.btn-play small { font-size: 11px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; opacity: .75; }
.btn-play strong { font-size: 18px; font-weight: 700; }
.btn-play svg { width: 26px; height: 26px; }

/* ---------- Nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: #070a10cc; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; font: 700 15px/1 var(--font-pixel); letter-spacing: 0.08em; text-transform: uppercase; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; image-rendering: pixelated; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a:not(.btn) { color: var(--text-muted); font-size: 15px; font-weight: 500; }
.nav-links a:not(.btn):hover { color: #fff; text-decoration: none; }
.nav-links .btn { padding: 10px 16px; font-size: 14px; white-space: nowrap; }
@media (max-width: 760px) { .nav-links a:not(.btn) { display: none; } }
@media (max-width: 420px) {
  .brand { gap: 8px; font-size: 12px; }
  .brand img { width: 24px; height: 24px; }
  .nav-links .btn { padding: 9px 12px; font-size: 13px; }
}

/* ---------- Hero ---------- */

.hero { position: relative; padding: 88px 0 120px; }
.hero::before {
  content: ""; position: absolute; inset: -120px 0 auto; height: 760px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 380px at 78% 30%, #3df5e01f, transparent 70%),
    radial-gradient(500px 300px at 10% 0%, #1f7a7226, transparent 70%);
}
.hero .wrap { display: grid; grid-template-columns: 1fr 1.15fr; gap: 64px; align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 5.4vw, 4rem); line-height: 1.02; font-weight: 800; letter-spacing: -0.035em; margin: 22px 0; }
.hero h1 em { font-style: normal; color: var(--accent); text-shadow: 0 0 40px #3df5e066; }
.hero .lede { margin-bottom: 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 28px 0 0; padding: 0; list-style: none; color: var(--text-faint); font-size: 14px; }
.hero-meta li { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta svg { width: 16px; height: 16px; color: var(--accent); }

@media (max-width: 960px) {
  .hero { padding: 56px 0 88px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 56px; }
}

/* Device composition: a browser window showing the stream, with the phone in front */
.showcase { position: relative; padding-bottom: 48px; }
.browser {
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--panel); border: 1px solid var(--border);
  box-shadow: 0 40px 80px -24px #000000cc, 0 0 0 1px #ffffff08, 0 0 80px -20px var(--accent-glow);
}
.browser-bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: var(--panel-raised); border-bottom: 1px solid var(--border); }
.browser-dots { display: flex; gap: 7px; }
.browser-dots i { width: 11px; height: 11px; border-radius: 50%; background: #2a3a48; }
.browser-url {
  flex: 1; max-width: 300px; margin: 0 auto; padding: 6px 14px; border-radius: 8px;
  background: var(--bg); color: var(--text-muted); font: 500 13px/1.2 ui-monospace, monospace; text-align: center;
}
.browser-view { position: relative; aspect-ratio: 16 / 10; background: #000; }
.browser-view img { width: 100%; height: 100%; object-fit: cover; }

/* Mirrors the real controls overlay of the stream page */
.stream-controls {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px;
  background: #0d131ccc; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid #ffffff14; white-space: nowrap;
  font: 400 11px/1 var(--font-pixel); letter-spacing: 0.08em; color: var(--accent);
}
.stream-controls .bar { width: 72px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--accent) 45%, #2a3a48 45%); }
.stream-controls .chip { padding: 6px 9px; border-radius: 6px; border: 1px solid #ffffff1f; color: var(--text); }
.stream-controls .chip.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.focus-ring {
  position: absolute; left: 51%; top: 52%; width: 64px; height: 64px; transform: translate(-50%, -50%);
  border: 2px solid var(--accent); border-radius: 10px; box-shadow: 0 0 24px var(--accent-glow);
  animation: focus 3.2s ease-in-out infinite;
}
@keyframes focus { 0%, 100% { transform: translate(-50%, -50%) scale(1.25); opacity: 0; } 20%, 70% { transform: translate(-50%, -50%) scale(1); opacity: 1; } }

.live-badge {
  position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 8px; background: #070a10b3; color: #fff;
  font: 400 11px/1 var(--font-pixel); letter-spacing: 0.1em;
}
.live-badge::before { content: ""; width: 8px; height: 8px; background: #ff4d5e; border-radius: 50%; box-shadow: 0 0 10px #ff4d5e; animation: blink 1.6s steps(2) infinite; }
@keyframes blink { 50% { opacity: .3; } }

.phone {
  position: absolute; right: -14px; bottom: 0; width: 30%; min-width: 150px;
  padding: 7px; border-radius: 30px; background: #05070b;
  border: 1px solid #2a3a48; box-shadow: 0 30px 60px -12px #000, 0 0 0 1px #ffffff0a;
}
.phone img { width: 100%; height: auto; border-radius: 24px; aspect-ratio: 9 / 16; object-fit: cover; object-position: top; }
@media (max-width: 600px) {
  .phone { right: -4px; width: 34%; min-width: 0; border-radius: 22px; padding: 5px; }
  .phone img { border-radius: 18px; }
  .stream-controls { display: none; }
}

/* ---------- Stats strip ---------- */

.stats { padding: 0; }
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: #0d131c99; overflow: hidden;
}
.stat { padding: 28px 24px; text-align: center; border-left: 1px solid var(--border); }
.stat:first-child { border-left: 0; }
.stat b { display: block; margin-bottom: 6px; color: var(--accent); font: 400 clamp(1.4rem, 3vw, 2rem)/1.1 var(--font-pixel); letter-spacing: 0.02em; }
.stat span { color: var(--text-muted); font-size: 14px; }
@media (max-width: 720px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
}

/* ---------- Demo video ---------- */

.video-frame {
  max-width: 1040px; margin: 0 auto; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border); background: #000;
  box-shadow: 0 40px 80px -24px #000000cc, 0 0 80px -20px var(--accent-glow);
}
.video-frame video { display: block; width: 100%; height: auto; }

/* ---------- Features ---------- */

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 960px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }
.card {
  position: relative; padding: 28px; border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #121a25, #0d131c); border: 1px solid var(--border);
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--accent-dim); transform: translateY(-2px); }
.icon-tile {
  display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 20px; border-radius: 12px;
  background: #3df5e014; border: 1px solid #3df5e033; color: var(--accent);
}
.icon-tile svg { width: 22px; height: 22px; }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; color: var(--text-muted); font-size: 15.5px; }
.card .tag { position: absolute; top: 24px; right: 24px; padding: 5px 8px; border-radius: 6px; background: var(--accent); color: var(--on-accent); font: 400 10px/1 var(--font-pixel); letter-spacing: 0.1em; }

/* ---------- Split (phone app section) ---------- */

.split { display: grid; grid-template-columns: 0.8fr 1fr; gap: 80px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 48px; } }
.split-media { display: grid; place-items: center; position: relative; isolation: isolate; }
.split-media::before { content: ""; position: absolute; width: 80%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(#3df5e026, transparent 65%); z-index: -1; }
.split-media .phone { position: static; width: min(320px, 78%); }
.checklist { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 18px; }
.checklist li { display: grid; grid-template-columns: 28px 1fr; gap: 14px; }
.checklist svg { width: 22px; height: 22px; margin-top: 3px; color: var(--accent); }
.checklist b { color: #fff; font-weight: 600; }
.checklist span { color: var(--text-muted); }

/* ---------- Steps ---------- */

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { padding: 32px 28px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: #0d131c99; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  display: block; margin-bottom: 18px; color: var(--accent); font: 400 28px/1 var(--font-pixel);
}
.step h3 { margin-bottom: 8px; }
.step p { margin: 0; color: var(--text-muted); font-size: 15.5px; }
.step code { padding: 3px 8px; border-radius: 6px; background: var(--bg); border: 1px solid var(--border); color: var(--accent); font: 500 14px/1.6 ui-monospace, monospace; white-space: nowrap; }

/* ---------- Privacy band ---------- */

.privacy-band {
  display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center;
  padding: 44px; border-radius: var(--radius-lg);
  background: radial-gradient(400px 200px at 0% 0%, #3df5e01a, transparent 70%), var(--panel);
  border: 1px solid var(--border);
}
.privacy-band .icon-tile { width: 72px; height: 72px; margin: 0; border-radius: 18px; }
.privacy-band .icon-tile svg { width: 34px; height: 34px; }
.privacy-band h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 10px; }
.privacy-band p { margin: 0; color: var(--text-muted); }
@media (max-width: 700px) { .privacy-band { grid-template-columns: 1fr; padding: 32px 24px; } }

/* ---------- FAQ ---------- */

.faq { max-width: 780px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { border: 1px solid var(--border); border-radius: var(--radius); background: #0d131c99; transition: border-color .2s ease; }
.faq details[open] { border-color: var(--accent-dim); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 24px; cursor: pointer; list-style: none; color: #fff; font-weight: 600; border-radius: var(--radius); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; color: var(--accent); font: 400 20px/1 var(--font-pixel); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0; padding: 0 24px 22px; color: var(--text-muted); }

/* ---------- CTA + footer ---------- */

.cta { text-align: center; padding-top: 0; }
.cta-box {
  padding: 80px 32px; border-radius: 28px; border: 1px solid #3df5e033;
  background: radial-gradient(600px 300px at 50% 0%, #3df5e026, transparent 70%), var(--panel);
}
.cta-box > img { width: 72px; height: 72px; margin: 0 auto 28px; image-rendering: pixelated; filter: drop-shadow(0 0 24px #3df5e066); }
.cta-box .lede { margin: 16px auto 36px; }
@media (max-width: 600px) { .cta-box { padding: 56px 20px; } }

footer { padding: 40px 0 56px; border-top: 1px solid var(--border-soft); color: var(--text-faint); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
footer nav { display: flex; flex-wrap: wrap; gap: 24px; }
footer a { color: var(--text-muted); }

/* Gentle fade-up for the hero on load */
.reveal { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.reveal.d1 { animation-delay: .08s; }
.reveal.d2 { animation-delay: .16s; }
.reveal.d3 { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .reveal, .focus-ring, .live-badge::before { animation: none; }
  .card, .btn { transition: none; }
}
