/* ==========================================================================
   SMART HOME MATEUSZ — PREMIUM DESIGN SYSTEM (DARK TECH LUXURY)
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-base: #08090C;
  --bg-surface: #0E1117;
  --bg-card: rgba(18, 22, 31, 0.75);
  --bg-card-hover: rgba(24, 30, 42, 0.9);
  --bg-card-solid: #12161F;
  --bg-elevated: #161B26;

  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-accent: rgba(59, 130, 246, 0.4);

  --accent-primary: #3B82F6;
  --accent-primary-hover: #2563EB;
  --accent-cyan: #38BDF8;
  --accent-emerald: #10B981;
  --accent-amber: #F59E0B;

  --accent-glow: rgba(59, 130, 246, 0.12);
  --accent-glow-subtle: rgba(56, 189, 248, 0.06);

  --text-main: #F9FAFB;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;
  --text-accent: #60A5FA;

  /* Typography Scale */
  --font-family: -apple-system, BlinkMacSystemFont, "Plus Jakarta Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --fs-hero: clamp(2.35rem, 5.5vw + 0.5rem, 4.25rem);
  --fs-h2: clamp(1.85rem, 3.2vw + 0.25rem, 2.75rem);
  --fs-h3: clamp(1.2rem, 1.8vw + 0.2rem, 1.5rem);
  --fs-body-lg: clamp(1.05rem, 0.6vw + 0.9rem, 1.25rem);
  --fs-body: clamp(0.95rem, 0.3vw + 0.85rem, 1.05rem);
  --fs-sm: 0.875rem;
  --fs-xs: 0.75rem;

  /* Layout & Spacing */
  --container-max: 1240px;
  --container-pad: clamp(1rem, 4vw, 2.5rem);
  --section-space: clamp(4.5rem, 8vw, 7.5rem);

  /* Radius & Shadows */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-subtle: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.6), 0 0 1px 1px var(--border-subtle);
  --shadow-glow: 0 0 35px -5px var(--accent-glow);

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-family);
  font-size: 16px;
  background-color: var(--bg-base);
  color: var(--text-main);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  background: radial-gradient(circle at 50% -100px, rgba(37, 99, 235, 0.08), transparent 700px),
              radial-gradient(circle at 85% 800px, rgba(56, 189, 248, 0.03), transparent 600px),
              var(--bg-base);
  min-height: 100vh;
}

/* Accessibility: Focus visible */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
}

/* Typography Defaults */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

p {
  color: var(--text-secondary);
  font-size: var(--fs-body);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

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

/* Container */
.container {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
  width: 100%;
}

/* Section Header Helper */
.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto clamp(2.5rem, 5vw, 4rem);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-text, #60A5FA);
  margin-bottom: 0.85rem;
  padding: 0.35rem 0.85rem;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-full);
}

.kicker .dot {
  width: 6px;
  height: 6px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-emerald);
  display: inline-block;
}

.section-title {
  font-size: var(--fs-h2);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: var(--fs-body-lg);
  color: var(--text-secondary);
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(8, 9, 12, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.site-header.scrolled {
  background: rgba(8, 9, 12, 0.94);
  border-bottom-color: var(--border-medium);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #1E293B, #0F172A);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  flex-shrink: 0;
  box-shadow: 0 0 15px -3px rgba(59, 130, 246, 0.25);
}

.brand-meta {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.15;
}

.brand-tag {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  list-style: none;
}

.nav-link {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  font-weight: 500;
  transition: color var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-main);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.nav-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
  font-size: var(--fs-sm);
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  transition: all var(--transition-fast);
}

.nav-phone:hover {
  border-color: var(--accent-primary);
  color: var(--accent-cyan);
}

.nav-phone svg {
  color: var(--accent-primary);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-primary);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.55rem 1.15rem;
  font-size: var(--fs-sm);
  font-weight: 500;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  box-shadow: 0 0 15px -3px rgba(59, 130, 246, 0.4);
}

