/* Fractal FX website. One stylesheet for every page.
   Dark only, like the app: black ground, near-white type, the app's green (#00ff88) for actions. */

:root {
  --bg: #050607;
  --bg-2: #0a0c0e;
  --surface: #0f1215;
  --surface-2: #161a1e;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.18);
  --text: #eef2f0;
  --text-2: #b9c2be;
  --muted: #8b9591;
  --accent: #00ff88;
  --accent-ink: #00180c;
  --accent-soft: rgba(0, 255, 136, 0.12);
  --todo: #ffcf5a;
  --radius: 16px;
  --wrap: 1120px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", "Cascadia Code", Consolas, "SFMono-Regular", Menlo, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16.5px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -0.015em; margin: 0; text-wrap: balance; }
p { margin: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left, 0px)); }
.eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.small { font-size: 14px; color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Placeholder text the owner fills in (tools/fill-legal.ps1). Loud on purpose. */
.todo { color: var(--todo); background: rgba(255, 207, 90, 0.12); outline: 1px dashed rgba(255, 207, 90, 0.6); border-radius: 4px; padding: 0 0.25em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 46px; padding: 0.7em 1.35em; border-radius: 999px;
  font: 650 15.5px/1.2 var(--font); letter-spacing: 0.01em; text-decoration: none; white-space: nowrap;
  color: var(--text); background: transparent; border: 1px solid var(--line-2);
  cursor: pointer; transition: background-color 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:hover { border-color: var(--text-2); background: rgba(255, 255, 255, 0.04); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #3dffa3; border-color: #3dffa3; }
.btn-sm { min-height: 38px; padding: 0.45em 1em; font-size: 14.5px; }
.btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-primary[aria-disabled="true"] { background: var(--surface-2); border-color: var(--line-2); color: var(--text-2); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.buy-error { font-size: 14px; color: #ff8f8f; min-height: 1.4em; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(5, 6, 7, 0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.top-in { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; flex: none; padding: 6px 0; }
.brand img { height: 19px; width: auto; }
.nav { display: flex; gap: 22px; margin-left: auto; }
/* The header's Download button (to the download section), on the right. */
.top-cta { margin-left: auto; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
.nav a { color: var(--text-2); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
@media (max-width: 720px) {
  .nav { gap: 16px; }
  .nav .nav-wide { display: none; }
}
@media (max-width: 420px) {
  .top-in { gap: 12px; }
  .brand img { height: 15px; }
  .nav { gap: 12px; }
  .nav a { font-size: 14px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 0 56px; }
.hero::before {
  content: ""; position: absolute; inset: -20% 0 auto 0; height: 760px; pointer-events: none;
  background: radial-gradient(60% 50% at 70% 35%, rgba(0, 255, 136, 0.10), transparent 70%);
}
.hero-in { position: relative; display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.3rem); font-weight: 700; margin-top: 14px; }
.hero .lede { margin-top: 20px; font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--text-2); max-width: 36em; }
.hero .btn-row { margin-top: 30px; }
.hero .fine { margin-top: 14px; font-size: 14px; color: var(--muted); }
@media (max-width: 880px) {
  .hero { padding: 40px 0 36px; }
  .hero-in { grid-template-columns: 1fr; gap: 36px; }
}

/* The informative home page (before launch): the hero's words alone, no picture beside them. */
.hero-solo { padding: 96px 0 40px; }
.hero-solo::before { background: radial-gradient(50% 55% at 26% 42%, rgba(0, 255, 136, 0.10), transparent 70%); }
.hero-solo .hero-in { grid-template-columns: minmax(0, 1fr); }
.hero-solo h1 { margin-top: 0; max-width: 15em; }
.hero-solo .lede { max-width: 40em; }
@media (max-width: 880px) { .hero-solo { padding: 48px 0 16px; } }
/* The feature boxes follow the hero straight away (no section heading above them). */
.hero-solo + .section { padding-top: 32px; }

/* The showreel slot: a still until a video is set in config.js (showreel). */
.reel {
  position: relative; margin: 0; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  background: #000; border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 255, 136, 0.05);
}
.reel img, .reel video { width: 100%; height: 100%; object-fit: cover; }
.reel::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.7); }

/* ---------- Facts strip ---------- */
.facts { border-block: 1px solid var(--line); background: var(--bg-2); }
.facts ul { list-style: none; margin: 0; padding: 18px 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 24px; }
.facts li { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; color: var(--text-2); }
.facts li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); flex: none; }
@media (max-width: 880px) { .facts ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .facts ul { grid-template-columns: 1fr; } }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section + .section { padding-top: 24px; }
.section-head { max-width: 46em; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 700; margin-top: 10px; }
.section-head p { margin-top: 14px; color: var(--text-2); font-size: 1.06rem; }
@media (max-width: 600px) { .section { padding: 56px 0; } }

.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 24px; }
.feature h3 { font-size: 1.08rem; font-weight: 650; letter-spacing: 0; }
.feature h3::before { content: ""; display: block; width: 22px; height: 3px; border-radius: 2px; background: var(--accent); margin-bottom: 14px; }
.feature p { margin-top: 8px; color: var(--text-2); font-size: 15px; }
@media (max-width: 1000px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.gallery figure { margin: 0; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.gallery figure:hover img { transform: scale(1.04); }
@media (max-width: 560px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }

/* Screenshot slots: hidden until real screenshots are added (see README). */
.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.shots figure { margin: 0; }
.shots img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.shots figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }
@media (max-width: 760px) { .shots { grid-template-columns: 1fr; } }

/* ---------- Pricing ---------- */
.pricing { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
@media (max-width: 880px) { .pricing { grid-template-columns: 1fr; } }
.price-card {
  position: relative; background: linear-gradient(180deg, rgba(0, 255, 136, 0.07), rgba(0, 255, 136, 0) 45%), var(--surface);
  border: 1px solid rgba(0, 255, 136, 0.35); border-radius: 20px; padding: 30px 30px 28px;
}
.price-card h3 { font-size: 1.15rem; font-weight: 650; }
.price { display: flex; align-items: baseline; gap: 14px; margin-top: 14px; }
.price-now { font: 700 clamp(3rem, 7vw, 4.2rem)/1 var(--font-display); letter-spacing: -0.03em; }
.price-was { font-size: 1.6rem; color: var(--muted); }
.badge {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 5px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 13.5px; font-weight: 650; letter-spacing: 0.02em;
}
.price-card .terms { margin-top: 10px; color: var(--text-2); font-size: 15px; }
.ticks { list-style: none; margin: 22px 0 26px; padding: 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 12px; color: var(--text); font-size: 15.5px; }
.ticks li::before {
  content: ""; flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3L15 6.8' fill='none' stroke='%2300180c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.price-card .btn-row .btn { flex: 1 1 200px; }
.price-card .small { margin-top: 16px; }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 30px; }
.side-card h3 { font-size: 1.15rem; font-weight: 650; }
.side-card ul { margin: 16px 0 0; padding-left: 1.1em; color: var(--text-2); display: grid; gap: 8px; }
.side-card p { margin-top: 14px; color: var(--text-2); }

/* The launch price shows while launch copies are left; the regular price after (site.js sets .launch-over on <html>). */
html:not(.launch-over) .when-regular { display: none !important; }
.launch-over .when-launch { display: none !important; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; max-width: 860px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 54px 18px 22px; position: relative;
  font-weight: 650; font-size: 1.02rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 22px; top: 50%; width: 12px; height: 12px; margin-top: -6px;
  background: linear-gradient(var(--accent), var(--accent)) center / 12px 2px no-repeat, linear-gradient(var(--accent), var(--accent)) center / 2px 12px no-repeat;
  transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 22px 20px; color: var(--text-2); }
.faq details > div p + p { margin-top: 10px; }

/* ---------- Download / thanks / key pages ---------- */
.page { padding: 64px 0 88px; }
.page-head { max-width: 44em; }
.page-head h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); font-weight: 700; margin-top: 10px; }
.page-head p { margin-top: 14px; color: var(--text-2); font-size: 1.08rem; }
.panel { margin-top: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 28px; max-width: 760px; }
.panel h2 { font-size: 1.25rem; font-weight: 650; }
.panel > * + * { margin-top: 14px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--text-2); font-size: 15px; }
.meta strong { color: var(--text); font-weight: 650; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: 14px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 32px 1fr; gap: 12px; color: var(--text-2); }
.steps li::before {
  content: counter(step); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 14px; color: var(--accent-ink); background: var(--accent);
}
.steps strong { color: var(--text); }
.notes { white-space: pre-line; color: var(--text-2); }
.plain-list { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; color: var(--text-2); font-size: 15px; }

