/* ============================================================
   SHTEPIA INTELIGJENTE — COMPONENTS CSS
   Architectural Minimalism · Cormorant Garamond + Outfit
   ============================================================ */

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.8rem 2rem;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), transform var(--transition);
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  position: relative;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: var(--ink);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.35);
}
.btn-outline:hover {
  border-color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.06);
}

.btn-outline-dark {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}
.btn-outline-dark:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: var(--text-xs);
  letter-spacing: 0.12em;
}

.btn-sm {
  padding: 0.55rem 1.25rem;
  font-size: 0.625rem;
  letter-spacing: 0.1em;
}

/* ================================================================
   NAVBAR
   ================================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  z-index: 1000;
  transition: background var(--transition), border-color var(--transition);
  border-bottom: 1px solid transparent;
}

.navbar.transparent {
  background: transparent;
  border-bottom-color: transparent;
}

.navbar.scrolled {
  background: var(--dark);
  border-bottom-color: rgba(255,255,255,0.06);
}

.navbar.solid {
  background: var(--dark);
  border-bottom-color: rgba(255,255,255,0.06);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--space-4);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon { flex-shrink: 0; }

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-text .logo-main {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: 1rem;
  color: var(--white);
  font-style: italic;
  letter-spacing: 0.01em;
}

.logo-text .logo-sub {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.6rem;
  color: var(--accent);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Desktop nav links */
.nav-links {
  display: none;
  align-items: center;
  gap: var(--space-8);
}

@media (min-width: 1024px) {
  .nav-links { display: flex; }
}

.nav-links a {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Nav actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

/* Language toggle */
.lang-toggle {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 2px;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  transition: border-color var(--transition), color var(--transition);
  text-decoration: none;
}

.lang-toggle:hover {
  border-color: rgba(255,255,255,0.5);
  color: var(--white);
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
  cursor: pointer;
  background: none;
  border: none;
}

@media (min-width: 1024px) { .hamburger { display: none; } }

.hamburger span {
  display: block;
  width: 20px;
  height: 1px;
  background: var(--white);
  transition: transform var(--transition), opacity var(--transition), width var(--transition);
}

.hamburger span:nth-child(2) { width: 14px; }

.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); width: 20px; }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile drawer */
.nav-drawer {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0;
  background: var(--dark);
  z-index: 999;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: var(--space-6) 0 var(--space-8);
}

.nav-drawer.open { display: block; }

.nav-drawer a {
  display: block;
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}

.nav-drawer a:hover { color: var(--white); }

.nav-drawer .drawer-cta {
  margin: var(--space-6) var(--space-6) 0;
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ================================================================
   HERO
   ================================================================ */
.hero {
  min-height: 100vh;
  background: var(--dark);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-height);
}

/* Subtle grain texture overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.4;
}

/* Thin accent line — top left decorative */
.hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 1px;
  height: 40%;
  background: var(--accent);
  opacity: 0.4;
}

.hero-bg { position: absolute; inset: 0; pointer-events: none; }

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--space-16);
  padding: var(--space-20) 0;
  width: 100%;
}

.hero-content { flex: 1; min-width: 0; }

.hero-visual {
  display: none;
  flex-shrink: 0;
  width: 320px;
}

@media (min-width: 1024px) {
  .hero-visual { display: block; }
}

/* Eyebrow */
.hero-eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-8);
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}

.hero h1 {
  color: var(--white);
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 1.02;
  margin-bottom: var(--space-8);
  font-style: italic;
  font-weight: 300;
}

.hero h1 .accent-word {
  color: var(--accent);
  font-style: italic;
}

.hero-sub {
  font-size: clamp(var(--text-base), 2vw, var(--text-lg));
  color: rgba(255,255,255,0.5);
  margin-bottom: var(--space-10);
  max-width: 460px;
  font-weight: 300;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-10);
}

/* Trust strip */
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  align-items: center;
  padding-top: var(--space-8);
  border-top: 1px solid rgba(255,255,255,0.08);
}

.hero-trust span {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.4);
  font-weight: 400;
  letter-spacing: 0.04em;
}

/* Hero stat cards */
.hero-stats-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.hero-stat-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 2px;
  padding: var(--space-6) var(--space-8);
  transition: border-color var(--transition);
}

