/* ==========================================================================
   HIGH-DEFINITION EMBOSSED UI SYSTEM — ARCHIBALD.AI
   Supports 4 Curated Palettes + Live Custom Color, Radius & Elevation Overrides
   ========================================================================== */

:root {
  /* Default Palette 1: Teal & Ice Emboss */
  --bg-canvas: #f0f4f8;
  --surface: #ffffff;
  --surface-alt: #e7eef5;
  --ink-primary: #111827;
  --ink-secondary: #4b5563;
  --accent-primary: #0284c7;
  --accent-orange: #ea580c;
--accent-orange-bright: #f97316;
--accent-orange-soft: rgba(234, 88, 12, 0.16);
  --accent-secondary: #0600ab;
  --accent-orange: #ea580c;
  --accent-orange-soft: rgba(234, 88, 12, 0.14);
  --accent-contrast: #ffffff;
  --border-subtle: rgba(17, 24, 39, 0.08);
  --highlight-light: rgba(255, 255, 255, 0.92);
  --shadow-dark: rgba(15, 23, 42, 0.13);

  /* Dynamic Controls */
  --emboss-strength: 1;
  --radius-card: 18px;
  --radius-pill: 999px;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

/* Palette 2: Editorial Warm & Terracotta */
[data-theme="warm-terracotta"] {
  --bg-canvas: #f7f4ee;
  --surface: #fffdf9;
  --surface-alt: #ede7dc;
  --ink-primary: #141413;
  --ink-secondary: #57534e;
  --accent-primary: #d95d43;
  --accent-secondary: #141413;
  --accent-contrast: #ffffff;
  --border-subtle: rgba(20, 20, 19, 0.09);
  --highlight-light: rgba(255, 255, 255, 0.95);
  --shadow-dark: rgba(41, 32, 24, 0.13);
}

/* Palette 3: Studio Amber & Ink */
[data-theme="studio-amber"] {
  --bg-canvas: #faf9f6;
  --surface: #ffffff;
  --surface-alt: #f2efe9;
  --ink-primary: #111111;
  --ink-secondary: #4a4a48;
  --accent-primary: #f4b400;
  --accent-secondary: #111111;
  --accent-contrast: #111111;
  --border-subtle: rgba(17, 17, 17, 0.1);
  --highlight-light: rgba(255, 255, 255, 0.96);
  --shadow-dark: rgba(17, 17, 17, 0.12);
}

/* Palette 4: Emerald & Slate Minimal */
[data-theme="emerald-slate"] {
  --bg-canvas: #f6f8f7;
  --surface: #ffffff;
  --surface-alt: #e8efec;
  --ink-primary: #0f172a;
  --ink-secondary: #475569;
  --accent-primary: #0e7c5b;
  --accent-secondary: #0f172a;
  --accent-contrast: #ffffff;
  --border-subtle: rgba(15, 23, 42, 0.09);
  --highlight-light: rgba(255, 255, 255, 0.95);
  --shadow-dark: rgba(15, 23, 42, 0.12);
}

[data-type="technical"] {
  --font-display: "JetBrains Mono", monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg-canvas);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

img,
video,
iframe {
  max-width: 100%;
  display: block;
}

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

.container {
  width: min(1240px, 92vw);
  margin: 0 auto;
}

/* ==========================================================================
   EMBOSSED ELEVATION & TACTILE SURFACES
   ========================================================================== */

.emboss-surface {
  background: linear-gradient(145deg, var(--surface), var(--bg-canvas));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.level-1 {
  box-shadow:
    calc(-4px * var(--emboss-strength)) calc(-4px * var(--emboss-strength)) calc(10px * var(--emboss-strength)) var(--highlight-light),
    calc(5px * var(--emboss-strength)) calc(5px * var(--emboss-strength)) calc(12px * var(--emboss-strength)) var(--shadow-dark),
    inset 0 1px 0 var(--highlight-light);
}

.level-2 {
  box-shadow:
    calc(-7px * var(--emboss-strength)) calc(-7px * var(--emboss-strength)) calc(16px * var(--emboss-strength)) var(--highlight-light),
    calc(9px * var(--emboss-strength)) calc(9px * var(--emboss-strength)) calc(20px * var(--emboss-strength)) var(--shadow-dark),
    inset 0 1px 1px var(--highlight-light);
}

.level-3 {
  box-shadow:
    calc(-10px * var(--emboss-strength)) calc(-10px * var(--emboss-strength)) calc(24px * var(--emboss-strength)) var(--highlight-light),
    calc(14px * var(--emboss-strength)) calc(14px * var(--emboss-strength)) calc(30px * var(--emboss-strength)) var(--shadow-dark);
}

.emboss-inset {
  background: var(--surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: calc(var(--radius-card) * 0.85);
  box-shadow:
    inset calc(4px * var(--emboss-strength)) calc(4px * var(--emboss-strength)) calc(9px * var(--emboss-strength)) var(--shadow-dark),
    inset calc(-4px * var(--emboss-strength)) calc(-4px * var(--emboss-strength)) calc(9px * var(--emboss-strength)) var(--highlight-light);
}

/* Tactile Embossed Buttons */
.emboss-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.62rem 1.15rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  background: linear-gradient(145deg, var(--surface), var(--surface-alt));
  color: var(--ink-primary);
  box-shadow:
    calc(-3px * var(--emboss-strength)) calc(-3px * var(--emboss-strength)) calc(7px * var(--emboss-strength)) var(--highlight-light),
    calc(4px * var(--emboss-strength)) calc(4px * var(--emboss-strength)) calc(9px * var(--emboss-strength)) var(--shadow-dark),
    inset 0 1px 0 var(--highlight-light);
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.2s ease;
}

.emboss-btn:hover {
  transform: translateY(-1px);
}

.emboss-btn:active {
  transform: translateY(1px);
  box-shadow:
    inset calc(3px * var(--emboss-strength)) calc(3px * var(--emboss-strength)) calc(7px * var(--emboss-strength)) var(--shadow-dark),
    inset calc(-2px * var(--emboss-strength)) calc(-2px * var(--emboss-strength)) calc(5px * var(--emboss-strength)) var(--highlight-light);
}

.btn-primary {
  background: var(--accent-primary);
  color: var(--accent-contrast);
  border-color: rgba(0, 0, 0, 0.12);
}

.btn-secondary {
  color: var(--accent-primary);
}

.btn-ghost {
  background: var(--surface);
}

.btn-danger {
  color: #b91c1c;
}

.btn-lg {
  padding: 0.82rem 1.5rem;
  font-size: 0.95rem;
}

.btn-sm {
  padding: 0.42rem 0.85rem;
  font-size: 0.8rem;
}

.full-width {
  width: 100%;
}

/* ==========================================================================
   TOPBAR & EDIT BANNER
   ========================================================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 0.85rem 0;
  background: color-mix(in srgb, var(--bg-canvas) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.9rem 0.35rem 0.4rem;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  box-shadow:
    -3px -3px 7px var(--highlight-light),
    3px 3px 8px var(--shadow-dark);
}

.brand-monogram {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-primary);
  color: var(--accent-contrast);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 0.92rem;
}

.brand-text small {
  font-size: 0.72rem;
  color: var(--ink-secondary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.nav-chip {
  padding: 0.42rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-secondary);
  transition: all 0.16s ease;
}

.nav-chip:hover {
  color: var(--ink-primary);
  background: var(--surface);
  box-shadow: -2px -2px 5px var(--highlight-light), 2px 2px 5px var(--shadow-dark);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.swatch-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: 2px solid var(--surface);
}

.edit-banner {
  background: var(--accent-primary);
  color: var(--accent-contrast);
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

.edit-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.edit-banner-status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25);
}

.edit-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

/* Editable State Highlighting */
body.is-editing [data-edit] {
  outline: 2px dashed var(--accent-secondary);
  outline-offset: 4px;
  border-radius: 6px;
  cursor: text;
}

.edit-only-btn {
  display: none;
}

body.is-editing .edit-only-btn {
  display: inline-flex;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero-section {
  padding: 2.5rem 0 1.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.32fr 0.88fr;
  gap: 1.75rem;
  align-items: stretch;
}

.hero-content {
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.15rem;
}

.hero-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-primary);
  box-shadow: inset 1px 1px 3px var(--shadow-dark), -2px -2px 5px var(--highlight-light);
}

.status-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
}

