:root {
  --ink: #152033;
  --ink-soft: #2a3a52;
  --sky: #7eb6e0;
  --sky-deep: #2f6fa8;
  --mist: #eef5fb;
  --paper: #f7fafc;
  --white: #ffffff;
  --muted: #66768c;
  --line: #d5e0ec;
  --radius: 12px;
  --font-display: "Outfit", sans-serif;
  --font-body: "DM Sans", sans-serif;
  --max: 1080px;
  --header-h: 4.25rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 4vw, 2.75rem);
  background: color-mix(in srgb, var(--paper) 75%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--white) 88%, transparent);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  color: var(--sky-deep);
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 1rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
}

.nav a {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-soft);
  transition: color 0.2s;
}

.nav a:hover {
  color: var(--sky-deep);
}

.nav-cta {
  padding: 0.5rem 1.1rem;
  background: var(--ink);
  color: var(--white) !important;
  border-radius: 8px;
  font-weight: 650 !important;
}

.nav-cta:hover {
  background: var(--sky-deep) !important;
  color: var(--white) !important;
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s, opacity 0.25s;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-5px) rotate(-45deg);
}

/* Hero — full-bleed background */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--header-h) + 2rem) 1.5rem 4rem;
  overflow: hidden;
  background: #c8dff2;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  animation: bg-in 1.2s ease forwards;
}

.hero-wash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 35%, rgba(247, 250, 252, 0.72) 0%, transparent 70%),
    linear-gradient(180deg, rgba(200, 223, 242, 0.35) 0%, rgba(247, 250, 252, 0.55) 55%, var(--paper) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 40rem;
  width: 100%;
  opacity: 0;
  animation: rise 0.9s 0.15s ease forwards;
}

.brand-hero {
  margin: 0 0 1.1rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.8rem, 8vw, 4.75rem);
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: var(--ink);
}

.hero h1 {
  margin: 0 auto 1rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--ink-soft);
  max-width: 20ch;
}

.hero-lead {
  margin: 0 auto 2rem;
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 36ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.45rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 650;
  border-radius: 10px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--ink);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--sky-deep);
}

.btn-ghost {
  background: color-mix(in srgb, var(--white) 55%, transparent);
  color: var(--ink);
  border-color: var(--line);
  backdrop-filter: blur(6px);
}

.btn-ghost:hover {
  border-color: var(--sky-deep);
  color: var(--sky-deep);
}

.btn-full {
  width: 100%;
  border-radius: 10px;
}

/* Sections */
.section {
  padding: 5.5rem clamp(1.25rem, 4vw, 2.5rem);
  max-width: var(--max);
  margin: 0 auto;
}

.section-head {
  text-align: center;
  max-width: 34rem;
  margin: 0 auto 3.25rem;
}

.section-head-left {
  text-align: left;
  margin-left: 0;
  margin-right: 0;
  max-width: 36rem;
}

.section-head h2 {
  margin: 0 0 0.7rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 3.5vw, 2.45rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

/* Products — quiet rows */
.products {
  max-width: none;
  background: var(--white);
  padding-top: 4.5rem;
  padding-bottom: 5rem;
}

.products .section-head,
.product-list {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1.25rem, 4vw, 2.5rem);
  padding-right: clamp(1.25rem, 4vw, 2.5rem);
}

.product-list {
  display: grid;
  gap: 0;
}

.product {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem 2rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.product:last-child {
  border-bottom: 1px solid var(--line);
}

.product.is-visible {
  opacity: 1;
  transform: none;
}

.product-index {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: var(--sky-deep);
  padding-top: 0.35rem;
}

.product-body h3 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.product-body > p {
  margin: 0 0 1.1rem;
  color: var(--muted);
  max-width: 52ch;
}

.product-body ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.35rem;
}

.product-body li {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
  position: relative;
  padding-left: 0.85rem;
}

.product-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sky);
}

/* Custom — soft band */
.custom {
  max-width: none;
  background:
    radial-gradient(ellipse 80% 80% at 10% 20%, #d7eaf8 0%, transparent 55%),
    radial-gradient(ellipse 60% 70% at 90% 80%, #cfe0f0 0%, transparent 50%),
    var(--mist);
  padding: 5.5rem clamp(1.25rem, 4vw, 2.5rem);
}

.custom-panel {
  max-width: var(--max);
  margin: 0 auto;
}

.custom .section-head {
  margin-bottom: 2.75rem;
}

.custom-points {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 800px) {
  .custom-points {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.custom-points li {
  display: grid;
  gap: 0.45rem;
  padding: 1.5rem 0 0;
  border-top: 2px solid color-mix(in srgb, var(--sky-deep) 25%, transparent);
}

.custom-points strong {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.custom-points span {
  color: var(--muted);
  font-size: 0.98rem;
}

/* Contact */
.contact {
  max-width: none;
  background: var(--paper);
  padding: 5.5rem clamp(1.25rem, 4vw, 2.5rem) 6rem;
}

.contact-shell {
  max-width: 40rem;
  margin: 0 auto;
}

.contact-form {
  display: grid;
  gap: 1.1rem;
  padding: 1.75rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.form-row {
  display: grid;
  gap: 1.1rem;
}

@media (min-width: 560px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.contact-form label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.optional {
  font-weight: 400;
  color: var(--muted);
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--sky-deep);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sky) 35%, transparent);
}

.contact-form textarea {
  resize: vertical;
  min-height: 7.5rem;
}

.form-status {
  margin: 0;
  font-size: 0.92rem;
  min-height: 1.3em;
}

.form-status.is-ok {
  color: var(--sky-deep);
}

.form-status.is-err {
  color: #b45309;
}

/* Popup resultado contacto */
.toast {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.toast[hidden] {
  display: none;
}

.toast-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(21, 32, 51, 0.45);
}

.toast-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 24rem);
  padding: 1.75rem 1.5rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 16px 40px rgba(21, 32, 51, 0.18);
}

.toast-panel.is-ok .toast-title {
  color: var(--sky-deep);
}

.toast-panel.is-err .toast-title {
  color: #b45309;
}

.toast-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.toast-msg {
  margin: 0 0 1.35rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.toast-panel .btn {
  min-width: 8rem;
}

/* Footer */
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.25rem clamp(1.25rem, 4vw, 2.5rem);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: end;
  border-top: 1px solid var(--line);
}

.footer-brand .brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.footer-brand p {
  margin: 0.3rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-copy {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Motion */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes bg-in {
  from {
    opacity: 0;
    transform: scale(1.04);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-content,
  .hero-bg img,
  .product {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}

/* Mobile */
@media (max-width: 720px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.6rem 1.25rem 1.25rem;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s, opacity 0.3s;
  }

  .nav.is-open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .nav a {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
  }

  .nav-cta {
    margin-top: 0.85rem;
    text-align: center;
    border-bottom: 0 !important;
  }

  .product {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}
