/* =============================================================
   Quarkray design system v2
   Matches the live quarkray.ro brand: teal→sand gradient, wave
   dividers, pill buttons, white shadow cards, Source Sans Pro.
   One stylesheet, no framework, no build step.
   Sections: 1 tokens · 2 reset · 3 type · 4 layout · 5 components
             6 page blocks · 7 motion · 8 responsive
   ============================================================= */

/* ---------- 1. TOKENS ------------------------------------- */

:root {
  color-scheme: light;

  /* surface */
  --bg:            #ffffff;
  --bg-deep:       #f6f8f8;
  --surface:       #ffffff;
  --surface-2:     #f3f6f6;
  --surface-3:     #eaeeee;

  /* ink */
  --ink:           #26343a;
  --ink-2:         #445056;
  --muted:         #6b7677;
  --faint:         #94a0a0;

  /* brand — exact quarkray.ro palette */
  --accent:        #21797c;
  --accent-hi:     #1b6669;
  --accent-ink:    #ffffff;
  --accent-wash:   rgba(33, 121, 124, 0.08);
  --accent-line:   rgba(33, 121, 124, 0.25);
  --sand:          #c99a52;
  --sand-deep:     #a97e3d;
  --sand-wash:     rgba(201, 154, 82, 0.12);
  --gradient:      linear-gradient(90deg, #21797c 0%, #e7cea9 100%);
  --gradient-deep: linear-gradient(90deg, #1b6669 0%, #d9b688 100%);

  /* structure */
  --line:          rgba(38, 52, 58, 0.11);
  --line-2:        rgba(38, 52, 58, 0.18);
  --shadow-sm:      0 2px 8px rgba(24, 42, 45, .06);
  --shadow:        0 8px 24px rgba(24, 42, 45, .09);
  --shadow-lg:     0 20px 40px rgba(24, 42, 45, .14);
  --shadow-xl:     0 24px 48px rgba(24, 42, 45, .20);

  /* type — Source Sans Pro throughout, exactly like the live site */
  --font-display: "Source Sans Pro", "Segoe UI", system-ui, sans-serif;
  --font-body: "Source Sans Pro", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  /* metrics */
  --radius:      10px;
  --radius-lg:   20px;
  --radius-pill: 999px;
  --gutter:      clamp(1.25rem, 4vw, 2.5rem);
  --measure:     68ch;
  --nav-h:       76px;
  --section-y:   clamp(4rem, 8vw, 7rem);
  --ease:        cubic-bezier(.22, .61, .36, 1);
}

/* ---------- 2. RESET -------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1.5rem);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; color: inherit; }

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

::selection { background: var(--accent); color: var(--accent-ink); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--accent);
  color: var(--accent-ink);
  padding: .7rem 1.1rem;
  font: 600 .85rem/1 var(--font-body);
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: .5rem; top: .5rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* decorative technical grid from a prior draft — intentionally inert */
.grid-field { display: none; }

/* ---------- 3. TYPE --------------------------------------- */

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

.h-display {
  font-size: clamp(2.4rem, 5.6vw, 4rem);
  letter-spacing: -0.02em;
  line-height: 1.04;
}
.h-1 { font-size: clamp(2rem, 4.4vw, 3.05rem); letter-spacing: -0.015em; }
.h-2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
.h-3 { font-size: clamp(1.2rem, 1.6vw, 1.35rem); line-height: 1.3; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(1.075rem, 1.55vw, 1.28rem);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 62ch;
}
.body-muted { color: var(--muted); }

.mono {
  font-family: var(--font-body);
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
}

strong { font-weight: 700; color: var(--ink); }

code {
  font-family: var(--font-mono);
  font-size: .875em;
  background: var(--accent-wash);
  color: var(--accent-hi);
  padding: .12em .38em;
  border-radius: 4px;
  word-break: break-word;
}

/* section eyebrow — small label + a short gradient bar, centered feel */
.rule-label {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1.4rem;
}
.rule-label .idx {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  flex-shrink: 0;
}

/* ---------- 4. LAYOUT ------------------------------------- */

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container-narrow { max-width: 820px; }

.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(2.75rem, 5.5vw, 4.5rem); }
.section--alt { background: var(--bg-deep); }
.section--bordered { border-top: 1px solid var(--line); }

.stack > * + * { margin-top: var(--stack-gap, 1rem); }

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

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.split--lead { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
.split--aside { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }

.section > .container { position: relative; z-index: 1; }

/* ---------- 5. COMPONENTS --------------------------------- */

/* --- buttons — pill-shaped, like the live site --- */
.btn {
  --btn-bg: var(--accent);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .95rem 1.7rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: .97rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s var(--ease), background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
/* hover keeps the pill's size, background and shadow exactly as-is —
   only the label and icon fade out, since both use `color`/`currentColor` */
.btn:hover { box-shadow: var(--shadow); color: transparent !important; }
.btn:active { opacity: .82; }

.btn--ghost {
  --btn-bg: var(--surface);
  --btn-fg: var(--ink);
  border-color: var(--line-2);
  box-shadow: none;
}
.btn--ghost:hover { --btn-bg: var(--accent-wash); border-color: var(--accent-line); }
.btn--sm { padding: .6rem 1.2rem; font-size: .875rem; }
.btn--block { width: 100%; }

/* text link with a soft underline */
.link {
  color: var(--accent);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size .25s var(--ease);
}
.link:hover { background-size: 100% 2px; }
.link .arrow { transition: transform .22s var(--ease); }
.link:hover .arrow { transform: translateX(3px); }

/* --- header — transparent over the gradient, solid once scrolled --- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  color: #fff;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease), color .2s var(--ease), backdrop-filter .3s;
}
.site-header.is-stuck {
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.5) blur(14px);
  backdrop-filter: saturate(1.5) blur(14px);
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.08rem;
  letter-spacing: .08em;
  margin-right: auto;
  flex-shrink: 0;
  color: inherit;
}
.brand .mark { color: currentColor; flex-shrink: 0; }
.brand .mark .orbit-a { transform-origin: 20px 20px; }
.brand:hover .mark .orbit-a { animation: spin 9s linear infinite; }
.brand:hover .mark .orbit-b { animation: spin 9s linear infinite reverse; }
.site-footer .brand { color: var(--ink); }
.site-footer .brand .mark { color: var(--accent); }

.nav { display: flex; align-items: center; gap: .1rem; }
.nav a {
  position: relative;
  padding: .55rem .75rem;
  font-size: .95rem;
  font-weight: 600;
  color: inherit;
  opacity: .92;
  border-radius: var(--radius);
  transition: opacity .18s var(--ease);
}
.nav a:hover { opacity: 1; }
.nav a[aria-current="page"] { opacity: 1; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }

.nav .btn {
  margin-left: .75rem;
  background: #fff;
  color: var(--accent-hi);
}
.nav .btn:hover { background: #fff; }
.site-header.is-stuck .nav .btn {
  background: var(--gradient);
  color: #fff;
}

.header-tools { display: flex; align-items: center; gap: .5rem; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: transparent;
  border: 1px solid currentColor;
  opacity: .85;
  border-radius: 50%;
  color: inherit;
  cursor: pointer;
  transition: opacity .18s var(--ease), background .18s var(--ease);
}
.icon-btn:hover { opacity: 1; background: rgba(255,255,255,.12); }
.site-header.is-stuck .icon-btn:hover { background: var(--accent-wash); }

.nav-toggle { display: none; }

/* mobile drawer — always solid/dark-on-white, like the source template */
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .5rem var(--gutter) 1.5rem;
    background: var(--surface);
    color: var(--ink);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
  }
  .nav[data-open="true"] { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav a {
    color: var(--ink);
    padding: .95rem .25rem;
    font-size: 1.08rem;
    border-bottom: 1px solid var(--line);
    opacity: 1;
  }
  .nav .btn {
    margin-left: 0;
    margin-top: 1.1rem;
    background: var(--gradient);
    color: #fff;
  }
  .header-cta { display: none; }
}
@media (min-width: 901px) {
  .nav > .btn { display: none; }
}

/* --- cards — white, rounded, shadow-lift, top accent bar --- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 2.6vw, 2.1rem) clamp(1.4rem, 2.4vw, 1.9rem);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--gradient);
}
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
/* a short code ("01", "S/01") reads as a small round badge; a longer
   category label ("Quality, lineage & observability") needs to size to
   its own text instead — both share this rule, sized by content so the
   colored background never runs out under the text (which is what made
   hover text turn invisible against the plain white card). */
.card .card-idx {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-width: 44px;
  max-width: 100%;
  padding: .5rem 1rem;
  margin: .35rem auto 1.1rem;
  border-radius: var(--radius-pill);
  background: var(--accent-wash);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .82rem;
  line-height: 1.3;
  text-align: center;
  transition: transform .3s var(--ease), background .3s var(--ease), color .3s var(--ease);
}
.card:hover .card-idx { transform: scale(1.04); background: var(--gradient); color: #fff; }
.card .card-idx svg { width: 22px; height: 22px; flex-shrink: 0; }
.card h3 { margin-bottom: .6rem; }
.card p { color: var(--muted); font-size: .97rem; }
.card .link { margin-top: 1.1rem; font-size: .92rem; justify-content: center; }

a.card { display: block; }
a.card:hover h3 { color: var(--accent); }

/* card grids: independent shadow cards with generous gaps */
.panel-grid {
  display: grid;
  gap: 1.5rem;
}
.panel-grid > .card,
.panel-grid > a { text-align: center; }

/* a handful of cards carry left-aligned body copy (spec tables etc.) —
   keep those readable instead of centering paragraphs of text */
.split .card { text-align: left; }
.split .card .card-idx { margin-inline: 0; }

/* --- chips / tech tokens --- */
.chip-set { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.split .chip-set { justify-content: flex-start; }
.chip {
  font-family: var(--font-body);
  font-size: .82rem;
  font-weight: 600;
  padding: .45rem .95rem;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-pill);
  color: var(--ink-2);
  background: var(--surface);
  white-space: nowrap;
  transition: border-color .18s var(--ease), color .18s var(--ease), background .18s var(--ease);
}
.chip:hover { border-color: var(--accent-line); color: var(--accent); background: var(--accent-wash); }
.chip--core { border-color: var(--accent-line); color: var(--accent-hi); background: var(--accent-wash); font-weight: 700; }

/* --- facts strip --- */
.facts {
  display: grid;
  gap: 1px;
  background: var(--bg-deep);
  border-block: 1px solid var(--line);
}
.facts > div {
  background: var(--bg-deep);
  padding: 1.6rem clamp(1rem, 2vw, 1.9rem);
  text-align: center;
}
.facts .k { display: block; margin-bottom: .5rem; }
.facts .v { font-size: .93rem; color: var(--muted); line-height: 1.45; }

/* --- numbered step list --- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 1.6rem 0 1.6rem 4rem;
  border-top: 1px solid var(--line);
}
.steps > li:last-child { border-bottom: 1px solid var(--line); }
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0; top: 1.5rem;
  width: 34px; height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 700;
}
.steps h3 { margin-bottom: .4rem; }
.steps p { color: var(--muted); font-size: .97rem; max-width: 62ch; }

/* --- checklist --- */
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.ticks li {
  position: relative;
  padding-left: 1.9rem;
  color: var(--ink-2);
  font-size: .97rem;
}
.ticks li::before {
  content: "✓";
  position: absolute;
  left: 0; top: -.05em;
  width: 20px; height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--accent);
  border-radius: 50%;
  font-size: .65rem;
  font-weight: 700;
}

/* --- FAQ — soft cards, not a hairline list --- */
.faq { display: grid; gap: 1rem; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 1.4rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s var(--ease);
}
.faq details[open] { box-shadow: var(--shadow); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.3rem 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  font-weight: 700;
  transition: color .18s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq summary::after {
  content: "";
  flex-shrink: 0;
  width: 11px; height: 11px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .25s var(--ease);
  opacity: .5;
  color: var(--accent);
}
.faq details[open] summary { color: var(--accent); }
.faq details[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq .answer { padding: 0 0 1.4rem; color: var(--muted); max-width: 72ch; }

/* --- callout --- */
.callout {
  background: var(--accent-wash);
  padding: 1.2rem 1.4rem;
  border-radius: var(--radius);
  color: var(--ink-2);
  font-size: .98rem;
}

/* --- soft elevated panel (used for asides, mock UI, timelines) --- */
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.panel-bar {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .9rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: var(--accent-wash);
  color: var(--accent-hi);
  font-weight: 700;
  font-size: .8rem;
}
.panel-bar .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--gradient);
  flex-shrink: 0;
}
.panel-bar .spacer { margin-left: auto; }
.panel-body { padding: clamp(1.2rem, 2.6vw, 1.75rem); }

/* --- forms --- */
.field { display: grid; gap: .45rem; margin-bottom: 1.15rem; }
.field label { font-size: .89rem; font-weight: 700; color: var(--ink-2); }
.field label .req { color: var(--accent); }
.field .hint { font-size: .8rem; color: var(--faint); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: .8rem .95rem;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  font-size: .97rem;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.field textarea { min-height: 130px; resize: vertical; line-height: 1.55; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.4rem;
}

/* --- prose (blog + legal) --- */
.prose { max-width: var(--measure); color: var(--ink-2); font-size: 1.075rem; line-height: 1.72; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  margin-top: 2.4em;
  margin-bottom: .1em;
  color: var(--ink);
  scroll-margin-top: calc(var(--nav-h) + 2rem);
}
.prose h3 {
  font-size: 1.18rem;
  margin-top: 1.9em;
  margin-bottom: .1em;
  color: var(--ink);
  scroll-margin-top: calc(var(--nav-h) + 2rem);
}
.prose h4 {
  font-size: 1.02rem;
  margin-top: 1.6em;
  margin-bottom: .1em;
  color: var(--ink);
}
.prose h2 + p, .prose h3 + p, .prose h4 + p { margin-top: .55em; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--accent); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose blockquote {
  margin: 1.6em 0;
  padding: 1rem 1.3rem;
  border-left: 4px solid var(--accent);
  background: var(--accent-wash);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink);
  font-style: normal;
}
.prose pre {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-size: .87rem;
  line-height: 1.55;
}
.prose pre code { background: none; padding: 0; color: var(--ink-2); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.6em 0; }
.prose table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .95rem; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: .7rem .9rem; text-align: left; }
.prose th { background: var(--surface-2); font-weight: 700; color: var(--ink); }

/* --- footer --- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding-block: clamp(3rem, 6vw, 4.5rem) 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
}
.footer-grid h4 {
  font-family: var(--font-body);
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--faint);
  margin-bottom: 1rem;
}
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.footer-links a { font-size: .94rem; color: var(--muted); transition: color .18s var(--ease); }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  border-top: 1px solid var(--line);
  padding-block: 1.5rem 1.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  color: var(--faint);
  font-size: .88rem;
}

/* ---------- 6. PAGE BLOCKS -------------------------------- */

/* gradient band shared by the home hero and every inner page-head,
   with the same wave-divider silhouette as the live site, done as a
   pure CSS mask so no per-page markup is needed */
.hero, .page-head {
  position: relative;
  color: #fff;
  background: var(--gradient);
  overflow: hidden;
}
.hero::after, .page-head::after {
  content: "";
  position: absolute;
  left: -2%; right: -2%; bottom: -1px;
  height: 13%;
  min-height: 46px;
  background: var(--bg);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath d='M0,32 C180,78 340,86 500,68 C660,50 760,10 960,14 C1140,18 1260,58 1440,40 L1440,100 L0,100 Z'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath d='M0,32 C180,78 340,86 500,68 C660,50 760,10 960,14 C1140,18 1260,58 1440,40 L1440,100 L0,100 Z'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
  pointer-events: none;
}
.section--alt.hero::after, .section--alt.page-head::after { background: var(--bg-deep); }

.hero {
  padding-top: calc(var(--nav-h) + clamp(3.25rem, 7vw, 5.5rem));
  padding-bottom: clamp(5.5rem, 10vw, 8rem);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(0, .97fr);
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}

.page-head {
  padding-top: calc(var(--nav-h) + clamp(2.5rem, 5.5vw, 3.75rem));
  padding-bottom: clamp(4rem, 7vw, 5.5rem);
}
.breadcrumb { display: flex; gap: .5rem; align-items: center; color: rgba(255,255,255,.8); margin-bottom: 1.4rem; font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.breadcrumb a { color: rgba(255,255,255,.95); }
.breadcrumb a:hover { text-decoration: underline; }
.hero .lede, .page-head .lede { color: rgba(255,255,255,.92); }
.hero .mono, .page-head .mono { color: rgba(255,255,255,.85); }
/* ...except inside a nested white card (the hero mockup, an aside panel) */
.hero .panel .mono, .page-head .panel .mono { color: var(--accent-hi); }
.hero .rule-label .idx, .page-head .rule-label .idx { background: #fff; color: var(--accent-hi); }
.page-head .chip { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.35); color: #fff; }
.page-head .chip:hover { background: rgba(255,255,255,.24); border-color: #fff; color: #fff; }

/* pipeline schematic — recolored for a white card, not a dark terminal */
.schematic { width: 100%; height: auto; }
.schematic .node-box { fill: var(--surface); stroke: var(--line-2); }
.schematic .node-box-hi { fill: var(--accent-wash); stroke: var(--accent-line); }
.schematic .edge { stroke: var(--line-2); stroke-width: 1.5; fill: none; }
.schematic .flow {
  stroke: var(--accent);
  stroke-width: 1.75;
  fill: none;
  stroke-dasharray: 5 9;
  animation: flow 1.4s linear infinite;
}
.schematic .label { fill: var(--muted); font-family: var(--font-body); font-weight: 700; font-size: 9px; letter-spacing: .04em; }
.schematic .label-hi { fill: var(--accent-hi); font-family: var(--font-body); font-weight: 700; font-size: 9px; letter-spacing: .04em; }
.schematic .glyph { stroke: var(--accent); fill: none; stroke-width: 1.25; }
.schematic .pulse { fill: var(--sand-deep); animation: pulse 2.6s ease-in-out infinite; }
.schematic .spark { stroke: var(--sand-deep); stroke-width: 1.75; fill: none; }

/* marquee of stack names — soft tinted strip */
.marquee {
  position: relative;
  overflow: hidden;
  background: var(--accent-wash);
  padding-block: 1.1rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 2.2rem;
  width: max-content;
  animation: marquee 46s linear infinite;
}
.marquee-track span {
  font-family: var(--font-body);
  font-size: .84rem;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--accent-hi);
  white-space: nowrap;
}
.marquee-track span::before { content: "◆"; color: var(--sand-deep); margin-right: 2.2rem; opacity: .8; font-size: .6em; vertical-align: middle; }
.marquee:hover .marquee-track { animation-play-state: paused; }

/* big CTA band — full gradient, like the live contact section */
.cta-band {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--gradient);
  color: #fff;
  padding: clamp(2.25rem, 5vw, 3.75rem);
  overflow: hidden;
  text-align: center;
}
.cta-band h2, .cta-band .lede { color: #fff; margin-inline: auto; }
.cta-band .lede { color: rgba(255,255,255,.92); }
.cta-band .mono { color: rgba(255,255,255,.85); }
.cta-band .btn:not(.btn--ghost) { --btn-bg: #fff; --btn-fg: var(--accent-hi); }
.cta-band .btn--ghost { --btn-bg: transparent; --btn-fg: #fff; border-color: rgba(255,255,255,.55); }
.cta-band .btn--ghost:hover { --btn-bg: rgba(255,255,255,.16); border-color: #fff; }
.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .85rem; margin-top: 1.85rem; }
.split .cta-actions, .split--aside .cta-actions { justify-content: flex-start; }

/* article list on the blog index — card grid, not a hairline row list */
.post-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.post-row {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.6rem;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  position: relative;
  overflow: hidden;
}
.post-row::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--gradient); }
.post-row:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.post-row .meta { color: var(--accent); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .9rem; display: block; }
.post-row h3 { margin-bottom: .55rem; transition: color .18s var(--ease); }
.post-row:hover h3 { color: var(--accent); }
.post-row p { color: var(--muted); font-size: .95rem; flex: 1; }
.post-row .go { color: var(--accent); font-weight: 700; margin-top: 1rem; }

/* article meta bar */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1.1rem;
  color: rgba(255,255,255,.85);
  margin-top: 1.4rem;
  font-size: .88rem;
  font-weight: 600;
}
.article-meta .sep { opacity: .6; }

/* reading progress */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 100%;
  transform-origin: left;
  transform: scaleX(0);
  background: var(--gradient);
  z-index: 101;
}

/* article: prose + sticky table of contents */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.toc {
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .55rem;
  counter-reset: toc;
}
.toc ol a {
  display: block;
  padding: .12rem 0;
  font-size: .89rem;
  line-height: 1.35;
  color: var(--muted);
  font-weight: 600;
  transition: color .18s var(--ease);
}
.toc ol a:hover { color: var(--ink); }
.toc ol a.is-active { color: var(--accent); }
.toc-cta { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }

.post-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.post-nav > div {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.35rem 1.5rem;
}
.post-nav > div:last-child { text-align: right; }
.post-nav > div:only-child { text-align: left; }

@media (max-width: 980px) {
  .article-layout { grid-template-columns: 1fr; }
  .toc { position: static; order: -1; }
  .toc-cta { display: none; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav > div:last-child { text-align: left; }
}

/* service anatomy table — framed as a soft card */
.spec {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .95rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.spec th, .spec td { padding: 1rem 1.4rem; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }
.spec th {
  width: 34%;
  font-family: var(--font-body);
  font-size: .78rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-wash);
}
.spec td { color: var(--ink-2); }

/* ---------- 7. MOTION ------------------------------------- */

@keyframes flow { to { stroke-dashoffset: -28; } }
@keyframes pulse {
  0%, 100% { opacity: .35; transform: scale(.85); }
  50%      { opacity: 1;   transform: scale(1.15); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes marquee { to { transform: translateX(-50%); } }

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .07s; }
.reveal[data-delay="2"] { transition-delay: .14s; }
.reveal[data-delay="3"] { transition-delay: .21s; }
.reveal[data-delay="4"] { transition-delay: .28s; }
.reveal[data-delay="5"] { transition-delay: .35s; }
/* children inside a card grid must not fade individually */
.panel-grid > .reveal { opacity: 1; transform: none; }

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

/* ---------- 8. RESPONSIVE --------------------------------- */

@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 620px; margin-top: 1rem; }
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .split, .split--lead, .split--aside { grid-template-columns: 1fr; gap: 2.25rem; }
  .split .card, .split .card .card-idx { text-align: center; }
  .split .card .card-idx { margin-inline: auto; }
  .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-list { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  :root { --nav-h: 64px; }
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .spec th { width: auto; display: block; padding-bottom: .35rem; }
  .spec td { display: block; padding-top: 0; }
  .btn { width: 100%; }
  .cta-actions .btn { width: auto; }
}

@media print {
  .site-header, .site-footer, .cta-band, .progress { display: none; }
  body { background: #fff; color: #000; }
}
