/* ========================================================================
   CSS VARIABLES - LIGHT THEME DEFAULT
   ======================================================================== */

:root {
  /* TEXT ROLE COLOURS - Light (default) */
  --text-primary: #434C5E;
  --text-secondary: #6B7586;
  --text-support: #4E5768;
  --text-muted: #9BA3B0;
  --text-accent: #d67c6c;
  --text-on-accent: #f5f5f5;

  /* ACCENT TONES */
  --brand-terracotta-muted: #c8998e;
  --brand-terracotta-soft: rgba(214, 124, 108, 0.12);

  /* THEME COLOURS - Light (default) */
  --color-bg-primary: #f6f7f8;
  --color-bg-primary-rgb: 246, 247, 248;
  --color-bg-secondary: #eceef0;
  --color-bg-secondary-rgb: 236, 238, 240;
  --color-bg-demos: #d4d8de;
  --color-bg: var(--color-bg-primary);
  --color-surface: #f8f9fb;
  --color-border: #ddd8d4;
  --color-border-subtle: rgba(61, 57, 53, 0.1);
  --color-divider-strong: rgba(0, 0, 0, 0.08);
  --color-divider-mid: rgba(0, 0, 0, 0.05);
  --color-divider-soft: rgba(0, 0, 0, 0.03);

  /* TYPOGRAPHY */
  --font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-family-mono:
    "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  /* TYPOGRAPHY SCALE */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3rem;

  /* FONT WEIGHTS */
  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* LINE HEIGHTS */
  --leading-tight: 1.2;
  --leading-normal: 1.5;
  --leading-relaxed: 1.6;

  /* SPACING */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-14: 3.5rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* LAYOUT */
  --content-width: 1200px;
  --container-padding: clamp(1.25rem, 2.2vw + 0.35rem, 2.5rem);
  --navbar-height: 74px;

  /* SECTION RHYTHM - spacing between page sections */
  --section-gap: 4rem;
  --section-title-gap: 2rem;

  /* EFFECTS */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(46, 52, 64, 0.06);
  --shadow-md: 0 4px 12px rgba(46, 52, 64, 0.08);
  --shadow-lg: 0 8px 30px rgba(46, 52, 64, 0.1);
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;

  /* FOCUS - keyboard-only indicator, invisible to mouse users */
  --focus-ring: rgba(79, 73, 67, 0.5);
  --focus-ring-offset: 2px;
}

@media (max-width: 767px) {
  :root {
    --section-gap: 3.5rem;
    --container-padding: clamp(16px, 5vw, 30px);
  }
}

/* ========================================================================
   DARK THEME OVERRIDE
   ======================================================================== */

:root.dark-theme,
html.dark-theme {
  --text-primary: #e7e5e1;
  --text-secondary: #919aa1;
  --text-support: #c2c9c6;
  --text-muted: #70767c;
  --text-accent: #d67c6c;
  --text-on-accent: #2a2623;

  --color-bg-primary: #1f2226;
  --color-bg-primary-rgb: 31, 34, 38;
  --color-bg-secondary: #1a1d20;
  --color-bg-secondary-rgb: 26, 29, 32;
  --color-bg-demos: #16191c;
  --color-bg: var(--color-bg-primary);
  --color-surface: #161b22;
  --color-border: #3d3630;
  --color-border-subtle: rgba(240, 240, 240, 0.08);
  --color-divider-strong: rgba(255, 255, 255, 0.06);
  --color-divider-mid: rgba(255, 255, 255, 0.05);
  --color-divider-soft: rgba(255, 255, 255, 0.03);
  --frame-border-rest: rgba(231, 229, 225, 0.14);
  --frame-border-hover: rgba(214, 124, 108, 0.56);
  --frame-border-active: rgba(214, 124, 108, 0.76);
  --frame-focus-ring: rgba(214, 124, 108, 0.42);
  --focus-ring: rgba(231, 229, 225, 0.45);
}

/* ========================================================================
   UNIVERSAL RESET
   ======================================================================== */

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

/* ========================================================================
   BILINGUAL CONTENT - shows only the active language
   ======================================================================== */

.i18n {
  display: none;
}

html[lang="en"] .i18n[lang="en"],
html[lang="no"] .i18n[lang="no"] {
  display: contents;
}

/* ========================================================================
   SKIP NAVIGATION - Hidden until keyboard focus
   ======================================================================== */

.skip-nav {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 10000;
  padding: 8px 16px;
  background: var(--color-bg-primary);
  color: var(--text-primary);
  border: 2px solid var(--text-accent);
  border-radius: 4px;
  font-size: 0.875rem;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-nav:focus {
  top: 16px;
}

/* ========================================================================
   BASE STYLES
   ======================================================================== */

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html.disable-smooth-scroll {
  scroll-behavior: auto !important;
}

body {
  font-family: var(--font-family);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--text-primary);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}

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

/* ========================================================================
   TYPOGRAPHY DEFAULTS
   ======================================================================== */

h1,
h2,
h3,
h4 {
  line-height: var(--leading-tight);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}

h1 {
  font-size: var(--text-3xl);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--text-2xl);
  letter-spacing: -0.01em;
}

h3 {
  font-size: var(--text-xl);
}

p {
  color: var(--text-support);
  line-height: var(--leading-relaxed);
}

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

/* ========================================================================
   LAYOUT UTILITIES
   ======================================================================== */

/* Shared container for all sections - centres content and sets max width */
.container {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* Shared section reveal motion keeps chapter transitions calm and consistent. */
.section-reveal-target {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.62s ease,
    transform 0.62s ease;
  will-change: opacity, transform;
}

.section-reveal-target.section-reveal-hidden {
  opacity: 0;
  transform: translateY(20px);
}

.section-reveal-target.section-reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Shared section heading style for all h2 elements */
.section-heading {
  text-align: center;
  font-size: 2.2rem;
  font-weight: var(--weight-semibold);
  line-height: 1.1;
  letter-spacing: 0;
  color: var(--text-primary);
  margin-bottom: var(--section-title-gap);
}

/* Hide iOS default focus ring on headings focused via in-page hash navigation. */
h1[tabindex="-1"]:focus,
h2[tabindex="-1"]:focus,
h3[tabindex="-1"]:focus {
  outline: none;
  box-shadow: none;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .section-heading {
    font-size: 2.05rem;
  }
}

@media (min-width: 421px) and (max-width: 767px) {
  .section-heading {
    font-size: 1.9rem;
    line-height: 1.2;
  }
}

@media (max-width: 420px) {
  .section-heading {
    font-size: 1.75rem;
    line-height: 1.2;
  }
}

/* Shared section subtitle style - matches Hero subtitle sizing across all screen ranges */
.section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

@media (min-width: 768px) and (max-width: 1023px) {
  .section-subtitle {
    font-size: 1.08rem;
  }
}

@media (min-width: 421px) and (max-width: 767px) {
  .section-subtitle {
    font-size: 1rem;
  }
}

@media (max-width: 420px) {
  .section-subtitle {
    font-size: 0.98rem;
  }
}

/* Accent word colour used in headings */
.accent {
  color: var(--text-accent);
}

/* Prevents line breaks in labelled phrases */
.keep-together {
  white-space: nowrap;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-decoration: none;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

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

.btn-primary:hover {
  background: #c46d5d;
  transform: translateY(-1px);
  color: var(--color-surface);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--color-border);
}

.btn-secondary:hover {
  border-color: var(--text-primary);
}

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

.navbar {
  --navbar-control-scale: 0.95;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--color-bg-primary);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  height: var(--navbar-height);
  transition: transform 0.3s ease-in-out;
  isolation: isolate;
}

.navbar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.01);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
  z-index: 1;
}

body.dark-theme .navbar {
  background: var(--color-bg-primary);
  border-bottom: none;
}

body.menu-open .navbar {
  background: var(--color-bg-primary);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.dark-theme.menu-open .navbar {
  background: var(--color-bg-primary);
}

body.menu-open .navbar::before {
  opacity: 1;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  position: relative;
}

/* Logo */
.navbar-logo {
  display: grid;
  align-items: center;
  text-decoration: none;
  position: relative;
  z-index: 0;
  transition: filter 0.3s ease;
}

.navbar-logo:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
  border-radius: var(--radius-sm);
}

.navbar-logo-svg {
  grid-area: 1 / 1;
  height: 32px;
  width: auto;
  display: block;
  pointer-events: none;
}

.navbar-logo-svg-dark {
  opacity: 0;
}

html.dark-theme .navbar-logo-svg-light,
body.dark-theme .navbar-logo-svg-light {
  opacity: 0;
}

html.dark-theme .navbar-logo-svg-dark,
body.dark-theme .navbar-logo-svg-dark {
  opacity: 1;
}

/* Navigation control buttons */
.navbar-controls {
  display: flex;
  align-items: center;
  gap: calc(0.8rem * var(--navbar-control-scale));
  position: relative;
  z-index: 2;
}

.navbar-btn {
  width: calc(39px * var(--navbar-control-scale));
  height: calc(39px * var(--navbar-control-scale));
  border-radius: calc(12px * var(--navbar-control-scale));
  background: transparent;
  border: 1px solid rgba(214, 124, 108, 0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  padding: 0;
}

.navbar-btn:focus {
  outline: none;
}

.navbar-btn:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
  border-radius: var(--radius-md);
}

