/* ═══════════════════════════════════════════════════════
   ULIKTECH — Design System CSS
   Blueprint & Datasheet aesthetic
   Version: 1.0.0
   ═══════════════════════════════════════════════════════ */

/* ── Google Fonts ───────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,600;12..96,700&family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;1,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Reset & Base ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.25s, color 0.25s;
}
img, svg { max-width: 100%; display: block; }
ul[role="list"] { list-style: none; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, select, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--accent-green); outline-offset: 3px; border-radius: 2px; }

/* ── Custom Properties — DARK THEME "Bench" (default) ── */
[data-theme="dark"], :root {
  --bg:           #0E1116;
  --surface:      #171C24;
  --surface-2:    #1E2530;
  --text:         #E8E6DF;
  --text-muted:   #8B9099;
  --grid-line:    #2A323E;
  --border:       #2A323E;
  --accent-green: #3DDC84;
  --accent-amber: #FFB224;
  --accent-coral: #FF6B57;
  --accent-green-dim: rgba(61,220,132,0.12);
  --accent-amber-dim: rgba(255,178,36,0.12);
  --nav-bg:       rgba(14,17,22,0.88);
  --shadow:       0 1px 0 var(--border);
  --radius-sm:    2px;
  --radius-md:    4px;
  --radius-lg:    8px;
}

/* ── Light Theme "Paper" ───────────────────────────── */
[data-theme="light"] {
  --bg:           #F2EFE6;
  --surface:      #E8E4D8;
  --surface-2:    #DEDAD0;
  --text:         #14171C;
  --text-muted:   #5A5F68;
  --grid-line:    #CFC9B8;
  --border:       #CFC9B8;
  --accent-green: #1C7C4A;
  --accent-amber: #B86E00;
  --accent-coral: #C2402F;
  --accent-green-dim: rgba(28,124,74,0.1);
  --accent-amber-dim: rgba(184,110,0,0.1);
  --nav-bg:       rgba(242,239,230,0.88);
}

/* ── System auto-detect (first visit) ──────────────── */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #F2EFE6; --surface: #E8E4D8; --surface-2: #DEDAD0;
    --text: #14171C; --text-muted: #5A5F68;
    --grid-line: #CFC9B8; --border: #CFC9B8;
    --accent-green: #1C7C4A; --accent-amber: #B86E00; --accent-coral: #C2402F;
    --accent-green-dim: rgba(28,124,74,0.1); --accent-amber-dim: rgba(184,110,0,0.1);
    --nav-bg: rgba(242,239,230,0.88);
  }
}

/* ── Typography Scale ───────────────────────────────── */
body { background: var(--bg); color: var(--text); }
.font-mono { font-family: 'JetBrains Mono', 'Courier New', monospace; }

h1, h2, h3, h4, h5 {
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  line-height: 1.1;
  font-weight: 700;
}
h1 { font-size: clamp(2.2rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1rem; font-weight: 600; }

/* ── Layout ─────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 2.5rem);
}

.section {
  padding-block: clamp(4rem, 8vw, 7rem);
  position: relative;
}

.section-header {
  max-width: 640px;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-label {
  font-size: 0.72rem;
  color: var(--accent-green);
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  opacity: 0.85;
}
.section-title {
  color: var(--text);
  margin-bottom: 1rem;
}
.section-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

/* ── Blueprint Grid Background ──────────────────────── */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

/* ── Section Dividers ───────────────────────────────── */
.section-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-inline: clamp(1rem, 5vw, 2.5rem);
  max-width: 1200px;
  margin-inline: auto;
  opacity: 0.4;
}
.divider-line {
  flex: 1;
  height: 1px;
  background: var(--grid-line);
}
.divider-label {
  color: var(--accent-green);
  font-size: 0.75rem;
}

/* ── Buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  transition: opacity 0.15s, transform 0.15s, background 0.15s;
  text-decoration: none;
  line-height: 1.4;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 0.85rem 1.8rem; font-size: 1rem; }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.85rem; }

.btn-wa {
  background: var(--accent-green);
  color: #0E1116;
  font-weight: 700;
}
.btn-wa:hover { opacity: 0.88; }

.btn-wa-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-wa-secondary:hover { border-color: var(--accent-green); color: var(--accent-green); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent-green); color: var(--accent-green); }

.btn-wa-full { width: 100%; justify-content: center; }
.btn-ig-full { width: 100%; justify-content: center; }

.wa-icon, .arrow-icon { width: 18px; height: 18px; flex-shrink: 0; }
.btn-lg .wa-icon { width: 20px; height: 20px; }

/* ── Navigation ─────────────────────────────────────── */
.nav-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 60px;
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 60px;
}
.nav-logo {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
}
.nav-logo-mark { color: var(--accent-green); font-size: 1.1rem; }
.nav-logo-text { font-size: 0.95rem; font-weight: 500; letter-spacing: 0.08em; }
.nav-logo-rev {
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  align-self: center;
  margin-top: 2px;
}

