/* Spectryse website. Plain CSS, no build step, no web fonts.
   Design system follows the PanoRyse site (same layout, components and accessibility patterns).
   Colours come from the Spectryse icon: charcoal background, a spectrum from blue to orange,
   and a red playhead. Dark by default; a light theme follows prefers-color-scheme. */

:root {
  --canvas: #111317;
  --panel: #181b20;
  --card: #22262d;
  --border: #2a2f38;
  --rule: #3a404b;
  --text: #e4e7ec;
  --muted: #9aa3b1;
  --heading: #f7f8fa;
  --accent: #f5a54a;          /* links and highlights: icon orange, lightened for contrast */
  --accent-strong: #f59a2e;   /* primary buttons */
  --accent-ink: #1a1206;      /* text on orange */
  --blue: #5b9bef;            /* icon blue, lightened for contrast */
  --playhead: #e5483b;
  --success: #34c38f;
  --warning: #f5b84a;
  --spectrum: linear-gradient(90deg, #3b7dd8 0%, #9a8a7a 50%, #f59a2e 100%);
  --code-bg: #0d0f13;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  --radius: 12px;
  --max: 1160px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, "Liberation Mono", Menlo, monospace;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --canvas: #f7f7f8;
    --panel: #ffffff;
    --card: #f0f1f3;
    --border: #d5d8de;
    --rule: #e3e5e9;
    --text: #1f232a;
    --muted: #4b5361;
    --heading: #0f1216;
    --accent: #b4540a;
    --accent-strong: #f59a2e;
    --accent-ink: #1a1206;
    --blue: #1d5fc4;
    --success: #047857;
    --warning: #9a5a06;
    --code-bg: #eef0f3;
    --shadow: 0 8px 24px rgba(15, 18, 22, 0.12);
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img, svg { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-strong); }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3, h4 { color: var(--heading); line-height: 1.2; margin: 1.6em 0 0.5em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); letter-spacing: -0.02em; margin-top: 0; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

code, kbd, pre { font-family: var(--mono); font-size: 0.9em; }
code { background: var(--code-bg); border: 1px solid var(--border); border-radius: 5px; padding: 0.05em 0.35em; }
kbd { background: var(--card); border: 1px solid var(--rule); border-bottom-width: 2px; border-radius: 4px; padding: 0.05em 0.4em; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent-strong); color: var(--accent-ink); padding: 0.6em 1em; z-index: 100; font-weight: 600; }
.skip-link:focus { left: 1em; top: 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--spectrum); opacity: 0.7; }
.site-header .wrap { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--heading); text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 0.25rem; }
.nav a { color: var(--text); text-decoration: none; padding: 0.45em 0.75em; border-radius: 8px; font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--card); color: var(--heading); }
.nav a.btn-primary, .nav a.btn-primary:hover { color: var(--accent-ink); }
.nav a.btn-primary[aria-current="page"] { background: var(--accent); }
.nav .btn { margin-left: 0.4rem; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 0.4em 0.7em; font: inherit; cursor: pointer; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--panel); border-bottom: 1px solid var(--border); padding: 0.5rem 1rem 1rem; }
  .nav.open { display: flex; }
  .nav .btn { margin: 0.5rem 0 0; text-align: center; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  padding: 0.7em 1.25em; border-radius: 10px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; font: inherit; font-weight: 600;
}
.btn-primary { background: var(--accent-strong); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { border-color: var(--rule); color: var(--heading); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-small { padding: 0.45em 0.9em; font-size: 0.9rem; }

/* Hero: always dark, like the icon */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(ellipse at 18% 30%, rgba(59, 125, 216, 0.28) 0%, rgba(59, 125, 216, 0) 50%),
    radial-gradient(ellipse at 85% 25%, rgba(245, 154, 46, 0.22) 0%, rgba(245, 154, 46, 0) 50%),
    linear-gradient(180deg, #16181c 0%, #111317 100%);
  color: #e4e7ec;
  padding: clamp(4rem, 11vw, 8rem) 0 clamp(9rem, 20vw, 14rem);
}
.hero-art { position: absolute; left: 0; right: 0; bottom: 0; height: clamp(160px, 30vw, 340px); width: 100%; object-fit: cover; object-position: center bottom; opacity: 0.55; pointer-events: none; }
.hero .wrap { position: relative; }
.hero h1 { color: #fff; max-width: 17ch; }
.hero .grad { background: linear-gradient(90deg, #6aa5f2 0%, #d9b48a 55%, #f59a2e 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede { font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 42rem; color: #d6dae1; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.75rem 0 1rem; }
.hero .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.45); }
.hero .btn-ghost:hover { border-color: #f5a54a; color: #f5a54a; }
.hero .note { font-size: 0.95rem; color: #b9c0cb; }
.pill { display: inline-block; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; padding: 0.3em 0.75em; border-radius: 999px; border: 1px solid rgba(245, 154, 46, 0.6); color: #f8c183; background: rgba(17, 19, 23, 0.6); margin-bottom: 1rem; }

/* Sections */
.section { padding: clamp(3rem, 8vw, 6rem) 0; border-top: 1px solid var(--border); }
.section:first-of-type { border-top: 0; }
.section-head { display: grid; grid-template-columns: auto 1fr; gap: 0 1.25rem; align-items: baseline; margin-bottom: 2rem; }
.section-num { font-family: var(--mono); color: var(--accent); font-size: clamp(1.4rem, 3vw, 2.2rem); font-weight: 700; }
.section-head h2 { margin: 0; }
.section-head p { grid-column: 2; color: var(--muted); margin: 0.6rem 0 0; max-width: 46rem; }
@media (max-width: 600px) { .section-head { grid-template-columns: 1fr; } .section-head p { grid-column: 1; } }

.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.split > * { min-width: 0; }
.split.reverse > :first-child { order: 2; }
@media (max-width: 900px) { .split, .split.reverse { grid-template-columns: 1fr; } .split.reverse > :first-child { order: 0; } }

.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.9rem; }
.feature-list li { padding-left: 1.6rem; position: relative; }
.feature-list li::before { content: ""; position: absolute; left: 0.2rem; top: 0.6em; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--spectrum); }
.feature-list strong { color: var(--heading); }

figure { margin: 0; }
figcaption { font-size: 0.9rem; color: var(--muted); padding: 0.6rem 0.2rem 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.4rem; min-width: 0; }
.card h3 { margin-top: 0; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.card ul { padding-left: 1.1rem; }
.card.link-card { text-decoration: none; color: var(--text); display: block; transition: border-color 0.15s, transform 0.15s; }
.card.link-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card .eyebrow { display: block; font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue); margin-bottom: 0.4rem; }
.audience .card { position: relative; overflow: hidden; }
.audience .card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--spectrum); }

.badge { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 0.15em 0.6em; border-radius: 999px; vertical-align: middle; border: 1px solid; }
.badge-soon { color: var(--warning); border-color: var(--warning); }

/* Steps (how it works) */
.steps-row { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; counter-reset: step; }
.steps-row li { counter-increment: step; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.2rem; min-width: 0; }
.steps-row li::before { content: "0" counter(step); display: block; font-family: var(--mono); font-weight: 700; color: var(--accent); margin-bottom: 0.3rem; }
.steps-row strong { display: block; color: var(--heading); margin-bottom: 0.25rem; }
.steps-row p { margin: 0; font-size: 0.95rem; color: var(--muted); }

/* Screenshots and the demo video: real captures from the app (see images/SOURCES.md). */
.shot img, .demo video, .demo img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); background: #14161a; }
.demo { max-width: 1100px; margin: 0 auto; }

/* Pricing */
.pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; align-items: stretch; }
.plan { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; display: flex; flex-direction: column; }
.plan.featured { border-color: var(--accent); }
.plan h2, .plan h3 { margin: 0 0 0.25rem; font-size: 1.2rem; }
.price { font-size: 1.6rem; font-weight: 800; color: var(--heading); margin: 0.4rem 0 0; }
.plan ul { padding-left: 1.1rem; margin: 1rem 0; flex: 1; }
.plan li { margin-bottom: 0.35rem; }