.nav-cta:hover {
  background: var(--accent-primary-hover);
  box-shadow: 0 0 25px -3px rgba(59, 130, 246, 0.6);
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  gap: 5px;
  z-index: 1001;
}

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--text-main);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.mobile-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.9rem 1.85rem;
  border-radius: var(--radius-full);
  font-size: var(--fs-body);
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: all var(--transition-fast);
  text-align: center;
  min-height: 48px;
}

.btn-primary {
  background: var(--accent-primary);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 20px -2px rgba(59, 130, 246, 0.4), inset 0 1px 0 0 rgba(255, 255, 255, 0.25);
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 25px -2px rgba(59, 130, 246, 0.55), inset 0 1px 0 0 rgba(255, 255, 255, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  border: 1px solid var(--border-medium);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.btn-phone {
  background: rgba(16, 185, 129, 0.1);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.btn-phone:hover {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.5);
  transform: translateY(-1px);
}

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

.hero-section {
  padding-top: calc(var(--header-h) + clamp(3rem, 6vw, 5.5rem));
  padding-bottom: clamp(3rem, 6vw, 5rem);
  position: relative;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-headline {
  font-size: var(--fs-hero);
  font-weight: 700;
  letter-spacing: -0.035em;
  max-width: 980px;
  margin-bottom: 1.25rem;
  line-height: 1.1;
  background: linear-gradient(180deg, #FFFFFF 30%, #D1D5DB 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: var(--fs-body-lg);
  color: var(--text-secondary);
  max-width: 680px;
  margin-bottom: 2.25rem;
  line-height: 1.6;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

/* Hero Media & Floating Chips */
.hero-visual-wrapper {
  position: relative;
  width: 100%;
  max-width: 1120px;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.03) 100%);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), var(--shadow-glow);
}

.hero-image-frame {
  position: relative;
  border-radius: calc(var(--radius-lg) - 1px);
  overflow: hidden;
  background-color: var(--bg-surface);
  aspect-ratio: 16 / 9;
}

.hero-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 9, 12, 0.1) 0%, rgba(8, 9, 12, 0.6) 100%);
  pointer-events: none;
}

/* Floating Status Chips */
.chip {
  position: absolute;
  background: rgba(14, 17, 23, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  padding: 0.6rem 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  box-shadow: var(--shadow-card);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-main);
  animation: floatSubtle 6s ease-in-out infinite alternate;
}

.chip-icon {
  color: var(--accent-primary);
  display: flex;
  align-items: center;
}

.chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.chip-1 { top: 8%; left: 4%; animation-delay: 0s; }
.chip-2 { top: 8%; right: 4%; animation-delay: 1.5s; }
.chip-3 { bottom: 10%; right: 5%; animation-delay: 3s; }
.chip-4 { bottom: 10%; left: 5%; animation-delay: 4.5s; }

@keyframes floatSubtle {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-7px); }
}

/* ==========================================================================
   SEKCJA: KIM JESTEM (WITHOUT PERSONAL PHOTO)
   ========================================================================== */

.about-me-section {
  padding-top: var(--section-space);
  padding-bottom: var(--section-space);
  position: relative;
}

.about-me-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 5vw, 4rem);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.about-me-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
}

.about-me-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.about-me-text h2 {
  font-size: var(--fs-h2);
  margin-bottom: 1.5rem;
}

.about-me-text p {
  font-size: var(--fs-body-lg);
  line-height: 1.7;
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}

.about-me-audience-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.45rem 1rem;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.about-me-audience-badge strong {
  color: var(--accent-cyan);
}

/* Pillars of Competence */
.about-pillars-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.about-pillar-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1.15rem;
  transition: all var(--transition-fast);
}

.about-pillar-box:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-medium);
  transform: translateY(-2px);
}

.about-pillar-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.about-pillar-content h4 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  color: var(--text-main);
}

.about-pillar-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.55;
}