.nav-links {
  display: none;
  gap: 0.25rem;
  list-style: none;
  margin-left: auto;
}
@media (min-width: 768px) { .nav-links { display: flex; } }

.nav-link {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s;
}
.nav-link:hover, .nav-link.is-active { color: var(--text); }
.nav-link.is-active { color: var(--accent-green); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}
@media (min-width: 768px) { .nav-actions { margin-left: 0; } }

.cmd-trigger, .theme-toggle {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid transparent;
  transition: border-color 0.15s, color 0.15s;
}
.cmd-trigger:hover, .theme-toggle:hover { border-color: var(--border); color: var(--text); }
.cmd-trigger-label { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; }
.theme-toggle svg { width: 18px; height: 18px; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: none; }

.nav-wa-btn { display: none; }
@media (min-width: 768px) { .nav-wa-btn { display: inline-flex; } }

/* Mobile hamburger */
.nav-hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border-radius: var(--radius-sm);
  margin-left: auto;
}
@media (min-width: 768px) { .nav-hamburger { display: none; } }

.ham-line {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.2s, opacity 0.2s;
}
.nav-hamburger[aria-expanded="true"] .ham-line:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger[aria-expanded="true"] .ham-line:nth-child(2) { opacity: 0; }
.nav-hamburger[aria-expanded="true"] .ham-line:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile menu overlay */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 60px 0 0 0;
  z-index: 99;
  background: var(--bg);
  flex-direction: column;
  padding: 2rem;
  gap: 2rem;
  border-top: 1px solid var(--border);
}
.mobile-menu.is-open { display: flex; }

.mobile-nav-links { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.mobile-nav-link {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Bricolage Grotesque', sans-serif;
  color: var(--text-muted);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s;
}
.mobile-nav-link:hover { color: var(--accent-green); }
.mobile-contact { display: flex; flex-direction: column; gap: 0.75rem; margin-top: auto; }

/* ── Cursor Tracker ──────────────────────────────────── */
.cursor-dot {
  position: fixed;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
  mix-blend-mode: difference;
}
.cursor-coords {
  position: fixed;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--accent-green);
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  letter-spacing: 0.05em;
  transform: translate(10px, -50%);
  transition: opacity 0.3s;
}
@media (pointer: fine) {
  .cursor-dot { opacity: 1; }
  .cursor-coords { opacity: 0.7; }
}
@media (prefers-reduced-motion: reduce) {
  .cursor-dot, .cursor-coords { display: none !important; }
}

/* ── Command Palette ─────────────────────────────────── */
.cmd-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(14,17,22,0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 20vh;
}
.cmd-overlay[hidden] { display: none; }

.cmd-palette {
  width: min(560px, 90vw);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.cmd-search-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}
.cmd-icon { color: var(--text-muted); font-size: 1rem; }
.cmd-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.95rem;
}
.cmd-esc-key {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 2px 5px;
}
.cmd-results { list-style: none; padding: 0.4rem 0; max-height: 320px; overflow-y: auto; }
.cmd-results li {
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: background 0.1s, color 0.1s;
}
.cmd-results li:hover, .cmd-results li.is-active { background: var(--accent-green-dim); color: var(--text); }
.cmd-results li .cmd-item-icon { color: var(--accent-green); font-size: 0.75rem; font-family: 'JetBrains Mono', monospace; }

