/* ASysT Rendering — website shared stylesheet.
   Design tokens lifted 1:1 from the tool (asyst-modeler/src/index.css) so the site and the app
   read as one brand. Dark is the default (like the tool); light via data-theme or OS preference. */

:root {
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
  line-height: 1.55;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;

  --text-primary: #edf3f8;
  --text-muted: #8fa4ba;
  --surface-page: #09111d;
  --surface-panel: rgba(9, 17, 29, 0.78);
  --surface-panel-strong: rgba(9, 17, 29, 0.92);
  --surface-soft: rgba(255, 255, 255, 0.05);
  --surface-card: rgba(255, 255, 255, 0.03);
  --border-default: rgba(177, 197, 218, 0.15);
  --border-soft: rgba(177, 197, 218, 0.12);
  --border-strong: rgba(177, 197, 218, 0.2);
  --accent-warm: #ffb570;
  --accent-warm-strong: #ffd369;
  --accent-mint: #31d0aa;
  --hero-copy: #a8bacd;
  --shadow-card: 0 18px 48px rgba(0, 0, 0, 0.35);
  --figure-bg: #ffffff; /* engine SVG exports are drawn on white */
}

:root[data-theme='light'] {
  --text-primary: #182637;
  --text-muted: #5d7186;
  --surface-page: #eef4f9;
  --surface-panel: rgba(255, 255, 255, 0.88);
  --surface-panel-strong: rgba(255, 255, 255, 0.96);
  --surface-soft: rgba(16, 37, 60, 0.06);
  --surface-card: rgba(255, 255, 255, 0.9);
  --border-default: rgba(34, 67, 102, 0.14);
  --border-soft: rgba(34, 67, 102, 0.12);
  --border-strong: rgba(34, 67, 102, 0.18);
  --accent-warm: #cc6d1f;
  --accent-warm-strong: #f2b53d;
  --accent-mint: #117f68;
  --hero-copy: #536679;
  --shadow-card: 0 18px 48px rgba(24, 44, 66, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-primary);
  background: var(--surface-page);
}

:root:not([data-theme='light']) body {
  background:
    radial-gradient(1100px 520px at 85% -10%, rgba(49, 208, 170, 0.10), transparent 60%),
    radial-gradient(900px 480px at -10% 20%, rgba(255, 181, 112, 0.08), transparent 55%),
    var(--surface-page);
  background-attachment: fixed;
}

a { color: inherit; }
img { max-width: 100%; }
button { font: inherit; cursor: pointer; }

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Header ─────────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: var(--surface-panel);
  border-bottom: 1px solid var(--border-soft);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}

.brand img { width: 30px; height: 30px; display: block; }
.brand .sub { color: var(--text-muted); font-weight: 400; font-size: 0.85rem; }

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  text-decoration: none;
  color: var(--text-muted);
  padding: 7px 11px;
  border-radius: 8px;
  font-size: 0.95rem;
}

.site-nav a:hover { color: var(--text-primary); background: var(--surface-soft); }
.site-nav a[aria-current='page'] { color: var(--text-primary); background: var(--surface-soft); }

.theme-toggle {
  border: 1px solid var(--border-default);
  background: transparent;
  color: var(--text-muted);
  border-radius: 8px;
  padding: 6px 10px;
  line-height: 1;
}
.theme-toggle:hover { color: var(--text-primary); border-color: var(--border-strong); }

/* ── Buttons ────────────────────────────────────────────────────────── */

.btn {
  display: inline-block;
  text-decoration: none;
  border-radius: 10px;
  padding: 11px 20px;
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  background: var(--surface-soft);
}
.btn:hover { border-color: var(--accent-mint); }

.btn-primary {
  background: var(--accent-mint);
  border-color: transparent;
  color: #06231c;
}
.btn-primary:hover { filter: brightness(1.08); border-color: transparent; }

.btn[aria-disabled='true'] {
  opacity: 0.55;
  pointer-events: none;
}

.btn-small { padding: 8px 14px; font-size: 0.9rem; }

/* ── Hero ───────────────────────────────────────────────────────────── */

.hero { padding: 72px 0 30px; text-align: center; }

.hero h1 {
  font-size: clamp(1.9rem, 4.6vw, 3.1rem);
  line-height: 1.15;
  margin: 0 auto 14px;
  max-width: 21ch;
  letter-spacing: -0.01em;
}

.hero h1 .accent { color: var(--accent-mint); }

