/* ==========================================================================
   CLIMASOFT - CARGAS TÉRMICAS v3.0 | LANDING PAGE DESIGN SYSTEM
   Ultra-Responsive, Mobile-First & Neuromarketing Optimized
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* Core Brand Colors */
  --c-e20: #2563eb;
  --c-e20-light: #3b82f6;
  --c-e20-bg: rgba(37, 99, 235, 0.08);
  --c-e20-border: rgba(37, 99, 235, 0.25);

  --c-rts: #d97706;
  --c-rts-light: #f59e0b;
  --c-rts-bg: rgba(217, 119, 6, 0.08);
  --c-rts-border: rgba(217, 119, 6, 0.25);

  --c-bim: #059669;
  --c-bim-light: #10b981;
  --c-bim-bg: rgba(16, 185, 129, 0.08);
  --c-bim-border: rgba(16, 185, 129, 0.25);

  /* Light Theme Palette (Default) */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-surface-translucent: rgba(255, 255, 255, 0.88);
  --bg-card-subtle: #f1f5f9;
  --bg-badge: #e2e8f0;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-subtle: #64748b;
  --text-inverse: #ffffff;

  --border-color: #e2e8f0;
  --border-subtle: rgba(226, 232, 240, 0.8);
  --border-focus: #3b82f6;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;

  --logo-brightness: 1;
  --grid-line-color: rgba(148, 163, 184, 0.12);
}

/* Dark Theme Palette */
[data-theme="dark"] {
  --bg-body: #0b0f19;
  --bg-surface: #111827;
  --bg-surface-elevated: #1e293b;
  --bg-surface-translucent: rgba(17, 24, 39, 0.88);
  --bg-card-subtle: #162032;
  --bg-badge: #1e293b;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --text-inverse: #0f172a;

  --border-color: #1e293b;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #60a5fa;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.4);

  --logo-brightness: 1.7;
  --grid-line-color: rgba(255, 255, 255, 0.04);
}

/* ==========================================================================
   BASE & RESET
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  width: 100%;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
  transition: background-color 0.3s ease, color 0.3s ease;
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(37, 99, 235, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(245, 158, 11, 0.05) 0%, transparent 40%),
    linear-gradient(to right, var(--grid-line-color) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line-color) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.2;
  word-break: break-word;
  overflow-wrap: break-word;
}

p {
  color: var(--text-muted);
  word-break: break-word;
  overflow-wrap: break-word;
}

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

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

.mono {
  font-family: 'JetBrains Mono', monospace;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.navbar-wrap {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--bg-surface-translucent);
  border-bottom: 1px solid var(--border-subtle);
  width: 100%;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-logo {
  height: 28px;
  width: auto;
  max-width: 230px;
  filter: brightness(var(--logo-brightness));
  transition: filter 0.3s ease;
}

.brand-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: var(--bg-badge);
  color: var(--c-e20);
  border: 1px solid var(--border-color);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

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

.nav-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s ease;
  white-space: nowrap;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.theme-toggle {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  color: var(--text-main);
  border-color: var(--border-focus);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.btn-text-short {
  display: none;
}

.nav-btn-bim,
.nav-btn-hoja {
  white-space: nowrap;
}

/* ==========================================================================
   HAMBURGER BUTTON & MOBILE DRAWER
   ========================================================================== */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
  transition: all 0.2s ease;
  z-index: 102;
}

.hamburger-btn:hover {
  border-color: var(--border-focus);
}

.hamburger-line {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.hamburger-btn.active .hamburger-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  background: var(--bg-surface);
  border-left: 1px solid var(--border-color);
  z-index: 999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-xl);
  overflow-y: auto;
}

.mobile-drawer.active {
  transform: translateX(0);
}

.mobile-drawer-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface-translucent);
}

.mobile-drawer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-drawer-logo {
  height: 22px;
  width: auto;
  filter: brightness(var(--logo-brightness));
}

