/* Syrenthix — schema atelier. Charcoal planes, cyan ink lines. */

:root {
  --bg: #0b0d10;
  --bg-elevated: #12161a;
  --bg-subtle: #181e24;
  --fg: #eceff1;
  --fg-muted: #8d97a0;
  --fg-subtle: #6a737b;
  --accent: #d7e0e4;
  --accent-fg: #0b0d10;
  --line: #6f9aa3;
  --border: color-mix(in oklab, var(--fg) 12%, transparent);
  --border-strong: color-mix(in oklab, var(--fg) 22%, transparent);
  --font-sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --text-xs: 0.78rem;
  --text-sm: 0.92rem;
  --text-base: 1.02rem;
  --text-lg: 1.18rem;
  --text-xl: clamp(1.45rem, 1.1rem + 1vw, 1.9rem);
  --text-2xl: clamp(1.9rem, 1.3rem + 1.8vw, 2.8rem);
  --text-3xl: clamp(2.1rem, 1.4rem + 2.6vw, 3.4rem);
  --leading-tight: 1.12;
  --leading-normal: 1.55;
  --tracking-tight: -0.03em;
  --tracking-label: 0.14em;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 28px;
  --shadow-border: 0 0 0 1px rgba(255, 255, 255, 0.08);
  --shadow-border-hover: 0 0 0 1px rgba(255, 255, 255, 0.16);
  --shadow-lift: 0 18px 40px -24px rgba(0, 0, 0, 0.55);
  --wrap: min(1120px, calc(100% - 40px));
  --header-h: 72px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--fg);
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  background: var(--bg);
  min-height: 100vh;
}
body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(to right, color-mix(in oklab, var(--line) 10%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in oklab, var(--line) 10%, transparent) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(1100px 640px at 85% -8%, #000 18%, transparent 72%);
  opacity: 0.4;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--fg); }
p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; letter-spacing: var(--tracking-tight); }
button:not(:disabled), .btn { cursor: pointer; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--fg); color: var(--bg); padding: 8px 12px; z-index: 20;
}
.skip:focus { left: 12px; top: 12px; }

.wrap { width: var(--wrap); margin-inline: auto; position: relative; z-index: 1; }
.kicker {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--line);
  font-weight: 500;
}

.site-header {
  position: sticky; top: 0; z-index: 8; height: var(--header-h);
  backdrop-filter: blur(14px);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  box-shadow: 0 1px 0 var(--border);
}
.site-header .wrap {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--fg); font-weight: 600;
}
.brand-mark { width: 28px; height: 28px; flex: none; }
.nav { display: flex; align-items: center; gap: var(--space-5); }
.nav a {
  text-decoration: none; color: var(--fg-muted); font-size: var(--text-sm); font-weight: 500;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); }
