/* Open Cinescript site — one stylesheet, no external requests.
   The palette IS the app's: the screening-room tokens from the app's
   index.css (cool ink #0a0c10, surfaces #12151b/#1b1f27, blue #2B61FF
   accent, teal reserved for the screenplay-slug motif, and the
   Write/Plan/Make/Cut phase quartet). Inter is self-hosted below —
   the same OFL-licensed files the app ships — so the site keeps its
   no-third-party-requests pledge. */

/* Inter — the app's UI face, self-hosted (see assets/fonts/inter/OFL.txt).
   unicode-range values match the app's own fonts.css. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #0a0c10;              /* app --bg: cool ink */
  --surface: #12151b;         /* app --surface */
  --surface-raised: #1b1f27;  /* app --surface-raised */
  --border: #2a2f3a;          /* app --border-color */
  --border-soft: #1b1f27;     /* section hairlines */
  --border-strong: #3a4150;
  --ink: #F4F2EE;             /* app --text: warm white */
  --ink-muted: #C3C7CF;       /* app --fg2 */
  --ink-faint: #8B919C;       /* app --fg3 */
  --ink-dim: #5C636F;         /* app --fg-muted */
  --blue: #2B61FF;            /* app --accent */
  --blue-hover: #1A50E0;      /* app --accent-dark */
  --accent: #7C9EFF;          /* link blue, readable on ink */
  --accent-hover: #A9BFFF;
  --teal: #5EEAD4;            /* app --cm-accent-fg: the slug motif */
  --teal-core: #14B8A6;       /* app --cm-accent: "alive" */
  --warn-bg: #1a1209;         /* pumpkin family — app's write/plan warmth */
  --warn-border: rgba(227, 120, 0, 0.35);
  --warn-ink: #EFC08A;
  --warn-strong: #F5CE9C;
  --paper: #F4EAD6;           /* app --phase-paper (write) */
  --paper-ink: #23211c;
  --screenplay: 'Courier Prime', 'Courier New', Courier, monospace;
  --code: 'JetBrains Mono', 'SF Mono', ui-monospace, Menlo, Consolas, monospace;
  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---------- basics ---------- */

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--teal-core);   /* the app's focus-ring contract */
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 0.6em; }
h1 { font-size: clamp(2.1rem, 5.5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0 0 1em; }
img { max-width: 100%; height: auto; display: block; }

code, pre {
  font-family: var(--code);
  font-size: 0.88em;
}
code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}
pre {
  background: #0d1015;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  overflow-x: auto;
  color: var(--ink-muted);
}
pre code { background: none; border: 0; padding: 0; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--paper);
  color: var(--paper-ink);
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

.wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- screenplay motif ---------- */

.slug {
  font-family: var(--screenplay);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 0.9rem;
}

/* ---------- beta banner ---------- */

.beta-banner {
  background: var(--warn-bg);
  border-bottom: 1px solid var(--warn-border);
  color: var(--warn-ink);
  padding: 0.7rem 0;
  font-size: 0.95rem;
}
.beta-banner .wrap {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  flex-wrap: wrap;
}
.beta-banner strong {
  font-family: var(--screenplay);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.85rem;
  white-space: nowrap;
  color: var(--warn-strong);
}
.beta-banner a { color: var(--warn-ink); }

/* ---------- header ---------- */