.location-tag {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink-secondary);
}

.eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-secondary);
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.2vw, 3.45rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
}

.hero-subtitle {
  margin: 0;
  font-size: clamp(1.08rem, 1.8vw, 1.32rem);
  font-weight: 600;
  color: var(--accent-primary);
  line-height: 1.38;
}

.hero-bio {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 0.98rem;
  max-width: 64ch;
}

.hero-cta-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.hero-social-bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-subtle);
}

.hero-visual {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  position: relative;
  overflow: hidden;
}

.geometric-accent {
  position: absolute;
  top: -36px;
  right: -36px;
  width: 165px;
  height: 165px;
  border-radius: 50%;
  background: var(--accent-primary);
  opacity: 0.16;
  pointer-events: none;
}

.portrait-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portrait-overlay {
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.badge-chip {
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
}

.hero-telemetry {
  padding: 1rem 1.15rem;
}

.telemetry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink-secondary);
}

.pill-ok {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: #059669;
  background: rgba(16, 185, 129, 0.14);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
}

.telemetry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.telemetry-cell {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  display: flex;
  flex-direction: column;
}

.t-key {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--ink-secondary);
}

.t-val {
  font-size: 0.8rem;
  font-weight: 700;
}

/* ==========================================================================
   METRICS SECTION
   ========================================================================== */