body.dark-theme .navbar-btn {
  border-color: rgba(214, 124, 108, 0.3);
}

@media (hover: hover) {
  .navbar-btn:hover {
    background: linear-gradient(
      135deg,
      rgba(180, 120, 100, 0.12),
      rgba(180, 120, 100, 0.06)
    );
    border-color: rgba(180, 120, 100, 0.25);
    color: var(--text-primary);
    transform: translateY(-1px);
  }

  body.dark-theme .navbar-btn:hover {
    background: linear-gradient(
      135deg,
      rgba(180, 120, 100, 0.15),
      rgba(180, 120, 100, 0.08)
    );
    border-color: rgba(180, 120, 100, 0.3);
  }
}

.navbar-btn:active {
  transform: translateY(0) scale(0.96);
}

/* Icon container shared by theme and language toggles */
.navbar-icon-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Theme toggle icon animation */
.theme-icon {
  position: absolute;
  width: calc(20px * var(--navbar-control-scale));
  height: calc(24px * var(--navbar-control-scale));
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-icon.sun-icon {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

.theme-icon.moon-icon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

body.dark-theme .theme-icon.sun-icon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

body.dark-theme .theme-icon.moon-icon {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

/* Language toggle flag animation */
.flag-icon {
  width: calc(20px * var(--navbar-control-scale));
  height: calc(15px * var(--navbar-control-scale));
  position: absolute;
  transform-origin: center;
  backface-visibility: hidden;
  will-change: transform, opacity;
  transition:
    opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
}

.language-toggle[data-lang="en"] .flag-no {
  opacity: 1;
  transform: rotate(0) scale(1);
}

.language-toggle[data-lang="en"] .flag-gb {
  opacity: 0;
  transform: rotate(-55deg) scale(0.82);
}

.language-toggle[data-lang="no"] .flag-no {
  opacity: 0;
  transform: rotate(55deg) scale(0.82);
}

.language-toggle[data-lang="no"] .flag-gb {
  opacity: 1;
  transform: rotate(0) scale(1);
}

/* Hamburger menu button - X animation */
.hamburger-line {
  width: calc(18px * var(--navbar-control-scale));
  height: calc(2px * var(--navbar-control-scale));
  background-color: var(--text-primary);
  border-radius: calc(2px * var(--navbar-control-scale));
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: absolute;
}

.hamburger-line.hamburger-line-upper {
  transform: translateY(calc(-6px * var(--navbar-control-scale)));
}

.hamburger-line.hamburger-line-lower {
  transform: translateY(calc(6px * var(--navbar-control-scale)));
}

.hamburger-menu.active .hamburger-line.hamburger-line-upper {
  transform: translateY(0) rotate(45deg);
}

.hamburger-menu.active .hamburger-line.hamburger-line-center {
  opacity: 0;
  transform: scale(0);
}

.hamburger-menu.active .hamburger-line.hamburger-line-lower {
  transform: translateY(0) rotate(-45deg);
}

.hamburger-menu.active .hamburger-line {
  background-color: var(--text-accent);
}

.hamburger-menu.active {
  background: linear-gradient(
    135deg,
    rgba(214, 124, 108, 0.12),
    rgba(214, 124, 108, 0.06)
  );
  border-color: rgba(214, 124, 108, 0.25);
}

body.dark-theme .hamburger-menu.active {
  background: linear-gradient(
    135deg,
    rgba(214, 124, 108, 0.15),
    rgba(214, 124, 108, 0.08)
  );
  border-color: rgba(214, 124, 108, 0.3);
}

/* Navbar scroll hide */
.navbar-hidden {
  transform: translateY(-100%);
}

/* Anchor offset for fixed navbar */
main[id],
section[id] {
  scroll-margin-top: calc(var(--navbar-height) + var(--space-3));
}

/* Page overlay */
.page-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.01);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 98;
}

.page-overlay.active {
  opacity: 1;
  visibility: visible;
}

body.menu-open .page-overlay {
  background: rgba(0, 0, 0, 0.01);
}

body.dark-theme .page-overlay {
  background: rgba(0, 0, 0, 0.01);
}

body.dark-theme.menu-open .page-overlay {
  background: rgba(0, 0, 0, 0.01);
}

/* Menu panel provides compact navigation links and action shortcut. */
.menu-panel {
  position: absolute;
  top: 100%;
  right: var(--container-padding);
  margin-top: 0.7rem;
  width: 250px;
  background: var(--color-bg-primary);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  padding: 0.75rem;
  z-index: 3;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-20px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-panel.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

body.dark-theme .menu-panel {
  background: var(--color-bg-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* Menu navigation */
.menu-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.menu-link {
  color: var(--text-primary);
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
}

.menu-link:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: -2px;
  border-radius: 10px;
}

@media (hover: hover) {
  .menu-link:hover {
    transform: translateY(-1px);
    background: rgba(180, 120, 100, 0.12);
  }

  body.dark-theme .menu-link:hover {
    background: rgba(255, 255, 255, 0.08);
  }
}

/* Discuss your project - styled like hero primary button */
.menu-link-discuss {
  margin-top: 0.5rem;
  padding: 0.675rem 0.9rem;
  color: var(--text-accent);
  border: 1px solid rgba(214, 124, 108, 0.3);
  text-align: center;
}

@media (hover: hover) {
  .menu-link-discuss:hover {
    background: rgba(180, 120, 100, 0.08);
    border-color: rgba(214, 124, 108, 0.5);
    color: var(--text-accent);
  }
}

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

.hero {
  padding-top: calc(var(--navbar-height) + var(--space-12));
  padding-bottom: var(--space-16);
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-content {
  max-width: 600px;
}

.hero-title {
  margin-bottom: var(--space-5);
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-8);
  max-width: 480px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
}

/* Hero CTA styling mirrors the original page */
.hero-actions .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.1rem;
  border-radius: 12px;
  font-weight: var(--weight-medium);
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  line-height: 1.2;
  white-space: nowrap;
  background: transparent;
  border: 1px solid rgba(214, 124, 108, 0.3);
  color: var(--text-accent);
  box-shadow: none;
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-actions .btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.hero-actions .btn-primary:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

.hero-actions .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--text-primary);
  font-weight: var(--weight-medium);
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
  transition:
    color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-actions .btn-secondary::after {
  content: "\2192";
  color: var(--text-accent);
  font-size: 0.95rem;
  font-weight: var(--weight-medium);
  display: inline-block;
  line-height: 1;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-actions .btn-secondary:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 999px;
}

@media (hover: hover) {
  .hero-actions .btn-primary:hover {
    transform: translateY(-1px);
    background: linear-gradient(
      135deg,
      rgba(180, 120, 100, 0.12),
      rgba(180, 120, 100, 0.06)
    );
    border-color: rgba(180, 120, 100, 0.25);
    color: var(--text-primary);
  }

  .hero-actions .btn-secondary:hover {
    transform: translateY(-1px);
    color: var(--text-primary);
  }

  .hero-actions .btn-secondary:hover::after {
    transform: translateX(3px);
  }
}

/* Hero configurator scene */
.hero-visual {
  width: 100%;
  max-width: 900px;
  margin: var(--space-12) auto 0;
  padding: 0 clamp(0.5rem, 3vw, 1rem);
  aspect-ratio: 900 / 565;
  height: auto;
  display: flex;
  justify-content: center;
  perspective: 2000px;
  position: relative;
  z-index: 5;
}

.scene-fit {
  --fit-scale: 1;
  width: 900px;
  height: 562px;
  position: absolute;
  top: 0;
  left: 50%;
  transform-origin: top center;
  transform: translateX(-50%) scale(var(--fit-scale));
  will-change: transform;
}

.scene {
  position: relative;
  width: 900px;
  height: 562px;
  transform: none;
  transition: transform var(--transition-base);
}

.configurator-shell {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  background: var(--color-surface);
  overflow: hidden;

  opacity: 0;
  filter: blur(8px);
  transform: translate3d(0, 32px, 0) scale(0.985);
}

.configurator-shell.configurator-ready {
  animation: configuratorMaterialize 0.78s ease forwards;
}

html.no-js .configurator-shell {
  opacity: 1;
  filter: none;
  transform: none;
}

html.no-js .configurator-shell.configurator-ready {
  animation: none;
}

.configurator-shell::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.12) 20%,
    rgba(255, 255, 255, 0.24) 50%,
    rgba(255, 255, 255, 0.12) 80%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 10;
}

.window-frame {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--color-bg-primary);
  pointer-events: none;
}

.window-header {
  height: 36px;
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-divider-mid);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  gap: 1rem;
  pointer-events: none;
}

.window-controls {
  display: flex;
  gap: 6px;
  pointer-events: none;
}

.window-control {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  pointer-events: none;
}

.window-control-close {
  background: #ff5f56;
}

.window-control-minimize {
  background: #ffbd2e;
}

.window-control-maximize {
  background: #27c93f;
}

.window-title {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: var(--weight-medium);
  margin: 0 auto;
  pointer-events: none;
}

.window-body {
  flex: 1;
  display: flex;
  overflow: hidden;
  pointer-events: none;
}

.window-content {
  flex: 1;
  display: flex;
  overflow: hidden;
  pointer-events: none;
}