/* ==========================================================================
   SEKCJA: NIE MUSISZ ZACZYNAĆ OD CAŁEGO DOMU (FLEXIBLE SCOPE & SCALE)
   ========================================================================== */

.scale-section {
  padding-top: var(--section-space);
  padding-bottom: var(--section-space);
  background: radial-gradient(circle at 50% 30%, rgba(37, 99, 235, 0.04), transparent 70%);
}

.scale-card-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 4vw, 3.5rem);
  box-shadow: var(--shadow-card);
  margin-bottom: 3.5rem;
}

/* Visual Roadmap: 1 urządzenie -> cały dom */
.scale-roadmap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  position: relative;
  margin-top: 2.5rem;
}

.scale-step {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-fast);
  position: relative;
}

.scale-step:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border-medium);
  transform: translateY(-3px);
}

.scale-step.highlight {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.06);
}

.scale-step-badge {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  margin-bottom: 0.75rem;
}

.scale-step-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.scale-step-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Small Tasks Pills Grid */
.small-tasks-wrapper {
  margin-top: 3.5rem;
  text-align: center;
}

.small-tasks-title {
  font-size: var(--fs-h3);
  margin-bottom: 0.75rem;
}

.small-tasks-subtitle {
  font-size: var(--fs-body);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 2rem;
}

.small-tasks-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  max-width: 960px;
  margin: 0 auto 2.5rem;
}

.task-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.55rem 1.1rem;
  font-size: var(--fs-sm);
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.task-pill:hover {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.35);
  color: #fff;
  transform: translateY(-2px);
}

.task-pill svg {
  color: var(--accent-primary);
  flex-shrink: 0;
}

.small-tasks-cta-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: var(--radius-md);
  padding: 1.25rem 2rem;
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  max-width: 760px;
  text-align: left;
}

.small-tasks-cta-box svg {
  color: #34D399;
  flex-shrink: 0;
}

.small-tasks-cta-box p {
  font-size: 0.95rem;
  color: var(--text-main);
  margin: 0;
}

.small-tasks-cta-box strong {
  color: #34D399;
}

/* ==========================================================================
   MAIN SCOPE OF SERVICES (4 GŁÓWNE FILARY)
   ========================================================================== */

.services-section {
  padding-top: var(--section-space);
  padding-bottom: var(--section-space);
}

.services-pillars-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

.scope-pillar-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2.5rem 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform var(--transition-smooth), border-color var(--transition-smooth), background-color var(--transition-smooth), box-shadow var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.scope-pillar-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.4), transparent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.scope-pillar-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-4px);
  box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.5), 0 0 20px -3px var(--accent-glow);
}

.scope-pillar-card:hover::before {
  opacity: 1;
}

.scope-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.scope-icon-box {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.scope-pillar-card:hover .scope-icon-box {
  background: rgba(59, 130, 246, 0.18);
  color: var(--accent-cyan);
}

.scope-badge {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  display: block;
}

.scope-title {
  font-size: 1.35rem;
  color: var(--text-main);
  margin-top: 0.15rem;
}

.scope-desc {
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1.75rem;
}

.scope-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 2rem;
}

.scope-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.92rem;
  color: var(--text-main);
}

.scope-checklist li svg {
  color: var(--accent-primary);
  flex-shrink: 0;
  margin-top: 3px;
}

.scope-pricing-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.scope-pricing-footer strong {
  color: var(--accent-cyan);
  font-weight: 600;
}

/* ==========================================================================
   MONITORING & CAMERAS SECTION (FULL REALISTIC SHOWCASE)
   ========================================================================== */

.monitoring-section {
  padding-top: var(--section-space);
  padding-bottom: var(--section-space);
  background: radial-gradient(circle at 50% 40%, rgba(37, 99, 235, 0.05), transparent 70%);
}

.monitoring-showcase {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
}

.monitoring-visual-pane {
  position: relative;
  height: 100%;
  min-height: 480px;
  background-color: var(--bg-surface);
  overflow: hidden;
}