.site-head {
  border-bottom: 1px solid var(--border);
  background: rgba(10, 12, 16, 0.92);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  flex-wrap: wrap;
}
.brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.brand .brand-ltx {
  font-family: var(--screenplay);
  color: var(--accent);
  letter-spacing: 0.06em;
}
.site-nav {
  display: flex;
  gap: 1.4rem;
  align-items: center;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--ink-faint);
  text-decoration: none;
  font-size: 0.95rem;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom: 2px solid var(--blue);
  padding-bottom: 2px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  border-radius: 8px;
  padding: 0.7rem 1.4rem;
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--blue);
  color: #fff;
}
.btn-primary:hover { background: var(--blue-hover); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--ink-faint); color: var(--ink); }
.btn-row {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ---------- hero ---------- */

.hero {
  padding: 4.2rem 0 2.5rem;
  text-align: center;
  background: radial-gradient(60% 42% at 50% -6%, rgba(43, 97, 255, 0.14), rgba(10, 12, 16, 0) 70%);
}
.hero .slug { margin-bottom: 1.2rem; }
.hero h1 { margin-bottom: 0.5em; }
.hero .lede {
  max-width: 44rem;
  margin: 0 auto 1.8rem;
  color: var(--ink-muted);
  font-size: 1.15rem;
}
.hero .btn-row { justify-content: center; margin-bottom: 0.9rem; }
.hero .fine {
  color: var(--ink-dim);
  font-size: 0.88rem;
}

/* Page headers on the inner pages get the same faint projection glow. */
.page-head {
  background: radial-gradient(52% 60% at 50% -10%, rgba(43, 97, 255, 0.12), rgba(10, 12, 16, 0) 70%);
}

/* ---------- screenshots ---------- */

.shot {
  margin: 2rem 0 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 30px 80px -24px rgba(0, 0, 0, 0.8);
}
.hero .shot {
  /* the projection glow: the hero screenshot lit like the app's viewfinder */
  box-shadow: 0 40px 90px -24px rgba(0, 0, 0, 0.85),
              0 0 110px -18px rgba(43, 97, 255, 0.35);
}
.shot img { width: 100%; }
figure.shot-fig { margin: 2.2rem 0 0; }
figure.shot-fig figcaption {
  margin-top: 0.7rem;
  font-size: 0.9rem;
  color: var(--ink-faint);
  text-align: center;
}

/* ---------- sections ---------- */

.section { padding: 3.5rem 0; border-top: 1px solid var(--border-soft); }
.section-tight { padding: 2.5rem 0; }

.feature-row {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 2.5rem;
  align-items: center;
  padding: 3rem 0;
  border-top: 1px solid var(--border-soft);
}
.feature-row:first-of-type { border-top: 0; }
.feature-row.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature-row.flip .feature-copy { order: 2; }
.feature-row .shot, .feature-row .shot-fig { margin-top: 0; }
.feature-copy p { color: var(--ink-muted); }
.feature-copy p strong { color: var(--ink); }

@media (max-width: 780px) {
  .feature-row, .feature-row.flip { grid-template-columns: 1fr; gap: 1.2rem; }
  .feature-row.flip .feature-copy { order: 0; }
  .hero { padding-top: 2.5rem; }
}

/* ---------- cards / callouts ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.6rem 1.8rem;
  margin: 1.5rem 0;
}
.card > :last-child { margin-bottom: 0; }

.callout {
  border-left: 3px solid #E37800;   /* the app's pumpkin */
  background: var(--warn-bg);
  color: var(--warn-ink);
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.3rem;
  margin: 1.4rem 0;
}
.callout > :last-child { margin-bottom: 0; }
.callout strong { color: var(--warn-strong); }
.callout a { color: var(--warn-ink); }