.keybox {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  padding: 18px 20px; border-radius: 14px; background: #000; border: 1px solid rgba(0, 255, 136, 0.45);
}
.keybox code { font: 600 clamp(1.05rem, 3.4vw, 1.5rem)/1.3 var(--mono); letter-spacing: 0.06em; color: var(--accent); word-break: break-all; flex: 1 1 260px; }

/* One of several states is shown at a time: [data-state] on the container picks it. */
[data-state] > [data-when] { display: none; }
[data-state="loading"] > [data-when="loading"],
[data-state="key"] > [data-when="key"],
[data-state="later"] > [data-when="later"],
[data-state="missing"] > [data-when="missing"],
[data-state="expired"] > [data-when="expired"],
[data-state="form"] > [data-when="form"],
[data-state="sent"] > [data-when="sent"] { display: block; }

.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin 0.9s linear infinite; display: inline-block; vertical-align: -5px; margin-right: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }

.field { display: grid; gap: 8px; }
.field label { font-weight: 600; }
.field input {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px;
  font: 500 16px var(--font); color: var(--text); background: #000; border: 1px solid var(--line-2);
}
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- Legal pages ---------- */
.prose { max-width: 72ch; }
.prose h1 { font-size: clamp(2rem, 4.6vw, 2.8rem); font-weight: 700; margin-top: 10px; }
.prose .updated { margin-top: 10px; color: var(--muted); font-size: 14.5px; }
.prose h2 { font-size: 1.3rem; font-weight: 650; margin-top: 40px; }
.prose p, .prose ul, .prose ol { margin-top: 14px; color: var(--text-2); }
.prose ul, .prose ol { padding-left: 1.25em; display: grid; gap: 6px; }
.prose strong { color: var(--text); }
.prose .callout { margin-top: 22px; padding: 16px 18px; border-radius: 12px; background: var(--accent-soft); color: var(--text); border: 1px solid rgba(0, 255, 136, 0.3); }
.prose table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 15px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); color: var(--text-2); }
.prose th { color: var(--text); font-weight: 650; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); background: var(--bg-2); padding: 40px 0 calc(40px + env(safe-area-inset-bottom, 0px)); }
.foot-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 40px; align-items: start; }
.foot-in > div > * + * { margin-top: 10px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: flex-end; }
.foot nav a { color: var(--text-2); text-decoration: none; font-size: 14.5px; }
.foot nav a:hover { color: var(--text); text-decoration: underline; }
.foot .brand-sm { height: 15px; width: auto; }
@media (max-width: 720px) {
  .foot-in { grid-template-columns: 1fr; }
  .foot nav { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
