:root { --header-h: 68px; }
html, body { overflow-x: hidden; }
html { overflow-y: scroll; }
body {
  background: #f8fafc;
  text-rendering: optimizeLegibility;
}
.dark body { background: #020617; }
[id] { scroll-margin-top: calc(var(--header-h) + 18px); }
::-moz-selection { background: rgba(255,179,26,.32); color: #050816; }
::selection { background: rgba(255,179,26,.32); color: #050816; }

.site-header {
  min-height: var(--header-h);
  background: rgba(248,250,252,.86);
  border-bottom: 1px solid rgba(226,232,240,.86);
  backdrop-filter: blur(18px);
}
.dark .site-header {
  background: rgba(2,6,23,.78);
  border-bottom-color: rgba(51,65,85,.74);
}

.brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: .5rem;
  background: #ffb31a;
  color: #050816;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 -4px 0 rgba(5,8,22,.16);
}

.nav-link {
  min-height: 2.5rem;
  border-radius: .5rem;
  display: inline-flex;
  align-items: center;
  padding: 0 .8rem;
  transition: background-color .18s ease, color .18s ease;
}

.button,
.icon-button {
  min-height: 2.75rem;
  border-radius: .5rem;
  transition: transform .16s ease, background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.button:hover,
.icon-button:hover { transform: translateY(-1px); }
.button:active,
.icon-button:active { transform: translateY(0); }

.hero {
  position: relative;
  isolation: isolate;
  color: #fff;
  min-height: clamp(610px, 82svh, 790px);
  overflow: hidden;
  background:
    radial-gradient(720px 420px at 9% 14%, rgba(255,179,26,.45), transparent 62%),
    radial-gradient(760px 460px at 82% 20%, rgba(0,166,166,.4), transparent 60%),
    radial-gradient(620px 420px at 84% 76%, rgba(255,95,109,.38), transparent 64%),
    linear-gradient(105deg, rgba(5,20,38,.96) 0%, rgba(9,52,74,.88) 42%, rgba(0,117,132,.62) 73%, rgba(255,138,0,.42) 100%),
    url('/img/landing.png') right 4% center / min(720px, 52vw) auto no-repeat,
    #0b2b36;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(rgba(255,255,255,.085) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px) 0 0 / 42px 42px;
  opacity: .58;
  transform: skewY(-4deg) translateY(-4%);
  transform-origin: top left;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, transparent 0%, rgba(255,255,255,.06) 64%, rgba(255,179,26,.15) 100%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.045) 0 1px, transparent 1px 8px);
  pointer-events: none;
}

.hero-kicker {
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(16px);
}

.cockpit {
  position: relative;
  border-radius: .5rem;
  border: 1px solid rgba(255,255,255,.18);
  background:
    linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,.07)),
    rgba(10,39,58,.66);
  box-shadow: 0 34px 90px -45px rgba(0,0,0,.76), inset 0 1px 0 rgba(255,255,255,.18);
  backdrop-filter: blur(22px);
  transform: perspective(1200px) rotateY(-9deg) rotateX(3deg);
}
.cockpit::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 1px solid rgba(255,179,26,.22);
  pointer-events: none;
}
.scan-line {
  position: absolute;
  inset-inline: 0;
  top: 18%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,179,26,.8), transparent);
  animation: scan 4.4s ease-in-out infinite;
  opacity: .82;
}
@keyframes scan {
  0%, 100% { transform: translateY(0); opacity: .22; }
  48% { transform: translateY(245px); opacity: .9; }
}

.pulse-bar {
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,.08);
}
.pulse-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ffb31a, #00a6a6, #ff5f6d);
  animation: breathe 3.8s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scaleX(.86); transform-origin: left; }
  50% { transform: scaleX(1); transform-origin: left; }
}

.surface {
  border-radius: .5rem;
  border: 1px solid rgb(226 232 240);
  background: rgba(255,255,255,.86);
  box-shadow: 0 24px 70px -54px rgba(2,6,23,.72);
}

.metric-chip {
  flex: 0 0 4.7rem;
  min-width: 4.7rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: .5rem;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: .68rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.dark .surface {
  border-color: rgba(51,65,85,.86);
  background: rgba(15,23,42,.72);
}

.service-card {
  position: relative;
  overflow: hidden;
  border-radius: .5rem;
  border: 1px solid rgb(226 232 240);
  background: #fff;
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.service-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, #ffb31a, #00a6a6, #ff5f6d);
  opacity: .9;
}
.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,179,26,.9);
  box-shadow: 0 28px 70px -48px rgba(2,6,23,.72);
}
.dark .service-card {
  border-color: rgba(51,65,85,.86);
  background: #0f172a;
}