.hero-stat-card:nth-child(2) { margin-left: var(--space-8); }
.hero-stat-card:nth-child(3) { margin-left: var(--space-16); }

.hero-stat-card:hover {
  border-color: rgba(196,154,46,0.3);
}

.hero-stat-value {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  font-weight: 300;
  color: var(--white);
  line-height: 1;
  margin-bottom: 4px;
  font-style: italic;
}

.hero-stat-label {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.4);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ================================================================
   STATS BAR
   ================================================================ */
.stats-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: var(--space-12) 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
}

@media (min-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
  }

  .stats-grid > div {
    padding: 0 var(--space-10);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .stats-grid > div:first-child { padding-left: 0; align-items: flex-start; text-align: left; }
  .stats-grid > div:last-child  { border-right: none; }
}

.stat-value {
  font-family: var(--font-heading);
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
  font-weight: 300;
  color: var(--ink);
  line-height: 1;
  font-style: italic;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: var(--text-xs);
  color: var(--ink-muted);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: var(--space-2);
}

/* ================================================================
   CARDS (base)
   ================================================================ */
.card {
  background: var(--surface);
  border-radius: 0;
  border: 1px solid var(--border);
  transition: border-color var(--transition);
  overflow: hidden;
}

.card:hover { border-color: var(--ink-faint); }

/* ================================================================
   BUNDLE CARDS
   ================================================================ */
.bundle-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: var(--space-8);
  transition: border-color var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.bundle-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.bundle-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  color: var(--ink-muted);
}

.bundle-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--border);
}

.bundle-title-group { flex: 1; }

.bundle-name {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 4px;
  line-height: 1.1;
}

.bundle-tagline {
  font-size: var(--text-xs);
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}

.bundle-benefits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.bundle-benefits li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--ink-muted);
  line-height: 1.5;
}

.bundle-benefits li::before {
  content: '—';
  color: var(--accent);
  font-weight: 400;
  flex-shrink: 0;
  margin-top: 1px;
  font-size: var(--text-xs);
}

.bundle-devices {
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: var(--space-4) var(--space-5);
}

.bundle-devices-title {
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  margin-bottom: var(--space-3);
}

.device-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.device-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--ink-muted);
}

.device-qty {
  background: var(--ink);
  color: var(--white);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 1px;
  flex-shrink: 0;
  min-width: 24px;
  text-align: center;
}

.bundle-addons {
  font-size: var(--text-xs);
  color: var(--ink-faint);
  line-height: 1.6;
}

.bundle-addons strong {
  color: var(--ink-muted);
  font-weight: 500;
}

.bundle-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
  margin-top: auto;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.bundle-best-for {
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--ink-faint);
  letter-spacing: 0.03em;
}

/* ================================================================
   USP LIST — Editorial numbered
   ================================================================ */
.usp-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.usp-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-8);
  padding: var(--space-8) 0;
  border-bottom: 1px solid var(--border);
}

.usp-item:first-child { border-top: 1px solid var(--border); }

@media (min-width: 768px) {
  .usp-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    column-gap: var(--space-16);
  }
  .usp-item:nth-child(odd) {
    border-right: 1px solid var(--border);
    padding-right: var(--space-12);
  }
  .usp-item:nth-child(even) { padding-left: var(--space-4); }
}

@media (min-width: 1024px) {
  .usp-list {
    grid-template-columns: repeat(3, 1fr);
    column-gap: 0;
  }
  .usp-item:nth-child(odd) { border-right: none; padding-right: 0; }
  .usp-item:nth-child(even) { padding-left: 0; }
  .usp-item:not(:nth-child(3n)) {
    border-right: 1px solid var(--border);
    padding-right: var(--space-10);
  }
  .usp-item:not(:nth-child(3n+1)) { padding-left: var(--space-10); }
}

.usp-num {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 300;
  color: var(--border);
  line-height: 1;
  flex-shrink: 0;
  width: 2.5rem;
  font-style: italic;
  letter-spacing: -0.02em;
}

.usp-body h4 {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 400;
  margin-bottom: var(--space-2);
  color: var(--ink);
}

.usp-body p {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  margin: 0;
  line-height: 1.65;
  font-weight: 300;
}

/* Legacy usp-grid / usp-card */
.usp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 640px) { .usp-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .usp-grid { grid-template-columns: repeat(3, 1fr); } }