.metrics-section {
  padding: 1rem 0 2rem;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
}

.metric-card {
  padding: 1.35rem 1.45rem;
}

.metric-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-primary);
  line-height: 1.1;
}

.metric-label {
  font-weight: 700;
  font-size: 0.92rem;
  margin-top: 0.35rem;
}

.metric-sub {
  font-size: 0.8rem;
  color: var(--ink-secondary);
  margin-top: 0.2rem;
}

/* ==========================================================================
   SECTIONS & FILTER CHIPS
   ========================================================================== */

.section-block {
  padding: 2.5rem 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.65rem;
}

.section-kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent-secondary);
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.6vw, 2.2rem);
  line-height: 1.15;
}

.filter-chips,
.lab-tabs,
.preset-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.chip-btn,
.tab-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  color: var(--ink-secondary);
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  box-shadow: -3px -3px 6px var(--highlight-light), 3px 3px 7px var(--shadow-dark);
  transition: all 0.16s ease;
}

.chip-btn.active,
.tab-btn.active {
  background: var(--accent-primary);
  color: var(--accent-contrast);
  box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.22);
}

/* ==========================================================================
   SYSTEMS / CASE STUDIES GRID
   ========================================================================== */

.systems-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.system-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.1rem;
}

.system-media-wrap {
  position: relative;
  border-radius: calc(var(--radius-card) * 0.75);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--surface-alt);
  border: 1px solid var(--border-subtle);
}

.system-media-wrap img,
.system-media-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-type-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.28rem 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-primary);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.system-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.system-cat {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-secondary);
}

.system-title {
  margin: 0.25rem 0 0;
  font-family: var(--font-display);
  font-size: 1.28rem;
}

.system-desc {
  margin: 0;
  color: var(--ink-secondary);
  font-size: 0.92rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.stack-tag {
  padding: 0.26rem 0.68rem;
  border-radius: var(--radius-pill);
  background: var(--surface-alt);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 600;
}

.system-impact {
  padding: 0.75rem 0.95rem;
  border-radius: 12px;
  background: var(--surface);
  border-left: 4px solid var(--accent-primary);
  font-size: 0.85rem;
  font-weight: 600;
}

.system-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   AUTOMATION LAB (INSPECTOR, SIMULATOR, ROI)
   ========================================================================== */

.lab-panel {
  padding: 1.75rem;
}

.blueprint-selector-bar {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-subtle);
}