.configurator-sidebar {
  width: 27%;
  min-width: 25%;
  max-width: 38%;
  background: var(--color-bg-secondary);
  border-right: 1px solid var(--color-divider-mid);
  display: flex;
  flex-direction: column;
  color: var(--text-secondary);
  font-size: 0.85rem;
  overflow: hidden;
  pointer-events: none;
}

#configurator-sidebar-accordion {
  flex: 1;
  overflow: hidden;
  padding: 0.5rem 0;
  pointer-events: none;
}

.room-tabs {
  display: flex;
  flex-direction: column;
  padding: 0.04rem 0 0.42rem;
}

.room-tab {
  padding: 0.55rem 1rem;
  font-weight: var(--weight-semibold);
  font-size: 0.77rem;
  color: var(--text-support);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-left: 3px solid transparent;
  transition: all var(--transition-base);
}

.room-tab.active {
  color: var(--text-accent);
  background: rgba(214, 124, 108, 0.16);
  border-left-color: var(--text-accent);
}

.room-separator {
  height: 1px;
  background: var(--color-divider-soft);
}

body.dark-theme .room-separator {
  background: var(--color-divider-strong);
}

.room-options-container {
  flex: 1;
  overflow: hidden;
  pointer-events: none;
}

.category-section {
  padding: 0.41rem 1rem;
}

.category-section:not(:last-child) {
  border-bottom: 1px solid var(--color-divider-soft);
}

.category-title {
  margin-bottom: 0.48rem;
  line-height: 1.2;
  color: var(--text-support);
  font-size: 0.7rem;
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.category-options {
  display: flex;
  flex-direction: column;
  gap: 0.17rem;
}

.option-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.63rem;
  border-radius: 6px;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--text-secondary);
}

.option-item.selected {
  background: rgba(214, 124, 108, 0.2);
  color: var(--text-primary);
}

.option-item.selected .option-price {
  color: var(--text-primary);
}

.option-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.option-price {
  margin-left: 0.5rem;
  font-size: 0.75rem;
  font-family: var(--font-family-mono);
  white-space: nowrap;
  color: var(--text-support);
}

.toggle-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.52rem 0.71rem;
  border-radius: 6px;
  margin-top: 0.24rem;
}

.toggle-label {
  display: flex;
  flex-direction: column;
  gap: 0.21rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.toggle-price {
  font-size: 0.75rem;
  font-family: var(--font-family-mono);
  color: var(--text-support);
}

.toggle-switch {
  width: 38px;
  height: 20px;
  background: var(--color-border);
  border-radius: 10px;
  position: relative;
}

.toggle-switch.active {
  background: var(--text-accent);
}

.toggle-circle {
  width: 18px;
  height: 18px;
  background: var(--color-bg-primary);
  border-radius: 50%;
  position: absolute;
  top: 1px;
  left: 1px;
  transition: transform var(--transition-base);
}

.toggle-switch.active .toggle-circle {
  transform: translateX(18px);
}

.right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  pointer-events: none;
}

.main-view {
  flex: 1;
  background: var(--color-bg-primary);
  position: relative;
  pointer-events: none;
}

.main-view img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

body.dark-theme .main-view img {
  filter: brightness(0.9) contrast(0.96);
}

.main-view img.active {
  opacity: 1;
  z-index: 1;
}

.sidebar-footer {
  padding: 0.85rem 1rem 1rem;
  background: var(--color-bg-secondary);
  border-top: 1px solid var(--color-divider-mid);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  pointer-events: none;
}

.price-wrapper {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.price-label {
  font-size: 0.7rem;
  color: var(--text-support);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: var(--weight-semibold);
}

.price-tag {
  font-size: 0.9rem;
  font-weight: var(--weight-medium);
  font-family: var(--font-family-mono);
  color: var(--text-primary);
  line-height: 1;
}

.btn-quote {
  width: 100%;
  background: var(--text-accent);
  border: none;
  color: var(--text-on-accent);
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: var(--weight-medium);
  pointer-events: none;
}

body.dark-theme .room-tab {
  color: var(--text-support);
}

body.dark-theme .room-tab.active {
  color: var(--text-accent);
  background: rgba(214, 124, 108, 0.16);
}

body.dark-theme .configurator-shell {
  background: var(--color-bg-secondary);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

body.dark-theme .configurator-shell::before {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.05) 20%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 80%,
    transparent 100%
  );
}

body.dark-theme .window-frame {
  background: var(--color-bg-secondary);
}

body:not(.dark-theme) .window-header {
  border-bottom: 1px solid var(--color-divider-soft);
}

body.dark-theme .window-header {
  background: var(--color-bg-secondary);
  border-bottom: 1px solid var(--color-divider-mid);
}

body.dark-theme .window-title {
  color: var(--text-support);
}

body:not(.dark-theme) .configurator-sidebar {
  border-right: 1px solid var(--color-divider-soft);
}

body.dark-theme .configurator-sidebar {
  background: var(--color-bg-secondary);
  border-right: 1px solid var(--color-divider-mid);
  color: var(--text-support);
}

body:not(.dark-theme) .sidebar-footer {
  border-top: 1px solid var(--color-divider-soft);
}

body.dark-theme .sidebar-footer {
  background: var(--color-bg-secondary);
  border-top: 1px solid var(--color-divider-mid);
}

body.dark-theme .category-title {
  color: var(--text-muted);
}

body.dark-theme .option-item {
  color: var(--text-support);
}

body.dark-theme .option-price {
  color: var(--text-muted);
}

body.dark-theme .option-item.selected {
  color: var(--text-primary);
}

body.dark-theme .option-item.selected .option-price {
  color: var(--text-primary);
}

body.dark-theme .toggle-label {
  color: var(--text-support);
}

body.dark-theme .toggle-price {
  color: var(--text-muted);
}

body.dark-theme .toggle-switch {
  background: var(--color-border);
}

body.dark-theme .toggle-circle {
  background: var(--text-primary);
}

body.dark-theme .main-view {
  background: var(--color-bg-secondary);
}

body.dark-theme .price-label {
  color: var(--text-support);
}

body.dark-theme .price-tag {
  color: var(--text-primary);
}

/* Hero content entrance animations */
.hero-title,
.hero-subtitle,
.hero-actions {
  opacity: 0;
  transform: translateY(18px);
  animation: heroContentReveal 0.7s ease forwards;
}

.hero-title {
  animation-delay: 0.08s;
}

.hero-subtitle {
  animation-delay: 0.16s;
}

.hero-actions {
  animation-delay: 0.24s;
}

/* Once animation has played, lock elements at final state to prevent replay on back-navigation */
body.hero-revealed .hero-title,
body.hero-revealed .hero-subtitle,
body.hero-revealed .hero-actions {
  opacity: 1;
  transform: translateY(0);
  animation: none;
}