.monitoring-visual-pane img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.monitoring-visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 9, 12, 0.2) 0%, rgba(8, 9, 12, 0.65) 100%);
  pointer-events: none;
}

/* Camera Detection Badges */
.detection-pill {
  position: absolute;
  background: rgba(14, 17, 23, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-full);
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-main);
  box-shadow: var(--shadow-subtle);
}

.detection-pill .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34D399;
  box-shadow: 0 0 10px #34D399;
}

.detection-pill.amber .pulse-dot {
  background: #F59E0B;
  box-shadow: 0 0 10px #F59E0B;
}

.det-1 { top: 10%; left: 8%; }
.det-2 { top: 35%; right: 10%; }
.det-3 { bottom: 12%; left: 8%; }

/* Monitoring Content Pane */
.monitoring-content-pane {
  padding: clamp(2rem, 4vw, 3.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.monitoring-content-pane h2 {
  font-size: var(--fs-h2);
  margin-bottom: 1.25rem;
}

.monitoring-content-pane p {
  font-size: var(--fs-body);
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.65;
}

.monitoring-features-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.monitoring-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.monitoring-feature-item svg {
  color: var(--accent-primary);
  flex-shrink: 0;
  margin-top: 3px;
}

.monitoring-feature-item h4 {
  font-size: 1rem;
  color: var(--text-main);
  margin-bottom: 0.15rem;
}

.monitoring-feature-item p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Smart Integration Scenarios Box */
.monitoring-scenarios-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

.mon-scenario-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: all var(--transition-fast);
}

.mon-scenario-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
}

.mon-scenario-badge {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-cyan);
  margin-bottom: 0.75rem;
}

.mon-scenario-title {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  color: var(--text-main);
}

.mon-scenario-flow {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.mon-scenario-flow li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mon-scenario-flow li svg {
  color: var(--accent-primary);
  flex-shrink: 0;
}

/* ==========================================================================
   SCENARIOS / INTERACTIVE SMART DASHBOARD
   ========================================================================== */

.scenarios-section {
  padding-top: var(--section-space);
  padding-bottom: var(--section-space);
}

.dashboard-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8);
}

.dashboard-header-bar {
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.dashboard-title-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.dashboard-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
}

.dashboard-title-info span {
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.scenario-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.35);
  padding: 0.35rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.scenario-tab-btn {
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.scenario-tab-btn:hover {
  color: var(--text-main);
}

.scenario-tab-btn.active {
  background: var(--accent-primary);
  color: #FFFFFF;
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.4);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  min-height: 480px;
}

.scenario-details-pane {
  padding: clamp(2rem, 3.5vw, 3rem);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.scenario-meta {
  margin-bottom: 2rem;
}

.scenario-kicker {
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  margin-bottom: 0.5rem;
}

.scenario-heading {
  font-size: var(--fs-h2);
  margin-bottom: 1rem;
}

.scenario-description {
  font-size: var(--fs-body);
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.scenario-actions-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.scenario-action-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-main);
}

.scenario-action-item svg {
  color: var(--accent-primary);
  flex-shrink: 0;
  margin-top: 3px;
}

.scenario-footnote {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.scenario-devices-pane {
  padding: clamp(2rem, 3.5vw, 3rem);
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.25rem;
}

.device-status-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all var(--transition-smooth);
}

.device-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.device-icon-wrapper {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.device-status-card.active .device-icon-wrapper {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.35);
  color: var(--accent-primary);
}

.device-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.device-location {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.device-badge {
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  transition: all var(--transition-fast);
}

.device-status-card.active .device-badge {
  background: rgba(16, 185, 129, 0.12);
  color: #34D399;
  border-color: rgba(16, 185, 129, 0.3);
}

.device-status-card.standby .device-badge {
  background: rgba(59, 130, 246, 0.1);
  color: #93C5FD;
  border-color: rgba(59, 130, 246, 0.25);
}

/* ==========================================================================
   TECHNOLOGY PHILOSOPHY: NAJPIERW KORZYŚĆ, POTEM TECHNOLOGIA
   ========================================================================== */

.philosophy-section {
  padding-top: var(--section-space);
  padding-bottom: var(--section-space);
}

.tech-benefit-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
  margin-bottom: 3.5rem;
}