.callout-info {
  border-left: 3px solid var(--teal-core);
  background: rgba(20, 184, 166, 0.07);
  color: #BFDDD7;
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.3rem;
  margin: 1.4rem 0;
}
.callout-info > :last-child { margin-bottom: 0; }
.callout-info strong { color: var(--teal); }
.callout-info a { color: #8FD9CC; }

/* ---------- honest beta list ---------- */

.beta-card {
  border: 1px solid rgba(227, 120, 0, 0.4);
  background: linear-gradient(180deg, #181008, #120d08);
  border-radius: 12px;
  padding: 1.8rem 2rem;
}
.beta-card .slug { color: #E89B45; }
.beta-card h2 { color: var(--warn-strong); }
.beta-card ul { margin: 0; padding-left: 1.2rem; color: #DDC49A; }
.beta-card li { margin-bottom: 0.55rem; }
.beta-card li strong { color: var(--warn-strong); }
.beta-card p { color: #DDC49A; }

/* ---------- tables ---------- */

.table-scroll { overflow-x: auto; margin: 1.4rem 0; }
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
}
th, td {
  text-align: left;
  padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
td { color: var(--ink-muted); }
th {
  color: var(--ink-faint);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
td strong { color: var(--ink); white-space: nowrap; }

/* ---------- download page ---------- */

.dl-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}
@media (max-width: 780px) { .dl-grid { grid-template-columns: 1fr; } }

.dl-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.7rem 1.8rem;
  display: flex;
  flex-direction: column;
}
.dl-card h2 { margin-bottom: 0.2em; }
.dl-card .dl-file {
  font-family: var(--code);
  font-size: 0.8rem;
  color: var(--ink-faint);
  margin-bottom: 1.1rem;
  word-break: break-all;
}
.dl-card ul { padding-left: 1.15rem; margin: 0 0 1.2rem; color: var(--ink-muted); }
.dl-card li { margin-bottom: 0.5rem; }
.dl-card li strong { color: var(--ink); }
.dl-card .btn { align-self: flex-start; }
.dl-card .btn-row { margin-top: auto; }

.os-dialog {
  border: 1px solid var(--border-strong);
  background: var(--surface-raised);
  border-radius: 10px;
  padding: 1.1rem 1.4rem;
  margin: 1.2rem 0;
  font-size: 0.95rem;
}
.os-dialog .os-dialog-title {
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.os-dialog p { color: var(--ink-muted); margin-bottom: 0.4rem; }
.os-dialog p:last-child { margin-bottom: 0; }

ol.steps { padding-left: 1.3rem; color: var(--ink-muted); }
ol.steps li { margin-bottom: 0.55rem; }
ol.steps li strong { color: var(--ink); }

/* ---------- how it works ---------- */

.phase-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}
@media (max-width: 880px) { .phase-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .phase-grid { grid-template-columns: 1fr; } }

.phase {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--border);
  border-radius: 10px;
  padding: 1.2rem 1.3rem;
}
.phase .phase-num {
  font-family: var(--screenplay);
  color: var(--teal);
  font-size: 0.75rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.4rem;
}
.phase h3 { margin-bottom: 0.3rem; }
.phase p { color: var(--ink-faint); font-size: 0.92rem; margin: 0; }

/* The app's phase quartet (index.css [data-phase] accents):
   write terracotta · plan pumpkin · make teal-green · cut blue-gray. */
.phase-grid .phase:nth-child(1) { border-top-color: #A85D2C; }
.phase-grid .phase:nth-child(2) { border-top-color: #E37800; }
.phase-grid .phase:nth-child(3) { border-top-color: #6EA88E; }
.phase-grid .phase:nth-child(4) { border-top-color: #7C98C4; }
.phase-grid .phase:nth-child(1) .phase-num { color: #C98B5A; }
.phase-grid .phase:nth-child(2) .phase-num { color: #E89B45; }
.phase-grid .phase:nth-child(3) .phase-num { color: #8FC3A9; }
.phase-grid .phase:nth-child(4) .phase-num { color: #9DB4D8; }

/* The 1·WRITE … 4·CUT slugs over the four feature rows pick up the same
   quartet (the rows sit in document order inside one wrap). */
.feature-row:nth-of-type(1) .slug { color: #C98B5A; }
.feature-row:nth-of-type(2) .slug { color: #E89B45; }
.feature-row:nth-of-type(3) .slug { color: #8FC3A9; }
.feature-row:nth-of-type(4) .slug { color: #9DB4D8; }

/* ---------- footer ---------- */

.site-foot {
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  padding: 2.5rem 0 3rem;
  color: var(--ink-dim);
  font-size: 0.9rem;
}
.site-foot p { margin-bottom: 0.6rem; }
.site-foot a { color: var(--ink-faint); }
.foot-links {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
  padding: 0;
  list-style: none;
}
