/* =====================================================================
   Glass theme — PREVIEW (/preview/glass-home/), 2026-09-22
   The brand spot's glass-node look carried onto the homepage: frosted
   white cards on a studio-white ground, a rim in the card's own colour,
   a top sheen, a coloured lip along the bottom edge, a soft halo, and a
   contact shadow — the same recipe as RegnorAd's glass theme (Remotion).
   The capability cards trade their generated 3D props for a glass
   workflow node (+ floor reflection). The Regnor / Valdis / Tavrin marks
   are untouched. Everything is scoped to body.theme-glass.
   ===================================================================== */

.theme-glass {
  --glass-ink: #141a22;
  --glass-muted: #5b6472;
  --glass-port-ring: #f4f6f9;
}

/* ---------- Studio ground ---------- */
.theme-glass .features-bright {
  background:
    radial-gradient(1200px 520px at 50% 0%, #ffffff 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #f7f8fa 0%, #eef1f5 62%, #e6eaf0 100%);
}
.theme-glass .features-grid { position: relative; isolation: isolate; }
/* Colour behind the glass — without something to refract, frosted glass is just white. */
.theme-glass .features-grid::before {
  content: "";
  position: absolute;
  inset: -40px -60px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(360px 240px at 14% 22%, rgba(37, 99, 235, 0.13), transparent 70%),
    radial-gradient(360px 240px at 50% 18%, rgba(79, 70, 229, 0.11), transparent 70%),
    radial-gradient(360px 240px at 86% 22%, rgba(8, 145, 178, 0.12), transparent 70%),
    radial-gradient(420px 260px at 22% 70%, rgba(124, 58, 237, 0.12), transparent 70%),
    radial-gradient(420px 260px at 78% 62%, rgba(13, 148, 136, 0.13), transparent 70%),
    radial-gradient(420px 260px at 28% 98%, rgba(37, 99, 235, 0.10), transparent 70%),
    radial-gradient(420px 260px at 78% 98%, rgba(217, 119, 6, 0.12), transparent 70%);
  filter: blur(8px);
}

/* ---------- Card colours ----------
   hero-bright.css declares `.feature-card { --fc: var(--hero-primary) }` AFTER the
   modifier classes, so on the live page every card's --fc is blue (the pastel
   gradients hid it — they use --g1/--g2). Glass is coloured only by its rim, so set it here. */
.theme-glass .feature-card--blue    { --fc: #2563EB; }
.theme-glass .feature-card--indigo  { --fc: var(--brand-valdis, #4F46E5); }
.theme-glass .feature-card--emerald { --fc: var(--brand-tavrin-text, #15803d); }
.theme-glass .feature-card--purple  { --fc: #7C3AED; }
.theme-glass .feature-card--teal    { --fc: #0D9488; }
.theme-glass .feature-card--slate   { --fc: #2563EB; }
.theme-glass .feature-card--amber   { --fc: #D97706; }

/* ---------- Glass card ---------- */
.theme-glass .feature-card {
  --rim: color-mix(in oklab, var(--fc) 52%, #fff);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.80) 0%, rgba(255, 255, 255, 0.56) 100%);
  border: 1.5px solid var(--rim);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),                       /* top edge catch-light */
    inset 0 -3px 0 color-mix(in oklab, var(--fc) 30%, transparent), /* coloured lip = thickness */
    0 0 0 4px color-mix(in oklab, var(--fc) 7%, transparent),        /* halo */
    0 26px 40px -24px color-mix(in oklab, var(--fc) 42%, transparent), /* contact shadow */
    0 2px 6px rgba(16, 24, 40, 0.05);
}
/* Sheen: the soft reflection across the top of the glass */
.theme-glass .feature-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 46%;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0) 100%);
}
/* Hover = the node "lights up", as it does when a run reaches it in the spot */
.theme-glass .feature-card:hover {
  border-color: color-mix(in oklab, var(--fc) 78%, #fff);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -3px 0 color-mix(in oklab, var(--fc) 45%, transparent),
    0 0 0 4px color-mix(in oklab, var(--fc) 12%, transparent),
    0 0 34px -4px color-mix(in oklab, var(--fc) 38%, transparent),
    0 30px 44px -24px color-mix(in oklab, var(--fc) 50%, transparent),
    0 2px 6px rgba(16, 24, 40, 0.05);
}
.theme-glass .feature-title { color: var(--glass-ink); }
.theme-glass .feature-desc { color: var(--glass-muted); }

/* Pill + dot read as a glass chip with a node port */
.theme-glass .feature-badge {
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid color-mix(in oklab, var(--fc) 26%, #fff);
  box-shadow: inset 0 1px 0 #fff, 0 1px 3px rgba(16, 24, 40, 0.06);
}
.theme-glass .feature-dot {
  width: 9px;
  height: 9px;
  background: radial-gradient(circle at 35% 35%, #fff 0 18%, var(--dot, var(--fc)) 46%);
  box-shadow:
    0 0 0 2px var(--glass-port-ring),
    0 0 0 3px color-mix(in oklab, var(--dot, var(--fc)) 40%, transparent),
    0 0 8px color-mix(in oklab, var(--dot, var(--fc)) 60%, transparent);
}

/* ---------- Glass workflow node (capability-card art) ---------- */
.theme-glass .feature-card .feature-art:has(.gnode) {
  width: 236px;
  height: 214px;
  right: 26px;
  bottom: -26px;
}
.theme-glass .features-grid > .feature-card:nth-child(n + 4) .feature-desc { padding-right: 272px; }

.gnode {
  --nc: #2563EB;
  position: relative;
  width: 100%;
  height: 100%;
  perspective: 900px;
  font-family: var(--hero-font, "Libre Franklin", system-ui, sans-serif);
}
.gnode-stage {
  position: absolute;
  left: 20px;
  top: 14px;
  width: 196px;
  transform: rotateY(-14deg) rotateX(7deg) rotateZ(-1deg);
  transform-origin: 30% 60%;
  transform-style: preserve-3d;
}
.gnode-card {
  position: relative;
  box-sizing: border-box;
  width: 196px;
  padding: 12px 14px 11px;
  border-radius: 16px;
  color: var(--glass-ink, #141a22);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(255, 255, 255, 0.58) 100%);
  border: 1.5px solid color-mix(in oklab, var(--nc) 70%, #fff);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -3px 0 color-mix(in oklab, var(--nc) 38%, transparent),
    0 0 0 3px color-mix(in oklab, var(--nc) 12%, transparent),
    0 0 26px -2px color-mix(in oklab, var(--nc) 40%, transparent);
  overflow: visible;
}
.gnode-card::before { /* sheen */
  content: "";
  position: absolute;
  inset: 1px 1px auto 1px;
  height: 48%;
  border-radius: 15px 15px 40% 40% / 15px 15px 14px 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.gnode-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.gnode-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(160deg, color-mix(in oklab, var(--nc) 80%, #fff), var(--nc));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 2px 6px -1px color-mix(in oklab, var(--nc) 60%, transparent);
}
.gnode-icon svg { width: 15px; height: 15px; stroke-width: 2; }
/* hero-bright's `.feature-art svg` (74 % wide, --fc colour, 0.34 opacity) was meant for the old line glyphs */
.theme-glass .feature-art .gnode-icon svg { width: 15px; height: 15px; color: #fff; opacity: 1; filter: none; }
.gnode-title { font-size: 13.5px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.gnode-row {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 10.5px;
  line-height: 1.75;
  color: var(--glass-muted, #5b6472);
  white-space: nowrap;
}
.gnode-row b { font-weight: 600; color: var(--glass-ink, #141a22); }
.gnode-status {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  padding: 2px 8px 2px 6px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 600;
  --tone: #15803d;
  color: var(--tone);
  background: color-mix(in oklab, var(--tone) 10%, #fff);
}
.gnode-status--info { --tone: #0369a1; }
.gnode-status--warn { --tone: #b45309; }
.gnode-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tone);
  box-shadow: 0 0 6px var(--tone);
}
/* Ports: ringed dots on the left/right edges, as on the canvas */
.gnode-port {
  position: absolute;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -4.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff 0 18%, color-mix(in oklab, var(--nc) 70%, #94a3b8) 50%);
  box-shadow: 0 0 0 2px var(--glass-port-ring, #f4f6f9), 0 0 8px color-mix(in oklab, var(--nc) 60%, transparent);
}
.gnode-port--in { left: -5.5px; }
.gnode-port--out { right: -5.5px; }
/* Incoming wire: a lit ribbon from off-canvas into the input port */
.gnode-wire {
  position: absolute;
  left: -14px;
  top: 76px;
  width: 38px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0), #38bdf8 60%, color-mix(in oklab, var(--nc) 60%, #38bdf8));
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.7);
  transform: rotate(-4deg);
}
/* Floor reflection: the same card, flipped, fading out */
.gnode-reflection {
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: 6px;
  transform: scaleY(-1);
  opacity: 0.62;
  filter: blur(0.6px);
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 52%);
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 52%);
  pointer-events: none;
}
.gnode-reflection .gnode-card { box-shadow: inset 0 1px 0 #fff, 0 0 0 3px color-mix(in oklab, var(--nc) 10%, transparent); }
.gnode-shadow {
  position: absolute;
  left: 30px;
  top: 138px;
  width: 190px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--nc) 30%, rgba(16, 24, 40, 0.25)), transparent);
  filter: blur(6px);
  z-index: -1;
}
.feature-card:hover .gnode-card {
  border-color: var(--nc);
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -3px 0 color-mix(in oklab, var(--nc) 50%, transparent),
    0 0 0 3px color-mix(in oklab, var(--nc) 18%, transparent),
    0 0 34px 0 color-mix(in oklab, var(--nc) 55%, transparent);
}

/* ---------- Pillar marks: untouched artwork, set on a glass floor ---------- */
.theme-glass .features-grid > .feature-card:nth-child(-n + 3) .feature-art::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 22%;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--fc) 28%, rgba(16, 24, 40, 0.2)), transparent);
  filter: blur(5px);
  z-index: -1;
}

/* ---------- Mobile: the node stays inside the card, text goes full width ---------- */
@media (max-width: 767px) {
  .theme-glass .features-grid > .feature-card:nth-child(n + 4) .feature-desc { padding-right: 0; }
  .theme-glass .feature-card:has(.gnode) { padding-bottom: 150px; }
  .theme-glass .feature-card .feature-art:has(.gnode) { right: 14px; bottom: -34px; transform: scale(0.86); transform-origin: bottom right; }
}

@media (prefers-reduced-transparency: reduce) {
  .theme-glass .feature-card,
  .gnode-card { -webkit-backdrop-filter: none; backdrop-filter: none; background: #fff; }
}

/* ---------- Node chips (protocol / provider badges, as on the canvas) ---------- */
.gnode-chips { position: relative; display: flex; gap: 4px; flex-wrap: wrap; margin: -2px 0 6px; }
.gnode-chip {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.5;
  padding: 0 6px;
  border-radius: 4px;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.gnode-chip.is-off { background: rgba(107, 114, 128, 0.15); color: #6b7280; box-shadow: none; }

/* ---------- Glass objects (features that are not nodes: Lab Designer, Living Docs) ---------- */
.theme-glass .feature-card .feature-art:has(.gobj) {
  width: 236px;
  height: 214px;
  right: 22px;
  bottom: -18px;
}
.gobj { width: 100%; height: 100%; }
.theme-glass .feature-art .gobj svg {
  width: 100%;
  height: 100%;
  opacity: 1;
  color: inherit;
  filter: drop-shadow(0 10px 18px rgba(16, 24, 40, 0.10));
}
@media (max-width: 767px) {
  .theme-glass .feature-card:has(.gobj) { padding-bottom: 150px; }
  .theme-glass .feature-card .feature-art:has(.gobj) { right: 10px; bottom: -30px; transform: scale(0.8); transform-origin: bottom right; }
}

/* =====================================================================
   Shared glass surface for the other card families
   (--gc = the card's colour; set per family below)
   ===================================================================== */
.theme-glass .arch-node,
.theme-glass .about-feature,
.theme-glass .process-step,
.theme-glass .arch-plane {
  position: relative;
  border: 1.5px solid color-mix(in oklab, var(--gc) 50%, #fff);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -3px 0 color-mix(in oklab, var(--gc) 26%, transparent),
    0 0 0 4px color-mix(in oklab, var(--gc) 6%, transparent),
    0 22px 36px -24px color-mix(in oklab, var(--gc) 45%, transparent),
    0 2px 6px rgba(16, 24, 40, 0.04);
}
.theme-glass .arch-node::before,
.theme-glass .about-feature::before,
.theme-glass .process-step::before,
.theme-glass .arch-plane::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 48%;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0));
}
.theme-glass .arch-node > *,
.theme-glass .about-feature > *,
.theme-glass .process-step > *,
.theme-glass .arch-plane > * { position: relative; }

/* ---------- Architecture diagram ---------- */
.theme-glass .arch-diagram {
  --gc: #1d8ff0;
  position: relative;
  border: 1.5px solid color-mix(in oklab, var(--gc) 32%, #fff);
  background-color: #f5f9fe;
  background-image:
    radial-gradient(560px 300px at 18% 30%, rgba(71, 85, 105, 0.10), transparent 70%),
    radial-gradient(560px 300px at 82% 40%, rgba(13, 148, 136, 0.14), transparent 70%),
    radial-gradient(420px 260px at 50% 45%, rgba(29, 143, 240, 0.10), transparent 70%),
    linear-gradient(rgba(29, 143, 240, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 143, 240, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, #ffffff 0%, #eef4fb 100%);
  background-size: 100% 100%, 100% 100%, 100% 100%, 24px 24px, 24px 24px, 100% 100%;
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -3px 0 rgba(29, 143, 240, 0.14),
    0 30px 60px -36px rgba(29, 143, 240, 0.45),
    0 2px 8px rgba(16, 24, 40, 0.05);
}
.theme-glass .arch-plane { border-style: solid; -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); }
.theme-glass .arch-plane-cloud {
  --gc: #64748b;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(241, 245, 249, 0.55) 100%);
}
.theme-glass .arch-plane-onprem {
  --gc: #0d9488;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.70) 0%, rgba(204, 251, 241, 0.55) 100%);
}
.theme-glass .arch-node {
  border-left-width: 1.5px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.7) 100%);
}
.theme-glass .arch-node-blue   { --gc: #2563EB; border-color: color-mix(in oklab, #2563EB 45%, #fff); }
.theme-glass .arch-node-indigo { --gc: var(--brand-valdis, #4F46E5); border-color: color-mix(in oklab, var(--brand-valdis, #4F46E5) 45%, #fff); }
/* line-icon tiles become lit glass chips (as on a node); the Valdis logo tile keeps a pale ground */
.theme-glass .arch-node .arch-node-icon:has(svg) {
  color: #fff;
  background: linear-gradient(160deg, color-mix(in oklab, var(--gc) 78%, #fff), var(--gc));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 3px 8px -2px color-mix(in oklab, var(--gc) 60%, transparent);
}
.theme-glass .arch-node .arch-node-icon:has(img) {
  background: rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--gc) 30%, #fff);
}
/* lock: glass bead — still OPAQUE (it masks the tunnel line behind it) */
.theme-glass .arch-lock {
  background: radial-gradient(circle at 35% 28%, #ffffff 0%, #eaf4ff 55%, #cfe6fd 100%);
  border: 1.5px solid rgba(29, 143, 240, 0.6);
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -3px 0 rgba(29, 143, 240, 0.22),
    0 0 0 5px rgba(29, 143, 240, 0.08),
    0 0 22px rgba(29, 143, 240, 0.35);
}

/* ---------- Three pillar cards under the diagram (logos untouched) ---------- */
.theme-glass .about-feature {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(255, 255, 255, 0.6) 100%);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border-radius: 18px;
}
.theme-glass .about-feature:nth-child(1) { --gc: #2563EB; }
.theme-glass .about-feature:nth-child(2) { --gc: var(--brand-valdis, #4F46E5); }
.theme-glass .about-feature:nth-child(3) { --gc: var(--brand-tavrin-text, #15803d); }
.theme-glass .about-feature:hover {
  border-color: color-mix(in oklab, var(--gc) 78%, #fff);
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -3px 0 color-mix(in oklab, var(--gc) 40%, transparent),
    0 0 0 4px color-mix(in oklab, var(--gc) 11%, transparent),
    0 0 30px -6px color-mix(in oklab, var(--gc) 40%, transparent),
    0 24px 38px -24px color-mix(in oklab, var(--gc) 50%, transparent);
}
.theme-glass .about-feature-icon {
  border: 0 !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, 0.75) !important; /* inline tint styles on the Valdis/Tavrin tiles */
  box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--gc) 28%, #fff), 0 6px 14px -8px color-mix(in oklab, var(--gc) 55%, transparent);
}

/* ---------- Three Steps to Automation ----------
   NO backdrop-filter / filter / opacity here: these cards live inside the flip faces,
   and any of those flattens the 3D context (see the FLATTEN TRAP note in hero-bright.css). */
.theme-glass .process-step {
  background: linear-gradient(180deg, #ffffff 0%, color-mix(in oklab, var(--gc) 5%, #fff) 100%);
  border-radius: 18px;
}
.theme-glass .process-steps > .process-flip:nth-child(1) .process-step { --gc: var(--brand-valdis, #4F46E5); }
.theme-glass .process-steps > .process-flip:nth-child(3) .process-step { --gc: #2563EB; }
.theme-glass .process-steps > .process-flip:nth-child(5) .process-step { --gc: var(--brand-tavrin-text, #15803d); }
.theme-glass .process-step-icon {
  position: relative;
}
.theme-glass .process-step-icon::after { /* contact shadow under the (unchanged) logo */
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 58px;
  height: 10px;
  margin-left: -29px;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--gc) 35%, rgba(16, 24, 40, 0.2)), transparent);
  z-index: -1;
}