.usp-card {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  padding: var(--space-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0;
}

.usp-icon { font-size: 1.5rem; flex-shrink: 0; line-height: 1; }

.usp-text h4 {
  font-size: var(--text-base);
  margin-bottom: var(--space-1);
}
.usp-text p {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  margin: 0;
}

/* ================================================================
   HOW IT WORKS — Steps
   ================================================================ */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  position: relative;
}

@media (min-width: 768px) {
  .steps-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
  }
  .steps-grid .step-card:not(:last-child) {
    border-right: 1px solid var(--border);
    padding-right: var(--space-10);
  }
  .steps-grid .step-card:not(:first-child) {
    padding-left: var(--space-10);
  }
}

.step-card {
  padding: var(--space-8) 0;
  position: relative;
}

.step-number {
  font-family: var(--font-heading);
  font-size: 5rem;
  font-weight: 300;
  color: var(--border);
  line-height: 1;
  margin-bottom: var(--space-6);
  font-style: italic;
  letter-spacing: -0.04em;
}

.step-card h4 {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 400;
  margin-bottom: var(--space-3);
  color: var(--ink);
}

.step-card p {
  color: var(--ink-muted);
  font-size: var(--text-sm);
  line-height: 1.7;
  font-weight: 300;
}

/* ================================================================
   TESTIMONIALS
   ================================================================ */
.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

@media (min-width: 768px) {
  .testimonials-grid { grid-template-columns: repeat(3, 1fr); }
}

.testimonial-card {
  background: var(--surface);
  padding: var(--space-8);
  border: none;
  position: relative;
}

.testimonial-card::before {
  content: '"';
  font-family: var(--font-heading);
  font-size: 6rem;
  color: var(--border);
  line-height: 1;
  position: absolute;
  top: var(--space-4);
  right: var(--space-6);
  font-style: italic;
}

.testimonial-stars {
  color: var(--accent);
  font-size: var(--text-base);
  letter-spacing: 3px;
  line-height: 1;
  margin-bottom: var(--space-4);
}

.testimonial-text {
  font-family: var(--font-heading);
  font-style: italic;
  font-weight: 300;
  color: var(--ink);
  margin-bottom: var(--space-6);
  font-size: var(--text-lg);
  line-height: 1.6;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}

.author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: var(--text-lg);
  font-style: italic;
  flex-shrink: 0;
}

.author-name {
  font-weight: 500;
  font-size: var(--text-sm);
  color: var(--ink);
}

.author-location {
  font-size: var(--text-xs);
  color: var(--ink-faint);
  letter-spacing: 0.03em;
}

/* ================================================================
   CTA BANNER
   ================================================================ */
.cta-banner {
  background: var(--dark);
  color: var(--white);
  padding: var(--space-24) 0;
  position: relative;
  overflow: hidden;
}

/* Decorative accent line */
.cta-banner::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: rgba(196,154,46,0.3);
}

.cta-banner .container { position: relative; text-align: center; }

.cta-banner h2 {
  color: var(--white);
  margin-bottom: var(--space-4);
  font-weight: 300;
  font-style: italic;
}

.cta-banner p {
  color: rgba(255,255,255,0.5);
  margin-bottom: var(--space-10);
  font-size: var(--text-lg);
  font-weight: 300;
}

/* ================================================================
   FILTER TABS
   ================================================================ */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-10);
}

.filter-tab {
  padding: 6px 16px;
  border-radius: 0;
  border: 1px solid var(--border);
  background: transparent;
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-tab:hover {
  border-color: var(--ink-muted);
  color: var(--ink);
}

.filter-tab.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

/* ================================================================
   SERVICE TIERS
   ================================================================ */
.tiers-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

@media (min-width: 640px) { .tiers-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .tiers-grid { grid-template-columns: repeat(4, 1fr); } }

.tier-card {
  padding: var(--space-8) var(--space-6);
  border-radius: 0;
  border: none;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  transition: background var(--transition);
  position: relative;
}

.tier-card.highlighted {
  background: var(--cream);
  border-top: 2px solid var(--accent);
}

.tier-card.highlighted::before {
  content: 'Popular';
  position: absolute;
  top: 0; left: var(--space-6);
  transform: translateY(-50%);
  background: var(--accent);
  color: var(--ink);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 0;
}

.tier-name {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 400;
  color: var(--ink);
  font-style: italic;
}

.tier-devices {
  font-size: var(--text-xs);
  color: var(--ink-muted);
  font-weight: 400;
  letter-spacing: 0.04em;
}

.tier-features {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
}

.tier-features li {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border);
  font-weight: 300;
}

