/* SparkForm website: shared styles. Dark, to sit with the black-studio renders; SparkForm green accent. */
:root {
  --bg: #0b0f0c;
  --surface: #131915;
  --surface-2: #1a221c;
  --border: #26302a;
  --text: #e6ebe7;
  --muted: #aab5ad;
  --accent: #43b049;
  --accent-strong: #5cc962;
  --accent-ink: #06210a;
  --teal: #2f6f78;
  --danger: #e5675f;
  --radius: 14px;
  --maxw: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--font);
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.eyebrow {
  display: inline-block; margin-bottom: .8rem;
  font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent);
}
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(56px, 9vw, 120px) 0; }
.section + .section { border-top: 1px solid var(--border); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 62ch; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  padding: .8em 1.4em; border-radius: 999px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-ink);
  font: 600 .95rem/1 var(--font); cursor: pointer; text-decoration: none;
  transition: background .15s, transform .15s;
}
.btn:hover { background: var(--accent-strong); text-decoration: none; transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent-strong); }
.btn[disabled] { opacity: .55; cursor: default; transform: none; }
.btn svg { width: 1.1em; height: 1.1em; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 1.5rem; height: 68px; }
.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 40px; width: auto; }
.brand-mark { display: none; }
.nav { display: flex; align-items: center; gap: .3rem; margin-left: auto; }
.nav a {
  padding: .5em .85em; border-radius: 999px; color: var(--muted);
  font-size: .93rem; font-weight: 500;
}
.nav a:hover { color: var(--text); text-decoration: none; background: var(--surface); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.nav .btn { margin-left: .5rem; padding: .6em 1.15em; }
.nav-toggle {
  display: none; margin-left: auto; background: none; border: 1px solid var(--border);
  color: var(--text); border-radius: 10px; width: 42px; height: 42px; cursor: pointer;
}
@media (max-width: 880px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: .5rem var(--gutter) 1rem; background: var(--bg); border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: .85em .6em; border-radius: 8px; }
  .nav .btn { margin: .6rem 0 0; justify-content: center; }
}

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0 40px; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: grid; gap: 2rem; grid-template-columns: 1.4fr repeat(3, 1fr); }
.site-footer h4 { color: var(--text); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 .8rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.site-footer .legal { grid-column: 1 / -1; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: .82rem; }
.site-footer .brand img { height: 34px; margin-bottom: .8rem; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } .site-footer .wrap > :first-child { grid-column: 1 / -1; } }

