:root {
  --ink: #0c1b2a;
  --ink-soft: #3d5568;
  --mist: #e7f1f5;
  --sand: #f2ebe0;
  --paper: #faf8f4;
  --cyan: #12b8c9;
  --blue: #1f5fd6;
  --line: rgba(12, 27, 42, 0.12);
  --shadow: 0 28px 60px rgba(12, 27, 42, 0.18);
  --font-display: "Sora", sans-serif;
  --font-body: "IBM Plex Sans", sans-serif;
  --nav-h: 4.25rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  background:
    radial-gradient(1200px 600px at 8% -10%, rgba(18, 184, 201, 0.16), transparent 55%),
    radial-gradient(900px 500px at 95% 8%, rgba(31, 95, 214, 0.1), transparent 50%),
    linear-gradient(180deg, var(--mist) 0%, var(--paper) 42%, var(--sand) 100%);
  min-height: 100%;
}

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

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

button {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--ink);
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
}

.skip-link:focus {
  top: 1rem;
}

/* Nav */
.site-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  background: rgba(250, 248, 244, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition:
    background 0.35s var(--ease),
    border-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}

.site-nav.is-scrolled {
  background: rgba(250, 248, 244, 0.92);
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px rgba(12, 27, 42, 0.06);
}

.nav-brand img {
  height: 2rem;
  width: auto;
}