.tier-features li:last-child { border-bottom: none; }

/* ================================================================
   CONTACT FORM
   ================================================================ */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: var(--space-2);
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 300;
  color: var(--ink);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}

.form-control::placeholder { color: var(--ink-faint); }

.form-control:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: none;
}

.form-control.is-invalid { border-color: var(--danger); }

.form-error {
  font-size: var(--text-xs);
  color: var(--danger);
  margin-top: var(--space-1);
  letter-spacing: 0.02em;
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236B6967'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 640px) {
  .form-grid { grid-template-columns: repeat(2, 1fr); gap: 0 var(--space-4); }
}

/* ================================================================
   FAQ
   ================================================================ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 760px;
  border-top: 1px solid var(--border);
}

.faq-item {
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  transition: border-color var(--transition);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-6) 0;
  cursor: pointer;
  font-weight: 400;
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--ink);
  background: transparent;
  transition: color var(--transition);
  user-select: none;
}

.faq-item.open .faq-question { color: var(--accent); }

.faq-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.25rem;
  font-weight: 300;
  font-family: var(--font-heading);
  line-height: 1;
  color: var(--ink-faint);
  transition: transform var(--transition), color var(--transition);
}

.faq-item.open .faq-icon {
  color: var(--accent);
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.38s var(--ease-out-expo), padding var(--transition);
}

.faq-item.open .faq-answer { max-height: 600px; }

.faq-answer-inner {
  padding: 0 0 var(--space-6);
  color: var(--ink-muted);
  font-size: var(--text-base);
  line-height: 1.72;
  font-weight: 300;
  max-width: 600px;
}

/* ================================================================
   GALLERY
   ================================================================ */
.gallery-grid {
  columns: 1;
  gap: 1px;
  column-gap: 1px;
}

@media (min-width: 640px) { .gallery-grid { columns: 2; } }
@media (min-width: 1024px) { .gallery-grid { columns: 3; } }

.gallery-item {
  break-inside: avoid;
  margin-bottom: 1px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  display: block;
  transition: transform 0.5s var(--ease-out-expo);
}

.gallery-item:hover img { transform: scale(1.04); }

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: transparent;
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  align-items: flex-end;
}

/* Solid bar — no gradient */
.gallery-item:hover .gallery-overlay { opacity: 1; }

.gallery-caption {
  width: 100%;
  background: var(--ink);
  color: var(--white);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.04em;
  padding: var(--space-3) var(--space-4);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.94);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
}

.lightbox.open { display: flex; }

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 0;
}

.lightbox-close {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  width: 40px;
  height: 40px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: border-color var(--transition);
}

.lightbox-close:hover { border-color: rgba(255,255,255,0.6); }

/* ================================================================
   BLOG
   ================================================================ */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

@media (min-width: 640px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } }

.blog-card {
  border-radius: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color var(--transition);
}

.blog-card:hover { border-color: var(--ink-faint); }

.blog-card-cover {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--cream);
}

.blog-card-body { padding: var(--space-6); }

