/* vesta-site — the Vesta brand, not the Ingenium house style.
 *
 * Source of truth: docs/flyer/vesta-flyer.html (ember on ink/paper). The values below are copied
 * from it, not approximated. apps/portal was rebranded to the same palette in #62 — keep all three
 * in step.
 *
 *   ink   #1B1420 · #2A1E2C · #24140F      the dark ground
 *   ember #FBBF24 · #F97316 · #EA580C      the flame ramp
 *   paper #FCFBF9 · tint #F5EFE7 · line #EBE2D6
 *
 * ⚠ ACCESSIBILITY, carried over from the portal rebrand: interactive surfaces use DEEP ember
 * (#9A4310), never the bright ramp. #EA580C on white measures 3.56:1 and FAILS WCAG AA for body
 * text; #9A4310 measures 6.59:1. The bright embers stay decorative — gradients, icon tiles, the
 * flame. This is why links and buttons here are not the colour the flyer's headlines are.
 *
 * Font: the flyer uses "Segoe UI"/Helvetica/Arial. Matched here rather than pulling a webfont —
 * a runtime request to a third party would undercut a page selling an air gap.
 */

:root {
  --ink: #1b1420;
  --ink-2: #2a1e2c;
  --ink-warm: #24140f;

  --ember-1: #fbbf24;
  --ember-2: #f97316;
  --ember-3: #ea580c;
  --ember-deep: #9a4310;   /* interactive only — see the note above */
  --ember-deeper: #7c350c;
  --gold: #f59e0b;
  --kicker: #e6a15c;

  --paper: #fcfbf9;
  --tint: #f5efe7;
  --line: #ebe2d6;
  --text: #2a2530;
  --muted: #7a7067;
  --heading: #1b1420;

  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgb(27 20 32 / 8%);
  --shadow-xl: 0 20px 30px -12px rgb(27 20 32 / 22%);

  --header-h: 4rem;

  --hero-bg:
    radial-gradient(60% 90% at 88% 8%, rgb(249 115 22 / 45%), rgb(249 115 22 / 0) 60%),
    radial-gradient(50% 80% at 100% 0%, rgb(251 191 36 / 35%), rgb(251 191 36 / 0) 55%),
    linear-gradient(135deg, #241826 0%, #1b1420 55%, #24140f 100%);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  font-family: "Segoe UI", Helvetica, Arial, "DejaVu Sans", -apple-system,
    BlinkMacSystemFont, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ember-deep); text-decoration: none; }
a:hover { color: var(--ember-deeper); text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.22; color: var(--heading); letter-spacing: -0.01em; }

img, svg { max-width: 100%; }

code, pre, kbd, samp {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono",
    monospace;
  font-size: 0.9em;
}

.container {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container.narrow { max-width: 46rem; }

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgb(252 251 249 / 88%);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1rem;
}

.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--heading); }
.brand:hover { text-decoration: none; }
.brand-mark { width: 2rem; height: 2rem; flex: 0 0 auto; }

.brand-name {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.22em;   /* the flyer wordmark is widely tracked */
}

.brand-kicker {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 0.7rem;
}

.nav-links { display: flex; gap: 1.5rem; font-size: 0.95rem; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--ember-deep); text-decoration: none; }

main { padding-top: var(--header-h); }

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

