/* Domotizame · web pública. Paleta y tipo: data/branding/guia/brand-guide.md */

@font-face {
  font-family: Fraunces;
  src: url("../fonts/Fraunces-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Manrope;
  src: url("../fonts/Manrope-Variable.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --turia: #233b7e;
  --turia-noche: #16264f;
  --brisa-claro: #e4ecfb;
  --brisa-luz: #9db6ea;
  --teja-luz: #ee8a60;
  --cal: #fbf8f2;
  --texto: #dce5f8;
  --tarjeta: #344a87;
  --borde: rgba(251, 248, 242, 0.2);
  --radio: 16px;
  --sombra-foco: 0 0 0 3px var(--turia), 0 0 0 6px var(--cal);
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  background: var(--turia);
  color: var(--texto);
  font-family: Manrope, "Segoe UI", sans-serif;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.55;
}

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

h1,
h2,
h3 {
  font-family: Fraunces, "Iowan Old Style", Palatino, Georgia, serif;
  font-weight: 600;
  font-optical-sizing: auto;
  color: var(--cal);
  text-wrap: balance;
  font-variation-settings: "SOFT" 100, "WONK" 0, "wght" 600;
}

h1 {
  margin: 0.55rem 0 1rem;
  font-size: clamp(2.15rem, 4.6vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  font-variation-settings: "SOFT" 100, "WONK" 0, "opsz" 60, "wght" 600;
}

h2 {
  margin: 0.3rem 0 0.8rem;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.17;
  font-variation-settings: "SOFT" 100, "WONK" 0, "opsz" 36, "wght" 600;
}

h3 {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.25;
  font-variation-settings: "SOFT" 100, "WONK" 0, "opsz" 24, "wght" 600;
}

p {
  margin: 0 0 0.9rem;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--brisa-luz);
}

a:hover {
  color: var(--cal);
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--cal);
  outline-offset: 3px;
}

::selection {
  background: var(--brisa-claro);
  color: var(--turia-noche);
}

.skip {
  position: absolute;
  left: 1rem;
  top: 0.75rem;
  transform: translateY(-160%);
  z-index: 80;
  background: var(--cal);
  color: var(--turia-noche);
  font-weight: 800;
  text-decoration: none;
  padding: 0.6rem 1rem;
  border-radius: 12px;
}

.skip:focus {
  transform: none;
}

.interior {
  width: min(68rem, calc(100% - 2.5rem));
  margin-inline: auto;
}

.kicker {
  margin: 0;
  font-family: Manrope, sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brisa-luz);
}

.kicker-linea + .kicker-linea::before {
  content: " · ";
}

@media (max-width: 720px) {
  .kicker-linea {
    display: block;
  }

  .kicker-linea + .kicker-linea::before {
    content: none;
  }
}

.lema {
  margin: 0.85rem 0 0;
  color: var(--brisa-claro);
  font-weight: 500;
  letter-spacing: 0.05em;
  font-size: 1.05rem;
}

.intro {
  max-width: 40rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--turia);
  border-bottom: 1px solid rgba(251, 248, 242, 0.12);
}

.site-header .interior {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 4.25rem;
}