/* ── Hero Section ────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 60px;
  overflow: hidden;
  position: relative;
}
.hero-circuit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.15;
}
.circuit-path {
  fill: none;
  stroke: var(--accent-green);
  stroke-width: 1.5;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
}
.circuit-path-1 { animation: draw-path 2s ease forwards 0.3s; }
.circuit-path-2 { animation: draw-path 2.5s ease forwards 0.6s; }
.circuit-path-3 { animation: draw-path 2s ease forwards 0.9s; }
.circuit-path-4 { animation: draw-path 1.5s ease forwards 1.2s; }
.grid-line-anim { stroke: var(--accent-amber); stroke-width: 0.5; opacity: 0.3; }
.circuit-node { fill: var(--accent-green); opacity: 0; animation: node-appear 0.3s ease forwards; }
.circuit-node:nth-child(6) { animation-delay: 1.5s; }
.circuit-node:nth-child(7) { animation-delay: 1.8s; }
.circuit-node:nth-child(8) { animation-delay: 2.0s; }
.circuit-node:nth-child(9) { animation-delay: 2.2s; }
.circuit-node:nth-child(10) { animation-delay: 2.4s; }

@keyframes draw-path {
  to { stroke-dashoffset: 0; }
}
@keyframes node-appear {
  to { opacity: 0.8; }
}

.coord-marker {
  position: absolute;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: var(--text-muted);
  opacity: 0.4;
  pointer-events: none;
}
.coord-tl { top: 70px; left: 1rem; }
.coord-tr { top: 70px; right: 1rem; }
.coord-bl { bottom: 1rem; left: 1rem; }
.coord-br { bottom: 1rem; right: 1rem; }

.hero-content {
  position: relative;
  z-index: 1;
  padding-block: 4rem;
}
.component-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--accent-green);
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  opacity: 0.7;
  min-height: 1em;
}

.hero-headline {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.hero-line-main { display: block; color: var(--text); }
.hero-line-sub {
  display: block;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 580px;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2rem; }

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}
.trust-item { display: flex; align-items: center; gap: 0.4rem; }
.trust-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.trust-dot-green { background: var(--accent-green); animation: pulse-dot 2s ease infinite; }
.trust-sep { color: var(--grid-line); }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* ── Audience Selector ───────────────────────────────── */
.audience-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 60px;
  z-index: 90;
}
.audience-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-block: 0.6rem;
  flex-wrap: wrap;
}
.audience-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  white-space: nowrap;
  opacity: 0.7;
}
.audience-tabs { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.audience-tab {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  border: 1px solid transparent;
  transition: all 0.15s;
}
.audience-tab:hover { color: var(--text); border-color: var(--border); }
.audience-tab.active { background: var(--accent-green-dim); color: var(--accent-green); border-color: var(--accent-green); }

.audience-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
  margin-left: auto;
}

/* ── Service Cards (Datasheet) ───────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--border);
}
@media (min-width: 1024px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
}

.service-card {
  background: var(--surface);
  display: flex;
  flex-direction: column;
}
.service-header {
  padding: 1.5rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: background 0.15s;
}
.service-header:hover { background: var(--surface-2); }
.service-header:focus-visible { outline: 2px solid var(--accent-green); outline-offset: -2px; }

.service-meta { display: flex; align-items: center; justify-content: space-between; }
.service-code {
  font-size: 0.65rem;
  color: var(--accent-green);
  letter-spacing: 0.1em;
  opacity: 0.85;
}
.service-pin-row { display: flex; gap: 3px; }
.pin {
  display: block;
  width: 8px; height: 14px;
  background: var(--grid-line);
  border-radius: 1px;
  transition: background 0.3s, transform 0.2s;
}
.pin-active { background: var(--accent-amber); }
.service-header:hover .pin, .service-header:focus-visible .pin {
  animation: pin-glow 0.4s ease forwards;
  animation-delay: calc(var(--i, 0) * 0.06s);
}
@keyframes pin-glow {
  to { background: var(--accent-green); }
}

.service-title { color: var(--text); }
.service-short { font-size: 0.9rem; color: var(--text-muted); line-height: 1.55; }

.service-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.65rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-green);
  letter-spacing: 0.08em;
  margin-top: auto;
  opacity: 0.7;
}
.toggle-arrow {
  width: 16px; height: 16px;
  transition: transform 0.25s;
}
.service-header[aria-expanded="true"] .toggle-arrow { transform: rotate(180deg); }

/* Service body — accordion */
.service-body {
  overflow: hidden;
  border-top: 1px solid var(--border);
  max-height: 0;
  transition: max-height 0.35s ease, padding 0.35s;
}
.service-body:not([hidden]) {
  display: block;
  max-height: 800px;
  padding: 1.5rem;
}
.service-body[hidden] { display: block; } /* override hidden for animation */

.datasheet-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 480px) { .datasheet-grid { grid-template-columns: repeat(3, 1fr); } }