@keyframes heroContentReveal {
  0% {
    opacity: 0;
    transform: translateY(18px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes configuratorMaterialize {
  0% {
    opacity: 0;
    filter: blur(8px);
    transform: translate3d(0, 32px, 0) scale(0.985);
  }

  100% {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0) scale(1);
  }
}

/* Hero responsive rules follow official range ladder: S, M, L, XL, XXL */
@media (max-width: 420px) {
  .hero {
    min-height: auto;
    padding-top: calc(var(--navbar-height) + var(--space-10));
    padding-bottom: var(--space-20);
    align-items: flex-start;
  }

  .hero-layout {
    max-width: 680px;
  }

  .hero-content {
    max-width: 620px;
    margin: 0 auto;
    text-align: center;
  }

  .hero-title {
    font-size: 2.25rem;
    line-height: 1.12;
    font-weight: var(--weight-bold);
  }

  .hero-subtitle {
    font-size: 0.98rem;
    max-width: 33ch;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--space-6);
  }

  .hero-actions {
    justify-content: center;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    font-size: 0.82rem;
  }

  .hero-actions .btn-primary {
    padding: 0.5rem 0.76rem;
  }

  .hero-actions .btn-secondary::after {
    font-size: inherit;
  }

  .hero-visual {
    max-width: 100%;
    margin-top: 0;
    padding: 0;
  }

  .scene-fit {
    top: 0;
    transform-origin: top center;
    transform: translateX(-50%) scale(var(--fit-scale));
  }
}

@media (min-width: 421px) and (max-width: 767px) {
  .hero {
    min-height: auto;
    padding-top: calc(var(--navbar-height) + var(--space-10));
    padding-bottom: var(--space-20);
    align-items: flex-start;
  }

  .hero-layout {
    max-width: 680px;
  }

  .hero-content {
    max-width: 620px;
    margin: 0 auto;
    text-align: center;
  }

  .hero-title {
    font-size: clamp(2.7rem, 2.35rem + 1.35vw, 3.05rem);
    line-height: 1.12;
    font-weight: var(--weight-bold);
  }

  .hero-subtitle {
    font-size: 1rem;
    max-width: clamp(42ch, 84vw, 560px);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: var(--space-8);
  }

  .hero-actions {
    justify-content: center;
    gap: var(--space-4);
    margin-bottom: var(--space-10);
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    font-size: 0.9rem;
  }

  .hero-actions .btn-primary {
    padding: 0.64rem 1rem;
  }

  .hero-actions .btn-secondary::after {
    font-size: inherit;
  }

  .hero-visual {
    max-width: 560px;
    margin-top: 0;
    padding: 0;
  }

  .scene-fit {
    top: 0;
    transform-origin: top center;
    transform: translateX(-50%) scale(var(--fit-scale));
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hero {
    min-height: auto;
    padding-top: calc(var(--navbar-height) + var(--space-10));
    align-items: flex-start;
  }

  .hero-layout {
    max-width: 920px;
    margin: 0 auto;
  }

  .hero-content {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
  }

  .hero-title {
    font-size: 3.3rem;
    line-height: 1.1;
    font-weight: var(--weight-bold);
  }

  .hero-subtitle {
    font-size: 1.08rem;
    max-width: 48ch;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    font-size: 0.95rem;
  }

  .hero-actions .btn-secondary::after {
    font-size: inherit;
  }

  .hero-visual {
    max-width: clamp(560px, 65vw, 700px);
    margin-top: var(--space-10);
    padding: 0 clamp(0.5rem, 2.4vw, 0.9rem);
  }

  .scene-fit {
    top: 0;
    transform-origin: top center;
    transform: translateX(-50%) scale(var(--fit-scale));
  }
}

@media (min-width: 1024px) and (max-width: 1199px) {
  .hero {
    padding-top: calc(var(--navbar-height) + var(--space-12));
    padding-bottom: var(--space-16);
    min-height: 100vh;
    align-items: center;
  }

  .hero-layout {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 0.75rem;
    align-items: center;
  }

  .hero-content {
    max-width: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
  }

  .hero-title {
    font-size: 3.35rem;
    font-weight: var(--weight-bold);
  }

  .hero-subtitle {
    max-width: 34rem;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .hero-visual {
    margin-top: 0;
    padding: 0;
    min-height: 26rem;
    height: 26rem;
    align-self: center;
    align-items: center;
  }

  .scene-fit {
    top: 50%;
    transform-origin: center;
    transform: translate(-50%, -50%) scale(var(--fit-scale));
  }
}

@media (min-width: 1200px) {
  .hero {
    padding-top: calc(var(--navbar-height) + var(--space-12));
    padding-bottom: var(--space-16);
    min-height: 100vh;
    align-items: center;
  }

  .hero-layout {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 0.5rem;
    align-items: center;
  }

  .hero-content {
    max-width: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
  }

  .hero-subtitle {
    max-width: 34rem;
  }

  .hero-title {
    font-size: 3.6rem;
    font-weight: var(--weight-bold);
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .hero-visual {
    margin-top: 0;
    padding: 0;
    min-height: 27rem;
    height: 27rem;
    align-self: center;
    align-items: center;
  }

  .scene-fit {
    top: 50%;
    transform-origin: center;
    transform: translate(-50%, -50%) scale(var(--fit-scale));
  }
}

/* ========================================================================
   PRODUCTS SECTION
   ======================================================================== */

.products {
  background: var(--color-bg-secondary);
  padding: var(--section-gap) 0;
}

.product-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto var(--space-12);
}

.product-subtitle {
  margin-top: var(--space-4);
}

/* Keeps product cards easy to scan at every viewport size. */
.product-scroll {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
}

/* Product card: flat content block without elevation */
.product-card {
  background: transparent;
  overflow: visible;
}

/* Image container blends with background */
.product-images {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-md);
}

.product-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: translateZ(0) scale(1.03);
  transform-origin: center center;
  transition:
    opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
  backface-visibility: hidden;
  z-index: 1;
}

body.dark-theme .product-image {
  filter: brightness(0.92) contrast(0.97);
}

/* Default state keeps the first image visible without JavaScript. */
.product-card[data-image-state="0"] .product-image-a,
.product-card[data-image-state="1"] .product-image-b,
.product-card[data-image-state="2"] .product-image-c {
  opacity: 1;
  transform: translateZ(0) scale(1);
  z-index: 2;
}

/* Gives outgoing image the same soft pull-back feel as original card motion. */
.product-card[data-prev-image-state="0"] .product-image-a,
.product-card[data-prev-image-state="1"] .product-image-b,
.product-card[data-prev-image-state="2"] .product-image-c {
  opacity: 0;
  transform: translateZ(0) scale(0.97);
  z-index: 3;
}

/* Text content below image */
.product-body {
  padding: var(--space-4) 0 0 0;
}

.product-title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}

.product-description {
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--text-secondary);
}

/* Reveals cards on entry to reduce initial visual noise. */
.product-card.product-card-hidden {
  opacity: 0;
  transform: translateY(20px);
}

.product-card.animate-in {
  animation: productCardReveal 0.62s ease forwards;
}

.product-card[data-index="0"].animate-in {
  animation-delay: 0s;
}
.product-card[data-index="1"].animate-in {
  animation-delay: 0.08s;
}
.product-card[data-index="2"].animate-in {
  animation-delay: 0.16s;
}
.product-card[data-index="3"].animate-in {
  animation-delay: 0.24s;
}

@keyframes productCardReveal {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}


/* L range: move to two-column grid with more breathing room. */
@media (min-width: 768px) and (max-width: 1023px) {
  .products .container {
    padding-left: clamp(2rem, 4vw, 3rem);
    padding-right: clamp(2rem, 4vw, 3rem);
  }

  .product-scroll {
    grid-template-columns: repeat(2, minmax(0, 320px));
    justify-content: center;
    gap: var(--space-8);
  }

  .product-card {
    width: 100%;
  }
}

/* XL range: keep 4-column grid with moderate edge spacing. */
@media (min-width: 1024px) and (max-width: 1199px) {
  .products .container {
    padding-left: clamp(2.2rem, 2.6vw, 3.1rem);
    padding-right: clamp(2.2rem, 2.6vw, 3.1rem);
  }
}

/* XXL range: preserve full desktop breathing room. */
@media (min-width: 1200px) {
  .products .container {
    padding-left: clamp(2.5rem, 3vw, 3.5rem);
    padding-right: clamp(2.5rem, 3vw, 3.5rem);
  }
}

/* S and M ranges: vertical stack */
@media (max-width: 767px) {
  .products {
    padding-top: var(--space-16);
    padding-bottom: var(--space-16);
  }

  .product-scroll {
    display: flex;
    flex-direction: column;
    gap: var(--space-16);
  }

  .product-card {
    width: 100%;
  }
}

/* M range: center cards with max-width for balanced layout */
@media (min-width: 421px) and (max-width: 767px) {
  .product-card {
    max-width: clamp(22.5625rem, calc(14.35rem + 31.21vw), 29.3125rem);
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .products {
    padding-bottom: var(--space-20);
  }
}

/* ========================================================================
   BENEFITS SECTION
   Sandbox-01 list layout with original icons, modal expand for detail
   ======================================================================== */

.benefits {
  padding: var(--section-gap) 0;
  background: var(--color-bg);
}

/* Centred heading block - mirrors .product-header pattern */
.benefits-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto var(--space-12);
}

.benefits-subtitle {
  margin-top: var(--space-4);
}

/* Stacked column by default (mobile), grid on wider viewports */
.benefits-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

/* Each benefit card: elevated container with interaction affordance */
.benefit-item {
  display: flex;
  gap: var(--space-5);
  align-items: flex-start;
  cursor: pointer;
  background: var(--color-bg-primary);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-divider-mid);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease,
    box-shadow 0.3s ease,
    border-color 0.5s ease;
}

.benefit-item:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.10);
  border-color: var(--brand-terracotta-muted);
}

.benefit-item:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

/* Icon container - matches Sandbox-01 number badge dimensions */
.benefit-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(180, 120, 100, 0.12);
  border-radius: var(--radius-md);
  transition:
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.3s ease;
}

.icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.benefit-icon svg {
  width: 20px;
  height: 20px;
  color: var(--text-accent);
  display: block;
  animation: iconBounce 18s linear infinite;
}

/* Staggered bounce: each icon pops 3 seconds apart */
.benefit-item:nth-child(1) .benefit-icon svg {
  animation-delay: 0s;
}
.benefit-item:nth-child(2) .benefit-icon svg {
  animation-delay: 3s;
}
.benefit-item:nth-child(3) .benefit-icon svg {
  animation-delay: 6s;
}
.benefit-item:nth-child(4) .benefit-icon svg {
  animation-delay: 9s;
}
.benefit-item:nth-child(5) .benefit-icon svg {
  animation-delay: 12s;
}
.benefit-item:nth-child(6) .benefit-icon svg {
  animation-delay: 15s;
}

@keyframes iconBounce {
  0% {
    transform: scale(1);
    animation-timing-function: ease-in;
  }
  1.33% {
    transform: scale(1.5);
    animation-timing-function: ease-out;
  }
  4%,
  100% {
    transform: scale(1);
  }
}

/* Pause bounce on interaction to reduce visual noise */
.benefit-item.bounce-paused .benefit-icon svg {
  animation-play-state: paused;
  transform: scale(1) !important;
}

/* Hover feedback on icon */
.benefit-item:hover .benefit-icon {
  background: rgba(180, 120, 100, 0.18);
}

.benefit-item:hover .icon-wrapper {
  transform: scale(1.15);
}

/* Text content */
.benefit-content {
  flex: 1;
  min-width: 0;
}

.benefit-title {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-2);
}