.blog-date {
  font-size: var(--text-xs);
  color: var(--ink-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.blog-card-title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 400;
  margin-bottom: var(--space-3);
  color: var(--ink);
  line-height: 1.15;
}

.blog-card-excerpt {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  margin-bottom: var(--space-5);
  font-weight: 300;
  line-height: 1.65;
}

.blog-read-more {
  color: var(--ink);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap var(--transition);
}

.blog-read-more::after {
  content: '→';
  font-size: var(--text-sm);
}

.blog-read-more:hover { gap: 14px; }

/* ================================================================
   MODAL
   ================================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(19,19,17,0.6);
  z-index: 5000;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  backdrop-filter: blur(4px);
}

.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: modalIn 0.38s var(--ease-out-expo);
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(-20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6) var(--space-8);
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 400;
  color: var(--ink);
  font-style: italic;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 2px;
  background: var(--cream);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  flex-shrink: 0;
  color: var(--ink-muted);
}

.modal-close:hover {
  background: var(--border);
  border-color: var(--ink-faint);
}

.modal-body { padding: var(--space-8); }

.modal-success {
  text-align: center;
  padding: var(--space-12) var(--space-8);
}

.modal-success-icon { font-size: 2.5rem; margin-bottom: var(--space-4); }
.modal-success h3 {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 400;
  font-style: italic;
  margin-bottom: var(--space-3);
}
.modal-success p { color: var(--ink-muted); font-weight: 300; }

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.5);
  padding: var(--space-20) 0 var(--space-10);
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  margin-bottom: var(--space-16);
}

@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }

.footer-brand p {
  font-size: var(--text-sm);
  line-height: 1.72;
  margin-top: var(--space-5);
  margin-bottom: var(--space-4);
  font-weight: 300;
  color: rgba(255,255,255,0.4);
}

.footer-location {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.04em;
}

.footer-heading {
  font-family: var(--font-body);
  font-size: 0.625rem;
  font-weight: 500;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--space-5);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-links a {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.5);
  font-weight: 300;
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: center;
  text-align: center;
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.04em;
}

@media (min-width: 640px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}

.footer-social { display: flex; gap: var(--space-3); }

.social-link {
  width: 32px;
  height: 32px;
  border-radius: 0;
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.4);
  transition: border-color var(--transition), color var(--transition);
}

.social-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ================================================================
   WHATSAPP FLOATING BUTTON
   ================================================================ */
.whatsapp-float {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 4000;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.whatsapp-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.3);
  transition: transform var(--transition), box-shadow var(--transition);
  flex-shrink: 0;
}

.whatsapp-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 28px rgba(37,211,102,0.4);
}

.whatsapp-tooltip {
  background: var(--ink);
  color: var(--white);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.06em;
  padding: 6px 12px;
  border-radius: 2px;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(10px);
  transition: opacity var(--transition), transform var(--transition);
  pointer-events: none;
}

.whatsapp-float:hover .whatsapp-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* ================================================================
   PAGE HERO (inner pages)
   ================================================================ */
.page-hero {
  background: var(--dark);
  padding: calc(var(--nav-height) + var(--space-20)) 0 var(--space-16);
  color: var(--white);
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 60px;
  height: 1px;
  background: var(--accent);
}

.page-hero h1 {
  color: var(--white);
  margin-bottom: var(--space-4);
  font-style: italic;
  font-weight: 300;
}

.page-hero p {
  color: rgba(255,255,255,0.5);
  font-size: var(--text-lg);
  font-weight: 300;
  max-width: 560px;
}

/* ================================================================
   ALERT
   ================================================================ */
.alert {
  padding: var(--space-4) var(--space-5);
  border-radius: 0;
  font-size: var(--text-sm);
  font-weight: 400;
  margin-bottom: var(--space-4);
  border-left: 3px solid;
}

.alert-success {
  background: rgba(74,124,89,0.06);
  color: var(--success);
  border-color: var(--success);
}

.alert-danger {
  background: rgba(220,38,38,0.06);
  color: var(--danger);
  border-color: var(--danger);
}

/* ================================================================
   MAP EMBED
   ================================================================ */
.map-container {
  border-radius: 0;
  overflow: hidden;
  height: 320px;
  border: 1px solid var(--border);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ================================================================
   CURSOR GLOW
   ================================================================ */
#cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(196, 154, 46, 0.10) 0%,
    rgba(196, 154, 46, 0.04) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 9;
  opacity: 0;
  transition: opacity 0.5s ease;
  will-change: transform;
}

/* ================================================================
   HERO CANVAS
   ================================================================ */
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ================================================================
   NETWORK VISUALIZATION (hero-visual)
   ================================================================ */
.network-viz {
  margin-bottom: var(--space-4);
}

.network-svg { display: block; overflow: visible; }

/* Connection lines data-flow animation */
@keyframes dashFlow {
  to { stroke-dashoffset: -20; }
}

.network-line {
  animation: dashFlow 2s linear infinite;
}

/* Device node — hidden until .active class is added by JS */
.device-node { opacity: 0; transition: opacity 0.6s ease; }
.device-node.active { opacity: 1; }

/* Icon fills fade in with node */
.device-icon-fill { transition: fill 0.4s ease; }