.hero p.lede {
  color: var(--hero-copy);
  font-size: 1.12rem;
  max-width: 58ch;
  margin: 0 auto 26px;
}

.hero .cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.hero .fineprint { color: var(--text-muted); font-size: 0.85rem; }

.hero-shot {
  margin: 42px auto 0;
  border: 1px solid var(--border-default);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--surface-panel-strong);
}
.hero-shot img { display: block; width: 100%; }

/* ── Sections / cards ───────────────────────────────────────────────── */

section { padding: 56px 0; }

.section-title { font-size: 1.55rem; margin: 0 0 8px; text-align: center; }
.section-sub { color: var(--text-muted); text-align: center; margin: 0 auto 34px; max-width: 62ch; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  border: 1px solid var(--border-default);
  border-radius: 14px;
  background: var(--surface-card);
  padding: 22px;
}

.card h3 { margin: 0 0 8px; font-size: 1.08rem; }
.card h3 .glyph { color: var(--accent-warm); margin-right: 8px; }
.card p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }

/* ── Gallery ────────────────────────────────────────────────────────── */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 16px;
}

.gallery figure {
  margin: 0;
  border: 1px solid var(--border-default);
  border-radius: 14px;
  overflow: hidden;
  background: var(--figure-bg);
}

.gallery figure img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; padding: 10px; }

.gallery figcaption {
  padding: 10px 14px;
  font-size: 0.88rem;
  color: var(--text-muted);
  background: var(--surface-panel-strong);
  border-top: 1px solid var(--border-soft);
}

/* ── Tables (pricing / tiers) ───────────────────────────────────────── */

.table-scroll { overflow-x: auto; border: 1px solid var(--border-default); border-radius: 14px; }

table.tiers {
  border-collapse: collapse;
  width: 100%;
  min-width: 640px;
  font-size: 0.92rem;
  background: var(--surface-card);
}

table.tiers th, table.tiers td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-soft);
  text-align: center;
  vertical-align: top;
}

table.tiers td:first-child, table.tiers th:first-child {
  text-align: left;
  max-width: 340px;
}

table.tiers thead th {
  background: var(--surface-panel-strong);
  font-size: 0.95rem;
}

table.tiers tbody tr:last-child td { border-bottom: none; }
table.tiers .yes { color: var(--accent-mint); font-weight: 600; }
table.tiers .no { color: var(--text-muted); }
table.tiers .hl { color: var(--accent-warm-strong); font-weight: 600; }

.footnote { color: var(--text-muted); font-size: 0.85rem; max-width: 72ch; }

/* ── Pricing cards ──────────────────────────────────────────────────── */

.price-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.price-card {
  border: 1px solid var(--border-default);
  border-radius: 14px;
  background: var(--surface-card);
  padding: 26px 22px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.price-card.featured { border-color: var(--accent-mint); }

.price-card .tier { font-weight: 600; font-size: 1.05rem; }
.price-card .price { font-size: 2.1rem; font-weight: 700; letter-spacing: -0.02em; }
.price-card .price small { font-size: 0.95rem; font-weight: 400; color: var(--text-muted); }
.price-card .note { color: var(--text-muted); font-size: 0.88rem; flex-grow: 1; }
.price-card .badge {
  align-self: center;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-warm-strong);
  border: 1px solid var(--border-default);
  border-radius: 999px;
  padding: 3px 10px;
}

/* ── Prose pages (licences / feedback / legal) ──────────────────────── */

.prose { max-width: 76ch; margin: 0 auto; }
.prose h1 { font-size: 1.9rem; margin: 46px 0 8px; }
.prose h2 { font-size: 1.25rem; margin: 34px 0 10px; }
.prose p, .prose li { color: var(--hero-copy); }
.prose strong { color: var(--text-primary); }
.prose code {
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 0.88em;
}
.prose .lead { font-size: 1.08rem; }

.callout {
  border: 1px solid var(--border-default);
  border-left: 3px solid var(--accent-mint);
  border-radius: 10px;
  background: var(--surface-card);
  padding: 14px 18px;
}

/* ── Footer ─────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 30px 0 40px;
  margin-top: 40px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  align-items: center;
}

.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text-primary); }
.site-footer .spacer { flex-grow: 1; }

@media (max-width: 640px) {
  .site-nav a { padding: 6px 7px; font-size: 0.88rem; }
  .brand .sub { display: none; }
  .hero { padding-top: 48px; }
}