.inspector-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
}

.inspector-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.inspector-head h3 {
  margin: 0.2rem 0 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.bp-kpi-pills {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.kpi-pill {
  padding: 0.28rem 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.bp-summary {
  color: var(--ink-secondary);
  font-size: 0.92rem;
}

.node-pipeline {
  display: grid;
  gap: 0.75rem;
}

.node-card {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  box-shadow: -3px -3px 7px var(--highlight-light), 3px 3px 8px var(--shadow-dark);
}

.node-step {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-primary);
  color: var(--accent-contrast);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.8rem;
}

.node-info strong {
  display: block;
  font-size: 0.92rem;
}

.node-info small {
  color: var(--ink-secondary);
  font-size: 0.8rem;
}

.node-tech {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.24rem 0.6rem;
  border-radius: var(--radius-pill);
  background: var(--surface-alt);
}

.inspector-code {
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.code-actions {
  display: flex;
  gap: 0.45rem;
}

.json-viewer {
  margin: 0;
  padding: 1rem;
  border-radius: 12px;
  background: #0f172a;
  color: #e2e8f0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.5;
  overflow: auto;
  max-height: 410px;
}

/* Simulator */
.simulator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.sim-controls {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.sim-controls h3 {
  margin: 0;
  font-family: var(--font-display);
}

.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.emboss-input {
  width: 100%;
  padding: 0.68rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  box-shadow: inset 2px 2px 5px var(--shadow-dark), inset -2px -2px 5px var(--highlight-light);
}

.mono-textarea {
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.sim-params {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.sim-output {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.trace-list {
  display: grid;
  gap: 0.55rem;
}

.trace-step {
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.83rem;
}

.sim-result-box {
  padding: 0.9rem;
  border-radius: 12px;
  background: #0f172a;
  color: #f8fafc;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  white-space: pre-wrap;
}

/* ROI Calculator */
.roi-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.75rem;
  align-items: center;
}

.roi-inputs {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.roi-inputs h3 {
  margin: 0;
  font-family: var(--font-display);
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.roi-results {
  display: grid;
  gap: 1rem;
}

.roi-card {
  padding: 1.25rem;
}

.roi-big-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0.25rem 0;
}

.accent-text {
  color: var(--accent-primary);
}

/* ==========================================================================
   MEDIA GALLERY (PHOTOS & VIDEOS)
   ========================================================================== */

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem;
}

.media-card {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.media-thumb {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--surface-alt);
  cursor: pointer;
}

.media-thumb img,
.media-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.media-card:hover .media-thumb img {
  transform: scale(1.03);
}

.play-pill {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: var(--accent-contrast);
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

.media-meta h4 {
  margin: 0.2rem 0;
  font-size: 1rem;
}

.media-meta p {
  margin: 0;
  font-size: 0.83rem;
  color: var(--ink-secondary);
}

/* ==========================================================================
   STACK & TESTIMONIALS
   ========================================================================== */

.stack-outcomes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.stack-panel,
.outcomes-panel {
  padding: 1.75rem;
}

.skills-bars {
  display: grid;
  gap: 0.95rem;
  margin-top: 1.25rem;
}

.skill-row-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.86rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.skill-track {
  height: 10px;
  border-radius: var(--radius-pill);
  background: var(--surface-alt);
  overflow: hidden;
  box-shadow: inset 2px 2px 4px var(--shadow-dark);
}

.skill-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  background: var(--accent-primary);
}

.testimonials-list {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

.quote-card {
  padding: 1.15rem;
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
}

.quote-card p {
  margin: 0 0 0.65rem;
  font-size: 0.9rem;
}

.quote-author {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-primary);
}

/* ==========================================================================
   CONNECT & ALL SOCIAL PLATFORMS
   ========================================================================== */

.connect-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.5rem;
}

.social-hub-card,
.contact-card {
  padding: 1.75rem;
}

.social-hub-head h3,
.contact-card h3 {
  margin: 0.25rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.social-hub-head p {
  margin: 0 0 1.25rem;
  color: var(--ink-secondary);
  font-size: 0.9rem;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.social-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.72rem 0.9rem;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  box-shadow: -3px -3px 7px var(--highlight-light), 3px 3px 8px var(--shadow-dark);
  transition: transform 0.15s ease;
}

.social-tile:hover {
  transform: translateY(-2px);
}

.social-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.social-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-primary);
  color: var(--accent-contrast);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.76rem;
  flex-shrink: 0;
}

.social-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.social-meta strong {
  font-size: 0.85rem;
}

.social-meta span {
  font-size: 0.74rem;
  color: var(--ink-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.contact-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.form-feedback {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--accent-primary);
}

/* ==========================================================================
   FOOTER, DRAWER & MODAL
   ========================================================================== */

.site-footer {
  padding: 1.75rem 0 2.5rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--ink-secondary);
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.drawer,
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
}

.drawer.open,
.modal.open {
  display: block;
}

.drawer-backdrop,
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
}

.drawer-panel {
  position: absolute;
  top: 1rem;
  right: 1rem;
  bottom: 1rem;
  width: min(420px, 92vw);
  padding: 1.5rem;
  overflow-y: auto;
  z-index: 2;
}

.drawer-head,
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-head h3,
.modal-head h3 {
  margin: 0.2rem 0 0;
  font-family: var(--font-display);
}

.drawer-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.palette-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.palette-card {
  text-align: left;
  padding: 0.75rem;
  border-radius: 14px;
  border: 2px solid transparent;
  background: var(--surface);
  cursor: pointer;
  box-shadow: -2px -2px 6px var(--highlight-light), 3px 3px 7px var(--shadow-dark);
}

.palette-card.active {
  border-color: var(--accent-primary);
}

.palette-card strong {
  display: block;
  font-size: 0.82rem;
  margin-top: 0.4rem;
}

.palette-card small {
  display: block;
  font-size: 0.72rem;
  color: var(--ink-secondary);
}

.swatches {
  display: flex;
  gap: 0.3rem;
}

.swatches i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.color-pickers-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
}

.picker-pill {
  padding: 0.55rem;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.74rem;
  font-weight: 600;
}

.picker-pill input[type="color"] {
  width: 100%;
  height: 28px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.segmented-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.seg-btn {
  padding: 0.55rem;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: var(--surface);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
}

.seg-btn.active {
  background: var(--accent-primary);
  color: var(--accent-contrast);
}

.modal-dialog {
  position: relative;
  z-index: 2;
  width: min(760px, 92vw);
  max-height: 88vh;
  margin: 5vh auto;
  padding: 1.5rem;
  overflow-y: auto;
}

.modal-body {
  margin-top: 1.15rem;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */

@media (max-width: 980px) {
  .hero-grid,
  .inspector-layout,
  .simulator-grid,
  .roi-grid,
  .stack-outcomes-grid,
  .connect-grid {
    grid-template-columns: 1fr;
  }

  .metrics-grid,
  .systems-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .media-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }

  .metrics-grid,
  .systems-grid,
  .media-grid,
  .social-grid,
  .form-row,
  .sim-params {
    grid-template-columns: 1fr;
  }

  .hero-content {
    padding: 1.5rem;
  }
}
/* Orange Accent Highlights */
.status-led,
.pulse-dot {
  background: var(--accent-orange);
  box-shadow: 0 0 0 4px var(--accent-orange-soft);
}

.eyebrow,
.section-kicker,
.system-cat {
  color: var(--accent-orange);
}

.system-impact {
  border-left-color: var(--accent-orange);
}

.badge-chip {
  border-left: 3px solid var(--accent-orange);
}/* Glossy Orange Character Accents */
.status-led,
.pulse-dot {
  background: linear-gradient(145deg, var(--accent-orange-bright), var(--accent-orange));
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.65),
    0 0 0 4px var(--accent-orange-soft);
}

.eyebrow,
.section-kicker,
.system-cat {
  color: var(--accent-orange);
}

.system-impact {
  border-left-color: var(--accent-orange);
}

.badge-chip {
  border-left: 3px solid var(--accent-orange);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0));
}