/* SunnyFlip dark theme layer.
   Isolated overrides: the light theme remains the base experience. */

.site-header,
.site-header.is-scrolled {
  background: rgba(247, 249, 248, 0.88);
  backdrop-filter: blur(18px);
}

#contacto .eyebrow {
  background: rgba(255, 255, 255, 0.92);
  border-color: var(--line);
  color: var(--orange);
  box-shadow: 0 8px 20px rgba(52, 56, 59, 0.05);
}

html {
  scroll-padding-top: 22px;
}

.section[id] {
  scroll-margin-top: 22px;
}

#inicio {
  scroll-margin-top: 0;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --cream: #151719;
  --white: #ffffff;
  --dark: #f0f2f1;
  --graphite: #c7cacb;
  --graphite-light: #aeb2b4;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --soft-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 88% 8%, rgba(251, 156, 9, 0.16), transparent 30rem),
    radial-gradient(circle at 6% 44%, rgba(53, 118, 147, 0.22), transparent 28rem),
    var(--cream);
}

html[data-theme="dark"] body::before {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.055), transparent 30rem);
}

html[data-theme="dark"] .site-header,
html[data-theme="dark"] .site-header.is-scrolled {
  background: rgba(24, 26, 28, 0.88);
  background-color: rgba(24, 26, 28, 0.88);
  backdrop-filter: blur(18px);
  border-bottom-color: rgba(255, 255, 255, 0.10);
  box-shadow: none;
}

html[data-theme="dark"] .brand-rubro {
  background: #181a1c;
  background-color: #181a1c;
  border-color: rgba(255, 255, 255, 0.10);
}

html[data-theme="dark"] .use-pill {
  background: rgba(32, 35, 38, 0.92);
  border-color: rgba(255, 255, 255, 0.11);
  color: var(--dark);
}

.mobile-toggle {
  color: var(--graphite-light);
}

html[data-theme="dark"] .mobile-menu {
  background: rgba(24, 26, 28, 0.98);
  border-top-color: rgba(255, 255, 255, 0.10);
}

html[data-theme="dark"] .mobile-toggle {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.14);
  color: #f0f2f1;
}

html[data-theme="dark"] .mobile-menu a {
  background: rgba(255, 255, 255, 0.06);
}

html[data-theme="dark"] .mobile-menu a.mobile-whatsapp {
  background: #25d366;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(37, 211, 102, 0.20);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--graphite-light);
  box-shadow: none;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  transition: 0.2s ease;
}

.theme-toggle:hover {
  color: var(--orange);
}

.theme-toggle:focus {
  outline: none;
}

.theme-toggle:focus-visible .theme-toggle-icon {
  outline: 3px solid rgba(251, 156, 9, 0.28);
  outline-offset: 3px;
}

.theme-toggle-icon {
  position: relative;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 999px;
  color: var(--graphite-light);
  background: transparent;
  box-shadow: none;
}

.theme-toggle-dial {
  display: block;
  width: 100%;
  height: 100%;
}

.theme-toggle-rays circle,
.theme-toggle-ring,
.theme-toggle-needle-shadow,
.theme-toggle-needle,
.theme-toggle-hub {
  vector-effect: non-scaling-stroke;
}

.theme-toggle-rays circle {
  fill: var(--orange);
  opacity: 0.9;
}

.theme-toggle-ring {
  fill: rgba(255, 255, 255, 0.55);
  stroke: currentColor;
  stroke-width: 2.2;
}