.tech-benefit-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-fast);
}

.tech-benefit-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-3px);
}

.tech-benefit-question {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.65rem;
}

.tech-benefit-answer {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  display: inline-block;
}

.tech-benefit-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.philosophy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.philosophy-content .kicker {
  margin-bottom: 1rem;
}

.philosophy-content h2 {
  font-size: var(--fs-h2);
  margin-bottom: 1.5rem;
}

.philosophy-content p {
  margin-bottom: 1.25rem;
  font-size: var(--fs-body-lg);
  line-height: 1.7;
}

.ecosystem-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.5rem 0 2rem;
}

.eco-tag {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.85rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-main);
  letter-spacing: 0.02em;
}

.eco-tag.highlight {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-cyan);
}

.trust-pillars {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.pillar-item {
  display: flex;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: border-color var(--transition-fast);
}

.pillar-item:hover {
  border-color: var(--border-medium);
}

.pillar-icon {
  color: var(--accent-primary);
  flex-shrink: 0;
  margin-top: 2px;
}

.pillar-text h4 {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.pillar-text p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

.philosophy-visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-medium);
  box-shadow: var(--shadow-card);
}

.philosophy-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ==========================================================================
   PROCESS / JAK WYGLĄDA WSPÓŁPRACA (4 KROKI)
   ========================================================================== */

.process-section {
  padding-top: var(--section-space);
  padding-bottom: var(--section-space);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  position: relative;
}

.process-step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.process-step-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-medium);
}

.step-num {
  font-family: var(--font-mono);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1;
  margin-bottom: 1.25rem;
  opacity: 0.5;
  transition: color var(--transition-fast);
}

.process-step-card:hover .step-num {
  color: var(--accent-primary);
  opacity: 1;
}

.step-title {
  font-size: 1.2rem;
  margin-bottom: 0.65rem;
  color: var(--text-main);
}

.step-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */

.contact-section {
  padding-top: var(--section-space);
  padding-bottom: var(--section-space);
  position: relative;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: clamp(2rem, 5vw, 4rem);
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.5rem);
  box-shadow: var(--shadow-card);
}

.contact-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.contact-info-header h2 {
  font-size: var(--fs-h2);
  margin-bottom: 0.75rem;
}

.contact-info-header p {
  font-size: var(--fs-body);
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.contact-reassurance-box {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  font-size: 0.92rem;
  color: var(--text-main);
  line-height: 1.55;
}

.contact-reassurance-box strong {
  color: var(--accent-cyan);
}

.direct-channels {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.direct-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.direct-item:hover {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.3);
}

.direct-item.phone-highlight {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.3);
}

.direct-item.phone-highlight:hover {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.5);
}

.direct-item-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.phone-highlight .direct-item-icon {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
}

.direct-item-text .label {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
}

.direct-item-text .value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.02em;
}

.direct-footer-note {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: 1.6;
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-label {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-main);
}

.form-input, .form-textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  font-family: inherit;
  font-size: var(--fs-body);
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  outline: none;
  background: rgba(0, 0, 0, 0.6);
}

.form-input::placeholder, .form-textarea::placeholder {
  color: var(--text-muted);
}

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

.form-consent {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  line-height: 1.5;
}

.form-alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  display: none;
}

.form-alert.success {
  display: block;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34D399;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
  background-color: #060709;
}

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

.footer-copy {
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}

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

/* ==========================================================================
   MOBILE STICKY CTA BAR
   ========================================================================== */

.mobile-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: rgba(10, 12, 16, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-subtle);
  padding: 0.75rem 1rem;
}

.mobile-sticky-inner {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.mobile-sticky-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: var(--fs-sm);
  border-radius: var(--radius-full);
}