/* Hero */
.hero { position: relative; padding: clamp(40px, 7vw, 90px) 0 clamp(40px, 6vw, 80px); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 4vw, 64px); align-items: center; }
.hero-media { position: relative; justify-self: center; width: min(100%, 460px); }
.hero-media video {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
  /* the render's black studio fades into the page instead of ending in a hard box */
  -webkit-mask-image: radial-gradient(ellipse 70% 72% at 50% 48%, #000 62%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 72% at 50% 48%, #000 62%, transparent 100%);
}
.hero::before {
  content: ""; position: absolute; inset: auto -10% -40% 30%; height: 80%;
  background: radial-gradient(closest-side, rgba(67,176,73,.16), transparent);
  pointer-events: none;
}
.hero.wide .wrap { grid-template-columns: 1fr; text-align: center; }
.hero.wide .lead { margin: 0 auto; }
.hero.wide .actions { justify-content: center; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-media { width: min(100%, 360px); }
}
.tagline { color: var(--accent); }

/* Cards */
.grid { display: grid; gap: 20px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid.cols-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; display: flex; flex-direction: column;
}
.card h3 { margin-bottom: .4em; }
.card p { color: var(--muted); font-size: .97rem; }
.card .more { margin-top: auto; font-weight: 600; font-size: .93rem; }
a.card { color: inherit; transition: border-color .15s, transform .15s; }
a.card:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-2px); }
.card-media { margin: -26px -26px 20px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; background: #000; }
.card-media img, .card-media video { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.icon-dot {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(67,176,73,.12); color: var(--accent-strong); margin-bottom: 14px;
}
.icon-dot svg { width: 22px; height: 22px; }

/* Story rows: text beside a video, alternating */
.story { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.story + .story { margin-top: clamp(64px, 10vw, 128px); }
.story.flip .story-media { order: 2; }
.story-media { position: relative; border-radius: var(--radius); overflow: hidden; background: #000; border: 1px solid var(--border); }
.story-media video, .story-media img { width: 100%; height: auto; }
.story-media.portrait { max-width: 440px; justify-self: center; width: 100%; }
.story-text .num { font-size: .8rem; font-weight: 700; color: var(--accent); letter-spacing: .12em; }
.story-text ul { padding-left: 1.1em; color: var(--muted); }
.story-text li { margin: .3em 0; }
.story-text li::marker { color: var(--accent); }
@media (max-width: 820px) {
  .story { grid-template-columns: 1fr; }
  .story.flip .story-media { order: 0; }
}
.figure-wide { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: #000; }
.figure-wide video, .figure-wide img { width: 100%; }
.caption { font-size: .88rem; color: var(--muted); margin-top: .7rem; }

/* Video controls overlay: play/pause, since the loops autoplay muted */
.vid { position: relative; }
.vid-toggle {
  position: absolute; right: 12px; bottom: 12px; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.55); color: #fff;
  display: grid; place-items: center; cursor: pointer; opacity: .75; transition: opacity .15s;
}
.vid-toggle:hover, .vid-toggle:focus-visible { opacity: 1; }
.vid-toggle svg { width: 16px; height: 16px; }

/* Feature tiles (small loops in a grid) */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .tiles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr; } }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.tile video { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: #000; }
.tile-body { padding: 18px 20px 22px; }
.tile-body h3 { font-size: 1.08rem; margin-bottom: .3em; }
.tile-body p { color: var(--muted); font-size: .93rem; margin: 0; }

/* Stats strip */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.stat { background: var(--surface); padding: 22px 20px; }
.stat b { display: block; font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 600; color: var(--text); line-height: 1.1; }
.stat span { color: var(--muted); font-size: .88rem; }
@media (max-width: 760px) { .stats { grid-template-columns: 1fr 1fr; } }
.footnote { font-size: .8rem; color: var(--muted); margin-top: .7rem; }

/* Chapters (RootBeacon story) */
.chapters { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.chapters button {
  width: 100%; text-align: left; display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: start;
  padding: 14px 16px; border-radius: 12px; border: 1px solid transparent; background: transparent;
  color: var(--muted); font: inherit; cursor: pointer;
}
.chapters button:hover { background: var(--surface); color: var(--text); }
.chapters button.active { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.chapters .t { font-variant-numeric: tabular-nums; font-size: .82rem; color: var(--accent); padding-top: .2em; }
.chapters strong { display: block; color: var(--text); font-weight: 600; font-size: 1rem; }
.chapters span.d { font-size: .92rem; }
.progress { height: 3px; background: var(--border); border-radius: 3px; overflow: hidden; margin-top: 10px; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); }

/* Download panel */
.download {
  display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center;
  background: linear-gradient(135deg, var(--surface-2), var(--surface)); border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px); padding: 28px 32px;
}
.download img { width: 72px; height: 72px; border-radius: 16px; }
.download h3 { margin: 0 0 .2em; }
.download p { margin: 0; color: var(--muted); font-size: .95rem; }
@media (max-width: 700px) { .download { grid-template-columns: 1fr; text-align: left; } }
.stores { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; }
.store {
  display: inline-flex; align-items: center; gap: 12px; padding: 10px 18px 10px 14px;
  border: 1px solid var(--border); border-radius: 12px; background: #000; color: var(--text);
  min-width: 200px; position: relative;
}
.store svg { width: 26px; height: 26px; flex-shrink: 0; }
.store small { display: block; font-size: .7rem; color: var(--muted); line-height: 1.2; }
.store b { display: block; font-size: 1.05rem; font-weight: 600; line-height: 1.2; }
.store[aria-disabled="true"] { opacity: .7; cursor: default; }
.store[aria-disabled="true"]:hover { text-decoration: none; }
.badge {
  display: inline-block; padding: .25em .7em; border-radius: 999px; font-size: .72rem; font-weight: 600;
  letter-spacing: .04em; background: rgba(67,176,73,.14); color: var(--accent-strong); border: 1px solid rgba(67,176,73,.35);
}
.store .badge { position: absolute; top: -10px; right: -8px; background: var(--surface-2); }

/* Screens */
.screen { border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: #0f172a; box-shadow: 0 30px 60px -30px rgba(0,0,0,.8); }
.phone { width: min(100%, 260px); border-radius: 30px; border: 8px solid #1f2622; overflow: hidden; background: #000; box-shadow: 0 30px 60px -30px rgba(0,0,0,.8); }
.phones { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; }

/* Team */
.team { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 760px) { .team { grid-template-columns: 1fr; } }
.person { display: grid; grid-template-columns: 120px 1fr; gap: 22px; align-items: start; }
.person img, .person .avatar { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.person .avatar { display: grid; place-items: center; background: var(--surface-2); color: var(--accent-strong); font-size: 2.2rem; font-weight: 600; }
.person h3 { margin-bottom: .1em; }
.person .role { color: var(--accent); font-weight: 600; font-size: .9rem; margin-bottom: .8em; }
.person p { color: var(--muted); font-size: .95rem; }
@media (max-width: 480px) { .person { grid-template-columns: 1fr; } }

/* Testimonials */
.testimonials { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 760px) { .testimonials { grid-template-columns: 1fr; } }
.quote {
  margin: 0; padding: 32px 30px 26px; position: relative; display: flex; flex-direction: column; gap: 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.quote::before {
  content: "\201C"; position: absolute; top: 2px; left: 22px;
  font-size: 4.5rem; line-height: 1; color: var(--accent); opacity: .5;
}
.quote blockquote { margin: 0; padding-top: 18px; font-size: 1.08rem; line-height: 1.6; }
.quote figcaption { display: flex; align-items: center; gap: 14px; margin-top: auto; color: var(--muted); font-size: .9rem; }
.quote figcaption img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.quote figcaption b { display: block; color: var(--text); font-weight: 600; font-size: 1rem; }
[data-placeholder] { color: var(--muted); font-style: italic; }

/* Docs list */
.doc-list { display: grid; gap: 14px; }
.doc {
  display: grid; grid-template-columns: 48px 1fr auto; gap: 18px; align-items: center;
  padding: 20px 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.doc h3 { margin: 0 0 .15em; font-size: 1.08rem; }
.doc p { margin: 0; color: var(--muted); font-size: .93rem; }
@media (max-width: 600px) { .doc { grid-template-columns: 40px 1fr; } .doc > :last-child { grid-column: 1 / -1; } }

/* Contact dialog */
dialog.contact {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0;
  border: 1px solid var(--border); border-radius: 18px; background: var(--surface); color: var(--text);
  box-shadow: 0 40px 120px rgba(0,0,0,.6);
}
dialog.contact::backdrop { background: rgba(0,0,0,.65); backdrop-filter: blur(3px); }
.contact form { padding: 28px 28px 24px; display: grid; gap: 14px; }
.contact header { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.contact header h2 { font-size: 1.5rem; margin: 0; }
.contact header p { margin: .3em 0 0; color: var(--muted); font-size: .93rem; }
.contact .close { background: none; border: none; color: var(--muted); cursor: pointer; padding: 4px; border-radius: 8px; }
.contact .close:hover { color: var(--text); background: var(--surface-2); }
.field { display: grid; gap: 6px; }
.field label { font-size: .85rem; font-weight: 600; }
.field label small { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  width: 100%; padding: .75em .9em; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font: inherit; font-size: .97rem;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .row-2 { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-size: .92rem; min-height: 1.4em; margin: 0; }
.form-status.ok { color: var(--accent-strong); }
.form-status.err { color: var(--danger); }

/* Notice ribbon (pre-release) */
.notice { font-size: .85rem; text-align: center; padding: .55em var(--gutter); background: var(--surface); border-bottom: 1px solid var(--border); color: var(--muted); }
.notice b { color: var(--accent-strong); font-weight: 600; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