.callout { border-left: 4px solid var(--accent); background: var(--panel); border-radius: 0 10px 10px 0; padding: 1rem 1.25rem; margin: 1.25rem 0; }
.callout.soon { border-left-color: var(--warning); }
.callout.info { border-left-color: var(--blue); }
.callout p:last-child { margin-bottom: 0; }

table { border-collapse: collapse; width: 100%; margin: 1rem 0 1.5rem; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { color: var(--heading); background: var(--panel); }
.table-scroll { overflow-x: auto; }

details { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 0.9rem 1.2rem; margin-bottom: 0.75rem; }
details summary { cursor: pointer; font-weight: 600; color: var(--heading); }
details[open] summary { margin-bottom: 0.6rem; }
details p:last-child, details ul:last-child { margin-bottom: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--panel); padding: 2.5rem 0; margin-top: 3rem; font-size: 0.92rem; color: var(--muted); }
.site-footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.5rem; }
.site-footer h2 { margin: 0 0 0.6rem; font-size: 0.95rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.35rem; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.site-footer .contact-email { color: var(--accent); }
.site-footer .legal { margin-top: 2rem; border-top: 1px solid var(--border); padding-top: 1.25rem; }
.site-footer .legal p { margin: 0 0 0.3rem; }

.page-head { padding: clamp(2.5rem, 7vw, 4.5rem) 0 1.5rem; background: linear-gradient(180deg, var(--panel), var(--canvas)); border-bottom: 1px solid var(--border); }
.page-head p { color: var(--muted); max-width: 44rem; font-size: 1.1rem; }
.prose { max-width: 48rem; }

/* Docs-style layout (features page) */
.docs { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 2.5rem; padding-top: 2rem; padding-bottom: 2rem; }
.docs-sidebar { position: sticky; top: 80px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto; padding-right: 0.5rem; }
.docs-sidebar h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0.4rem 0 0.4rem; }
.docs-sidebar ol { list-style: none; margin: 0; padding: 0; }
.docs-sidebar a { display: block; padding: 0.35em 0.7em; border-radius: 7px; color: var(--text); text-decoration: none; font-size: 0.95rem; }
.docs-sidebar a:hover { background: var(--card); color: var(--accent); }
.docs-content { min-width: 0; }
.docs-content > section { scroll-margin-top: 80px; }
.docs-content h2 { border-top: 1px solid var(--border); padding-top: 1.2rem; }
.docs-content > section:first-child h2 { border-top: 0; padding-top: 0; margin-top: 0; }
.docs-content figure { margin: 1.25rem 0 1.75rem; }
.docs-toggle { display: none; }
@media (max-width: 900px) {
  .docs { grid-template-columns: 1fr; gap: 1rem; }
  .docs-sidebar { position: static; max-height: none; border: 1px solid var(--border); border-radius: 10px; padding: 0.75rem; background: var(--panel); }
  .docs-toggle { display: inline-block; margin-bottom: 0.5rem; }
  .docs-sidebar nav.collapsed { display: none; }
}

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.center { text-align: center; }
.muted { color: var(--muted); }