/* Hub glow when active */
.device-node[data-device="hub"].active circle.device-node-body {
  filter: drop-shadow(0 0 6px rgba(196,154,46,0.5));
}

/* Pulse rings */
@keyframes devicePulse {
  0%   { transform: scale(0.4); opacity: 0.7; }
  100% { transform: scale(2.2); opacity: 0; }
}

.device-node-ring {
  transform-box: fill-box;
  transform-origin: center;
  animation: devicePulse 2.8s ease-out infinite;
}

/* Only show rings when node is active */
.device-node:not(.active) .device-node-ring {
  animation-play-state: paused;
  opacity: 0;
}

/* Subtle dot-grid background for light sections */
.section.bg-light,
.stats-bar {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Ccircle cx='1' cy='1' r='1' fill='%23DEDAD6' fill-opacity='0.6'/%3E%3C/svg%3E");
}

/* ================================================================
   BUNDLE CARD POWER-ON HOVER
   ================================================================ */
.bundle-card:hover .bundle-icon svg {
  filter: drop-shadow(0 0 10px rgba(196,154,46,0.45));
  transition: filter 0.3s ease;
}

.bundle-card .bundle-icon svg {
  transition: filter 0.3s ease;
}

/* Accent slide-in under bundle name */
.bundle-name {
  position: relative;
}

.bundle-name::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.35s ease;
}

.bundle-card:hover .bundle-name::after { width: 60%; }

/* ================================================================
   SHELLY PARTNER BADGE (about page)
   ================================================================ */
.shelly-badge {
  border: 1px solid var(--border);
  overflow: hidden;
}

.shelly-badge-visual {
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6) var(--space-8);
  border-bottom: 1px solid rgba(196,154,46,0.2);
}

.shelly-badge-content {
  padding: var(--space-6) var(--space-8);
}

.shelly-badge-label {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-2);
}

.shelly-badge-title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 400;
  color: var(--ink);
  margin-bottom: var(--space-3);
}

.shelly-badge-text {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  line-height: 1.65;
  font-weight: 300;
  margin-bottom: var(--space-5);
}

.shelly-badge-tag {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-4) var(--space-5);
  background: var(--dark);
  border-left: 2px solid var(--accent);
}

.shelly-badge-tag > span:first-child {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 400;
  font-style: italic;
  color: var(--white);
  line-height: 1;
}

.shelly-badge-sub {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ================================================================
   REDUCED MOTION
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll,
  .animate-on-scroll.is-visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .network-line,
  .device-node-ring {
    animation: none !important;
  }

  #cursor-glow { display: none; }
  #hero-canvas { display: none; }
}

/* ================================================================
   SHOWCASE GALLERY — Smart Home Room Cards
   ================================================================ */

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  margin-bottom: var(--space-16);
}

.room-card {
  background: var(--dark);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  outline: none;
  position: relative;
  transition: background var(--transition);
}

.room-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  z-index: 1;
}

.room-card-inner {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.room-card-inner svg {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.7s var(--ease-out-expo);
}

.room-card:hover .room-card-inner svg {
  transform: scale(1.025);
}

/* Warm amber overlay on hover */
.room-warm-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(196,154,46,0.18) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.room-card:hover .room-warm-overlay,
.room-card.powered-on .room-warm-overlay {
  opacity: 1;
}

/* Category chip (top-left badge) */
.room-chip {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  padding: 3px 10px;
  background: rgba(17, 17, 16, 0.82);
  border: 1px solid rgba(196,154,46,0.35);
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  backdrop-filter: blur(4px);
}

/* Status indicator (top-right) */
.room-status {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  background: rgba(17, 17, 16, 0.78);
  border: 1px solid rgba(245,243,239,0.1);
  color: rgba(245,243,239,0.55);
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.06em;
  backdrop-filter: blur(4px);
}

.room-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: statusPulse 2.2s ease infinite;
  flex-shrink: 0;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Room info footer */
.room-footer {
  padding: var(--space-4) var(--space-5);
  background: var(--dark);
  border-top: 1px solid rgba(245,243,239,0.06);
  flex: 1;
  transition: background 0.3s ease;
}

.room-card:hover .room-footer {
  background: #1a1a18;
}

.room-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 400;
  font-style: italic;
  color: var(--white);
  margin-bottom: 4px;
  line-height: 1.2;
}