.nav-links {
  display: none;
  gap: 1.75rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-links a {
  opacity: 0.72;
  transition: opacity 0.2s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  opacity: 1;
}

.nav-actions {
  display: none;
  align-items: center;
  gap: 0.65rem;
}

.nav-toggle {
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.7);
  display: grid;
  place-content: center;
  gap: 6px;
  cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 1.1rem;
  height: 2px;
  background: var(--ink);
  transition: transform 0.25s var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  transform: translateY(4px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  z-index: 35;
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.25rem 1.5rem;
  background: rgba(250, 248, 244, 0.97);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(12, 27, 42, 0.1);
}

.mobile-menu[hidden] {
  display: none;
}

.mobile-menu a {
  padding: 0.85rem 0.25rem;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}

.mobile-menu .btn {
  margin-top: 0.5rem;
  justify-content: center;
  border-bottom: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.65rem;
  padding: 0.65rem 1.15rem;
  border-radius: 0.7rem;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition:
    transform 0.25s var(--ease),
    background 0.25s var(--ease),
    color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-solid {
  color: #fff;
  background: linear-gradient(120deg, var(--blue) 0%, #1489c9 48%, var(--cyan) 100%);
  box-shadow: 0 12px 28px rgba(31, 95, 214, 0.28);
}

.btn-solid:hover {
  box-shadow: 0 16px 34px rgba(18, 184, 201, 0.32);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

.hero .btn-ghost,
.closing .btn-ghost {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
}

.site-nav .btn-ghost,
.mobile-menu .btn-ghost {
  color: var(--ink);
  background: transparent;
  border-color: var(--line);
}

.btn-ink {
  background: var(--ink);
  color: #fff;
}

.btn-lg {
  min-height: 3.15rem;
  padding: 0.8rem 1.45rem;
  font-size: 1rem;
}

/* Hero — one composition, brand-first, full-bleed media */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #fff;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% center;
  transform: scale(1.04);
  animation: hero-drift 18s var(--ease) infinite alternate;
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(7, 18, 28, 0.92) 0%, rgba(7, 18, 28, 0.78) 34%, rgba(7, 18, 28, 0.28) 58%, rgba(7, 18, 28, 0.1) 100%),
    linear-gradient(180deg, rgba(7, 18, 28, 0.45) 0%, transparent 30%, rgba(7, 18, 28, 0.62) 100%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: min(42rem, calc(100% - 2.5rem));
  margin: 0 0 clamp(3.5rem, 8vh, 6rem) clamp(1.25rem, 5vw, 4.5rem);
  padding-top: calc(var(--nav-h) + 2rem);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.brand-mark {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8vw, 4.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.98;
  background: linear-gradient(120deg, #ffffff 20%, #9ce8f2 70%, #6bb8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: mark-in 0.9s var(--ease) both;
}

.brand-mark-dark {
  background: linear-gradient(120deg, var(--ink) 10%, #176fbf 55%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero h1 {
  margin: 0;
  max-width: 16ch;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4.6vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
  animation: rise-in 0.9s var(--ease) 0.12s both;
}

.hero-lead {
  margin: 1.25rem 0 0;
  max-width: 34ch;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.86);
  animation: rise-in 0.9s var(--ease) 0.22s both;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
  animation: rise-in 0.9s var(--ease) 0.32s both;
}

/* Sections */
.section {
  display: grid;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
  padding: clamp(4.5rem, 10vw, 7.5rem) clamp(1.25rem, 5vw, 4.5rem);
  max-width: 1180px;
  margin: 0 auto;
}

.section-text h2,
.trust h2,
.closing h2 {
  margin: 0.4rem 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.section-text p,
.trust p,
.closing p {
  margin: 0;
  color: var(--ink-soft);
}

.eyebrow {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #0f7f8c;
}

.plain-list {
  margin: 1.4rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.7rem;
}

.plain-list li {
  position: relative;
  padding-left: 1.35rem;
  color: var(--ink);
  font-weight: 600;
}

.plain-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  transform: translateY(-50%) rotate(45deg);
}

.scene {
  margin-top: 1.5rem;
  padding: 1rem 1.1rem;
  border-left: 3px solid var(--cyan);
  background: rgba(18, 184, 201, 0.08);
  border-radius: 0 0.75rem 0.75rem 0;
}

.scene p {
  margin: 0;
  color: var(--ink) !important;
  font-size: 0.98rem;
  line-height: 1.55;
  font-weight: 500;
}

.trust-grid-secondary {
  margin-top: 1.5rem;
}

.section-media {
  margin: 0;
  border-radius: 1.35rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
}

.section-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease);
}

.section-media:hover img {
  transform: scale(1.03);
}

/* Trust band */
.trust {
  padding: clamp(4.5rem, 10vw, 7rem) clamp(1.25rem, 5vw, 4.5rem);
  background:
    linear-gradient(180deg, rgba(12, 27, 42, 0.94), rgba(12, 27, 42, 0.98)),
    url("assets/images/atmosphere-glass.jpg") center / cover;
  color: #fff;
}

.trust-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.trust .eyebrow {
  color: #7adce8;
}

.trust h2 {
  max-width: 18ch;
  color: #fff;
}

.trust-lead {
  max-width: 52ch;
  margin-top: 0.25rem !important;
  color: rgba(255, 255, 255, 0.78) !important;
}

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

.trust-grid article {
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.trust-grid h3 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.trust-grid p {
  color: rgba(255, 255, 255, 0.72) !important;
}

/* Closing */
.closing {
  padding: clamp(5rem, 12vw, 8rem) clamp(1.25rem, 5vw, 4.5rem);
  background:
    radial-gradient(700px 300px at 20% 20%, rgba(18, 184, 201, 0.18), transparent 60%),
    radial-gradient(600px 280px at 90% 80%, rgba(31, 95, 214, 0.12), transparent 55%),
    var(--paper);
}

.closing-copy {
  max-width: 40rem;
}

.closing .hero-cta .btn-ghost {
  color: var(--ink);
  background: transparent;
  border-color: var(--line);
}

/* Footer */
.site-footer {
  display: grid;
  gap: 1.5rem;
  padding: 2.5rem clamp(1.25rem, 5vw, 4.5rem) 2rem;
  border-top: 1px solid var(--line);
  background: #efe8db;
}

.footer-brand {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  max-width: 36rem;
}

.footer-brand img {
  border-radius: 0.65rem;
}

.footer-brand strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.footer-brand p {
  margin: 0.25rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.footer-links a {
  opacity: 0.75;
}

.footer-links a:hover {
  opacity: 1;
}

.footer-copy {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* Motion */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.8s var(--ease),
    transform 0.8s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes hero-drift {
  from {
    transform: scale(1.04) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.08) translate3d(-1.5%, -1%, 0);
  }
}

@keyframes mark-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

  .hero-media img,
  .brand-mark,
  .hero h1,
  .hero-lead,
  .hero-cta,
  .reveal {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}

@media (min-width: 800px) {
  .nav-links,
  .nav-actions {
    display: flex;
  }

  .nav-toggle,
  .mobile-menu {
    display: none !important;
  }

  .section {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .feature-reverse .section-text {
    order: 2;
  }

  .feature-reverse .section-media {
    order: 1;
  }

  .trust-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }

  .site-footer {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
  }

  .footer-copy {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1100px) {
  .hero-copy {
    margin-bottom: clamp(4rem, 10vh, 7rem);
  }

  .section-media {
    aspect-ratio: 5 / 4;
  }
}

/* Páginas legales (HTML estático, sin JS obligatorio) */
.legal-body {
  min-height: 100vh;
}

.legal-nav {
  position: sticky;
}

.legal-main {
  width: min(760px, calc(100% - 2rem));
  margin: 0 auto;
  padding: calc(var(--nav-h) + 2.5rem) 0 4rem;
}

.legal-article {
  padding: clamp(1.5rem, 4vw, 2.5rem) 0;
}

.legal-article h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
  margin: 0.75rem 0 1rem;
}

.legal-article h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 2rem 0 0.6rem;
}

.legal-article section p,
.legal-intro {
  color: var(--ink-soft);
}

.legal-intro {
  font-size: 1.125rem;
  margin: 0;
}

.legal-updated {
  color: #7b8496;
  font-size: 0.9rem;
  margin: 0.75rem 0 0;
}

.legal-article a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.legal-article .btn {
  text-decoration: none;
  display: inline-flex;
  margin-top: 1rem;
}

.footer-links a[aria-current="page"],
.nav-links a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
