/* ==========================================================================
   Limian design system
   Dark, technological, orange-accented — the same language as the home page
   so every route reads as one site. The animated backdrop (js/bg.js) paints a
   fixed canvas at z-index 0; page chrome is lifted above it in "Stacking".
   ========================================================================== */

:root {
  /* Colours come from the theme tokens in chrome.css, which both shells load.
     Defining any of them here would override the light palette, since this
     file is loaded after chrome.css — so these are aliases only. */
  --line: var(--line-10);
  --line-strong: var(--line-16);
  --text-dim: var(--text-70);
  --text-faint: var(--text-50);
  --accent-low: var(--accent-deep);

  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 24px;

  --container-w: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
  --section-y: clamp(60px, 8vw, 104px);

  --font-sans: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text);
  /* Transparent so the fixed backdrop canvas shows through the whole page. */
  background: transparent;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.12;
  text-wrap: pretty;
}

p { text-wrap: pretty; }

::selection { background: rgba(255, 106, 0, 0.3); color: #fff; }

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

/* ---------- Stacking -------------------------------------------------------
   The backdrop canvas is position:fixed with z-index 0, so it paints after
   every static element. Page content must be positioned to land on top of it.

   The header and footer are deliberately NOT listed here: chrome.css gives the
   header `position: sticky; z-index: 60`, and base.css loads later, so naming
   it here would flatten it to z-index 1 — level with <main>, which then paints
   over the open mobile menu. */
main { position: relative; z-index: 1; }

/* ---------- Layout ---------- */
.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  width: 100%;
}

.section { padding: var(--section-y) 0; }
.section--tight { padding: clamp(40px, 5vw, 64px) 0; }
.section--flush-top { padding-top: 0; }

/* A quiet panel used to group a section against the moving backdrop. */
.panel {
  background: var(--surface-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 52px);
  backdrop-filter: blur(6px);
}

/* ---------- Type ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(255, 106, 0, 0.9);
  flex: none;
}

.page-title {
  font-size: clamp(34px, 5vw, 54px);
  margin: 18px 0 0;
  color: transparent;
  background-image: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-title {
  font-size: clamp(26px, 3.4vw, 38px);
  margin: 0 0 16px;
}

.lead {
  margin: 18px 0 0;
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 660px;
}

.muted { color: var(--text-dim); }
.note { font-size: 14px; color: var(--text-faint); }

/* ---------- Section heading block ---------- */
.section-head { margin-bottom: clamp(26px, 3.5vw, 42px); max-width: 780px; }
.section-head .section-title { margin-top: 14px; }
.section-head .lead { margin-top: 12px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 0;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.25s ease, background-color 0.25s ease,
    border-color 0.25s ease, color 0.25s ease;
}
.btn:active { transform: translateY(1px); }

.btn-accent {
  background-image: var(--grad-btn);
  color: var(--accent-ink);
  box-shadow: var(--glow);
}
.btn-accent:hover { color: var(--accent-ink); }
.btn-accent:hover { box-shadow: var(--glow-lg); }

.btn-ghost {
  background: var(--surface-faint);
  border: 1px solid var(--line-strong);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent-line); color: var(--accent-hi); }

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-hi);
  transition: gap 0.2s ease;
}
.btn-link:hover { gap: 12px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-faint);
  transition: color 0.2s ease, gap 0.2s ease;
}
.back-link:hover { color: var(--accent-hi); gap: 12px; }

/* ---------- Cards ---------- */
.card {
  position: relative;
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease,
    background-color 0.25s ease;
}
a.card:hover,
.card--hover:hover {
  border-color: var(--accent-line);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
  background: var(--surface-2);
}
.card h3 { font-size: 20px; margin-bottom: 10px; }
.card p { margin: 0; color: var(--text-dim); font-size: 15px; line-height: 1.6; }
.card p + p { margin-top: 12px; }

/* Icon plate — the recurring orange square from the home page. */
.icon-tile {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background-image: var(--grad-accent);
  box-shadow: 0 6px 16px rgba(255, 106, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-ink);
  flex: none;
  margin-bottom: 18px;
}
.icon-tile svg { width: 22px; height: 22px; }

.grid { display: grid; gap: clamp(16px, 2vw, 24px); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

/* ---------- Chips ---------- */
.tag-chip {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(255, 106, 0, 0.24);
  color: var(--accent-hi);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.filter-chip:hover { border-color: var(--accent-line); color: var(--text); }
.filter-chip.active {
  background-image: var(--grad-btn);
  border-color: transparent;
  color: var(--accent-ink);
  box-shadow: var(--glow);
}

/* ---------- Lists ---------- */
.dot-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 13px;
}
.dot-list li {
  position: relative;
  padding-left: 26px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-dim);
}
.dot-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(255, 106, 0, 0.8);
}
.dot-list li a { color: var(--accent-hi); text-decoration: underline; text-underline-offset: 3px; }
.dot-list li strong { color: var(--text); font-weight: 600; }

/* ---------- Numbered steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: clamp(16px, 2vw, 24px);
}
.step {
  position: relative;
  padding: 24px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.step .num {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background-image: var(--grad-accent);
  box-shadow: 0 6px 16px rgba(255, 106, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  color: var(--accent-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 14px;
}
.step p { margin: 0; font-size: 15px; color: var(--text-dim); line-height: 1.6; }

/* ---------- CTA panel ---------- */
.cta-panel {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  padding: clamp(32px, 4vw, 52px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
}
/* Warm bloom in the corner, echoing the backdrop glows. */
.cta-panel::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  right: -140px;
  top: -180px;
  background: radial-gradient(circle, rgba(255, 106, 0, 0.28), transparent 70%);
  pointer-events: none;
}
.cta-panel > * { position: relative; z-index: 1; }
.cta-panel p {
  margin: 0;
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 600;
  max-width: 620px;
  line-height: 1.4;
}

/* ---------- Forms ---------- */
.field { display: block; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--text-faint);
}
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--text-40); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.14);
}

.form-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--text);
  font-size: 15px;
  margin: 0 0 20px;
}

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 12px; max-width: 820px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  transition: border-color 0.25s ease;
}
.faq-item[open] { border-color: var(--accent-line); }
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  color: var(--accent);
  font-size: 22px;
  line-height: 1;
  font-weight: 400;
  flex: none;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { margin: 14px 0 0; color: var(--text-dim); font-size: 15px; line-height: 1.6; }

/* ---------- Reveal on scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  /* Opacity finishes long before the slide does. While an element is
     translucent the animated backdrop shows through it *and* through its
     text, and the letterforms come apart; a short fade closes that window
     while the movement still reads. */
  transition: opacity 0.22s ease, transform 0.5s ease;
}
[data-reveal].is-revealed { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn, .card, a.card { transition: none; }
}

/* ---------- Stub pages ---------- */
.stub-page { padding: clamp(80px, 12vw, 150px) 0; text-align: center; }
.stub-page .page-title { margin-bottom: 14px; }
.stub-page p { color: var(--text-dim); margin: 0 0 28px; }

/* ---------- Shared page-level pieces ---------- */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

.lead--wide { max-width: 820px; }

.panel-title { font-size: clamp(22px, 2.6vw, 28px); margin: 14px 0 18px; }
.panel > .eyebrow + .panel-title { margin-top: 14px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }

.icon-tile--lg {
  width: 62px;
  height: 62px;
  border-radius: 17px;
  margin-bottom: 0;
}
.icon-tile--lg svg { width: 30px; height: 30px; }

/* Non-interactive card: keeps the surface, drops the hover affordance. */
.card--static { cursor: default; }

.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