/* In list items, titles flow naturally on one line for a cleaner look.
   The modal title uses the same span but gets display:block below. */
.benefit-title .title-last-word {
  display: inline;
}

.modal-title .title-last-word {
  display: inline;
}

.benefit-description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

/* Entrance animation - initial hidden state */
.benefit-item:not(.animate-in) {
  opacity: 0;
  transform: translateY(20px);
}

/* Animated-in state shows full card */
.benefit-item.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Dark theme card contrast */
body:not(.dark-theme) .benefit-item {
  box-shadow: none;
}

body.dark-theme .benefit-item {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  border-color: var(--frame-border-rest);
}

body.dark-theme .benefit-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  border-color: var(--frame-border-hover);
}

/* ========================================================================
   BENEFITS SECTION - RESPONSIVE
   ======================================================================== */

/* L range: 2-column grid with tablet spacing. */
@media (min-width: 768px) and (max-width: 1023px) {
  .benefits .container {
    padding-left: clamp(2rem, 4vw, 3rem);
    padding-right: clamp(2rem, 4vw, 3rem);
  }

  .benefits-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-10) var(--space-12);
  }

  .benefits {
    padding-top: var(--space-16);
    padding-bottom: var(--space-20);
  }
}

/* XL range: 3-column grid with moderate desktop spacing. */
@media (min-width: 1024px) and (max-width: 1199px) {
  .benefits .container {
    padding-left: clamp(2.2rem, 2.6vw, 3.1rem);
    padding-right: clamp(2.2rem, 2.6vw, 3.1rem);
  }

  .benefits-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-10) var(--space-12);
  }

  .benefit-icon {
    width: 38px;
    height: 38px;
  }

  .benefit-icon svg {
    width: 19px;
    height: 19px;
  }

  .benefits {
    padding-bottom: var(--space-20);
  }
}

/* S and M ranges: convert to horizontal scroll for compact mobile experience */
@media (max-width: 767px) {
  .benefits {
    padding: calc(var(--section-gap) + var(--space-2)) 0 var(--section-gap);
  }

  .benefits-header {
    margin-bottom: var(--space-8);
  }

  .benefits-list {
    --benefits-scroll-edge-space: var(--container-padding);
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    gap: var(--space-4);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: var(--benefits-scroll-edge-space);
    scroll-padding-right: var(--benefits-scroll-edge-space);
    -webkit-overflow-scrolling: touch;
    padding: var(--space-2) var(--benefits-scroll-edge-space) var(--space-6);
    margin: 0 calc(-1 * var(--container-padding));
  }

  .benefits-list::-webkit-scrollbar {
    display: none;
  }

  .benefit-item {
    flex: 0 0 280px;
    width: auto;
    scroll-snap-align: start;
  }
}

/* S range: tighten card width for smallest screens */
@media (max-width: 420px) {
  .benefit-item {
    flex: 0 0 260px;
  }
}

/* XXL range: preserve full desktop spacing. */
@media (min-width: 1200px) {
  .benefits .container {
    padding-left: clamp(2.5rem, 3vw, 3.5rem);
    padding-right: clamp(2.5rem, 3vw, 3.5rem);
  }

  .benefits-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-10) var(--space-12);
  }

  .benefit-icon {
    width: 38px;
    height: 38px;
  }

  .benefit-icon svg {
    width: 19px;
    height: 19px;
  }

  .benefits {
    padding-bottom: var(--space-20);
  }
}

/* ========================================================================
   BENEFIT MODAL
   Full overlay with detailed explanation, summary bullets, crossfading images
   ======================================================================== */

.benefit-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.01);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.benefit-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.benefit-modal {
  position: relative;
  width: 90%;
  max-width: 640px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--color-bg-primary);
  border: 1px solid var(--color-bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.benefit-modal-overlay.active .benefit-modal {
  transform: scale(1) translateY(0);
}

/* Close button */
.modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(180, 120, 100, 0.12);
  border: 1px solid rgba(180, 120, 100, 0.25);
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--text-accent);
  transition:
    background 0.2s ease,
    transform 0.2s ease;
  z-index: 1;
}

.modal-close:hover {
  background: rgba(180, 120, 100, 0.2);
  transform: scale(1.05);
}

.modal-close:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

.modal-close svg {
  width: 18px;
  height: 18px;
}

/* Close button flash animation on close */
.modal-close.closing {
  animation: closeButtonFlash 0.15s ease-out;
}

@keyframes closeButtonFlash {
  0% {
    transform: scale(1);
    background: rgba(180, 120, 100, 0.12);
  }
  50% {
    transform: scale(0.85);
    background: rgba(180, 120, 100, 0.3);
  }
  100% {
    transform: scale(1);
    background: var(--brand-terracotta-soft);
  }
}

/* Modal content layout */
.modal-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
  line-height: var(--leading-tight);
  margin-bottom: 0;
  margin-top: var(--space-12);
  text-align: center;
}

.modal-image {
  position: relative;
  width: 100%;
  max-width: clamp(330px, 70vw, 500px);
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: var(--space-8) auto var(--space-8);
  background: var(--color-bg-secondary);
}

.modal-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

body.dark-theme .modal-img {
  filter: brightness(0.9) contrast(0.96);
}

.modal-img.active {
  opacity: 1;
}

/* Summary bullets */
.modal-summary {
  margin-bottom: 1.6rem;
}

.modal-summary .summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.modal-summary .summary-item {
  position: relative;
  padding-left: var(--space-5);
  font-size: var(--text-sm);
  color: var(--text-support);
  line-height: var(--leading-relaxed);
}

.modal-summary .summary-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-accent);
}

/* Description paragraphs */
.modal-description p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-top: 0;
  margin-bottom: var(--space-4);
}

.modal-description p:last-child {
  margin-bottom: 0;
}

/* ========================================================================
   BENEFIT MODAL - DARK THEME
   ======================================================================== */

body.dark-theme .benefit-modal {
  background: var(--color-bg-primary);
  border-color: var(--frame-border-rest);
}

body.dark-theme .modal-close {
  background: rgba(214, 124, 108, 0.12);
  border-color: var(--frame-border-hover);
}

body.dark-theme .modal-image {
  background: var(--color-bg-secondary);
}

/* ========================================================================
   BENEFIT MODAL - RESPONSIVE
   ======================================================================== */

@media (max-width: 767px) {
  .benefit-modal {
    width: 95%;
    padding: var(--space-6);
    max-height: 85svh;
  }

  .modal-title {
    font-size: var(--text-lg);
  }

  .modal-close.closing {
    animation-duration: 0.25s;
  }
}

/* ========================================================================
   LIVE DEMOS SECTION
   Keeps live demo options together in one clear comparison block.
   ======================================================================== */

.live-demos {
  --live-demos-text: var(--text-primary);
  --live-demos-text-muted: var(--text-support);
  --live-demos-card-bg: var(--color-bg-secondary);
  --live-demos-card-border: var(--color-border);
  background: var(--color-bg-demos);
  color: var(--live-demos-text);
  padding: calc(var(--section-gap) + var(--space-2)) 0 var(--space-24);
}

/* Groups heading and intro copy for translation consistency. */
.live-demos-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto var(--space-12);
}

.live-demos-heading {
  color: var(--text-primary);
}

.live-demos-subtitle {
  margin-top: var(--space-4);
}

/* Holds demo entries and lets layout adapt by breakpoint. */
.live-demos-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* Each entry combines preview, context, and action link. */
.live-demos-card {
  background: var(--live-demos-card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--live-demos-card-border);
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow 0.3s ease,
    border-color 0.5s ease;
}

@media (hover: hover) {
  .live-demos-card:hover {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    border-color: var(--brand-terracotta-muted);
  }

  body.dark-theme .live-demos-card:hover {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    border-color: var(--frame-border-hover);
  }
}

body.dark-theme .live-demos {
  --live-demos-card-border: var(--frame-border-rest);
}

/* Maintains a stable preview frame for each demo. */
.live-demos-preview {
  display: block;
  position: relative;
  aspect-ratio: 1923 / 1358;
  overflow: hidden;
  background: var(--color-surface);
  cursor: pointer;
}

.live-demos-preview:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: -2px;
}

.live-demos-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

body.dark-theme .live-demos-image {
  filter: brightness(0.92) contrast(0.97);
}

/* Keeps demo text and action together. */
.live-demos-info {
  padding: var(--space-5);
}

.live-demos-title {
  color: var(--live-demos-text);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-2);
}

.live-demos-description {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
}

/* Styles external demo action consistently. */
.live-demos-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-accent);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-decoration: none;
}

.live-demos-link:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
  border-radius: var(--radius-sm);
}

.live-demos-link::after {
  content: "\2192";
  transition: transform var(--transition-fast);
}

@media (hover: hover) {
  .live-demos-link:hover::after {
    transform: translateX(4px);
  }
}

/* ========================================================================
   LIVE DEMOS SECTION - RESPONSIVE
   ======================================================================== */

/* Uses two-column comparison once enough width is available. */
@media (min-width: 768px) {
  .live-demos-list {
    flex-direction: row;
    justify-content: center;
  }

  .live-demos-card {
    flex: 0 1 clamp(20.5rem, 43vw, 28rem);
    max-width: 28rem;
  }
}