.theme-toggle-needle-shadow {
  stroke: rgba(255, 255, 255, 0.88);
  stroke-width: 4.6;
  stroke-linecap: round;
  transform: rotate(90deg);
  transform-box: view-box;
  transform-origin: 32px 32px;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.theme-toggle-needle {
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  transform: rotate(90deg);
  transform-box: view-box;
  transform-origin: 32px 32px;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.theme-toggle-hub {
  fill: currentColor;
}

html[data-theme="dark"] .theme-toggle {
  background: transparent;
  color: var(--graphite-light);
}

html[data-theme="dark"] .theme-toggle-icon {
  color: #f0f2f1;
  background: transparent;
  box-shadow: none;
}

html[data-theme="dark"] .theme-toggle-ring {
  fill: rgba(24, 26, 28, 0.78);
}

html[data-theme="dark"] .theme-toggle-rays circle {
  opacity: 0.94;
}

html[data-theme="dark"] .theme-toggle-needle {
  stroke: #ff9c09;
  stroke-width: 3;
  transform: rotate(-180deg);
}

html[data-theme="dark"] .theme-toggle-needle-shadow {
  stroke: rgba(0, 0, 0, 0.95);
  stroke-width: 5.8;
  transform: rotate(-180deg);
}

html[data-theme="dark"] .theme-toggle:focus-visible .theme-toggle-icon {
  outline-color: rgba(251, 156, 9, 0.34);
}

html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .hero-point,
html[data-theme="dark"] .photo-card,
html[data-theme="dark"] .benefit-card,
html[data-theme="dark"] .wide-card,
html[data-theme="dark"] .product-card,
html[data-theme="dark"] .quote-card,
html[data-theme="dark"] .contact-item,
html[data-theme="dark"] .form-card,
html[data-theme="dark"] .faq-item {
  background: rgba(32, 35, 38, 0.92);
  border-color: rgba(255, 255, 255, 0.11);
}

html[data-theme="dark"] .photo-shell,
html[data-theme="dark"] .product-showcase-shell {
  background: rgba(32, 35, 38, 0.68);
  border-color: rgba(255, 255, 255, 0.10);
}

html[data-theme="dark"] .photo-frame {
  background:
    linear-gradient(135deg, rgba(41, 44, 47, 0.96), rgba(29, 32, 35, 0.98) 48%, rgba(27, 45, 54, 0.92)),
    repeating-linear-gradient(135deg, rgba(251, 156, 9, 0.08) 0 1px, transparent 1px 16px);
  border-color: rgba(255, 255, 255, 0.10);
}

html[data-theme="dark"] .season-panel.warm {
  background: linear-gradient(135deg, rgba(251, 156, 9, 0.16), rgba(32, 35, 38, 0.98));
  border-color: rgba(251, 156, 9, 0.14);
}

html[data-theme="dark"] .season-panel.cold {
  background: linear-gradient(135deg, rgba(53, 118, 147, 0.22), rgba(32, 35, 38, 0.98));
  border-color: rgba(104, 161, 187, 0.16);
}

html[data-theme="dark"] .dark-panel,
html[data-theme="dark"] .product-copy,
html[data-theme="dark"] #contacto {
  background:
    radial-gradient(circle at 82% 12%, rgba(251, 156, 9, 0.26), transparent 16rem),
    linear-gradient(135deg, #24272a, #181a1c);
}

html[data-theme="dark"] .field input,
html[data-theme="dark"] .field textarea,
html[data-theme="dark"] .field select {
  background-color: #181a1c;
  border-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .field input:focus,
html[data-theme="dark"] .field textarea:focus,
html[data-theme="dark"] .field select:focus {
  background-color: #202326;
}

html[data-theme="dark"] .choice-field label {
  background: #181a1c;
  border-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .button-secondary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

html[data-theme="dark"] .form-promo-note {
  background:
    radial-gradient(circle at 6% 35%, rgba(251, 156, 9, 0.22), transparent 8rem),
    linear-gradient(135deg, rgba(251, 156, 9, 0.15), rgba(234, 94, 7, 0.09));
  border-color: rgba(251, 156, 9, 0.22);
}

html[data-theme="dark"] .site-footer {
  background: #181a1c;
  border-top-color: rgba(255, 255, 255, 0.10);
}

html[data-theme="dark"] #contacto .eyebrow {
  background: rgba(32, 35, 38, 0.92);
  border-color: rgba(255, 255, 255, 0.11);
  color: var(--orange);
  box-shadow: none;
}

@media (max-width: 1040px) {
  .theme-toggle {
    margin-left: auto;
  }
}

@media (max-width: 520px) {
  .theme-toggle {
    width: 44px;
    height: 40px;
  }

  .theme-toggle-icon {
    width: 38px;
    height: 38px;
  }
}

.theme-toggle-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 820px) {
  html {
    scroll-padding-top: 36px;
  }

  .section[id] {
    scroll-margin-top: 36px;
  }
}