.mobile-drawer-close {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  font-size: 1.3rem;
  line-height: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-drawer-close:hover {
  color: var(--text-main);
  background: var(--border-color);
}

.mobile-drawer-menu {
  list-style: none;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-grow: 1;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.mobile-nav-link svg {
  width: 18px;
  height: 18px;
  color: var(--c-e20);
  flex-shrink: 0;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  background: var(--bg-card-subtle);
  color: var(--text-main);
}

.mobile-drawer-footer {
  padding: 18px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-card-subtle);
}

.mobile-drawer-contact {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-subtle);
  margin-top: 4px;
}

.mobile-drawer-contact a {
  color: var(--c-e20);
  text-decoration: underline;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 11px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  text-align: center;
  box-sizing: border-box;
  max-width: 100%;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.825rem;
}

.btn-lg {
  padding: 13px 24px;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  transform: translateY(-1px);
  border-color: var(--text-muted);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
  padding: 48px 0 64px;
  position: relative;
}

.hero-badge-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  max-width: 100%;
  line-height: 1.4;
}

.hero-badge-wrap .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: center;
}

.hero-content h1 {
  font-size: clamp(2rem, 3.8vw, 3.4rem);
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.hero-content h1 .gradient-text {
  background: linear-gradient(135deg, var(--c-e20) 0%, #6366f1 50%, var(--c-rts) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  max-width: 560px;
  line-height: 1.6;
}

.hero-lead b {
  color: var(--text-main);
  font-weight: 600;
}

.hero-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.hero-trust-list {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border-subtle);
  padding-top: 20px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.825rem;
  color: var(--text-muted);
  font-weight: 500;
}

.trust-item svg {
  color: #10b981;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Hero Interactive Card */
.hero-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
  width: 100%;
}

.hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--c-e20) 0%, var(--c-rts) 100%);
}

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.card-subtitle {
  font-size: 0.775rem;
  color: var(--text-subtle);
}

.interactive-pill-group {
  display: inline-flex;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 2px;
  gap: 2px;
}

.pill-btn {
  background: transparent;
  border: none;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.pill-btn.active {
  background: var(--bg-surface);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.canvas-container {
  position: relative;
  width: 100%;
  height: 200px;
  margin: 8px 0 12px;
}

#heroCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.curve-readout {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.readout-box {
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
}

.readout-box.e20 {
  background: var(--c-e20-bg);
  border-color: var(--c-e20-border);
}

.readout-box.rts {
  background: var(--c-rts-bg);
  border-color: var(--c-rts-border);
}

.readout-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.readout-box.e20 .readout-label { color: var(--c-e20); }
.readout-box.rts .readout-label { color: var(--c-rts); }

.readout-val {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 2px;
  font-family: 'JetBrains Mono', monospace;
}

.readout-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.card-footer-tip {
  margin-top: 12px;
  padding: 8px 10px;
  background: var(--c-rts-bg);
  border-left: 3px solid var(--c-rts);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.775rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.card-footer-tip b {
  color: var(--text-main);
}

/* ==========================================================================
   METRICS & AUTHORITY BAR
   ========================================================================== */
.metrics-section {
  padding: 24px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

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

.metric-card {
  display: flex;
  flex-direction: column;
  padding: 8px 14px;
  border-left: 2px solid var(--border-color);
  transition: border-color 0.2s ease;
}

.metric-card:hover {
  border-color: var(--c-e20);
}

.metric-num {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.1;
}

.metric-num .accent-blue { color: var(--c-e20); }
.metric-num .accent-amber { color: var(--c-rts); }
.metric-num .accent-green { color: var(--c-bim); }

.metric-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
  margin-top: 3px;
}

.metric-sub {
  font-size: 0.75rem;
  color: var(--text-subtle);
  margin-top: 2px;
}

/* ==========================================================================
   SECTION COMMON STYLES
   ========================================================================== */
.section {
  padding: 72px 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 44px;
}

.section-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-e20);
  background: var(--c-e20-bg);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 0.975rem;
  color: var(--text-muted);
}

/* ==========================================================================
   METHOD DUEL: CARRIER E-20 VS ASHRAE RTS
   ========================================================================== */
.methods-duel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.method-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  position: relative;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
}

.method-card.e20 {
  border-top: 4px solid var(--c-e20);
}

.method-card.rts {
  border-top: 4px solid var(--c-rts);
}

.method-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 14px;
}

