/* openmarks.com — design system
   Dark-first, light theme via prefers-color-scheme. No external fonts or libraries. */

:root {
  --bg: #070b16;
  --bg-2: #0c1324;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.10);
  --text: #e7ecf5;
  --muted: #9aa6bd;
  --teal: #2dd4bf;
  --teal-2: #0f9f8f;
  --gold: #f5c542;
  --violet: #8b7cf6;
  --danger: #f87171;
  --grad: linear-gradient(120deg, var(--teal) 0%, #7dd3c8 45%, var(--gold) 100%);
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
  --max: 1160px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f8fc;
    --bg-2: #ffffff;
    --surface: rgba(10, 20, 40, 0.035);
    --surface-2: rgba(10, 20, 40, 0.06);
    --border: rgba(10, 20, 40, 0.10);
    --text: #0d1526;
    --muted: #55617a;
    --teal: #0d9488;
    --teal-2: #0f766e;
    --gold: #b7860b;
    --grad: linear-gradient(120deg, #0d9488 0%, #14b8a6 45%, #c99a12 100%);
    --shadow: 0 20px 50px -25px rgba(13, 21, 38, 0.25);
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(16px, 0.35vw + 15px, 18px);
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(45, 212, 191, 0.13), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(139, 124, 246, 0.10), transparent 60%),
    var(--bg);
  min-height: 100vh;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code, pre, .mono { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--gold); color: #111; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }

.container { width: min(100% - 40px, var(--max)); margin-inline: auto; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 750; letter-spacing: -0.02em; font-size: 1.15rem; }
.brand:hover { text-decoration: none; }
.brand svg { width: 34px; height: 34px; }
.brand span b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; gap: 6px; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--muted); padding: 8px 14px; border-radius: 999px; font-size: 0.95rem; font-weight: 550; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: var(--surface-2); text-decoration: none; }
.nav-links .btn { margin-left: 6px; }
.menu-toggle { display: none; background: none; border: 1px solid var(--border); color: var(--text); border-radius: 10px; width: 42px; height: 42px; cursor: pointer; }
.menu-toggle svg { margin: auto; }

@media (max-width: 860px) {
  .menu-toggle { display: grid; place-items: center; }
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px 20px 20px;
    background: var(--bg-2); border-bottom: 1px solid var(--border);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; border-radius: 12px; }
  .nav-links .btn { margin: 8px 0 0; text-align: center; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; font-weight: 650; font-size: 0.98rem;
  border: 1px solid var(--border); color: var(--text); background: var(--surface-2);
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  cursor: pointer;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); background: var(--surface); }
.btn-primary { background: var(--grad); color: #071016; border: 0; box-shadow: 0 10px 30px -10px rgba(45, 212, 191, 0.55); }
.btn-primary:hover { background: var(--grad); box-shadow: 0 14px 34px -10px rgba(245, 197, 66, 0.55); }
.nav-links .btn-primary { color: #071016; padding: 9px 18px; }
.nav-links .btn-primary:hover { color: #071016; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.025em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4.4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.7rem); font-weight: 780; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.1rem, 1vw + 0.9rem, 1.35rem); color: var(--muted); max-width: 46rem; }
.gradient-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--grad); border-radius: 2px; }
.muted { color: var(--muted); }

/* ---------- Sections ---------- */
section { padding: clamp(64px, 9vw, 120px) 0; }
.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.alt { background: linear-gradient(180deg, transparent, var(--surface) 20%, var(--surface) 80%, transparent); }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(56px, 9vw, 110px); padding-bottom: clamp(40px, 6vw, 80px); position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 20px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.tagline { font-weight: 650; color: var(--gold); margin-top: 18px; font-size: .95rem; letter-spacing: .02em; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }

/* Hero visual: animated mark card */
.mark-visual { position: relative; }
.mark-visual .orb { position: absolute; inset: -12% -8% auto auto; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(45,212,191,.45), rgba(245,197,66,.15) 60%, transparent 70%); filter: blur(30px); z-index: 0; animation: float 9s ease-in-out infinite; }
.code-card {
  position: relative; z-index: 1;
  background: color-mix(in srgb, var(--bg-2) 88%, transparent);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.code-card .bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--border); font-size: .8rem; color: var(--muted); }