.ds-heading {
  font-size: 0.6rem;
  color: var(--accent-amber);
  letter-spacing: 0.1em;
  margin-bottom: 0.6rem;
  opacity: 0.85;
}
.ds-list { list-style: none; display: flex; flex-direction: column; gap: 0.4rem; }
.ds-list li {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-left: 1rem;
  position: relative;
  line-height: 1.5;
}
.ds-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent-green);
  font-size: 0.75rem;
}

.service-tech { margin-bottom: 1.25rem; }
.tech-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 0.5rem;
}
.tech-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tech-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.service-cta { display: flex; flex-direction: column; gap: 0.5rem; }
.cta-hint {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-muted);
  opacity: 0.6;
}

/* ── Demo Section ────────────────────────────────────── */
.demo-tabs-nav {
  display: flex;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  overflow: hidden;
  margin-bottom: 0;
}
.demo-tab-btn {
  flex: 1;
  padding: 0.75rem 1.25rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: background 0.15s, color 0.15s;
}
.demo-tab-btn .font-mono { font-size: 0.65rem; opacity: 0.6; }
.demo-tab-btn.active { background: var(--surface-2); color: var(--text); }
.demo-tab-btn:hover { background: var(--surface-2); }

.demo-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: 2rem;
}
.demo-panel.hidden { display: none; }

.demo-badge {
  display: inline-block;
  font-size: 0.65rem;
  color: var(--accent-amber);
  border: 1px solid var(--accent-amber);
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  margin-bottom: 1.5rem;
  opacity: 0.85;
  letter-spacing: 0.08em;
}

/* IoT Dashboard */
.iot-dashboard { display: flex; flex-direction: column; gap: 1.5rem; }

.sensor-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.sensor-card {
  background: var(--bg);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.sensor-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  opacity: 0.75;
}
.sensor-value {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-green);
  line-height: 1;
}
.sensor-unit { font-size: 1rem; color: var(--text-muted); font-weight: 400; }
.sensor-bar {
  height: 3px;
  background: var(--grid-line);
  border-radius: 2px;
  overflow: hidden;
}
.sensor-bar-fill {
  height: 100%;
  background: var(--accent-green);
  border-radius: 2px;
  transition: width 0.4s ease;
}
.sensor-bar-amber { background: var(--accent-amber); }
.sensor-bar-green { background: var(--accent-green); }
.sensor-range { font-size: 0.6rem; color: var(--text-muted); opacity: 0.5; }

.graph-container {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
}
.sensor-graph { width: 100%; height: auto; display: block; }

.graph-legend {
  position: absolute;
  bottom: 0.5rem;
  right: 0.75rem;
  display: flex;
  gap: 1rem;
  font-size: 0.6rem;
  color: var(--text-muted);
}
.legend-item { display: flex; align-items: center; gap: 0.3rem; }
.legend-dot { width: 8px; height: 2px; border-radius: 1px; }
.ld-green { background: var(--accent-green); }
.ld-amber { background: var(--accent-amber); }
.ld-blue { background: #5B8DEF; }

.dashboard-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
}
.ctrl-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.ctrl-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.ctrl-slider {
  -webkit-appearance: none;
  width: 120px; height: 3px;
  background: var(--grid-line);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.ctrl-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent-green);
  border: 2px solid var(--bg);
  cursor: pointer;
}
.ctrl-slider::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent-green);
  border: 2px solid var(--bg);
  cursor: pointer;
}
.ctrl-value {
  font-size: 0.72rem;
  color: var(--accent-green);
  min-width: 2rem;
}

/* UI Component Demo */
.ui-demo-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 640px) {
  .ui-demo-layout { grid-template-columns: 260px 1fr; }
}

.ui-ctrl-title {
  font-size: 0.65rem;
  color: var(--accent-green);
  letter-spacing: 0.1em;
  margin-bottom: 1.25rem;
  opacity: 0.85;
}
.ui-controls { display: flex; flex-direction: column; gap: 1.25rem; }