.marca {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.marca img {
  display: block;
  width: 7.5rem;
  height: auto;
}

.header-acciones {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem 0.75rem;
  min-width: 0;
}

.nav-principal {
  position: relative;
  order: 1;
}

.header-acciones .btn-compacto {
  order: 2;
}

.nav-check {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.nav-toggle {
  cursor: pointer;
  min-width: 3rem;
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(251, 248, 242, 0.28);
  color: var(--cal);
  font-weight: 700;
  background: transparent;
}

.nav-check:focus-visible + .nav-toggle {
  outline: 3px solid var(--cal);
  outline-offset: 3px;
}

.nav-lista {
  list-style: none;
  margin: 0;
  padding: 0.35rem;
  display: none;
}

.nav-lista a {
  color: var(--texto);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.35rem 0.5rem;
  border-radius: 10px;
  white-space: nowrap;
}

.nav-lista a:hover {
  color: var(--cal);
  background: rgba(251, 248, 242, 0.06);
}

.nav-check:checked ~ .nav-lista {
  display: flex;
  flex-direction: column;
  position: absolute;
  right: 0;
  top: calc(100% + 0.45rem);
  min-width: 16rem;
  background: var(--turia-noche);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  z-index: 50;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.7rem 1.15rem;
  border-radius: var(--radio);
  border: 2px solid transparent;
  background: var(--teja-luz);
  color: var(--turia-noche);
  font-family: Manrope, sans-serif;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  max-width: 100%;
  cursor: pointer;
}

.btn:hover {
  background: #f39972;
  color: var(--turia-noche);
}

.btn:active {
  background: #e88962;
}

.btn-compacto {
  min-height: 2.75rem;
  padding: 0.4rem 0.85rem;
  font-size: 0.95rem;
}

.btn-secundario {
  background: transparent;
  color: var(--cal);
  border-color: var(--brisa-luz);
}

.btn-secundario:hover {
  background: rgba(228, 236, 251, 0.12);
  color: var(--cal);
}

.btn[hidden] {
  display: none;
}

.enlace {
  font-weight: 700;
  text-underline-offset: 0.18em;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.seccion {
  padding: 3.5rem 0;
}

.seccion-noche {
  background: var(--turia-noche);
}

.seccion-noche + .seccion-noche {
  border-top: 1px solid rgba(251, 248, 242, 0.12);
}

.hero {
  padding: 2.25rem 0 3.25rem;
}

.hero-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.logo-hero,
.logo-hero-sub {
  display: block;
  height: auto;
  margin: 0 0 1.15rem;
}

.logo-hero {
  width: min(13.5rem, 100%);
}

.logo-hero-sub {
  display: none;
  width: min(26rem, 100%);
}

.hero-acciones {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.25rem;
  margin: 1.4rem 0 0;
}

.sello {
  width: min(16.5rem, 72%);
  margin-inline: auto;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--turia-noche);
}

.sello img {
  width: 70%;
  height: auto;
}

.cards {
  display: grid;
  gap: 1rem;
  margin-top: 1.75rem;
}

.card {
  background: var(--tarjeta);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 1.25rem 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  min-width: 0;
}

.card > p:last-of-type {
  flex: 1;
}

.card-acciones {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.75rem;
  width: 100%;
  margin-top: auto;
}

.modal {
  width: min(36rem, calc(100vw - 1.5rem));
  max-height: min(90vh, 90dvh);
  margin: auto;
  padding: 0;
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  background: var(--turia-noche);
  color: var(--texto);
  box-shadow: 0 1.5rem 4rem rgba(8, 14, 32, 0.45);
}

.modal::backdrop {
  background: rgba(12, 20, 46, 0.72);
}

.modal-caja {
  padding: 1.35rem 1.25rem 1.5rem;
  overflow: auto;
  max-height: min(90vh, 90dvh);
}

.modal-cabecera {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.85rem;
}

.modal h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2rem);
}

.modal-cerrar {
  flex: 0 0 auto;
  min-height: 2.75rem;
  padding: 0.35rem 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(251, 248, 242, 0.35);
  background: transparent;
  color: var(--cal);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.modal-cerrar:hover {
  background: rgba(228, 236, 251, 0.12);
}

.modal-lista {
  margin: 0.35rem 0 1.25rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.85rem;
}

.modal-lista strong {
  color: var(--cal);
}

.icono {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: var(--turia-noche);
  display: grid;
  place-items: center;
}

.icono img {
  width: 1.7rem;
  height: 1.7rem;
}

.card .badge,
.badge {
  margin: 0;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  height: auto;
  flex: 0 0 auto;
  min-height: 1.7rem;
  padding: 0.1rem 0.65rem;
  border: 1px solid var(--brisa-luz);
  border-radius: 999px;
  color: var(--cal);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nota {
  margin-top: 1.5rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radio);
  border: 1px solid rgba(157, 182, 234, 0.5);
  background: rgba(22, 38, 79, 0.35);
  max-width: 46rem;
}

.seccion-noche .nota {
  background: rgba(35, 59, 126, 0.55);
}

.nota p {
  margin: 0;
}

.nota + .nota,
.bloque-cierre {
  margin-top: 1.25rem;
}

.fiscal {
  font-size: 1rem;
  line-height: 1.5;
  max-width: none;
}

.faq-lista {
  display: grid;
  gap: 0;
  margin-top: 1.25rem;
  max-width: 46rem;
}

.faq {
  border-bottom: 1px solid rgba(251, 248, 242, 0.16);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  color: var(--cal);
  font-weight: 700;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--brisa-luz);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
}