.code-card .bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-2); display: inline-block; }
.code-card .bar i:nth-child(1) { background: #f87171aa; } .code-card .bar i:nth-child(2) { background: #f5c542aa; } .code-card .bar i:nth-child(3) { background: #2dd4bfaa; }
.code-card .bar span { margin-left: auto; font-family: var(--mono); }
.code-card pre { margin: 0; padding: 20px 22px; font-size: .86rem; line-height: 1.7; overflow-x: auto; color: var(--text); }
.tok-k { color: var(--teal); } .tok-s { color: var(--gold); } .tok-c { color: var(--muted); font-style: italic; } .tok-n { color: var(--violet); }
.stamp { position: absolute; z-index: 2; right: -10px; bottom: -18px; transform: rotate(-8deg); background: var(--grad); color: #071016; font-weight: 800; padding: 10px 18px; border-radius: 12px; box-shadow: var(--shadow); letter-spacing: .02em; }

@keyframes float { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(18px) } }

/* ---------- 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(--bg-2); padding: 22px 24px; }
.stat .v { font-size: clamp(1.4rem, 2.2vw, 1.9rem); font-weight: 780; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat .l { color: var(--muted); font-size: .88rem; }
.stats-note { color: var(--muted); font-size: .8rem; margin-top: 10px; text-align: right; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--teal) 45%, var(--border)); background: var(--surface-2); }
.card p:last-child { margin-bottom: 0; }
.card .icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px; background: color-mix(in srgb, var(--teal) 15%, transparent); color: var(--teal); }
.card .icon svg { width: 24px; height: 24px; }
.card.gold .icon { background: color-mix(in srgb, var(--gold) 16%, transparent); color: var(--gold); }
.card.violet .icon { background: color-mix(in srgb, var(--violet) 18%, transparent); color: var(--violet); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); }
.card .more { display: inline-block; margin-top: 12px; font-weight: 650; }

/* Status badges: honest about what exists today */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 700; letter-spacing: .04em; padding: 4px 10px; border-radius: 999px; margin-bottom: 14px; border: 1px solid var(--border); }
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.live { color: #34d399; background: rgba(52, 211, 153, .10); }
.badge.spec { color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, transparent); }
.badge.dev { color: var(--violet); background: color-mix(in srgb, var(--violet) 14%, transparent); }

/* ---------- Flow / steps ---------- */
.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.step { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--grad); color: #071016; font-weight: 800; margin-bottom: 14px; }
.step h3 { font-size: 1.1rem; }
.step p { color: var(--muted); font-size: .95rem; margin: 0; }
.step:not(:last-child)::after { content: "→"; position: absolute; right: -14px; top: 30px; color: var(--teal); font-weight: 800; z-index: 1; }
@media (max-width: 960px) { .flow { grid-template-columns: repeat(2, 1fr); } .step::after { display: none; } }
@media (max-width: 560px) { .flow { grid-template-columns: 1fr; } }

/* ---------- Split feature ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.reverse > :first-child { order: 2; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split.reverse > :first-child { order: 0; } }
.checklist { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.checklist li { padding-left: 34px; position: relative; color: var(--muted); }
.checklist li strong { color: var(--text); }
.checklist li::before { content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: color-mix(in srgb, var(--teal) 18%, transparent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232dd4bf' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 14px no-repeat; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
td code { color: var(--teal); font-size: .9em; }

/* ---------- CTA ---------- */
.cta { position: relative; overflow: hidden; text-align: center; border-radius: calc(var(--radius) + 8px); padding: clamp(40px, 6vw, 72px) 24px; border: 1px solid var(--border); background: radial-gradient(600px 240px at 50% 0%, rgba(45,212,191,.18), transparent 70%), var(--surface); }
.cta .actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* ---------- Proof tool ---------- */
.tool { background: var(--bg-2); border: 1px solid var(--border); border-radius: calc(var(--radius) + 4px); padding: clamp(20px, 3vw, 34px); box-shadow: var(--shadow); }
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); margin-bottom: 20px; }
.tabs button { border: 0; background: none; color: var(--muted); padding: 8px 18px; border-radius: 999px; font: inherit; font-weight: 650; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--bg); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.dropzone { display: grid; place-items: center; text-align: center; gap: 8px; min-height: 190px; border: 2px dashed var(--border); border-radius: var(--radius); padding: 28px; cursor: pointer; transition: border-color .2s, background .2s; }
.dropzone:hover, .dropzone.drag { border-color: var(--teal); background: color-mix(in srgb, var(--teal) 7%, transparent); }
.dropzone svg { width: 40px; height: 40px; color: var(--teal); margin: 0 auto; }
.dropzone strong { font-size: 1.05rem; }
textarea { width: 100%; min-height: 160px; resize: vertical; font: inherit; font-size: .95rem; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.result { margin-top: 22px; display: none; }
.result.show { display: block; animation: fadeUp .35s ease both; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; font-weight: 700; }
.field .out { display: flex; gap: 8px; align-items: stretch; }
.field output { flex: 1; font-family: var(--mono); font-size: .88rem; word-break: break-all; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; color: var(--teal); }
.copy { flex: none; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: var(--radius-sm); padding: 0 14px; cursor: pointer; font: inherit; font-size: .85rem; font-weight: 650; }
.copy.done { color: #34d399; }
.privacy { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--muted); margin-top: 18px; }
.privacy svg { flex: none; width: 20px; height: 20px; color: #34d399; margin-top: 2px; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }

/* ---------- Callout ---------- */
.callout { border-left: 3px solid var(--gold); background: color-mix(in srgb, var(--gold) 7%, transparent); padding: 16px 20px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--muted); }
.callout strong { color: var(--text); }

/* ---------- Page hero (subpages) ---------- */
.page-hero { padding: clamp(56px, 8vw, 96px) 0 clamp(24px, 4vw, 48px); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 56px 0 40px; margin-top: 40px; color: var(--muted); font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { color: var(--text); font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--muted); }
.footer-grid a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--border); margin-top: 40px; padding-top: 24px; font-size: .85rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