.nav-toggle {
  display: none; width: 44px; height: 44px; border: 0; background: transparent; color: var(--fg);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 0;
  font-family: inherit; font-size: var(--text-sm); font-weight: 600; text-decoration: none;
  transition: transform 150ms var(--ease-out), background 150ms var(--ease-out);
}
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--line); outline-offset: 3px; }
.btn-primary { background: var(--fg); color: var(--accent-fg); }
.btn-primary:hover { background: #fff; color: var(--accent-fg); }
.btn-ghost { background: transparent; color: var(--fg); box-shadow: var(--shadow-border); }
.btn-ghost:hover { box-shadow: var(--shadow-border-hover); }

.hero { padding: var(--space-6) 0 var(--space-5); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: var(--space-6);
  align-items: center;
}
.hero h1 {
  margin: 10px 0 12px;
  font-size: var(--text-3xl);
  line-height: var(--leading-tight);
  font-weight: 600;
}
.lede { color: var(--fg-muted); font-size: var(--text-lg); max-width: 46ch; margin: 0 0 var(--space-5); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: var(--space-5); }
.meta-row {
  display: flex; flex-wrap: wrap; gap: 10px 18px;
  color: var(--fg-subtle); font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.04em;
}
.hero-frame {
  border-radius: var(--radius-xl); padding: 10px;
  background: var(--bg-elevated); box-shadow: var(--shadow-border), var(--shadow-lift);
}
.hero-frame .schema-art { width: 100%; height: auto; border-radius: calc(var(--radius-xl) - 10px); aspect-ratio: 5 / 4; }
.title-block {
  display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; padding: 12px 6px 2px;
  font-family: var(--font-mono); font-size: 11px; color: var(--fg-subtle);
}

.section { position: relative; z-index: 1; padding: var(--space-8) 0; }
#catalog { scroll-margin-top: calc(var(--header-h) + 8px); padding-top: var(--space-6); }
.section-head {
  display: flex; justify-content: space-between; align-items: end; gap: var(--space-4); margin-bottom: var(--space-6);
}
.section-head h2 { margin: 8px 0 0; font-size: var(--text-2xl); }
.section-head p { color: var(--fg-muted); max-width: 36ch; margin: 0; }
.rule { height: 1px; background: var(--border); border: 0; margin: 0; }

.mission { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: var(--space-7); align-items: center; }
.mission .schema-art { width: 100%; border-radius: var(--radius-lg); background: #0b0d10; box-shadow: var(--shadow-border); }
.mission h2 { margin-top: 0; }
.mission p { color: var(--fg-muted); margin-top: 0; }

.catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.plate {
  display: flex; flex-direction: column;
  background: var(--bg-elevated); border-radius: var(--radius-lg); padding: 10px;
  text-decoration: none; color: inherit; box-shadow: var(--shadow-border);
  transition: box-shadow 250ms var(--ease-out), transform 250ms var(--ease-out);
  min-height: 100%;
}
.plate:hover { box-shadow: var(--shadow-border-hover), var(--shadow-lift); transform: translateY(-2px); }
.plate-image { border-radius: var(--radius-md); overflow: hidden; background: #0b0d10; }
.plate-image .schema-art { width: 100%; height: auto; }
.plate-body { padding: 14px 8px 8px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.plate-body h3 { margin: 0; font-size: 1.15rem; font-weight: 600; }
.plate-body p { margin: 0; color: var(--fg-muted); font-size: var(--text-sm); flex: 1; }
.plate-meta {
  display: flex; justify-content: space-between; margin-top: 6px;
  font-family: var(--font-mono); font-size: var(--text-sm);
}
.price-free { color: var(--line); }
.level-tag { color: var(--fg-subtle); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }

.benefits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.benefit { background: var(--bg-elevated); border-radius: var(--radius-md); padding: 20px 18px 18px; box-shadow: var(--shadow-border); }
.benefit svg { width: 22px; height: 22px; color: var(--line); margin-bottom: 14px; }
.benefit h3 { margin: 0 0 8px; font-size: 1rem; }
.benefit p { margin: 0; color: var(--fg-muted); font-size: var(--text-sm); }

.freeband {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: var(--space-6); align-items: center;
  background: var(--bg-elevated); border-radius: var(--radius-xl); padding: 28px; box-shadow: var(--shadow-border);
}
.freeband h2 { margin: 8px 0 12px; font-size: var(--text-xl); }
.freeband p { color: var(--fg-muted); margin: 0 0 18px; max-width: 52ch; }
.freeband-visual { border-radius: calc(var(--radius-xl) - 12px); overflow: hidden; background: #0b0d10; }
.freeband-visual .schema-art { width: 100%; }

.faq { display: grid; gap: 8px; }
.faq details { background: var(--bg-elevated); border-radius: var(--radius-md); box-shadow: var(--shadow-border); padding: 4px 16px; }
.faq summary {
  list-style: none; cursor: pointer; min-height: 52px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--fg-subtle); font-size: 18px; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; color: var(--fg-muted); }
.faq-title { margin: 8px 0 14px; }

.product-hero {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: var(--space-7); align-items: start; padding-top: var(--space-7);
}
.product-cover {
  border-radius: var(--radius-xl); padding: 10px; background: var(--bg-elevated);
  box-shadow: var(--shadow-border); position: sticky; top: calc(var(--header-h) + 16px);
}
.product-cover .schema-art { width: 100%; border-radius: calc(var(--radius-xl) - 10px); }
.crumb {
  font-family: var(--font-mono); font-size: var(--text-xs); color: var(--fg-subtle);
  letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 14px;
}
.crumb a { color: var(--fg-muted); text-decoration: none; }
.crumb a:hover { color: var(--fg); }
.product-hero h1 { margin: 8px 0 10px; font-size: var(--text-2xl); }
.buy-box { margin-top: 20px; padding: 18px; background: var(--bg-subtle); border-radius: var(--radius-md); }
.buy-price { font-size: var(--text-xl); font-weight: 600; margin: 0 0 8px; }
.buy-note { color: var(--fg-muted); font-size: var(--text-sm); margin: 0 0 16px; }
.stack { display: grid; gap: 18px; padding: var(--space-8) 0; }
.panel { background: var(--bg-elevated); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-border); }
.panel h2 { margin: 6px 0 10px; font-size: var(--text-xl); }
.panel p { color: var(--fg-muted); }
.modules { display: grid; gap: 12px; }
.module { display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.module:first-child { border-top: 0; }
.mod-n { font-family: var(--font-mono); color: var(--line); font-size: var(--text-sm); padding-top: 4px; }
.module h3 { margin: 0 0 4px; font-size: 1rem; }
.module p { margin: 0; font-size: var(--text-sm); }
.ticks { margin: 0; padding: 0 0 0 18px; color: var(--fg-muted); }
.ticks li { margin: 0 0 8px; }

.form { display: grid; gap: 14px; max-width: 520px; }
.form label { display: grid; gap: 6px; font-size: var(--text-sm); color: var(--fg-muted); }
.form input, .form textarea {
  background: var(--bg-elevated); color: var(--fg); border: 0; box-shadow: var(--shadow-border);
  border-radius: var(--radius-sm); min-height: 44px; padding: 10px 12px; font: inherit;
}
.form textarea { min-height: 140px; resize: vertical; }
.notice { color: var(--fg-subtle); font-size: var(--text-sm); }

.prose { max-width: 68ch; }
.prose h1 { font-size: var(--text-2xl); margin: 8px 0 16px; }
.prose h2 { font-size: var(--text-xl); margin: 28px 0 10px; }
.prose p { color: var(--fg-muted); }

.site-footer { padding: var(--space-8) 0 var(--space-6); box-shadow: 0 -1px 0 var(--border); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--space-6); }
.footer-grid h2 { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; font-family: var(--font-mono); color: var(--fg-subtle); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: 0 0 8px; }
.footer-grid a { color: var(--fg-muted); text-decoration: none; }
.footer-grid a:hover { color: var(--fg); }
.footer-blurb { color: var(--fg-muted); font-size: var(--text-sm); max-width: 36ch; margin: 12px 0 0; }
.footer-mail { margin: 14px 0 0; }
.socials { display: flex; gap: 10px; }
.socials a {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: var(--radius-sm); box-shadow: var(--shadow-border); color: var(--fg);
}
.socials svg { width: 18px; height: 18px; }
.footer-end {
  margin-top: var(--space-6); padding-top: var(--space-4);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  color: var(--fg-subtle); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
}

.loading-stage { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: var(--space-8) 0; }
.spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border-strong); border-top-color: var(--line);
  margin: 0 auto 18px; animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.fallback { max-width: 42ch; margin: 0 auto; }
.fallback-actions { margin-top: 18px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.error { padding: var(--space-8) 0; text-align: center; }
.error p { color: var(--fg-muted); }

@media (max-width: 900px) {
  .hero-grid, .mission, .freeband, .footer-grid { grid-template-columns: 1fr; }
  .product-hero { grid-template-columns: 1fr; }
  .product-cover { position: static; order: 2; }
  .benefits, .catalog-grid { grid-template-columns: 1fr 1fr; }
  .section-head { flex-direction: column; align-items: start; }
}
@media (max-width: 720px) {
  :root { --wrap: min(1120px, calc(100% - 28px)); --header-h: 64px; }
  .nav {
    display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--bg-elevated); flex-direction: column; align-items: stretch;
    padding: 12px 16px 20px; gap: 4px; box-shadow: var(--shadow-border), var(--shadow-lift);
  }
  .nav.open { display: flex; }
  .nav a, .nav .btn { min-height: 44px; display: flex; align-items: center; }
  .nav-toggle { display: grid; place-items: center; }
  .catalog-grid, .benefits { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