.palette-options, .size-options, .layout-options {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.palette-btn {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.palette-btn[data-palette="green"] { background: var(--accent-green); }
.palette-btn[data-palette="amber"] { background: var(--accent-amber); }
.palette-btn[data-palette="mono"] { background: var(--text-muted); }
.palette-btn.active, .palette-btn[aria-pressed="true"] { border-color: var(--text); transform: scale(1.15); }

.size-btn, .layout-btn {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text-muted);
  transition: all 0.15s;
}
.size-btn.active, .layout-btn.active,
.size-btn[aria-pressed="true"], .layout-btn[aria-pressed="true"] {
  background: var(--accent-green-dim);
  color: var(--accent-green);
  border-color: var(--accent-green);
}

.ui-preview {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg);
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Blueprint grid in preview too */
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 20px 20px;
}
.preview-label {
  position: absolute;
  top: 0.5rem;
  left: 0.75rem;
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  opacity: 0.5;
}

.component-preview { padding: 2rem; }
.preview-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem;
  min-width: 220px;
  max-width: 320px;
  transition: border-radius 0.2s, padding 0.2s;
}
.preview-card-header { margin-bottom: 0.75rem; }
.preview-badge {
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  color: var(--accent-green);
  border: 1px solid var(--accent-green);
  padding: 0.15rem 0.4rem;
  border-radius: 2px;
  opacity: 0.8;
}
.preview-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.preview-body {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
}
.preview-btn {
  background: var(--accent-green);
  color: #0E1116;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: border-radius 0.2s, padding 0.2s, background 0.2s;
}

/* ── Process Steps ───────────────────────────────────── */
.process-track {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.process-step {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 0;
  opacity: 0.4;
  transition: opacity 0.4s ease;
}
.process-step.is-active { opacity: 1; }

.step-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.step-line {
  width: 1px;
  flex: 1;
  background: var(--grid-line);
  min-height: 20px;
  transition: background 0.4s;
}
.process-step.is-active .step-line { background: var(--accent-green); }

.step-dot {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.4s, background 0.4s;
  position: relative;
  z-index: 1;
}
.process-step.is-active .step-dot {
  border-color: var(--accent-green);
  background: var(--accent-green-dim);
  box-shadow: 0 0 10px var(--accent-green-dim);
}
.step-num {
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.process-step.is-active .step-num { color: var(--accent-green); }

.step-content {
  padding: 0.5rem 0 2.5rem 1.5rem;
}
.step-code {
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
  opacity: 0.6;
}
.step-title {
  font-size: 1.1rem;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.step-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.6rem;
}
.step-detail {
  font-size: 0.65rem;
  color: var(--accent-amber);
  letter-spacing: 0.06em;
  opacity: 0.7;
}

/* ── Project Cards ───────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
@media (min-width: 640px) { .projects-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .projects-grid { grid-template-columns: repeat(3, 1fr); } }

.project-card { background: var(--surface); }
.project-card.is-hidden { display: none; }

.project-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: background 0.15s;
}
.project-link:hover { background: var(--surface-2); }
.project-link:hover .project-title { color: var(--accent-green); }

.project-visual {
  position: relative;
  overflow: hidden;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.project-svg { width: 100%; height: auto; }
.project-code {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  opacity: 0.5;
}

.project-info { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.project-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.project-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}
.project-tag-audience { color: var(--accent-amber); border-color: var(--accent-amber); opacity: 0.75; }

.project-title {
  font-size: 1rem;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  color: var(--text);
  transition: color 0.15s;
  line-height: 1.3;
}
.project-problem {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.project-result {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.result-label {
  font-size: 0.6rem;
  color: var(--accent-green);
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 0.25rem;
}
.project-stack {
  font-size: 0.65rem;
  color: var(--text-muted);
  opacity: 0.5;
  letter-spacing: 0.04em;
}

/* ── Contact Section ─────────────────────────────────── */
.section-kontak { background: var(--surface); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 768px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

.contact-wa-group { display: flex; flex-direction: column; gap: 1px; background: var(--border); border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--border); }

.contact-card { background: var(--bg); padding: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }
.contact-card-header { display: flex; align-items: center; gap: 0.75rem; }
.contact-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent-green-dim);
  border: 1px solid var(--accent-green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}
.avatar-initials { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; font-weight: 500; color: var(--accent-green); }
.avatar-status {
  position: absolute;
  bottom: 1px; right: 1px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent-green);
  border: 2px solid var(--bg);
}
.contact-info { flex: 1; }
.contact-name { font-weight: 600; font-size: 1rem; color: var(--text); }
.contact-role { font-size: 0.65rem; color: var(--text-muted); letter-spacing: 0.06em; opacity: 0.75; }
.contact-code { font-size: 0.6rem; color: var(--text-muted); opacity: 0.4; letter-spacing: 0.08em; }
.contact-number { font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; color: var(--text-muted); }
.contact-hours { font-size: 0.8rem; color: var(--text-muted); opacity: 0.7; }