.hero { background: var(--hero-bg); color: #f7f1ea; position: relative; overflow: hidden; }
.hero-inner { padding: 5.5rem 1.25rem 4.5rem; }

.hero-glow {
  position: absolute;
  right: 4%;
  top: 12%;
  width: 15rem;
  height: 15rem;
  opacity: 0.16;
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--kicker);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.hero h1 {
  margin: 0 0 1.1rem;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  color: #fff;
  max-width: 20ch;
}

/* The flyer sets the second line in bright ember on ink — decorative display text at 3rem+,
   which is why the bright ramp is acceptable here and not on links. */
.flame-word { color: var(--ember-1); }

.hero-sub {
  max-width: 42rem;
  margin: 0 0 2rem;
  font-size: 1.1rem;
  color: #dfd3c8;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ---- the ink strip under the hero ------------------------------------------------------ */

.strip { background: var(--ink); color: #f1e7dc; padding: 0.85rem 0; font-size: 0.95rem; }
.strip .container { display: flex; align-items: center; gap: 0.75rem; }
.strip svg { width: 1.1rem; height: 1.1rem; stroke: var(--ember-1); stroke-width: 2; fill: none; flex: 0 0 auto; }
.strip b { color: var(--ember-1); font-weight: 600; }

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

.btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: 0.5rem;
  font-weight: 700;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--ember-deep); color: #fff; }
.btn-primary:hover { background: var(--ember-deeper); color: #fff; }

.btn-ghost { background: rgb(255 255 255 / 10%); color: #fff; border: 1px solid rgb(255 255 255 / 28%); }
.btn-ghost:hover { background: rgb(255 255 255 / 20%); color: #fff; }

.section .btn-ghost,
.page-head .btn-ghost {
  background: #fff;
  color: var(--text);
  border-color: var(--line);
}
.section .btn-ghost:hover,
.page-head .btn-ghost:hover { background: var(--tint); color: var(--heading); }

.link-arrow { font-weight: 700; }

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

.section { padding: 4rem 0; }
.section-alt { background: var(--tint); }

.section-dark { background: var(--hero-bg); color: #e4d8cc; }
.section-dark h2, .section-dark h3 { color: #fff; }

.section h2 { margin: 0 0 0.7rem; font-size: clamp(1.55rem, 3vw, 2.1rem); font-weight: 800; }
.section-sub { margin: 0 0 2.25rem; max-width: 46rem; font-size: 1.02rem; color: var(--muted); }
.section-foot { margin: 2rem 0 0; color: var(--muted); }
.section-foot-dark { color: #cdbfb2; }
.section-foot-dark a { color: var(--ember-1); }

.page-head { padding: 3.25rem 0 1rem; border-bottom: 1px solid var(--line); }
.page-head h1 { margin: 0 0 0.7rem; font-size: clamp(1.85rem, 4vw, 2.6rem); font-weight: 800; }
.page-sub { margin: 0 0 1.5rem; font-size: 1.02rem; color: var(--muted); max-width: 46rem; }

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

.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card h3 { margin: 0 0 0.5rem; font-size: 1.1rem; font-weight: 800; }
.card p { margin: 0 0 0.85rem; color: var(--muted); font-size: 0.97rem; }
.card p:last-child { margin-bottom: 0; }

.card-dark { background: rgb(255 255 255 / 6%); border-color: rgb(255 255 255 / 14%); box-shadow: none; }
.card-dark p { color: #e4d8cc; }

/* The flyer's lead feature: a card with an ember rule down its left edge. */
.feature {
  border: 1px solid var(--line);
  border-left: 4px solid var(--ember-3);
  border-radius: var(--radius);
  background: linear-gradient(120deg, #fff, var(--tint));
  padding: 1.4rem 1.6rem;
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}
.feature h3 { margin: 0 0 0.3rem; font-size: 1.12rem; font-weight: 800; }
.feature p { margin: 0; color: var(--muted); }

/* Icon tile — decorative, so the bright ember ramp is fine here. */
.ico {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.6rem;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgb(251 191 36 / 18%), rgb(234 88 12 / 15%));
  margin-bottom: 0.85rem;
}
.ico svg { width: 1.25rem; height: 1.25rem; stroke: var(--ember-3); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.feature .ico { margin-bottom: 0; }

.hover-lift { transition: transform 0.3s, box-shadow 0.3s; }
.hover-lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-xl); }

.ticks { margin: 0 0 0.9rem; padding-left: 1.1rem; color: var(--muted); font-size: 0.95rem; }
.ticks li { margin-bottom: 0.3rem; }

/* ---- Maya band ------------------------------------------------------------------------- */

.maya {
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  color: #f7f1ea;
  display: flex;
  gap: 1.1rem;
  align-items: center;
  background:
    radial-gradient(60% 120% at 92% 50%, rgb(249 115 22 / 40%), rgb(249 115 22 / 0) 60%),
    linear-gradient(120deg, var(--ink-2), var(--ink));
}
.maya svg { width: 2.5rem; height: 2.5rem; flex: 0 0 auto; }
.maya h3 { margin: 0 0 0.25rem; font-size: 1.15rem; font-weight: 800; color: #fff; }
.maya h3 span { color: var(--ember-1); }
.maya p { margin: 0; color: #e4d8cc; font-size: 0.97rem; }

/* ---- use-case chips -------------------------------------------------------------------- */

.usecases { margin-top: 2rem; }

.usecases-label {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chips span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ember-deep);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgb(251 191 36 / 16%), rgb(234 88 12 / 10%));
}

/* ---- spec tables (the SKU section) ----------------------------------------------------- */

.spec { width: 100%; border-collapse: collapse; font-size: 0.93rem; margin: 0 0 1rem; }
.spec th, .spec td { text-align: left; padding: 0.45rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { color: var(--muted); font-weight: 600; white-space: nowrap; padding-right: 1rem; }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }

.price { font-size: 1.05rem; font-weight: 800; color: var(--heading); }
.price small { display: block; font-size: 0.8rem; font-weight: 400; color: var(--muted); }

/* ---- callouts + code ------------------------------------------------------------------- */

.callout {
  margin: 2.25rem 0 0;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--ember-3);
  border-radius: var(--radius);
  background: var(--tint);
}
.callout h3 { margin: 0 0 0.5rem; font-size: 1.02rem; font-weight: 800; }
.callout ul { margin: 0; padding-left: 1.1rem; color: var(--muted); }
.callout p { color: var(--muted); }
.callout p:last-child { margin-bottom: 0; }
.callout-next { border-left-color: var(--ember-1); }
.callout-next .btn { margin: 0.5rem 0.5rem 0 0; }

.checksum {
  overflow-wrap: anywhere;
  background: var(--ink);
  color: var(--ember-1);
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
}
.checksum code { color: inherit; }

pre {
  overflow-x: auto;
  padding: 1rem 1.15rem;
  background: var(--ink);
  color: #f1e7dc;
  border-radius: var(--radius);
  line-height: 1.55;
}
pre code { color: inherit; background: none; padding: 0; border: 0; }

:not(pre) > code {
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  padding: 0.1rem 0.35rem;
  color: var(--heading);
}

/* ---- documents ------------------------------------------------------------------------- */

.doc-layout {
  display: grid;
  grid-template-columns: 16rem minmax(0, 1fr);
  gap: 3rem;
  padding-top: 2.5rem;
  padding-bottom: 4rem;
  align-items: start;
}

.doc-toc {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  max-height: calc(100vh - var(--header-h) - 3rem);
  overflow-y: auto;
  font-size: 0.9rem;
}

.doc-toc-heading {
  margin: 0 0 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.doc-toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.doc-toc li a { display: block; padding: 0.25rem 0 0.25rem 0.85rem; color: var(--muted); }
.doc-toc li a:hover { color: var(--ember-deep); text-decoration: none; }
.doc-toc .toc-l2 a { padding-left: 1.6rem; font-size: 0.85rem; }

.doc { min-width: 0; }
.doc > :first-child { margin-top: 0; }
.doc h1 { font-size: clamp(1.75rem, 4vw, 2.3rem); margin: 0 0 1rem; font-weight: 800; }
.doc h2 {
  font-size: 1.45rem;
  margin: 2.6rem 0 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--line);
  font-weight: 800;
}
.doc h3 { font-size: 1.12rem; margin: 1.9rem 0 0.55rem; font-weight: 800; }
.doc h4 { font-size: 1rem; margin: 1.4rem 0 0.5rem; }

.doc p, .doc li { color: var(--text); }
.doc ul, .doc ol { padding-left: 1.35rem; }
.doc li { margin-bottom: 0.35rem; }

.doc blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--ember-3);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--tint);
  color: var(--text);
}
.doc blockquote > :first-child { margin-top: 0; }
.doc blockquote > :last-child { margin-bottom: 0; }

.doc hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

.doc table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.94rem;
}
.doc thead th { text-align: left; background: var(--tint); border-bottom: 2px solid var(--line); }
.doc th, .doc td { padding: 0.6rem 0.85rem; border: 1px solid var(--line); vertical-align: top; }
.doc tbody tr:nth-child(even) { background: rgb(245 239 231 / 45%); }

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

.site-footer { background: var(--ink); color: #cdbfb2; padding: 3rem 0 1.5rem; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.footer-brand { display: flex; align-items: center; gap: 0.6rem; margin: 0 0 0.6rem; }
.footer-brand svg { width: 1.75rem; height: 1.75rem; }
.footer-brand span { font-size: 1.05rem; font-weight: 800; letter-spacing: 0.22em; color: #fff; }
.footer-note { margin: 0; max-width: 24rem; }
.footer-heading { margin: 0 0 0.6rem; font-weight: 700; color: #f1e7dc; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.35rem; }
.site-footer a { color: #cdbfb2; overflow-wrap: anywhere; }
.site-footer a:hover { color: var(--ember-1); }

.footer-legal {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--ink-2);
  font-size: 0.85rem;
  color: #9a8e83;
}
.footer-legal p { margin: 0; }

/* ---- responsive ------------------------------------------------------------------------ */

@media (max-width: 62rem) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .doc-toc { position: static; max-height: none; }
}

@media (max-width: 46rem) {
  .nav-links { display: none; }
  .brand-kicker { display: none; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-inner { padding: 4rem 1.25rem 3rem; }
  .hero-glow { display: none; }
  .maya { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hover-lift, .hover-lift:hover { transition: none; transform: none; }
}