.faq[open] summary::after {
  content: "–";
}

.faq p {
  margin: 0 0 1rem;
  max-width: 42rem;
}

.contacto-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.panel {
  background: var(--tarjeta);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 1.25rem;
}

.panel h3 {
  margin-bottom: 0.6rem;
}

.form-grid {
  display: grid;
  gap: 0.9rem;
}

.campo {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-weight: 700;
  color: var(--cal);
  font-size: 0.95rem;
}

.campo input,
.campo select,
.campo textarea {
  width: 100%;
  font: inherit;
  font-weight: 500;
  font-size: 1rem;
  color: var(--cal);
  background: var(--turia);
  border: 1px solid rgba(157, 182, 234, 0.55);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  min-height: 3rem;
}

.campo textarea {
  min-height: 8rem;
  resize: vertical;
}

.campo input::placeholder,
.campo textarea::placeholder {
  color: var(--brisa-luz);
}

.ayuda-form {
  margin: 0.35rem 0 0;
  color: var(--brisa-claro);
  font-size: 0.95rem;
}

#form-estado {
  min-height: 1.4em;
  margin-top: 0.75rem;
  font-weight: 700;
  color: var(--cal);
}

.site-footer {
  background: var(--turia-noche);
  border-top: 1px solid rgba(251, 248, 242, 0.12);
  padding: 2.5rem 0 3rem;
}

.pie-marca {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.25rem;
}

.pie-marca img {
  width: 4rem;
  height: auto;
}

.pie-nombre {
  margin: 0;
  font-family: Fraunces, Georgia, serif;
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--cal);
  font-variation-settings: "SOFT" 100, "WONK" 0, "opsz" 24, "wght" 600;
}

.pie-dominio {
  margin: 0;
  color: var(--brisa-luz);
  font-weight: 600;
}

.pie-enlaces {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  list-style: none;
  margin: 0 0 1.1rem;
  padding: 0;
}

.pie-enlaces a {
  color: var(--texto);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
}

.pie-enlaces a:hover {
  color: var(--cal);
}

.peque {
  color: var(--brisa-luz);
  font-size: 0.875rem;
  line-height: 1.45;
}

.pagina-simple {
  padding: 2.5rem 0 4rem;
}

.pagina-simple h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.pagina-simple h2 {
  margin-top: 2rem;
  font-size: 1.65rem;
}