/* ==========================================================================
   SCROLL REVEAL ANIMATIONS
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

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

@media (max-width: 1024px) {
  .about-me-grid {
    grid-template-columns: 1fr;
  }

  .services-pillars-grid {
    grid-template-columns: 1fr;
  }

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

  .monitoring-showcase {
    grid-template-columns: 1fr;
  }

  .monitoring-visual-pane {
    min-height: 360px;
  }

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

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

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .scenario-details-pane {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
  }

  .philosophy-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .nav-menu {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(8, 9, 12, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 2.5rem 1.5rem;
    gap: 1.5rem;
    align-items: flex-start;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .nav-menu.open {
    transform: translateX(0);
  }

  .nav-link {
    font-size: 1.25rem;
    font-weight: 600;
  }

  .nav-cta, .nav-phone {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .monitoring-scenarios-grid {
    grid-template-columns: 1fr;
  }

  .chip-1 { top: 4%; left: 4%; }
  .chip-2 { display: none; }
  .chip-3 { display: none; }
  .chip-4 { bottom: 4%; left: 4%; }

  .mobile-sticky-bar {
    display: block;
  }

  body {
    padding-bottom: 60px;
  }
}

@media (max-width: 640px) {
  .tech-benefit-grid {
    grid-template-columns: 1fr;
  }

  .scale-roadmap {
    grid-template-columns: 1fr;
  }

  .process-grid {
    grid-template-columns: 1fr;
  }

  .scenario-tabs {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    border-radius: var(--radius-md);
  }

  .scenario-tab-btn {
    white-space: nowrap;
    font-size: var(--fs-xs);
    padding: 0.5rem 0.85rem;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta-group .btn {
    width: 100%;
  }

  .small-tasks-cta-box {
    flex-direction: column;
    text-align: center;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ==========================================================================
   V2 — BASE FIXES & POLISH
   ========================================================================== */

:root {
  --header-h: 72px;
  --form-control-font: max(16px, 0.95rem);
}