/* Tightens spacing on smaller screens for easier scanning. */
@media (max-width: 767px) {
  .live-demos {
    padding-bottom: var(--space-20);
  }

  .live-demos-header {
    margin-bottom: var(--space-8);
  }

  .live-demos-info {
    padding: var(--space-4);
  }

  .live-demos-title {
    font-size: var(--text-base);
  }
}

/* M range: keep demo preview windows closer to S proportions. */
@media (min-width: 421px) and (max-width: 767px) {
  .live-demos-card {
    width: 100%;
    max-width: clamp(22.5rem, calc(15.47rem + 26.71vw), 28.275rem);
    margin-left: auto;
    margin-right: auto;
  }
}

/* ========================================================================
   CLIENT PROOF SECTION
   Shows approved client work and company context without preview-only code.
   ======================================================================== */

.client-proof {
  background: var(--color-bg-primary);
  padding: var(--space-16) 0 calc(var(--space-20) + var(--space-2));
}

.client-proof-header {
  margin: 0 auto var(--space-10);
  max-width: 760px;
  text-align: center;
}

.client-proof-header .section-heading {
  margin-bottom: var(--space-4);
}

.client-proof-shell {
  display: grid;
  gap: var(--space-6);
}

.client-proof-main {
  align-items: center;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  display: grid;
  gap: var(--space-8);
  grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.72fr);
  padding: var(--space-8);
}

body.dark-theme .client-proof-main,
body.dark-theme .client-proof-references {
  border-color: var(--frame-border-rest);
}

.client-proof-kicker {
  color: var(--text-accent);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--space-3);
  text-transform: uppercase;
}

.client-proof-title {
  color: var(--text-primary);
  font-size: var(--text-3xl);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-3);
}

.client-proof-copy {
  color: var(--text-secondary);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-5);
  max-width: 38rem;
}

.client-proof-description {
  align-items: center;
  display: flex;
  min-height: 5.9rem;
}

.client-proof-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-4);
}

.client-proof-actions .btn {
  font-size: 0.9rem;
  line-height: 1.2;
  min-height: 2.4rem;
  padding: 0.62rem 1rem;
  white-space: nowrap;
}

.client-proof-actions .btn-primary {
  background: transparent;
  border: 1px solid rgba(214, 124, 108, 0.42);
  color: var(--text-accent);
}

.client-proof-actions .btn-secondary {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--text-primary);
  padding: 0;
  transition:
    color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.client-proof-actions .btn-secondary::after {
  color: var(--text-accent);
  content: "\2192";
  display: inline-block;
  line-height: 1;
  margin-left: 0.45rem;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (hover: hover) {
  .client-proof-actions .btn-secondary:hover {
    color: var(--text-primary);
    transform: translateY(-1px);
  }

  .client-proof-actions .btn-secondary:hover::after {
    transform: translateX(3px);
  }
}

.client-proof-visual {
  background: var(--color-surface);
  border: 1px solid var(--color-divider-mid);
  border-radius: var(--radius-md);
  justify-self: end;
  max-width: 460px;
  padding: var(--space-3);
  width: 100%;
}

.client-proof-image {
  aspect-ratio: 2734 / 1622;
  background: #ffffff;
  border-radius: var(--radius-sm);
  display: block;
  height: auto;
  object-fit: contain;
  object-position: center;
  width: 100%;
}

body.dark-theme .client-proof-image {
  filter: brightness(0.9) contrast(0.98);
}

.client-proof-visual-note {
  color: var(--text-muted);
  font-size: var(--text-xs);
  line-height: var(--leading-normal);
  margin-top: var(--space-2);
  text-align: center;
}

.client-proof-references {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: grid;
  gap: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: var(--space-5) var(--space-6);
}

.client-proof-reference {
  display: grid;
  gap: var(--space-3);
  min-height: 9.4rem;
  padding: 0 var(--space-5);
}

.client-proof-reference:first-child {
  padding-left: 0;
}

.client-proof-reference:last-child {
  padding-right: 0;
}

.client-proof-reference + .client-proof-reference {
  border-left: 1px solid var(--color-divider-mid);
}

.client-proof-reference-logo {
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-divider-mid);
  border-radius: var(--radius-sm);
  box-sizing: border-box;
  display: flex;
  height: 3rem;
  justify-content: flex-start;
  max-width: 100%;
  min-width: 9.6rem;
  padding: var(--space-2) var(--space-3);
  width: fit-content;
}

.client-proof-reference-logo.is-dark {
  background: #343a46;
  border-color: #343a46;
}

.client-proof-reference-logo.is-ecodomus {
  background: #f8f9fb;
  border-color: rgba(0, 0, 0, 0.05);
}

.client-proof-reference-logo img {
  display: block;
  max-height: 1.85rem;
  max-width: 8rem;
  object-fit: contain;
  object-position: left center;
  width: auto;
}

.client-proof-reference-logo:not(.is-dark) img {
  max-height: 2.2rem;
  max-width: 7rem;
}

.client-proof-reference-name {
  color: var(--text-primary);
  display: block;
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-1);
}

.client-proof-reference-country {
  color: var(--text-muted);
  display: block;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.04em;
  line-height: var(--leading-normal);
  text-transform: uppercase;
}

.client-proof-reference-text {
  color: var(--text-secondary);
  display: block;
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  margin: 0;
}

/* ========================================================================
   CLIENT PROOF SECTION - RESPONSIVE
   Keeps proof content readable across the landing page screen ranges.
   ======================================================================== */

@media (max-width: 1023px) {
  .client-proof-main {
    grid-template-columns: 1fr;
  }

  .client-proof-visual {
    justify-self: start;
  }
}

@media (max-width: 767px) {
  .client-proof {
    padding: var(--space-14) 0 calc(var(--space-16) + var(--space-2));
  }

  .client-proof-header {
    margin-bottom: var(--space-8);
  }

  .client-proof-main {
    padding: var(--space-5);
  }

  .client-proof-title {
    font-size: var(--text-2xl);
  }

  .client-proof-description {
    min-height: auto;
  }

  .client-proof-actions {
    align-items: center;
    flex-direction: row;
  }

  .client-proof-actions .btn {
    justify-content: center;
    width: auto;
  }

  .client-proof-visual {
    padding: var(--space-2);
  }

  .client-proof-references {
    grid-template-columns: 1fr;
    padding: var(--space-5);
  }

  .client-proof-reference {
    min-height: auto;
    padding: 0;
  }

  .client-proof-reference + .client-proof-reference {
    border-left: 0;
    border-top: 1px solid var(--color-divider-mid);
    margin-top: var(--space-4);
    padding-top: var(--space-4);
  }
}

@media (max-width: 420px) {
  .client-proof-title {
    font-size: var(--text-xl);
  }

  .client-proof-copy {
    font-size: var(--text-sm);
  }
}

/* ========================================================================
   PROCESS SECTION
   Shows a simple connected path so visitors understand the project flow quickly.
   ======================================================================== */

.process {
  --process-marker-size: 42px;
  --process-line-thickness: 1px;
  --process-step-count: 3;
  --process-step-gap: var(--space-8);
  --process-step-item-gap: var(--space-5);
  --process-title-size: var(--text-lg);
  --process-title-gap: var(--space-2);
  --process-body-size: var(--text-sm);
  --process-body-leading: 1.6;
  background: var(--color-bg-secondary);
  padding: calc(var(--section-gap) + var(--space-2)) 0 var(--space-20);
}

.process-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--space-12);
}

.process-intro {
  margin-top: var(--space-4);
}

.process-steps {
  display: flex;
  flex-direction: column;
  gap: var(--process-step-gap);
  position: relative;
}

.process-steps::before {
  content: "";
  position: absolute;
  left: calc(var(--process-marker-size) / 2 - var(--process-line-thickness) / 2);
  top: calc(var(--process-marker-size) / 2);
  bottom: calc(var(--process-marker-size) / 2);
  width: var(--process-line-thickness);
  background: var(--text-accent);
  z-index: 0;
}

.process-step {
  display: flex;
  gap: var(--process-step-item-gap);
  align-items: flex-start;
  position: relative;
}

.process-step-marker {
  flex-shrink: 0;
  width: var(--process-marker-size);
  height: var(--process-marker-size);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-secondary);
  border: var(--process-line-thickness) solid var(--text-accent);
  color: var(--text-accent);
  font-size: calc(var(--process-marker-size) * 0.36);
  line-height: 1;
  font-weight: 600;
  border-radius: 50%;
  position: relative;
  z-index: 1;
}

.process-step-content h3 {
  font-size: var(--process-title-size);
  margin-bottom: var(--process-title-gap);
  color: var(--text-primary);
}

.process-step-content p {
  font-size: var(--process-body-size);
  line-height: var(--process-body-leading);
  color: var(--text-secondary);
}

/* ========================================================================
   PROCESS SECTION - RESPONSIVE
   Keeps the same step order readable across official screen ranges.
   ======================================================================== */

/* S range: keep compact spacing for narrow phones. */
@media (max-width: 420px) {
  .process {
    --process-marker-size: 38px;
    --process-step-gap: 1.5rem;
    --process-step-item-gap: 1rem;
    --process-title-size: 1rem;
    --process-title-gap: 0.375rem;
    --process-body-size: 0.84rem;
    --process-body-leading: 1.52;
  }

  .process .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .process-steps {
    flex-direction: column;
  }

  .process-header {
    margin-bottom: var(--space-8);
  }
}