.method-card.e20 .method-badge {
  background: var(--c-e20-bg);
  color: var(--c-e20);
}

.method-card.rts .method-badge {
  background: var(--c-rts-bg);
  color: var(--c-rts);
}

.method-card h3 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.method-source {
  font-size: 0.8rem;
  color: var(--text-subtle);
  font-style: italic;
  margin-bottom: 14px;
}

.method-card > p {
  font-size: 0.925rem;
  line-height: 1.55;
  margin-bottom: 20px;
}

.method-spec-list {
  list-style: none;
  border-top: 1px solid var(--border-subtle);
}

.method-spec-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.875rem;
}

.spec-key {
  font-weight: 600;
  color: var(--text-main);
}

.spec-val {
  color: var(--text-muted);
}

/* ==========================================================================
   INTERACTIVE SIMULTANEITY & ROI CALCULATOR
   ========================================================================== */
.calc-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  box-shadow: var(--shadow-xl);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: center;
}

.calc-controls {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.calc-control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calc-control-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

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

.calc-badge-val {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--c-e20);
  background: var(--c-e20-bg);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
}

.slider-range {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--border-color);
  outline: none;
}

.slider-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--c-e20);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(37, 99, 235, 0.4);
}

.preset-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.preset-btn {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  padding: 5px 10px;
  border-radius: var(--radius-full);
  font-size: 0.775rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-btn.active, .preset-btn:hover {
  background: var(--c-e20);
  color: #ffffff;
  border-color: var(--c-e20);
}

.calc-results-box {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.calc-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.calc-res-label {
  font-size: 0.825rem;
  color: var(--text-muted);
}

.calc-res-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 700;
}

.calc-highlight-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.05) 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  text-align: center;
}

.calc-highlight-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #059669;
  letter-spacing: 0.05em;
}

.calc-highlight-num {
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: #059669;
  line-height: 1.1;
  margin: 4px 0;
}

.calc-highlight-desc {
  font-size: 0.775rem;
  color: var(--text-muted);
}

/* ==========================================================================
   BIM IFC WORKFLOW
   ========================================================================== */
.bim-workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.workflow-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 26px 22px;
  position: relative;
  transition: all 0.3s ease;
}

.workflow-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--c-bim);
}

.workflow-step-num {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--c-bim-bg);
  color: var(--c-bim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 16px;
  border: 1px solid var(--c-bim-border);
}

.workflow-card h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.workflow-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.bim-interactive-panel {
  margin-top: 32px;
  background: var(--bg-surface);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-xl);
  padding: 32px 20px;
  text-align: center;
}

.bim-icon-wrap {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  background: var(--c-bim-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-bim);
}

.bim-icon-wrap svg {
  width: 26px;
  height: 26px;
}

/* ==========================================================================
   DELIVERABLES & SHOWCASE
   ========================================================================== */
.deliverables-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.deliverable-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-sm);
}

.deliverable-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-e20);
  background: var(--c-e20-bg);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  align-self: flex-start;
}

.deliverable-card h3 {
  font-size: 1.1rem;
}

.deliverable-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   VERIFICATION TABLE
   ========================================================================== */
.verif-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  width: 100%;
}

.verif-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.verif-table {
  width: 100%;
  min-width: 500px;
  border-collapse: collapse;
  text-align: left;
}

.verif-table th {
  background: var(--bg-card-subtle);
  padding: 14px 18px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-subtle);
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
}

.verif-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.875rem;
}

.verif-table tr:last-child td {
  border-bottom: none;
}

.verif-table td:first-child {
  font-weight: 600;
  color: var(--text-main);
}

.verif-table td:nth-child(2) {
  color: var(--text-muted);
}

.verif-table td:last-child {
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--c-rts);
}

/* ==========================================================================
   FAQ ACCORDION
   ========================================================================== */
.faq-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 780px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  background: transparent;
  border: none;
  text-align: left;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  gap: 12px;
}

.faq-icon {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
  color: var(--text-muted);
  flex-shrink: 0;
}

.faq-item.open .faq-icon {
  transform: rotate(180deg);
  color: var(--c-e20);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease;
  padding: 0 18px;
}