html {
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Long e-mails / URLs must never cause horizontal scrolling */
p, li, h1, h2, h3, h4, .direct-item-text .value {
  overflow-wrap: anywhere;
}

.section-title,
.hero-headline,
.contact-info-header h2 {
  text-wrap: balance;
}

/* Header contact actions are surfaced inside the mobile menu instead */
.nav-menu-actions {
  display: none;
}

/* Never break navigation labels in the middle of a word */
.nav-menu { flex-wrap: nowrap; }
.nav-link,
.nav-phone span,
.nav-cta span,
.brand-name,
.brand-tag {
  white-space: nowrap;
}

body.menu-open {
  overflow: hidden;
}

/* Contact form: error state (was missing — JS set the class but had no styles) */
.form-alert.error {
  display: block;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #FCA5A5;
}

/* Touch-friendly fields + prevents iOS zoom-on-focus (needs >= 16px) */
.form-input,
.form-textarea {
  font-size: var(--form-control-font);
  min-height: 50px;
}

.form-textarea {
  min-height: 132px;
  line-height: 1.55;
}

.form-input:focus-visible,
.form-textarea:focus-visible {
  outline: none;
}

/* ==========================================================================
   V2 — RESPONSIVE / MOBILE
   ========================================================================== */

/* Keep the desktop navigation comfortable on narrower laptops */
@media (max-width: 1280px) {
  .brand-tag { display: none; }
  .nav-menu { gap: 1.1rem; }
  .nav-phone { padding: 0.5rem; }
  .nav-phone span { display: none; }
}

/* ---- Tablets & large phones (mobile navigation) ---- */
@media (max-width: 1024px) {
  :root {
    --header-h: 64px;
    --section-space: clamp(3rem, 11vw, 4.25rem);
    --container-pad: clamp(1.05rem, 5vw, 1.75rem);
    --fs-hero: clamp(2.1rem, 8.5vw, 2.75rem);
    --fs-h2: clamp(1.6rem, 6.5vw, 2.1rem);
    --fs-body-lg: 1rem;
  }

  .nav-wrap { height: var(--header-h); }

  .nav-menu {
    top: var(--header-h);
    bottom: auto;
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    padding: 1.75rem 1.35rem 2.5rem;
    gap: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .nav-menu > li { width: 100%; }
  .nav-menu .nav-link {
    display: block;
    width: 100%;
    padding: 0.85rem 0;
    font-size: 1.2rem;
    border-bottom: 1px solid var(--border-subtle);
  }

  .nav-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    margin-top: 1.75rem;
  }
  .nav-menu-actions .btn { width: 100%; }

  .section-header { margin-bottom: clamp(2rem, 6vw, 2.75rem); }

  /* Reduce oversized card padding on smaller screens */
  .about-me-card { padding: clamp(1.5rem, 6vw, 2rem); }
  .scale-card-container { padding: 1.5rem 1.25rem; margin-bottom: 2.5rem; }
  .scope-pillar-card { padding: 1.6rem 1.35rem; }
  .monitoring-content-pane { padding: 1.75rem 1.35rem; }
  .scenario-details-pane,
  .scenario-devices-pane { padding: 1.6rem 1.35rem; }
  .contact-grid { padding: 1.6rem 1.35rem; gap: 2rem; }
  .process-step-card { padding: 1.6rem 1.35rem; }
  .small-tasks-cta-box { padding: 1.25rem 1.35rem; }

  .dashboard-header-bar {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.35rem;
  }
  .scenario-tabs { width: 100%; overflow-x: auto; }

  /* Sticky bar: proper height + iOS safe area */
  .mobile-sticky-bar { padding-bottom: calc(0.6rem + env(safe-area-inset-bottom)); }
  body { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
}

/* ---- Phones ---- */
@media (max-width: 640px) {
  /* HERO: floating chips become readable status cards below the photo */
  .hero-visual-wrapper {
    background: none;
    padding: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
  }

  .hero-image-frame {
    aspect-ratio: auto;
    overflow: visible;
    background: none;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
  }

  .hero-image-frame img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 11;
    object-fit: cover;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-medium);
  }

  .hero-image-overlay { display: none; }

  .chip {
    position: static;
    width: 100%;
    animation: none;
    justify-content: flex-start;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    padding: 0.7rem 0.95rem;
  }
  .chip-1, .chip-2, .chip-3, .chip-4 {
    top: auto; right: auto; bottom: auto; left: auto;
  }
  .chip-2, .chip-3 { display: flex; }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }
  .hero-cta-group .btn { width: 100%; }

  /* Monitoring overlay pills are too small to read here */
  .detection-pill { display: none; }
  .monitoring-visual-pane { min-height: 240px; }

  /* Device status cards stack neatly */
  .device-status-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
  }
  .device-info { min-width: 0; width: 100%; }
  .device-badge { align-self: flex-start; }

  /* Contact */
  .direct-item { padding: 0.9rem 1rem; gap: 0.85rem; }
  .direct-item-text .value { font-size: 1rem; }

  /* Footer stacks vertically */
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
  .footer-links { flex-wrap: wrap; gap: 0.75rem 1.25rem; }

  .scenario-tabs { border-radius: var(--radius-md); }
  .mobile-sticky-btn { font-size: var(--fs-sm); white-space: nowrap; }
}

/* ---- Small phones ---- */
@media (max-width: 420px) {
  :root {
    --fs-hero: clamp(1.9rem, 9vw, 2.3rem);
    --fs-h2: clamp(1.4rem, 7vw, 1.75rem);
    --section-space: 2.75rem;
  }

  .brand-icon { width: 34px; height: 34px; }
  .chip { font-size: 0.75rem; }
  .direct-item-text .value { font-size: 0.92rem; }

  .mobile-sticky-inner { gap: 0.5rem; }
  .mobile-sticky-btn { padding: 0.7rem 0.5rem; }
  .mobile-sticky-btn svg { display: none; }
}