/* M range: preserve vertical flow with slightly more breathing room. */
@media (min-width: 421px) and (max-width: 767px) {
  .process {
    --process-marker-size: clamp(38px, calc(1.16vw + 33.13px), 42px);
    --process-step-gap: clamp(1.5rem, calc(2.31vw + 0.89rem), 2rem);
    --process-step-item-gap: clamp(1rem, calc(2.31vw + 0.39rem), 1.5rem);
    --process-title-size: clamp(1rem, calc(0.58vw + 0.85rem), 1.125rem);
    --process-title-gap: clamp(0.375rem, calc(0.72vw + 0.18rem), 0.5rem);
    --process-body-size: clamp(0.84rem, calc(0.16vw + 0.8rem), 0.875rem);
    --process-body-leading: 1.56;
  }

  .process .container {
    padding-left: clamp(2rem, calc(19.65vw - 3.17rem), 6.25rem);
    padding-right: clamp(2rem, calc(19.65vw - 3.17rem), 6.25rem);
  }

  .process-steps {
    flex-direction: column;
  }

  .process-header {
    margin-bottom: var(--space-10);
  }
}

/* L range: keep vertical timeline, increase readability for tablet widths. */
@media (min-width: 768px) and (max-width: 1023px) {
  .process {
    --process-step-gap: 2rem;
    --process-step-item-gap: 1.5rem;
    --process-title-size: 1.125rem;
    --process-title-gap: 0.5rem;
    --process-body-size: 0.875rem;
    --process-body-leading: 1.6;
  }

  .process .container {
    padding-left: 6.25rem;
    padding-right: 6.25rem;
  }

  .process-steps {
    flex-direction: column;
  }

}

/* Shared desktop layout for XL and XXL ranges. */
@media (min-width: 1024px) {
  .process-steps {
    flex-direction: row;
  }

  .process-steps::before {
    left: calc(
      (100% - ((var(--process-step-count) - 1) * var(--process-step-gap))) /
        (var(--process-step-count) * 2)
    );
    right: calc(
      (100% - ((var(--process-step-count) - 1) * var(--process-step-gap))) /
        (var(--process-step-count) * 2)
    );
    top: calc(var(--process-marker-size) / 2 - var(--process-line-thickness) / 2);
    bottom: auto;
    height: var(--process-line-thickness);
    width: auto;
  }

  .process-step {
    flex: 1;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-5);
  }

  .process-step-content h3 {
    font-size: var(--text-lg);
  }
}

/* XL range: keep timeline compact at the desktop entry point. */
@media (min-width: 1024px) and (max-width: 1199px) {
  .process {
    --process-step-gap: var(--space-6);
  }
}

/* XXL range: add comfortable spacing for wide desktops. */
@media (min-width: 1200px) {
  .process {
    --process-step-gap: var(--space-8);
  }
}

/* ========================================================================
   ABOUT SECTION
   Builds trust through founder context and a readable story block.
   ======================================================================== */

.about {
  background: var(--color-bg-primary);
  padding: var(--space-16) 0;
}

.about-wrapper {
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.about-inner {
  max-width: 840px;
  margin: var(--section-title-gap) auto 0;
}

.about-content {
  min-width: 0;
}

.about-heading {
  text-align: center;
}

.about-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: var(--space-4);
}

.about-text:last-of-type {
  margin-bottom: 0;
}

.about-signature {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: var(--space-6);
  line-height: 1.5;
}

.about-name {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-muted);
}

.about-role {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ========================================================================
   ABOUT SECTION - RESPONSIVE
   Sandbox-01 structure with fixed 9:16 photo and non-sticky behavior.
   ======================================================================== */


/* ========================================================================
   QUESTIONS SECTION
   Gives clear, expandable answers to common client questions.
   ======================================================================== */

.questions {
  background: var(--color-bg-secondary);
  padding: var(--space-16) 0 var(--space-20);
}

.questions-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--space-12);
}

.questions-subtitle {
  margin-top: var(--space-4);
}

.questions-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.questions-item {
  background: var(--color-bg-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-divider-mid);
  transition: box-shadow var(--transition-fast), border-color 0.5s ease;
}

@media (hover: hover) {
  .questions-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--brand-terracotta-muted);
  }
}

.questions-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5);
  background: none;
  border: none;
  font-family: inherit;
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.questions-trigger:focus {
  outline: none;
}

.questions-item.active {
  box-shadow: var(--shadow-md);
  border-color: var(--brand-terracotta-muted);
}

.questions-item.active .questions-trigger {
  background: transparent;
}

@media (hover: hover) {
  .questions-trigger:hover {
    background: var(--color-bg-secondary);
  }
}

.questions-trigger:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: -2px;
}

.questions-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-accent);
  font-size: var(--text-xl);
  font-weight: var(--weight-normal);
  transition: transform var(--transition-base);
}

.questions-item.active .questions-icon {
  transform: rotate(45deg);
}

.questions-answer {
  height: 0;
  overflow: hidden;
  transition: height 0.3s ease;
}

.questions-answer p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  padding: 0 var(--space-5);
  margin-left: var(--space-6);
}

.questions-answer p:not(:last-child) {
  margin-bottom: var(--space-3);
}

.questions-answer p:last-child,
.questions-answer .faq-list:last-child {
  padding-bottom: var(--space-5);
}

.questions-answer .faq-list {
  margin: 0 0 0 var(--space-6);
  padding: 0 var(--space-5) 0 var(--space-5);
  list-style: none;
}

.questions-answer .faq-list li {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-2);
  position: relative;
  padding-left: var(--space-3);
}

.questions-answer .faq-list li::before {
  content: "–";
  position: absolute;
  left: 0;
}

/* ========================================================================
   QUESTIONS SECTION - DARK THEME
   Keeps readability and interaction clarity in dark mode.
   ======================================================================== */

body.dark-theme .questions-item {
  background: var(--color-bg-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--frame-border-rest);
}

body.dark-theme .questions-item:hover,
body.dark-theme .questions-item.active {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  border-color: var(--frame-border-hover);
}

body.dark-theme .questions-trigger {
  color: var(--text-support);
}

body.dark-theme .questions-trigger:hover {
  background: var(--color-bg-secondary);
}

body.dark-theme .questions-item.active .questions-trigger {
  background: transparent;
}

/* ========================================================================
   QUESTIONS SECTION - RESPONSIVE
   Keeps tap targets and reading comfort on smaller screens.
   ======================================================================== */

@media (min-width: 421px) and (max-width: 767px) {
  .questions .container {
    padding-left: 2.75rem;
    padding-right: 2.75rem;
  }

  .questions-list {
    max-width: 34rem;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .questions .container {
    padding-left: 6.25rem;
    padding-right: 6.25rem;
  }

  .questions-list {
    max-width: 42rem;
  }
}

@media (max-width: 767px) {
  .questions-header {
    margin-bottom: var(--space-8);
  }

  .questions-trigger {
    padding: var(--space-4);
    font-size: var(--text-sm);
  }

  .questions-answer p {
    padding: 0 var(--space-4);
  }

  .questions-answer p:last-child,
  .questions-answer .faq-list:last-child {
    padding-bottom: var(--space-4);
  }

  .questions-answer .faq-list {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
}

/* ========================================================================
   CONVERSATION SECTION
   ======================================================================== */

.conversation {
  background: var(--color-bg-primary);
  padding: var(--space-16) 0;
}

.conversation-header {
  max-width: 760px;
  margin: 0 auto var(--space-10);
  text-align: center;
}

.conversation-wrapper {
  max-width: 700px;
  margin: 0 auto;
}

.conversation .section-heading {
  margin-bottom: var(--space-4);
}

.conversation-subtitle {
  margin-top: var(--space-4);
}

.conversation-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.conversation-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  position: relative;
}

.conversation-honeypot {
  display: none;
  visibility: hidden;
}

.conversation-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-primary);
}

.conversation-label-required::after {
  content: " *";
  color: var(--text-accent);
}

.conversation-input,
.conversation-textarea {
  width: 100%;
  padding: 0.9rem var(--space-4);
  font-family: inherit;
  font-size: var(--text-base);
  color: var(--text-support);
  background: var(--color-bg-secondary);
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  -webkit-appearance: none;
  appearance: none;
}

.conversation-input:focus,
.conversation-textarea:focus {
  outline: none;
  border-color: var(--text-accent);
  background: var(--color-bg-primary);
}

.conversation-textarea {
  min-height: 140px;
  resize: vertical;
}

.conversation-input::placeholder,
.conversation-textarea::placeholder {
  color: var(--text-muted);
  opacity: 1;
  font-family: var(--font-family-mono);
  font-size: var(--text-sm);
}

/* Highlights missing or invalid inputs during form validation. */
.conversation-field.is-invalid .conversation-input,
.conversation-field.is-invalid .conversation-textarea {
  border-color: #d67c6c;
  background: #f9f5f3;
}

body.dark-theme .conversation-field.is-invalid .conversation-input,
body.dark-theme .conversation-field.is-invalid .conversation-textarea {
  background: rgba(229, 83, 75, 0.1);
}

body.dark-theme .conversation-input,
body.dark-theme .conversation-textarea {
  border-color: var(--frame-border-rest);
}