.room-meta {
  font-family: var(--font-body);
  font-size: 10px;
  color: rgba(245,243,239,0.35);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-weight: 400;
  margin: 0;
}

/* SVG smart element states */
.smart-el {
  transition: opacity 0.55s ease, filter 0.55s ease;
}

.room-card:not(.powered-on) .smart-el {
  opacity: 0.25 !important;
  filter: none;
}

.room-card.powered-on .smart-el {
  opacity: 1 !important;
}

.room-card:hover .smart-el {
  filter: drop-shadow(0 0 3px rgba(196,154,46,0.6));
}

/* Light cone — barely visible, warms on hover */
.light-cone {
  opacity: 0.01;
  transition: opacity 0.7s ease;
}

.room-card.powered-on .light-cone {
  opacity: 0.045;
}

.room-card:hover .light-cone {
  opacity: 0.09;
}

/* Room glow gradient */
.room-glow {
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.room-card.powered-on .room-glow {
  opacity: 1;
}

/* Device screen glow */
.device-screen {
  transition: opacity 0.55s ease;
}

.room-card:not(.powered-on) .device-screen {
  opacity: 0.3 !important;
}

/* IoT connection lines */
.iot-line {
  opacity: 0;
  transition: opacity 0.6s ease;
  stroke-dasharray: 4 4;
  animation: none;
}

.room-card.powered-on .iot-line {
  opacity: 1;
  animation: iotFlow 2.5s linear infinite;
}

@keyframes iotFlow {
  to { stroke-dashoffset: -16; }
}

/* Showcase CTA */
.showcase-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding: var(--space-8) var(--space-10);
  background: var(--dark);
  border: 1px solid rgba(245,243,239,0.08);
  margin-top: var(--space-12);
}

.showcase-cta p {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 300;
  font-style: italic;
  color: rgba(245,243,239,0.75);
  margin: 0;
}

/* Responsive: 2 columns on tablet */
@media (max-width: 1023px) {
  .showcase-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Responsive: 1 column on mobile */
@media (max-width: 639px) {
  .showcase-grid {
    grid-template-columns: 1fr;
  }

  .showcase-cta {
    flex-direction: column;
    text-align: center;
    padding: var(--space-6);
  }
}

/* Reduced motion — disable room card animations */
@media (prefers-reduced-motion: reduce) {
  .room-card-inner svg,
  .room-warm-overlay,
  .smart-el,
  .light-cone,
  .room-glow,
  .device-screen,
  .iot-line {
    transition: none !important;
    animation: none !important;
  }

  .room-status-dot {
    animation: none !important;
  }
}


/* ================================================================
   ROOM EXPLORER — Scene-based fullscreen viewer (Implementation 3)
   Scroll/swipe drives discrete scene transitions in-place.
   Scenes: Overview → Device 1..N → System Topology
   ================================================================ */

.room-explorer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.36s ease;
}

.room-explorer[hidden] { display: none; }

.room-explorer.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* ── SVG background — JS positions SVG with explicit cover math ── */
.ex-svg-bg {
  position: absolute;
  inset: 0;
  background: #0a0a09;
  overflow: hidden;
}

/* ── Canvas: topology overlay, fades in on topology scene ── */
.ex-canvas {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.ex-canvas.is-visible { opacity: 1; }

/* ── Spotlight ring tracking device position in SVG ── */
.ex-spotlight {
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1.5px solid rgba(196,154,46,0.9);
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: left 0.5s cubic-bezier(0.25,1,0.5,1),
              top  0.5s cubic-bezier(0.25,1,0.5,1),
              opacity 0.3s ease;
  animation: spotlightPulse 2.4s ease infinite;
}

.ex-spotlight.is-visible { opacity: 1; }

@keyframes spotlightPulse {
  0%   { box-shadow: 0 0 0 0    rgba(196,154,46,0.45); }
  60%  { box-shadow: 0 0 0 14px rgba(196,154,46,0);    }
  100% { box-shadow: 0 0 0 0    rgba(196,154,46,0);    }
}

/* ── Top chrome: close button + room navigation ── */
.ex-chrome-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-6);
  height: 56px;
  background: linear-gradient(to bottom, rgba(13,13,12,0.82) 0%, rgba(13,13,12,0) 100%);
  pointer-events: none;
}

