/* ==========================================================================
   Elysian Tech Leverage — product design system
   Cool slate, teal accent, sans-first. Mobile-first, no dependencies.
   ========================================================================== */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/fraunces-600.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/fraunces-700.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/source-sans-3-400.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/source-sans-3-400i.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/source-sans-3-600.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/source-sans-3-700.woff2") format("woff2");
}

:root {
  --paper: #eef3f6;
  --paper-deep: #dce6ec;
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #d5dee6;
  --line-strong: #becad4;
  --surface: #ffffff;
  --surface-2: #f1f7f8;
  --accent: #0d9488;
  --accent-deep: #0f766e;
  --accent-soft: #14b8a6;
  --bronze: var(--accent);
  --bronze-deep: var(--accent-deep);
  --gold: var(--accent-soft);
  --forest: #0f766e;
  --warn: #b45309;
  --danger: #dc2626;
  --focus: #0d9488;
  --code-bg: #0f172a;

  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --shadow: 0 1px 0 rgba(15, 23, 42, 0.04), 0 16px 36px -22px rgba(15, 23, 42, 0.28);
  --shadow-soft: 0 1px 0 rgba(15, 23, 42, 0.05);
  --maxw: 1160px;
  --gap: 1.1rem;
  --ring: 0 0 0 3px rgba(13, 148, 136, 0.18);

  --font-serif: "Source Sans 3", "Avenir Next", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-sans: "Source Sans 3", "Avenir Next", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "IBM Plex Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse 900px 480px at 100% -12%, rgba(20, 184, 166, 0.16), transparent 58%),
    radial-gradient(ellipse 720px 420px at -8% 8%, rgba(56, 189, 248, 0.08), transparent 55%),
    radial-gradient(ellipse 700px 380px at -10% 0%, rgba(15, 23, 42, 0.05), transparent 55%);
  color: var(--ink-soft);
  line-height: 1.65;
  font-size: 17px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 200;
  opacity: 0.13;
  background-image: url("../img/noise.svg");
  background-size: 180px 180px;
  mix-blend-mode: overlay;
}

img { max-width: 100%; height: auto; }

a { color: var(--bronze); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--bronze-deep); }

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  line-height: 1.18;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.03em;
}
h1 { font-size: clamp(2.05rem, 4.6vw, 3.2rem); font-weight: 700; margin: 0 0 0.7rem; overflow-wrap: break-word; }
h2 { font-size: clamp(1.45rem, 2.8vw, 2rem); margin-top: 2.6rem; }
h3 { font-size: 1.22rem; }

p { color: var(--ink-soft); }

code, pre, kbd, samp { font-family: var(--font-mono); }
:not(pre) > code {
  background: var(--surface-2);
  padding: 0.12em 0.38em;
  border-radius: 5px;
  font-size: 0.86em;
  border: 1px solid var(--line);
  color: var(--ink);
}

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