@media (max-width: 399px) {
  .site-header .btn-texto {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .site-header .btn-compacto {
    padding-inline: 0.7rem;
  }
}

@media (min-width: 700px) {
  .card-sola {
    grid-column: 1 / -1;
  }
}

@media (min-width: 400px) {
  .logo-hero,
  .lema-estrecho {
    display: none;
  }

  .logo-hero-sub {
    display: block;
  }
}

code {
  font-family: Manrope, sans-serif;
  font-weight: 700;
  color: var(--cal);
}

@media (min-width: 700px) {
  .cards {
    grid-template-columns: 1fr 1fr;
  }

  .form-grid-2 {
    grid-template-columns: 1fr 1fr;
  }

  .campo-ancho {
    grid-column: 1 / -1;
  }

  .contacto-grid {
    grid-template-columns: minmax(16rem, 0.8fr) minmax(0, 1.3fr);
    align-items: start;
  }
}

@media (min-width: 880px) {
  .seccion {
    padding: 5rem 0;
  }

  .hero {
    padding: 3rem 0 4.5rem;
  }
}

@media (min-width: 1040px) {
  .marca img {
    width: 10.5rem;
  }

  .nav-check,
  .nav-toggle {
    display: none;
  }

  .nav-lista,
  .nav-check:checked ~ .nav-lista {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.1rem;
    width: max-content;
    min-width: max-content;
    padding: 0;
    background: transparent;
    border: 0;
  }
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.45fr) minmax(16rem, 0.7fr);
    gap: 3rem;
  }

  .sello {
    width: min(20rem, 100%);
    margin-inline: auto 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media (prefers-contrast: more) {
  .card,
  .panel,
  .nav-check:checked ~ .nav-lista,
  .aviso-cookies-panel,
  .cookie-fila,
  .cookie-switch {
    border-color: var(--cal);
  }

  body,
  .card p,
  .nav-lista a,
  .pie-enlaces a,
  .pie-enlaces .pie-accion,
  .aviso-cookies,
  .aviso-cookies p,
  .cookie-detalle,
  .site-footer .pie-accion {
    color: var(--cal);
  }
}

.pagina-simple ul {
  margin: 0 0 0.9rem;
  padding-left: 1.25rem;
}

.pagina-simple li {
  margin: 0 0 0.45rem;
}

.pagina-simple li:last-child {
  margin-bottom: 0;
}

button.enlace {
  font: inherit;
  font-weight: 700;
  color: var(--brisa-luz);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

button.enlace:hover {
  color: var(--cal);
}

.pie-accion {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: inherit;
}

.pie-enlaces .pie-accion {
  color: var(--texto);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
}

.site-footer p .pie-accion {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.pie-enlaces .pie-accion:hover,
.site-footer .pie-accion:hover {
  color: var(--cal);
}

.aviso-foco-script :focus,
.aviso-foco-script :focus-visible {
  outline: none;
}

.aviso-cookies:not([hidden]) {
  position: fixed;
  z-index: 70;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.75rem;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  pointer-events: none;
  font-size: 1rem;
}

.aviso-cookies-panel {
  width: min(68rem, 100%);
  margin-inline: auto;
  pointer-events: auto;
  max-height: calc(100vh - 1.5rem);
  max-height: calc(100dvh - 1.5rem);
  overflow: auto;
  background: var(--turia-noche);
  color: var(--texto);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 1.15rem 1.25rem 1.25rem;
  box-shadow: 0 12px 40px rgba(22, 38, 79, 0.45);
}

.aviso-cookies h2 {
  margin: 0 0 0.45rem;
  font-size: 1.5rem;
}

.aviso-cookies p {
  margin: 0 0 0.65rem;
}

.aviso-cookies a {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.aviso-cookies-acciones {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
  margin-top: 1.1rem;
}

.aviso-cookies .btn {
  width: 100%;
  min-width: 0;
  height: 100%;
}

.cookie-fila {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--borde);
}

.cookie-fila > div:first-child {
  flex: 1 1 14rem;
  min-width: 0;
}

.cookie-nombre {
  margin: 0 0 0.2rem;
  color: var(--cal);
  font-weight: 800;
}

.cookie-detalle {
  margin: 0;
  color: var(--texto);
  font-size: 0.95rem;
}

.cookie-control {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-left: auto;
}

.cookie-estado {
  min-width: 7.2rem;
  color: var(--brisa-luz);
  font-size: 0.875rem;
  font-weight: 700;
  text-align: right;
}

.cookie-switch {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex: 0 0 auto;
  width: 4rem;
  height: 2.75rem;
  margin: 0;
  padding: 0.2rem;
  border-radius: 999px;
  border: 2px solid var(--brisa-luz);
  background: transparent;
  cursor: pointer;
}

.cookie-switch-punto {
  display: block;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 50%;
  background: var(--cal);
}

.cookie-switch[aria-checked="true"] {
  justify-content: flex-end;
  background: var(--teja-luz);
  border-color: var(--teja-luz);
}

.cookie-switch[aria-checked="true"] .cookie-switch-punto {
  background: var(--turia-noche);
}

.cookie-switch-fijo {
  justify-content: flex-end;
  cursor: default;
  background: var(--brisa-claro);
  border-color: var(--brisa-claro);
}

.cookie-switch-fijo .cookie-switch-punto {
  background: var(--turia-noche);
}

#cookies-cerrar {
  grid-column: 1 / -1;
}

@media (min-width: 720px) {
  .aviso-cookies-acciones {
    grid-template-columns: 1fr 1fr 1fr;
    align-items: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-switch,
  .cookie-switch-punto {
    transition: none;
  }
}