.marquee {
  display: flex;
  overflow: hidden;
  white-space: nowrap;
  border-block: 1px solid rgba(226,232,240,.9);
  background: #fff;
}
.dark .marquee {
  background: #020617;
  border-color: rgba(51,65,85,.86);
}
.marquee-track {
  display: flex;
  min-width: -moz-max-content;
  min-width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee span {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: 1rem 1.25rem;
  color: #475569;
  font-size: .82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .14em;
}
.dark .marquee span { color: #cbd5e1; }
.marquee i {
  width: .45rem;
  height: .45rem;
  border-radius: 999px;
  background: #ffb31a;
  display: inline-block;
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

.process-step {
  border-left: 2px solid rgba(255,179,26,.55);
  padding-left: 1.25rem;
  position: relative;
}
.process-step::before {
  content: "";
  position: absolute;
  left: -6px;
  top: .45rem;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ffb31a;
  box-shadow: 0 0 0 7px rgba(255,179,26,.12);
}

.drawer {
  transform: translateX(-100%);
  opacity: 0;
  transition: transform .22s cubic-bezier(.2,.8,.2,1), opacity .22s ease;
}
.drawer[data-state="open"] {
  transform: translateX(0);
  opacity: 1;
}
.drawer-backdrop {
  opacity: 0;
  transition: opacity .22s ease;
}
.drawer-backdrop[data-state="open"] { opacity: 1; }
.no-scroll { overflow: hidden; touch-action: none; overscroll-behavior: none; }

.form-field {
  width: 100%;
  border-radius: .5rem;
  border: 1px solid rgb(203 213 225);
  background: rgba(255,255,255,.95);
  padding: .82rem .95rem;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.form-field:focus {
  border-color: #ffb31a;
  box-shadow: 0 0 0 4px rgba(255,179,26,.2);
}
.dark .form-field {
  border-color: rgb(51 65 85);
  background: rgba(15,23,42,.82);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Páginas legales */
.legal-hero {
  background:
    radial-gradient(520px 320px at 8% 12%, rgba(255,179,26,.42), transparent 70%),
    radial-gradient(620px 360px at 84% 16%, rgba(0,166,166,.34), transparent 66%),
    radial-gradient(420px 280px at 74% 86%, rgba(255,95,109,.22), transparent 70%),
    linear-gradient(135deg, #fff8e1 0%, #ffffff 46%, #e6fffb 100%);
}
.dark .legal-hero {
  background:
    radial-gradient(520px 320px at 8% 12%, rgba(255,179,26,.24), transparent 70%),
    radial-gradient(620px 360px at 84% 16%, rgba(0,166,166,.24), transparent 66%),
    linear-gradient(135deg, #050816 0%, #0f172a 58%, #092f33 100%);
}
.legal-card {
  border-radius: .5rem;
  border: 1px solid rgb(226 232 240);
  background: rgba(255,255,255,.9);
  box-shadow: 0 24px 70px -54px rgba(2,6,23,.72);
}
.dark .legal-card {
  border-color: rgba(51,65,85,.86);
  background: rgba(15,23,42,.76);
}
.content-section h2 {
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 900;
  color: #020617;
}
.dark .content-section h2 { color: #fff; }
.content-section p,
.content-section li,
.content-section td,
.content-section th {
  color: #475569;
  line-height: 1.75;
}
.dark .content-section p,
.dark .content-section li,
.dark .content-section td,
.dark .content-section th { color: #cbd5e1; }
.content-section a { text-decoration: underline; text-underline-offset: 3px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.content-section table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}
.content-section th,
.content-section td {
  border: 1px solid rgb(226 232 240);
  padding: .75rem;
  text-align: left;
  vertical-align: top;
}
.dark .content-section th,
.dark .content-section td { border-color: rgb(51 65 85); }
.content-section th {
  background: rgba(248,250,252,.9);
  font-weight: 900;
  color: #020617;
}
.dark .content-section th { background: rgba(2,6,23,.45); color: #fff; }

@media (max-width: 767px) {
  :root { --header-h: 64px; }
  .hero {
    min-height: auto;
    background:
      radial-gradient(420px 300px at 18% 0%, rgba(255,179,26,.42), transparent 68%),
      radial-gradient(420px 330px at 100% 48%, rgba(0,166,166,.36), transparent 70%),
      linear-gradient(180deg, rgba(5,20,38,.96) 0%, rgba(9,52,74,.88) 56%, rgba(0,117,132,.62) 100%),
      url('/img/landing.png') right -120px bottom 20px / 520px auto no-repeat,
      #0b2b36;
  }
  .hero::before {
    background-size: 34px 34px;
    transform: skewY(-6deg) translateY(-2%);
  }
  .marquee span {
    padding: .9rem 1rem;
    font-size: .72rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