.contact-side { display: flex; flex-direction: column; gap: 1rem; }

.contact-ig-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.ig-header { display: flex; align-items: center; gap: 0.75rem; }
.ig-icon { width: 28px; height: 28px; color: var(--accent-coral); flex-shrink: 0; }
.ig-name { font-weight: 600; color: var(--text); }
.ig-desc { font-size: 0.65rem; color: var(--text-muted); letter-spacing: 0.04em; opacity: 0.75; }

.contact-services { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.25rem; }
.contact-svc-label { font-size: 0.6rem; color: var(--text-muted); letter-spacing: 0.08em; display: block; margin-bottom: 0.75rem; opacity: 0.6; }
.contact-svc-btns { display: flex; flex-direction: column; gap: 0.5rem; }
.btn-svc {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  justify-content: flex-start;
}

/* ── Fallback Contact Form (FR-14) ──────────────────── */
.contact-fallback {
  margin-top: 2rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}
.fallback-title {
  font-size: 0.7rem;
  color: var(--accent-amber);
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
.fallback-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) {
  .form-grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.form-label {
  font-size: 0.7rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
}
.form-input, .form-select, .form-textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.6rem 0.8rem;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-green);
}
.form-textarea {
  resize: vertical;
  min-height: 90px;
}
.form-status {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-top: 1rem;
  display: none;
}
.form-status.success {
  display: block;
  background: var(--accent-green-dim);
  border: 1px solid var(--accent-green);
  color: var(--text);
}
.form-status.error {
  display: block;
  background: rgba(255, 107, 87, 0.15);
  border: 1px solid var(--accent-coral);
  color: var(--text);
}

/* ── Footer ──────────────────────────────────────────── */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding-block: 2rem;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

.footer-brand { display: flex; flex-direction: column; gap: 0.25rem; }
.footer-logo { font-size: 0.8rem; color: var(--accent-green); letter-spacing: 0.1em; }
.footer-tagline { font-size: 0.8rem; color: var(--text-muted); font-style: italic; }

.footer-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-link { font-size: 0.82rem; color: var(--text-muted); transition: color 0.15s; }
.footer-link:hover { color: var(--text); }

.footer-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  opacity: 0.6;
  flex-wrap: wrap;
}
.footer-sep { opacity: 0.4; }

/* ── Floating WhatsApp ───────────────────────────────── */
.wa-float {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 80;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 4px 16px rgba(61,220,132,0.35);
  transition: transform 0.2s, opacity 0.2s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 26px; height: 26px; color: #0E1116; }

@media (min-width: 768px) { .wa-float { display: none; } }

/* ── Reduced Motion ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .circuit-path { stroke-dashoffset: 0; }
  .process-step { opacity: 1; }
  html { scroll-behavior: auto; }
}

/* ── Accessibility Helpers ───────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--accent-green);
  color: #0E1116;
  padding: 0.5rem 1rem;
  font-weight: 700;
  border-radius: 2px;
  z-index: 999;
}
.skip-link:focus { top: 1rem; }

/* ── Utility ─────────────────────────────────────────── */
.hidden { display: none !important; }

/* ═══ Case Study Pages ══════════════════════════════════ */
.case-study-hero {
  padding-top: calc(60px + 4rem);
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}
.case-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  transition: color 0.15s;
}
.case-back:hover { color: var(--accent-green); }
.case-meta { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.case-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text-muted);
}
.case-title { margin-bottom: 0.75rem; }
.case-subtitle { font-size: 1.1rem; color: var(--text-muted); max-width: 580px; }

.case-body { padding-block: 3rem; display: flex; flex-direction: column; gap: 3rem; }
.case-section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--accent-green);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  display: block;
}
.case-problem {
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.7;
  border-left: 2px solid var(--accent-green);
  padding-left: 1.25rem;
}

.case-tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.case-tech-item {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--text-muted);
}
.case-result {
  background: var(--accent-green-dim);
  border: 1px solid var(--accent-green);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.case-result-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--accent-green);
  letter-spacing: 0.1em;
}
.case-result-text { color: var(--text); line-height: 1.65; }

.case-lesson {
  background: var(--accent-amber-dim);
  border: 1px solid var(--accent-amber);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}
.case-lesson-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--accent-amber);
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}
.case-lesson-text { color: var(--text); line-height: 1.65; }