body.dark-theme .conversation-input:focus,
body.dark-theme .conversation-textarea:focus {
  border-color: var(--frame-border-active);
}

/* Adds brief attention animation when validation fails. */
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-4px);
  }
  40% {
    transform: translateX(4px);
  }
  60% {
    transform: translateX(-2px);
  }
  80% {
    transform: translateX(2px);
  }
}

.conversation-field.needs-attention {
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.conversation-submit {
  display: block;
  width: 25%;
  min-width: max-content;
  margin: var(--space-4) auto 0;
  padding: 0.6rem var(--space-6);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  letter-spacing: normal;
  text-align: center;
  white-space: nowrap;
}

.conversation-submit:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

.conversation-promise {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--space-6);
  line-height: var(--leading-relaxed);
}

/* Displays form submission feedback states and fallback action link. */
.conversation-status {
  padding: var(--space-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  white-space: pre-line;
  display: none;
}

.conversation-status:not(:empty) {
  display: block;
  animation: fadeIn 0.3s ease;
}

.conversation-status.is-success {
  background: rgba(40, 200, 64, 0.1);
  color: #1a7f37;
  border: 1px solid rgba(40, 200, 64, 0.2);
}

.conversation-status.is-error {
  background: rgba(214, 124, 108, 0.1);
  color: #c04d3b;
  border: 1px solid rgba(214, 124, 108, 0.2);
}

body.dark-theme .conversation-status.is-success {
  color: #4ade80;
  background: rgba(40, 200, 64, 0.15);
  border-color: rgba(40, 200, 64, 0.3);
}

body.dark-theme .conversation-status.is-error {
  color: #fca5a5;
}

.conversation-status-title {
  display: block;
  font-weight: var(--weight-bold);
  margin-bottom: 0.2em;
}

.conversation-status-link {
  display: block;
  margin-top: var(--space-2);
  color: inherit;
  font-weight: var(--weight-semibold);
  text-decoration: underline;
  cursor: pointer;
}

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

/* Mobile-first: one composed panel with clear visual tiers */
.site-footer {
  --footer-text-strong: var(--text-primary);
  --footer-text-soft: var(--text-secondary);
  --footer-text-muted: var(--text-muted);
  --footer-divider: var(--text-accent);
  --footer-panel-border: var(--color-border);
  --footer-link-underline: rgba(79, 73, 67, 0.22);
  --footer-link-underline-hover: rgba(79, 73, 67, 0.42);
  --footer-meta-size: 0.8rem;
  --footer-meta-leading: 1.34;
  background: var(--color-bg-secondary);
  color: var(--footer-text-soft);
  padding: var(--space-10) var(--container-padding) var(--space-8);
  font-family: var(--font-family);
}

body.dark-theme .site-footer {
  --footer-text-strong: var(--text-primary);
  --footer-text-soft: var(--text-secondary);
  --footer-text-muted: var(--text-muted);
  --footer-divider: var(--text-accent);
  --footer-panel-border: var(--frame-border-rest);
  --footer-link-underline: rgba(231, 229, 225, 0.16);
  --footer-link-underline-hover: rgba(231, 229, 225, 0.32);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Creates a single visual frame so brand and contact feel connected. */
.footer-shell {
  background: var(--color-bg-primary);
  border: 1px solid var(--footer-panel-border);
  border-radius: 1.1rem;
  padding: clamp(1.3rem, 1.9vw, 2.05rem);
  box-shadow: var(--shadow-sm);
}

body.dark-theme .footer-shell {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Upper tier: identity and contact entry points. */
.footer-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  padding-bottom: 0;
}

.footer-main::after {
  content: "";
  width: 100%;
  height: 1px;
  background: var(--footer-divider);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: flex-start;
}

.footer-logo {
  display: grid;
  width: max-content;
}

.footer-logo-image {
  grid-area: 1 / 1;
  height: 32px;
  width: auto;
  display: block;
  pointer-events: none;
}

.footer-logo-image-dark {
  opacity: 0;
}

html.dark-theme .footer-logo-image-light,
body.dark-theme .footer-logo-image-light {
  opacity: 0;
}

html.dark-theme .footer-logo-image-dark,
body.dark-theme .footer-logo-image-dark {
  opacity: 1;
}

.footer-tagline {
  margin: 0;
  max-width: 40ch;
  color: var(--text-secondary);
  font-size: clamp(0.95rem, 0.45vw + 0.86rem, 1.07rem);
  line-height: 1.46;
}

/* Lower tier: legal and utility details stay calm and secondary. */
.footer-bottom {
  padding-top: var(--space-4);
}

.footer-legal {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.footer-legal-item {
  font-size: var(--footer-meta-size);
  line-height: 1.3;
  color: var(--text-support);
}

.footer-legal-item:first-child {
  color: var(--text-support);
  font-weight: var(--weight-medium);
  letter-spacing: 0.02em;
}

.footer-legal-link {
  display: inline-block;
  font-size: var(--footer-meta-size);
  line-height: 1.3;
  color: var(--text-support);
  text-decoration: none;
  transition: color var(--transition-fast) ease;
}

.footer-legal-link:hover {
  color: var(--text-secondary);
}

.footer-legal-link:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
  border-radius: var(--radius-sm);
}

/* Keeps iOS auto-detected number links from switching to global accent color. */
.site-footer a[x-apple-data-detectors],
.site-footer a[x-apple-data-detectors-type],
.site-footer a[href^="tel:"],
.site-footer a[href^="x-apple-data-detectors"] {
  color: inherit !important;
  text-decoration: none !important;
}

.footer-copyright {
  margin: 0;
  font-size: var(--footer-meta-size);
  line-height: var(--footer-meta-leading);
  color: var(--text-support);
  text-align: left;
  max-width: 34ch;
}

.footer-privacy-link {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  cursor: pointer;
  font-size: var(--footer-meta-size);
  line-height: var(--footer-meta-leading);
  color: var(--text-support);
  text-decoration: underline;
  text-decoration-color: var(--footer-link-underline);
  text-underline-offset: 2px;
  transition:
    color var(--transition-fast) ease,
    text-decoration-color var(--transition-fast) ease;
}

.footer-privacy-link:hover {
  color: var(--text-secondary);
  text-decoration-color: var(--footer-link-underline-hover);
}

.footer-privacy-link:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
}

/* S range - compact stacked layout for narrow phones. */
@media (max-width: 420px) {
  .site-footer {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  .footer-shell {
    padding: var(--space-5) var(--space-4);
  }

  .footer-main {
    gap: 1.9rem;
    padding-bottom: 0;
  }

  .footer-bottom {
    padding-top: 1.9rem;
  }

}

/* M range - keeps stacked flow with more breathing room. */
@media (min-width: 421px) and (max-width: 767px) {
  .footer-shell {
    padding: 1.85rem 1.35rem;
  }
}

/* L range - keeps the footer card balanced at tablet widths. */
@media (min-width: 768px) and (max-width: 1023px) {
  .footer-copyright {
    max-width: 36ch;
  }
}

/* XL range - keeps right-bottom contact stack aligned. */
@media (min-width: 1024px) and (max-width: 1199px) {
  .footer-shell {
    padding: 1.85rem;
  }

  .footer-copyright {
    max-width: 38ch;
  }
}

/* XXL range - expands brand area without changing hierarchy. */
@media (min-width: 1200px) {
  .footer-shell {
    padding: 2.2rem;
  }

  .footer-copyright {
    max-width: 40ch;
  }
}

.privacy-modal-content {
  padding: var(--space-10) var(--space-12);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.privacy-updated {
  margin-top: calc(var(--space-8) * 3);
  font-size: var(--text-xs);
  font-family: var(--font-family);
  color: var(--text-support);
  text-align: right;
  margin-bottom: 0;
  border-top: 1px solid var(--color-border-subtle);
  padding-top: var(--space-4);
}

.privacy-section {
  margin-bottom: var(--space-6);
}

.privacy-section-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.privacy-text {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.privacy-list {
  padding-left: var(--space-5);
  margin-bottom: var(--space-3);
  list-style-type: disc;
}

.privacy-list li {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.privacy-link {
  color: var(--text-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-fast);
}

.privacy-link:hover {
  border-bottom-color: var(--text-accent);
}

.privacy-link:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
  border-radius: var(--radius-sm);
}

/* =========================================================================
   PRIVACY POLICY PAGE
   ========================================================================= */

.privacy-page {
  padding-top: calc(var(--navbar-height) + var(--space-12));
  padding-bottom: var(--section-gap);
}

.privacy-page-header {
  position: relative;
  padding-top: calc(36px + var(--space-4));
  margin-bottom: var(--space-8);
}

.privacy-page-title {
  margin-bottom: 0;
  text-align: center;
}

.privacy-page-close {
  top: 0;
  right: 0;
}

@media (max-width: 419px) {
  .privacy-modal-content {
    padding-left: 0;
    padding-right: 0;
  }
}

@media (min-width: 420px) and (max-width: 449px) {
  .privacy-modal-content {
    padding-left: 8px;
    padding-right: 8px;
  }
}

@media (min-width: 450px) and (max-width: 767px) {
  .privacy-modal-content {
    padding-left: 12px;
    padding-right: 12px;
  }
}