.faq-item.open .faq-answer {
  max-height: 350px;
  padding: 0 18px 16px;
}

.faq-answer p {
  font-size: 0.9rem;
  line-height: 1.55;
}

/* ==========================================================================
   COMMERCIAL CTA CLOSING
   ========================================================================== */
.cta-closing {
  padding: 72px 0;
  position: relative;
}

.cta-box {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-radius: var(--radius-xl);
  padding: 48px 36px;
  color: #ffffff;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
  align-items: center;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

.cta-box h2 {
  font-size: clamp(1.8rem, 2.8vw, 2.3rem);
  color: #ffffff;
  margin-bottom: 12px;
}

.cta-box p {
  color: #94a3b8;
  font-size: 0.975rem;
}

.cta-actions-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.cta-actions-card .btn {
  width: 100%;
}

/* ==========================================================================
   SERVICES & OPEN LICENSING (Option 2 & Option C)
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}

.service-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 34px 26px 26px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  box-shadow: var(--shadow-md);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--border-focus);
}

.service-card.highlighted {
  border: 2px solid var(--c-e20);
  background: var(--bg-surface-elevated);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.14);
}

.service-ribbon {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  white-space: nowrap;
}

.service-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
  align-self: flex-start;
}

.service-badge.green {
  background: var(--c-bim-bg);
  color: var(--c-bim);
}

.service-badge.blue {
  background: var(--c-e20-bg);
  color: var(--c-e20);
}

.service-badge.orange {
  background: var(--c-rts-bg);
  color: var(--c-rts);
}

.service-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  color: var(--text-main);
}

.service-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 10px 0 14px;
}

.service-price {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
  line-height: 1;
}

.service-period {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}

.service-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
  min-height: 42px;
}

.service-features {
  list-style: none;
  margin-bottom: 26px;
  flex-grow: 1;
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
}

.service-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-main);
  margin-bottom: 12px;
  line-height: 1.4;
}

.service-feature-item svg {
  width: 17px;
  height: 17px;
  color: var(--c-bim-light);
  flex-shrink: 0;
  margin-top: 1px;
}

.service-card-action {
  margin-top: auto;
}

.service-legal-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--text-subtle);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-align: center;
  width: 100%;
  transition: color 0.2s ease;
}

.service-legal-link:hover {
  color: var(--c-e20);
}

/* ==========================================================================
   DONATION & COMMUNITY SUPPORT BLOCK
   ========================================================================== */
.donation-box {
  margin-top: 44px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.donation-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #10b981 0%, #2563eb 50%, #f59e0b 100%);
}

.donation-header {
  max-width: 720px;
  margin: 0 auto 24px;
}

.donation-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--c-bim-bg);
  color: var(--c-bim);
  margin-bottom: 12px;
}

.donation-badge svg {
  color: #10b981;
}

.donation-title {
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  color: var(--text-main);
}

.donation-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.donation-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 620px;
}