.ex-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(245,243,239,0.07);
  border: 1px solid rgba(245,243,239,0.16);
  color: rgba(245,243,239,0.75);
  font-size: 24px;
  font-family: var(--font-body);
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.ex-close:hover {
  background: rgba(245,243,239,0.14);
  color: var(--white);
  border-color: rgba(245,243,239,0.35);
}

.ex-room-nav {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  pointer-events: auto;
}

.ex-room-prev,
.ex-room-next {
  display: flex;
  align-items: center;
  padding: 6px 14px;
  background: rgba(245,243,239,0.06);
  border: 1px solid rgba(245,243,239,0.14);
  color: rgba(245,243,239,0.65);
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.ex-room-prev:hover,
.ex-room-next:hover {
  border-color: rgba(196,154,46,0.5);
  color: var(--accent);
  background: rgba(196,154,46,0.07);
}

.ex-counter {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: rgba(245,243,239,0.35);
  letter-spacing: 0.12em;
  min-width: 36px;
  text-align: center;
}

/* ── Scene progress dots ── */
.ex-dots {
  position: absolute;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.ex-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(245,243,239,0.22);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--transition), transform var(--transition);
}

.ex-dot.is-active {
  background: var(--accent);
  transform: scale(1.5);
}

/* ── Bottom info panel ── */
.ex-panel-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: linear-gradient(to top,
    rgba(13,13,12,0.96) 0%,
    rgba(13,13,12,0.82) 55%,
    rgba(13,13,12,0) 100%);
  padding: 5rem var(--space-8) calc(var(--space-10) + 28px);
  pointer-events: none;
}

.ex-content {
  max-width: 520px;
  pointer-events: auto;
  transition: opacity 0.22s ease;
}

.ex-content.is-fading { opacity: 0; }

/* ── Scene toggle ── */
.ex-scene          { display: none; }
.ex-scene.is-active { display: block; }

/* ── Overview scene ── */
.ex-cat {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-2);
}

.ex-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 300;
  font-style: italic;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: var(--space-3);
}

.ex-meta {
  font-family: var(--font-body);
  font-size: 11px;
  color: rgba(245,243,239,0.38);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-bottom: var(--space-5);
}

.ex-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: rgba(245,243,239,0.4);
  letter-spacing: 0.05em;
  animation: hintBounce 1.8s ease infinite;
}

.ex-hint-icon {
  color: var(--accent);
  font-size: 16px;
}

@keyframes hintBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(4px); }
}

/* ── Device scene ── */
.ex-dev-badge {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.ex-dev-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: rgba(13,13,12,0.9);
  flex-shrink: 0;
}

.ex-dev-badge-text { flex: 1; min-width: 0; }

.ex-dev-name {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  font-weight: 400;
  font-style: italic;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 2px;
}

.ex-dev-model {
  font-family: var(--font-body);
  font-size: 10px;
  color: rgba(245,243,239,0.32);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ex-dev-status-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.ex-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  background: rgba(196,154,46,0.1);
  border: 1px solid rgba(196,154,46,0.3);
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ex-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: rgba(245,243,239,0.55);
}

.ex-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ex-dev-specs {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ex-dev-specs li {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: rgba(245,243,239,0.62);
  font-weight: 300;
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}

.ex-spec-dot {
  color: var(--accent);
  font-size: 13px;
  flex-shrink: 0;
}

/* ── Topology scene label ── */
.ex-section-label {
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(245,243,239,0.32);
  margin: 0;
}

/* ── Mobile ── */
@media (max-width: 639px) {
  .ex-chrome-top {
    padding: 0 var(--space-4);
    height: 50px;
  }

  .ex-panel-wrap {
    padding: 4rem var(--space-5) calc(var(--space-8) + 24px);
  }

  .ex-title {
    font-size: clamp(1.7rem, 7vw, 2.6rem);
  }

  .ex-dev-icon {
    width: 42px;
    height: 42px;
    font-size: 18px;
  }

  .ex-dots {
    bottom: var(--space-4);
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .room-explorer,
  .ex-canvas,
  .ex-spotlight,
  .ex-content,
  .ex-close,
  .ex-room-prev,
  .ex-room-next,
  .ex-dot,
  .ex-hint {
    transition: none !important;
    animation: none !important;
  }
}