/* --- Skip link & focus ---------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent-soft);
  color: var(--ink);
  padding: 0.6rem 1rem;
  border-radius: 0 0 8px 0;
  z-index: 1000;
}
.skip-link:focus { left: 0; }

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

/* --- Layout --------------------------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
main { flex: 1 0 auto; padding: 1.75rem 0 4.5rem; }
.section { margin: 3.6rem 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.65rem;
  padding-bottom: 0;
  border-bottom: 0;
}
.section-head .kicker { margin-bottom: 0.45rem; }
.section-head h2 { margin: 0; }
.section-head h2::after {
  content: "";
  display: block;
  width: 2.4rem;
  height: 3px;
  margin-top: 0.7rem;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent-soft), transparent);
}
.section-head p { color: var(--muted); margin: 0.45rem 0 0; max-width: 42rem; }
.muted { color: var(--muted); }
.dim { color: var(--faint); }
.small { font-size: 0.875rem; }
.center { text-align: center; }

.kicker,
.eyebrow {
  display: inline-block;
  color: var(--bronze);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin: 0 0 0.85rem;
}

.lead {
  font-size: 1.18rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 40rem;
}

/* --- Header / nav --------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(1.2) blur(16px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 28px -24px rgba(15, 23, 42, 0.35);
}
.site-header::before {
  content: "";
  display: block;
  height: 2px;
  background: linear-gradient(90deg, #0f766e, #2dd4bf, #38bdf8, #2dd4bf, #0f766e);
  background-size: 220% 100%;
  animation: bar-shift 9s linear infinite;
}
.brand .logo {
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.3s ease;
  filter: drop-shadow(0 6px 10px rgba(20, 184, 166, 0.18));
}
.brand:hover .logo { transform: rotate(-6deg) scale(1.04); }
.nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 0.85rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
  min-width: 0;
}
.brand:hover { text-decoration: none; color: var(--ink); }
.brand .logo { width: 36px; height: 36px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: -0.03em;
}
.brand-sub {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-top: 0.18rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: 0.35rem;
}
.nav-link,
.nav-links > a {
  color: var(--ink-soft);
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  background: transparent;
  border: 0;
  font-family: inherit;
  cursor: pointer;
}
.nav-link:hover,
.nav-links > a:hover {
  color: var(--ink);
  background: var(--paper-deep);
  text-decoration: none;
}
.nav-caret { display: inline-flex; align-items: center; gap: 0.35rem; }
.nav-caret::after {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
}

.nav-item { position: relative; }

.mega {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  width: min(640px, calc(100vw - 2.5rem));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.85rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.35rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
  z-index: 120;
}
.mega::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -0.55rem;
  height: 0.55rem;
}
.mega a {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.7rem 0.75rem;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
}
.mega a strong { font-family: var(--font-sans); font-size: 0.98rem; font-weight: 700; }
.mega a span { color: var(--muted); font-size: 0.8rem; line-height: 1.35; font-weight: 400; }
.mega a:hover { background: var(--surface-2); text-decoration: none; color: var(--ink); }
.has-menu.open .mega,
.has-menu:hover .mega {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.nav-right { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 10px;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  position: relative;
  border-radius: 2px;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle-bars::before { top: -5px; }
.nav-toggle-bars::after { top: 5px; }

.search-mini { display: flex; gap: 0.35rem; }
.search-mini input {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 8px;
  padding: 0.48rem 0.9rem;
  width: 168px;
  font-size: 0.9rem;
  font-family: inherit;
}
.search-mini input::placeholder { color: var(--faint); }
.search-mini input:focus { border-color: var(--accent); outline: none; box-shadow: var(--ring); }

@media (max-width: 960px) {
  .nav { flex-wrap: wrap; }
  .nav-toggle { display: inline-flex; margin-left: auto; }
  .brand-sub { display: none; }
  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    order: 3;
    padding: 0.35rem 0 0.85rem;
    gap: 0.2rem;
  }
  .nav-links.open { display: flex; }
  .nav-right {
    display: none;
    order: 4;
    width: 100%;
    margin-left: 0;
    padding-bottom: 0.75rem;
  }
  .nav-links.open ~ .nav-right { display: flex; }
  .search-mini { width: 100%; }
  .search-mini input { width: 100%; }
  .nav-item { width: 100%; }
  .mega {
    position: static;
    width: 100%;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    grid-template-columns: 1fr;
    margin-top: 0.35rem;
  }
  .has-menu.open .mega,
  .has-menu:hover .mega { display: grid; }
}

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.64rem 1.1rem;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95rem;
  font-family: inherit;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.25s ease, transform 0.2s ease;
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,0.38) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform 0.55s ease;
  pointer-events: none;
}
.btn:hover { text-decoration: none; border-color: var(--ink); color: var(--ink); background: var(--surface-2); transform: translateY(-1px); }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, #14b8a6 0%, #0d9488 100%);
  color: #f0fdfa;
  border-color: #0f766e;
  box-shadow: 0 8px 20px -10px rgba(13, 148, 136, 0.8);
}
.btn-primary:hover { background: linear-gradient(180deg, #2dd4bf 0%, #0d9488 100%); border-color: var(--accent-deep); color: #f0fdfa; filter: none; }
.btn-ghost { background: transparent; }
.btn-sm { padding: 0.38rem 0.8rem; font-size: 0.84rem; }
.btn-block { width: 100%; justify-content: center; }
.btn-danger { border-color: #e3c2bd; color: var(--danger); background: #fff8f6; }

/* --- Hero ----------------------------------------------------------------- */
.hero {
  padding: 2.2rem 2.15rem 1.7rem;
  text-align: left;
  background:
    radial-gradient(520px circle at var(--mx, 78%) var(--my, 18%), rgba(45, 212, 191, 0.22), transparent 46%),
    linear-gradient(155deg, #0b1f2a 0%, #0f172a 58%, #134e4a 130%);
  border-radius: var(--radius-lg);
  color: #cbd5e1;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 24px 50px -28px rgba(15, 23, 42, 0.55), inset 0 1px 0 rgba(255,255,255,0.08);
}
.hero > * { position: relative; z-index: 1; }
.hero-orbs { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  opacity: 0.55;
}
.orb-a {
  width: 280px; height: 280px; top: -90px; right: -40px;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.45), transparent 68%);
  animation: orb-drift 14s ease-in-out infinite;
}
.orb-b {
  width: 220px; height: 220px; bottom: -70px; left: 12%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.28), transparent 70%);
  animation: orb-drift 18s ease-in-out infinite reverse;
}
.orb-c {
  width: 160px; height: 160px; top: 38%; left: 42%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.18), transparent 70%);
  animation: orb-drift 16s ease-in-out infinite 1.4s;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../img/noise.svg");
  opacity: 0.16;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 0;
}
.hero-copy { min-width: 0; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.75fr);
  gap: 2.4rem;
  align-items: end;
}
.hero h1 { max-width: 16ch; color: #f8fafc; }
.hero .eyebrow { color: #5eead4; }
.hero p.lead { margin: 0 0 1.6rem; font-size: 1.16rem; max-width: 38rem; color: #94a3b8; }
.hero-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.hero .btn {
  background: transparent;
  color: #f8fafc;
  border-color: rgba(248, 250, 252, 0.28);
}
.hero .btn:hover { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: rgba(248, 250, 252, 0.5); }
.hero .btn-primary {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
  color: #042f2e;
}
.hero .btn-primary:hover { background: #5eead4; border-color: #5eead4; color: #042f2e; }
.hero-aside {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 1.3rem 1.35rem 1.2rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
  backdrop-filter: blur(18px) saturate(1.3);
}
.hero-aside blockquote {
  margin: 0 0 1.15rem;
  padding: 0;
  border: 0;
  font-family: var(--font-sans);
  font-size: 1.18rem;
  line-height: 1.35;
  color: #f8fafc;
  font-weight: 700;
}
.hero-points { list-style: none; padding: 0; margin: 0; }
.hero-points li {
  display: flex;
  gap: 0.7rem;
  padding: 0.55rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 0.92rem;
}
.hero-points strong { color: #e2e8f0; display: block; font-size: 0.95rem; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 2.1rem;
  padding-top: 1.3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.hero-stats div {
  padding-right: 0.75rem;
}
.hero-stats .value {
  display: block;
  font-family: var(--font-sans);
  font-size: 1.4rem;
  color: #f8fafc;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.hero-stats .label {
  display: block;
  color: #94a3b8;
  font-size: 0.84rem;
  margin-top: 0.15rem;
}

.page-hero {
  margin: 0.4rem 0 2rem;
  padding: 0 0 1.4rem 1.05rem;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  max-width: 46rem;
}
.page-hero h1 { margin-bottom: 0.65rem; }
.page-hero .lead { margin: 0; }
.page-hero + .section { margin-top: 1.35rem; }

@media (max-width: 820px) {
  .hero { padding: 1.6rem 1.2rem 1.35rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .hero h1 { max-width: none; font-size: clamp(1.85rem, 8vw, 2.4rem); }
  .hero-stats { grid-template-columns: 1fr; }
}

/* --- Grid & cards --------------------------------------------------------- */
.grid { display: grid; gap: var(--gap); perspective: 900px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) {
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
}

.card {
  background:
    radial-gradient(280px 140px at 0% 0%, rgba(20, 184, 166, 0.12), transparent 58%),
    linear-gradient(180deg, #ffffff 0%, #f5fafb 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  padding: 1.35rem 1.3rem 1.2rem;
  transition: border-color 0.28s ease, box-shadow 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  height: 100%;
  min-height: 13.5rem;
  box-shadow: 0 1px 0 rgba(255,255,255,0.8) inset, 0 12px 28px -22px rgba(15, 23, 42, 0.35);
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../img/noise.svg");
  opacity: 0.07;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.card::after {
  content: "";
  position: absolute;
  inset: -40% -20%;
  background: linear-gradient(115deg, transparent 42%, rgba(255,255,255,0.5) 50%, transparent 58%);
  transform: translateX(-70%);
  transition: transform 0.7s ease;
  pointer-events: none;
}
a.card:hover,
.card:hover {
  border-color: rgba(20, 184, 166, 0.38);
  box-shadow: 0 22px 44px -24px rgba(15, 23, 42, 0.4), 0 0 0 1px rgba(20, 184, 166, 0.14);
  text-decoration: none;
  transform: translateY(-7px);
}
a.card:hover::after,
.card:hover::after { transform: translateX(70%); }
.card h3 { margin: 0; font-size: 1.22rem; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--bronze-deep); }
.card .card-meta {
  font-size: 0.78rem;
  color: var(--faint);
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  align-items: center;
}
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; flex: 1 1 auto; }
.card .icon { font-size: 1.4rem; }
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}
.card-go {
  margin-top: 0.55rem;
  color: var(--accent-deep);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.card-go::after { content: " →"; }
.card:hover .card-go { color: var(--accent); }

.pillar-card .pillar-index {
  font-family: var(--font-sans);
  color: #5eead4;
  background: #0f172a;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  padding: 0.28rem 0.5rem;
  border-radius: 7px;
}
.card-icon {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.08);
  position: relative;
}
.card-icon::before,
.card-icon::after {
  content: "";
  position: absolute;
  background: var(--accent);
}
.card-icon-cpu::before { inset: 7px; border: 1.6px solid var(--accent); background: transparent; border-radius: 3px; }
.card-icon-flow::before { left: 6px; right: 6px; top: 15px; height: 1.6px; }
.card-icon-flow::after { left: 14px; top: 7px; width: 6px; height: 6px; border-radius: 50%; box-shadow: 0 12px 0 var(--accent), -8px 6px 0 var(--accent); background: var(--accent); }
.card-icon-grid::before { inset: 7px; background: transparent; border: 1.6px solid var(--accent); box-shadow: inset 7px 0 0 -1.4px var(--accent), inset 0 7px 0 -1.4px var(--accent); }
.card-icon-code::before { left: 8px; top: 10px; width: 6px; height: 6px; border-left: 1.6px solid var(--accent); border-bottom: 1.6px solid var(--accent); transform: rotate(45deg); background: transparent; }
.card-icon-code::after { right: 8px; top: 10px; width: 6px; height: 6px; border-right: 1.6px solid var(--accent); border-bottom: 1.6px solid var(--accent); transform: rotate(-45deg); background: transparent; }
.card-icon-cloud::before { left: 8px; right: 8px; bottom: 9px; height: 8px; border-radius: 8px 8px 4px 4px; }
.card-icon-nodes::before { left: 8px; top: 8px; width: 7px; height: 7px; border-radius: 50%; box-shadow: 10px 10px 0 var(--accent); }
.card-icon-nodes::after { left: 11px; top: 14px; width: 10px; height: 1.5px; transform: rotate(45deg); }
.card-icon-stack::before { left: 8px; right: 8px; top: 8px; height: 4px; box-shadow: 0 6px 0 var(--accent), 0 12px 0 var(--accent); }
.card-icon-shield::before { left: 10px; right: 10px; top: 7px; bottom: 8px; background: transparent; border: 1.6px solid var(--accent); border-radius: 3px 3px 10px 10px; }
.card-icon-bars::before { left: 8px; bottom: 8px; width: 4px; height: 8px; box-shadow: 7px -4px 0 var(--accent), 14px 2px 0 var(--accent); }

.tool-mark {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 8px;
  background: #0f172a;
  border: 1px solid rgba(94, 234, 212, 0.25);
  color: #5eead4;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.15rem;
  position: relative;
}
.calc-mark::before,
.calc-mark::after {
  content: "";
  position: absolute;
  background: #5eead4;
}
.calc-mark::before {
  top: 6px;
  left: 6px;
  right: 6px;
  height: 5px;
  border-radius: 1px;
  opacity: 0.95;
}
.calc-mark::after {
  top: 13px;
  left: 7px;
  width: 4px;
  height: 4px;
  border-radius: 1px;
  box-shadow: 7px 0 0 #5eead4, 14px 0 0 #5eead4, 0 6px 0 #5eead4, 7px 6px 0 #5eead4, 14px 6px 0 #5eead4;
}
.pill-card { text-align: left; }
.pill-card .pill-tag,
.card-kicker {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--bronze);
  font-weight: 700;
  font-family: var(--font-sans);
}

/* --- Badges & tags -------------------------------------------------------- */
.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.22rem 0.52rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface-2);
}
.badge.brand { color: var(--accent-deep); border-color: #99f6e4; background: #ccfbf1; }
.badge.accent { color: var(--forest); border-color: #99f6e4; background: #f0fdfa; }
.badge.warn { color: var(--warn); border-color: #ead8a6; background: #fbf4de; }
.badge.danger { color: var(--danger); border-color: #ecc4bf; background: #fdf1ef; }
.tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.tag {
  font-size: 0.8rem;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  text-decoration: none;
}
a.tag:hover { border-color: var(--bronze); color: var(--bronze-deep); text-decoration: none; }

/* --- Notices / callouts --------------------------------------------------- */
.notice {
  border: 1px solid var(--line);
  border-left: 3px solid var(--bronze);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.15rem;
  margin: 1.25rem 0;
}
.notice.warn { border-left-color: var(--warn); background: #fbf6ea; }
.notice.info { border-left-color: var(--bronze); }
.notice.accent { border-left-color: var(--forest); background: #f3f7f4; }
.notice strong { color: var(--ink); }
.notice p:last-child { margin-bottom: 0; }

.admonition {
  border: 1px solid var(--line);
  border-left: 3px solid var(--bronze);
  background: var(--surface);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin: 1.25rem 0;
}
.admonition-title { font-weight: 700; color: var(--ink); margin: 0 0 0.35rem; font-family: var(--font-sans); }
.admonition.warning { border-left-color: var(--warn); }
.admonition.danger { border-left-color: var(--danger); }
.admonition.note, .admonition.info { border-left-color: var(--bronze); }

/* --- Flash messages ------------------------------------------------------- */
.flashes { margin: 1rem 0; display: flex; flex-direction: column; gap: 0.5rem; }
.flash { padding: 0.75rem 1rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.flash.success { border-color: #c9ddd3; color: var(--forest); background: #eef6f1; }
.flash.danger { border-color: #ecc4bf; color: var(--danger); background: #fdf1ef; }
.flash.warning { border-color: #ead8a6; color: var(--warn); background: #fbf4de; }

/* --- Article layout ------------------------------------------------------- */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 2.75rem; align-items: start; }
@media (max-width: 980px) { .article-layout { grid-template-columns: 1fr; } .article-side { order: 3; } }

.prose { max-width: 100%; font-size: 1.06rem; }
.prose > *:first-child { margin-top: 0; }
.prose p { margin: 1.15rem 0; }
.prose ul, .prose ol { margin: 1.1rem 0; padding-left: 1.3rem; }
.prose li { margin: 0.38rem 0; }
.prose h2 {
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.4rem;
  margin-top: 2.4rem;
}
.prose h3 { margin-top: 1.8rem; }
.prose blockquote {
  margin: 1.4rem 0;
  padding: 0.15rem 0 0.15rem 1.15rem;
  border-left: 3px solid var(--gold);
  color: var(--ink-soft);
  background: transparent;
  border-radius: 0;
  font-family: var(--font-sans);
  font-size: 1.12rem;
  line-height: 1.45;
  font-weight: 600;
}
.prose pre {
  background: var(--code-bg);
  color: #e2e8f0;
  border: 0;
  border-radius: 12px;
  padding: 1.05rem 1.15rem;
  overflow-x: auto;
  font-size: 0.86rem;
}
.prose pre code { background: none; border: 0; color: inherit; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: 0.94rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 0.6rem 0.75rem; text-align: left; }
.prose th { background: var(--surface-2); color: var(--ink); }
.prose img { border-radius: 12px; border: 1px solid var(--line); }

.article-header { margin-bottom: 1.6rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.article-header h1 { margin: 0.7rem 0 0.75rem; }
.article-header .lead { margin: 0 0 0.9rem; max-width: 42rem; }
.byline { display: flex; gap: 0.75rem; flex-wrap: wrap; color: var(--faint); font-size: 0.9rem; align-items: center; }
.byline .dot::before { content: "·"; margin-right: 0.75rem; color: var(--line-strong); }

.article-side .side-box { position: sticky; top: 88px; }
.toc-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.05rem 1.15rem;
}
.toc-box h4 {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--faint);
  font-family: var(--font-sans);
  font-weight: 700;
}
.toc-box ul { list-style: none; padding: 0; margin: 0; }
.toc-box li { margin: 0.55rem 0; }
.toc-box a { color: var(--ink-soft); text-decoration: none; }
.toc-box a:hover { color: var(--bronze-deep); }

/* --- Breadcrumbs ---------------------------------------------------------- */
.breadcrumbs {
  font-size: 0.82rem;
  color: var(--faint);
  margin: 0 0 1.1rem;
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--bronze-deep); }
.breadcrumbs span.sep { color: var(--line-strong); }

/* --- Forms ---------------------------------------------------------------- */
.form-group { margin-bottom: 1.1rem; }
label { display: block; font-weight: 600; margin-bottom: 0.35rem; font-size: 0.9rem; color: var(--ink); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="search"], input[type="url"], select, textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  border-radius: 10px;
  padding: 0.68rem 0.85rem;
  font-size: 1rem;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--bronze);
  box-shadow: var(--ring);
}
textarea { resize: vertical; min-height: 120px; }
.field-hint { font-size: 0.82rem; color: var(--faint); margin-top: 0.3rem; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 0 0 1.25rem; background: var(--surface); }
legend { padding: 0 0.5rem; color: var(--muted); font-weight: 600; }
.checkbox { display: flex; align-items: center; gap: 0.5rem; }
.checkbox input { width: auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

.hp-field { position: absolute; left: -9999px; }

/* --- Tool / calculator UI ------------------------------------------------- */
.tool-shell { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: start; }
@media (max-width: 820px) { .tool-shell { grid-template-columns: 1fr; } }
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.3rem 1.2rem;
  box-shadow: var(--shadow-soft);
}
.panel h3 { margin-top: 0; }
.result-box {
  background: var(--code-bg);
  color: #e2e8f0;
  border: 0;
  border-radius: 10px;
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 3rem;
}
.metric {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.95rem 1rem;
  background: var(--surface-2);
  border-radius: 12px;
  border: 1px solid var(--line);
}
.metric .value { font-size: 1.55rem; font-weight: 700; color: var(--ink); font-family: var(--font-sans); }
.metric .label { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.metrics.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 720px) { .metrics.cols-3 { grid-template-columns: 1fr 1fr; } }
.copy-btn { font-size: 0.8rem; }
.error-text { color: var(--danger); font-size: 0.9rem; }

details {
  border-top: 1px solid var(--line);
  padding-top: 0.85rem;
}
details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
}
details summary:hover { color: var(--bronze-deep); }

/* --- Footer --------------------------------------------------------------- */
.site-footer {
  border-top: 0;
  background:
    radial-gradient(ellipse 700px 180px at 50% -20%, rgba(20, 184, 166, 0.16), transparent 60%),
    #0f172a;
  padding: 3rem 0 1.4rem;
  margin-top: auto;
  color: #94a3b8;
  font-size: 0.92rem;
  position: relative;
}
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../img/noise.svg");
  opacity: 0.12;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.site-footer .brand { color: #f8fafc; margin-bottom: 0.85rem; }
.site-footer .brand:hover { color: #f8fafc; }
.site-footer .brand-sub { color: #94a3b8; }
.site-footer .muted,
.site-footer .dim { color: #94a3b8; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 1.75rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 {
  color: #e2e8f0;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin: 0 0 0.85rem;
  font-family: var(--font-sans);
  font-weight: 700;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0.4rem 0; }
.site-footer a { color: #94a3b8; text-decoration: none; }
.site-footer a:hover { color: #f8fafc; }
.footer-bottom {
  border-top: 1px solid #1e293b;
  margin-top: 2.2rem;
  padding-top: 1.2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: #64748b;
}

/* --- Ad slots ------------------------------------------------------------- */
.ad-slot {
  margin: 2rem 0;
  padding: 0.55rem;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  text-align: center;
  background: var(--surface-2);
}
.ad-slot .ad-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--faint);
  display: block;
  margin-bottom: 0.35rem;
}

/* --- Tables (admin) ------------------------------------------------------- */
.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th, .table td { text-align: left; padding: 0.7rem 0.75rem; border-bottom: 1px solid var(--line); }
.table th {
  color: var(--faint);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  font-family: var(--font-sans);
}
.table tr:hover td { background: var(--surface); }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.table-wrap .table { margin: 0; }
.row-handled { opacity: 0.55; }

.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 0.4rem; }
.status-published { background: var(--forest); }
.status-draft { background: var(--faint); }
.status-review { background: var(--gold); }
.status-archived { background: var(--danger); }

/* --- Admin layout --------------------------------------------------------- */
.admin-layout { display: grid; grid-template-columns: 230px 1fr; gap: 2rem; margin-top: 0.5rem; }
@media (max-width: 820px) { .admin-layout { grid-template-columns: 1fr; } }
.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem;
}
.admin-nav .admin-kicker {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  font-weight: 700;
  padding: 0.35rem 0.75rem 0.7rem;
}
.admin-nav a {
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  color: var(--ink-soft);
  text-decoration: none;
}
.admin-nav a:hover, .admin-nav a.active { background: var(--surface-2); color: var(--ink); text-decoration: none; }

.login-wrap { max-width: 440px; margin: 3rem auto 2rem; }
.login-wrap h1 { margin-bottom: 0.4rem; }

/* --- Utilities ------------------------------------------------------------ */
.stack { display: flex; flex-direction: column; gap: 1rem; }
.row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.row-split { justify-content: space-between; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 1rem; }
.hr { height: 1px; background: var(--line); border: 0; margin: 2rem 0; }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.inline-form { display: inline; }

.search-form { margin: 1rem 0 1.5rem; }
.search-form input[type="search"] { max-width: 420px; }

/* --- Motion, reveal, textures --------------------------------------------- */
@keyframes bar-shift {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
@keyframes orb-drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-28px, 18px, 0) scale(1.08); }
}
@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.hero-copy .eyebrow,
.hero-copy h1,
.hero-copy .lead,
.hero-copy .hero-actions {
  animation: rise-in 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.hero-copy h1 { animation-delay: 0.08s; }
.hero-copy .lead { animation-delay: 0.16s; }
.hero-copy .hero-actions { animation-delay: 0.24s; }
.hero-aside { animation: rise-in 0.9s 0.18s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.hero-stats { animation: rise-in 0.9s 0.28s cubic-bezier(0.2, 0.8, 0.2, 1) both; }

.js [data-reveal]:not(.is-in) {
  opacity: 0;
  transform: translateY(20px);
}
.js [data-reveal] {
  transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}
.grid > [data-reveal]:nth-child(1) { transition-delay: 0.02s; }
.grid > [data-reveal]:nth-child(2) { transition-delay: 0.07s; }
.grid > [data-reveal]:nth-child(3) { transition-delay: 0.12s; }
.grid > [data-reveal]:nth-child(4) { transition-delay: 0.17s; }
.grid > [data-reveal]:nth-child(5) { transition-delay: 0.22s; }
.grid > [data-reveal]:nth-child(6) { transition-delay: 0.27s; }
.grid > [data-reveal]:nth-child(7) { transition-delay: 0.32s; }
.grid > [data-reveal]:nth-child(8) { transition-delay: 0.37s; }
.grid > [data-reveal]:nth-child(9) { transition-delay: 0.42s; }

.panel {
  position: relative;
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255,255,255,0.75);
}
.tool-mark {
  transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}
.card:hover .tool-mark {
  transform: scale(1.08);
}

.deck {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 2.15rem 1.7rem 1.9rem;
  border-radius: var(--radius-lg);
  color: #cbd5e1;
  background:
    radial-gradient(520px circle at 86% 12%, rgba(45, 212, 191, 0.18), transparent 48%),
    linear-gradient(155deg, #0b1f2a 0%, #0f172a 58%, #134e4a 130%);
  box-shadow: 0 24px 50px -28px rgba(15, 23, 42, 0.5), inset 0 1px 0 rgba(255,255,255,0.08);
}
.deck > * { position: relative; z-index: 1; }
.deck::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../img/noise.svg");
  opacity: 0.14;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.deck .section-head h2 { color: #f8fafc; }
.deck .section-head p { color: #94a3b8; }
.deck .section-head .kicker { color: #5eead4; }
.deck .btn {
  background: transparent;
  color: #f8fafc;
  border-color: rgba(248, 250, 252, 0.28);
}
.deck .btn:hover { background: rgba(255,255,255,0.08); color: #fff; }
.deck .card {
  background:
    radial-gradient(240px 120px at 0% 0%, rgba(45, 212, 191, 0.14), transparent 60%),
    rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  min-height: 12.5rem;
  backdrop-filter: blur(14px);
}
.deck .card h3 { color: #f8fafc; }
.deck .card p { color: #94a3b8; }
.deck .card-go { color: #5eead4; }
.deck .card:hover {
  border-color: rgba(94, 234, 212, 0.35);
  box-shadow: 0 18px 36px -22px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255,255,255,0.1);
}
.deck .badge.accent {
  background: rgba(45, 212, 191, 0.12);
  border-color: rgba(94, 234, 212, 0.28);
  color: #5eead4;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
  .btn:hover, .card:hover, a.card:hover { transform: none; }
}

/* --- Cookie consent ------------------------------------------------------- */
.cookie-banner {
  position: fixed;
  z-index: 80;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  max-width: 52rem;
  margin: 0 auto;
  padding: 1.1rem 1.2rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0f172a;
  color: #e2e8f0;
  box-shadow: 0 18px 40px -20px rgba(15, 23, 42, 0.7);
}
.cookie-banner-inner {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  justify-content: space-between;
}
@media (max-width: 720px) {
  .cookie-banner-inner { flex-direction: column; align-items: stretch; }
}
.cookie-banner-title {
  margin: 0 0 0.35rem;
  font-weight: 700;
  color: #f8fafc;
}
.cookie-banner p { margin: 0; font-size: 0.92rem; color: #94a3b8; }
.cookie-banner a { color: #5eead4; }
.cookie-banner-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.cookie-banner .btn-ghost { color: #e2e8f0; border-color: rgba(255,255,255,0.2); }
.footer-bottom .linkish {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.footer-bottom .linkish:hover { color: #f8fafc; }