.donation-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.donation-pill {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-family: 'Outfit', sans-serif;
  font-size: 0.925rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.donation-pill:hover {
  border-color: var(--c-bim-light);
  color: var(--c-bim-light);
  transform: translateY(-1px);
}

.donation-pill.active {
  background: var(--c-bim);
  border-color: var(--c-bim);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.donation-action-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.donation-btn {
  padding: 12px 28px;
  font-size: 0.95rem;
  gap: 8px;
}

.donation-note {
  font-size: 0.8rem;
  color: var(--text-subtle);
}

.donation-note code {
  font-family: 'JetBrains Mono', monospace;
  color: var(--c-e20);
}

.donation-gratitude {
  margin-top: 24px;
  padding: 12px 22px;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.donation-gratitude strong {
  color: var(--c-bim);
  font-weight: 800;
  letter-spacing: 0.03em;
}

@media (max-width: 640px) {
  .donation-box {
    padding: 28px 18px;
  }
  .donation-pill {
    padding: 6px 12px;
    font-size: 0.85rem;
  }
  .donation-btn {
    width: 100%;
    font-size: 0.875rem;
    padding: 11px 16px;
  }
  .donation-gratitude {
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    padding: 10px 14px;
    text-align: center;
    justify-content: center;
  }
}

/* Community Collaboration & Suggestions Bar */
.community-collaborate-bar {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.875rem;
}

.community-link-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.community-link-item svg {
  color: var(--c-e20);
  flex-shrink: 0;
}

.community-link-item:hover {
  color: var(--text-main);
  border-color: var(--border-focus);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.community-link-item strong {
  color: var(--text-main);
}

.community-divider {
  color: var(--text-subtle);
  font-weight: bold;
}

@media (max-width: 640px) {
  .community-collaborate-bar {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }
  .community-link-item {
    width: 100%;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 0.825rem;
  }
  .community-divider {
    display: none;
  }
}

/* ==========================================================================
   LEGAL MODALS
   ========================================================================== */
.legal-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.legal-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.legal-modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.legal-modal-backdrop.active .legal-modal-card {
  transform: scale(1);
}

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

.legal-modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.legal-modal-close {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  line-height: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.legal-modal-close:hover {
  color: var(--text-main);
  background: var(--border-color);
}

.legal-modal-body {
  padding: 24px;
  overflow-y: auto;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.legal-modal-body h4 {
  font-size: 0.975rem;
  color: var(--text-main);
  margin: 18px 0 6px;
  font-weight: 700;
}

.legal-modal-body h4:first-child {
  margin-top: 0;
}

.legal-modal-body p {
  margin-bottom: 12px;
}

.legal-modal-body ul {
  padding-left: 20px;
  margin-bottom: 14px;
}

.legal-modal-body li {
  margin-bottom: 6px;
}

.legal-modal-body code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85em;
  background: var(--bg-card-subtle);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--c-e20);
}

.legal-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  background: var(--bg-card-subtle);
}

.footer-legal-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.825rem;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.footer-legal-btn:hover {
  color: var(--text-main);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  padding: 36px 0 44px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  font-size: 0.825rem;
  color: var(--text-muted);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
  flex-wrap: wrap;
}

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

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES (iPhone & Mobile-specific)
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .methods-duel-grid {
    grid-template-columns: 1fr;
  }
  .calc-card {
    grid-template-columns: 1fr;
  }
  .bim-workflow-grid {
    grid-template-columns: 1fr;
  }
  .deliverables-grid {
    grid-template-columns: 1fr;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .services-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    max-width: 540px;
    margin: 0 auto;
  }
  .cta-box {
    grid-template-columns: 1fr;
    padding: 36px 24px;
  }
}

/* EL SELECTOR DE IDIOMA DE LA BARRA Y DEL CAJON.

   En la barra va detras del menu, con el mismo tamano que los enlaces de
   navegacion para que no cante. Dentro del cajon del movil va al pie, debajo
   del contacto, porque en movil la barra no ensena el menu y el selector tiene
   que estar donde esta todo lo demas. */
.nav-idiomas {
  margin-left: 16px;
  white-space: nowrap;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-secondary, #475569);
}
.mobile-drawer-idiomas {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(128,128,128,.22);
  font-size: 15px;
  text-align: center;
  color: var(--text-secondary, #475569);
}

/* LA BARRA DE ARRIBA CABE JUSTO, Y NO CABE IGUAL EN CADA IDIOMA.

   El menu se recogia en la hamburguesa a 768 px, pero deja de caber mucho
   antes: entre ese ancho y el que hace falta, los botones de la derecha
   -tema, BIM IFC y la llamada a la accion- se salen de la pantalla sin que
   nada lo indique, y esta pagina vive de esos botones.

   Medido con el navegador, buscando el ancho exacto en el que el borde
   derecho de .nav-actions pasa del borde de la ventana:

       espanol   deja de caber por debajo de 1353 px
       ingles                                 1335 px
       frances                                1548 px

   El frances necesita casi 200 px mas porque sus rotulos son mas largos:
   «Calculateur d'economies» frente a «Calculadora de Ahorro», «Rigueur
   scientifique» frente a «Rigor Cientifico». El espanol YA SE SALIA a 1280,
   antes de que existiera ninguna traduccion; no es un defecto que trajeran
   los idiomas, es uno que los idiomas destaparon.

   Se recoge el menu en cada idioma en su propio ancho, en vez de igualar los
   tres al mas exigente: asi el espanol conserva su barra completa hasta donde
   de verdad le cabe.                                                        */
@media (max-width: 1560px) {
  html[lang="fr"] .nav-menu    { display: none; }
  html[lang="fr"] .nav-idiomas { display: none; }
  html[lang="fr"] .hamburger-btn { display: flex; }
}
@media (max-width: 1360px) {
  html[lang="es"] .nav-menu,
  html[lang="en"] .nav-menu    { display: none; }
  html[lang="es"] .nav-idiomas,
  html[lang="en"] .nav-idiomas { display: none; }
  html[lang="es"] .hamburger-btn,
  html[lang="en"] .hamburger-btn { display: flex; }
}

@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }
  .nav-idiomas {
    display: none;
  }
  .hamburger-btn {
    display: flex;
  }
  .hero-ctas {
    flex-direction: column;
    width: 100%;
  }
  .hero-ctas .btn {
    width: 100%;
  }
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .navbar {
    height: 60px;
  }
  .brand-logo {
    height: 24px;
    width: auto;
    max-width: 230px;
  }
  .brand-badge {
    display: none;
  }
  .nav-actions {
    gap: 8px;
  }
  .nav-actions .btn-sm {
    padding: 6px 11px;
    font-size: 0.8rem;
  }
  .hero-section {
    padding: 28px 0 44px;
  }
  .hero-card {
    padding: 16px 14px;
  }
  .curve-readout {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .method-card {
    padding: 20px 16px;
  }
  .method-spec-item {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .calc-card {
    padding: 20px 14px;
  }
  .calc-results-box {
    padding: 16px 12px;
  }
  .calc-result-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .bim-interactive-panel {
    padding: 20px 12px;
  }
  .cta-box {
    padding: 28px 16px;
  }
  .cta-box h2 {
    font-size: 1.6rem;
  }
}

@media (max-width: 480px) {
  .btn-text-full {
    display: none;
  }
  .btn-text-short {
    display: inline;
  }
  .nav-actions {
    gap: 6px;
  }
  .nav-actions .btn-sm {
    padding: 5px 9px;
    font-size: 0.78rem;
  }
  .theme-toggle {
    width: 32px;
    height: 32px;
  }
  .theme-toggle svg {
    width: 15px;
    height: 15px;
  }
}

@media (max-width: 420px) {
  .hero-content h1 {
    font-size: 1.85rem;
  }
  .card-header-flex {
    flex-direction: column;
    align-items: stretch;
  }
  .interactive-pill-group {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
  .pill-btn {
    text-align: center;
    padding: 4px 2px;
  }
  .preset-pills {
    display: grid;
    grid-template-columns: 1fr;
  }
  .preset-btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 380px) {
  .navbar {
    gap: 3px;
  }
  .brand-logo {
    height: 20px;
    max-width: 80px;
  }
  .nav-actions {
    gap: 3px;
  }
  .nav-actions .btn-sm {
    padding: 4px 6px;
    font-size: 0.70rem;
    letter-spacing: -0.01em;
  }
  .theme-toggle {
    width: 26px;
    height: 26px;
  }
  .theme-toggle svg {
    width: 13px;
    height: 13px;
  }
  .hamburger-btn {
    width: 28px;
    height: 28px;
    padding: 5px;
    gap: 3px;
  }
  .hamburger-line {
    width: 14px;
  }
}

/* ==========================================================================
   FLOATING BACK TO TOP BUTTON (Semi-Transparent)
   ========================================================================== */
.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.15);
  color: var(--text-main);
  border: 1px solid rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .scroll-top-btn {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.scroll-top-btn.visible {
  opacity: 0.38;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover, .scroll-top-btn:focus-visible {
  opacity: 0.95;
  background: var(--c-e20);
  color: #ffffff;
  border-color: var(--c-e20);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.scroll-top-btn svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 640px) {
  .scroll-top-btn {
    bottom: 18px;
    right: 18px;
    width: 38px;
    height: 38px;
  }
  .scroll-top-btn svg {
    width: 18px;
    height: 18px;
  }
}
