/* ==========================================================================
   Giro Merino SL — Hoja de estilos principal
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --bg: #f7f8fc;
  --bg-elev: #ffffff;
  --surface: #ffffff;
  --surface-2: #eff2f9;
  --ink: #0b1224;
  --ink-soft: #2b3450;
  --muted: #5b6580;
  --line: #e3e7f1;
  --line-strong: #d2d8e7;
  --brand: #4f46e5;
  --brand-soft: #eef0ff;
  --brand-2: #0ea5e9;
  --teal: #14b8a6;
  --grad: linear-gradient(120deg, #6366f1 0%, #0ea5e9 58%, #14b8a6 100%);
  --header-bg: rgba(247, 248, 252, 0.82);
  --shadow-sm: 0 1px 2px rgba(11, 18, 36, 0.05), 0 2px 6px rgba(11, 18, 36, 0.04);
  --shadow-md: 0 14px 34px -16px rgba(11, 18, 36, 0.24);
  --shadow-lg: 0 36px 80px -34px rgba(11, 18, 36, 0.38);
  --radius: 20px;
  --radius-sm: 12px;
  --maxw: 1160px;
  --header-h: 74px;
  --font: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070a14;
  --bg-elev: #0b1020;
  --surface: #0e1424;
  --surface-2: #151c2e;
  --ink: #eef2fb;
  --ink-soft: #ccd4e6;
  --muted: #97a2ba;
  --line: #1c2437;
  --line-strong: #2a3449;
  --brand: #8b8ffb;
  --brand-soft: #1a1f3d;
  --brand-2: #38bdf8;
  --teal: #2dd4bf;
  --header-bg: rgba(7, 10, 20, 0.76);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md: 0 16px 40px -18px rgba(0, 0, 0, 0.8);
  --shadow-lg: 0 40px 90px -40px rgba(0, 0, 0, 0.95);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 8px;
}

::selection {
  background: rgba(99, 102, 241, 0.24);
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus-visible {
  transform: none;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(20px, 4.5vw, 32px);
}

.section {
  padding-block: clamp(64px, 8.5vw, 116px);
  scroll-margin-top: calc(var(--header-h) + 8px);
}

.section--tight {
  padding-block: clamp(40px, 6vw, 72px);
}

.section-head {
  max-width: 730px;
  margin-bottom: clamp(32px, 4.5vw, 56px);
}

.section-head p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.06rem;
  max-width: 62ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--brand);
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--grad);
}

h2 {
  font-size: clamp(1.85rem, 3.4vw, 2.65rem);
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.82rem 1.4rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease,
    border-color 0.18s ease, color 0.18s ease;
}

.btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

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

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

.btn--primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 12px 26px -12px rgba(79, 70, 229, 0.65);
}

.btn--primary:hover {
  box-shadow: 0 18px 32px -14px rgba(79, 70, 229, 0.72);
}

.btn--ghost {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.btn--ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.btn--sm {
  padding: 0.62rem 1.1rem;
  font-size: 0.88rem;
}

.btn--block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 10px 30px -24px rgba(11, 18, 36, 0.6);
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.025em;
  flex: none;
}

.brand__mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  box-shadow: 0 8px 18px -10px rgba(79, 70, 229, 0.8);
}

.brand__text small {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.2;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.nav-links a {
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.18s ease, background-color 0.18s ease;
}

.nav-links a:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
}

.theme-toggle,
.nav-toggle {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

.theme-toggle:hover,
.nav-toggle:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .icon-sun {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

.nav-toggle {
  display: none;
}

.nav-toggle__bars {
  position: relative;
  width: 17px;
  height: 11px;
}

.nav-toggle__bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.nav-toggle__bars span:first-child {
  top: 0;
}

.nav-toggle__bars span:last-child {
  bottom: 0;
}

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

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

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(44px, 6vw, 88px) clamp(60px, 8vw, 108px);
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -10% -10% auto;
  height: 640px;
  z-index: -2;
  background-image: linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 62px 62px;
  -webkit-mask-image: radial-gradient(ellipse 62% 58% at 50% 8%, #000 10%, transparent 78%);
  mask-image: radial-gradient(ellipse 62% 58% at 50% 8%, #000 10%, transparent 78%);
  opacity: 0.9;
}

.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -240px;
  left: 50%;
  width: 1100px;
  height: 620px;
  transform: translateX(-50%);
  background: radial-gradient(
      circle at 32% 45%,
      rgba(99, 102, 241, 0.24),
      transparent 62%
    ),
    radial-gradient(circle at 68% 40%, rgba(14, 165, 233, 0.2), transparent 60%);
  filter: blur(12px);
  pointer-events: none;
}

.hero__copy {
  min-width: 0;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: clamp(36px, 5vw, 64px);
  align-items: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 0.79rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.hero__badge .pulse {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
  animation: pulse 2.6s ease-out infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.hero h1 {
  margin-top: 22px;
  font-size: clamp(2.45rem, 5vw, 3.95rem);
  letter-spacing: -0.038em;
  line-height: 1.03;
}

.hero__lead {
  margin-top: 22px;
  max-width: 52ch;
  font-size: clamp(1.02rem, 1.4vw, 1.13rem);
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-top: 26px;
  font-size: 0.87rem;
  color: var(--muted);
}

.hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero__meta svg {
  width: 15px;
  height: 15px;
  color: var(--teal);
  flex: none;
}

/* ---------- Hero visual ---------- */
.hero__visual {
  position: relative;
  min-height: 470px;
  display: flex;
  align-items: center;
}

.hero__visual .glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(46px);
  opacity: 0.5;
  z-index: -1;
}

.glow--a {
  width: 260px;
  height: 260px;
  top: 10%;
  left: 2%;
  background: rgba(99, 102, 241, 0.55);
}

.glow--b {
  width: 240px;
  height: 240px;
  bottom: 6%;
  right: 6%;
  background: rgba(20, 184, 166, 0.45);
}

.mock {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
}

.mock--browser {
  width: 100%;
  overflow: hidden;
  transform: rotate(-1.4deg);
  transition: transform 0.5s ease;
}

.hero__visual:hover .mock--browser {
  transform: rotate(0deg);
}

.mock__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}

.mock__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line-strong);
}

.mock__dot:nth-child(1) {
  background: #fda4af;
}

.mock__dot:nth-child(2) {
  background: #fcd34d;
}

.mock__dot:nth-child(3) {
  background: #6ee7b7;
}

.mock__url {
  margin-left: 10px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mock__body {
  padding: 18px;
}

.dash-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.dash-kicker {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.dash-title {
  margin-top: 2px;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dash-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  font-size: 0.62rem;
  font-weight: 700;
}

.dash-pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

[data-theme="dark"] .dash-pill {
  color: #4ade80;
}

.dash-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.dash-card {
  padding: 11px 12px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.dash-card span {
  display: block;
  font-size: 0.63rem;
  color: var(--muted);
  font-weight: 600;
}

.dash-card strong {
  display: block;
  margin-top: 2px;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.dash-card em {
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 700;
  color: #16a34a;
}

[data-theme="dark"] .dash-card em {
  color: #4ade80;
}

.dash-chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 92px;
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-2), transparent);
}

.dash-chart span {
  flex: 1;
  height: var(--h, 40%);
  border-radius: 5px 5px 3px 3px;
  background: linear-gradient(180deg, #818cf8, #4f46e5);
  opacity: 0.85;
  animation: grow 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: bottom;
}

.dash-chart span:nth-child(even) {
  background: linear-gradient(180deg, #38bdf8, #0ea5e9);
  opacity: 0.7;
}

@keyframes grow {
  from {
    transform: scaleY(0.1);
    opacity: 0;
  }
}

.dash-rows {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.dash-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 9px;
  background: var(--surface-2);
}

.dash-row .avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c7d2fe, #67e8f9);
  flex: none;
}

.dash-row .line {
  height: 6px;
  border-radius: 3px;
  background: var(--line-strong);
}

.dash-row .w-60 {
  width: 58%;
}

.dash-row .w-40 {
  width: 38%;
}

.dash-row .tag {
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.55rem;
  font-weight: 700;
  color: #0369a1;
  background: rgba(14, 165, 233, 0.14);
}

[data-theme="dark"] .dash-row .tag {
  color: #7dd3fc;
}

/* Teléfono */
.mock--phone {
  position: absolute;
  right: -8px;
  bottom: -34px;
  width: 178px;
  padding: 7px;
  border-radius: 30px;
  background: linear-gradient(155deg, #263049, #0a0f1e 60%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 40px 70px -32px rgba(5, 10, 25, 0.7);
  transform: rotate(3.5deg);
  animation: floaty 7s ease-in-out infinite;
}

.phone__screen {
  position: relative;
  border-radius: 24px;
  background: var(--bg-elev);
  padding: 12px 11px 14px;
  overflow: hidden;
}

.phone__screen::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 50%;
  width: 46px;
  height: 5px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: var(--line-strong);
}

.phone__status {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 0 2px;
  font-size: 0.5rem;
  font-weight: 700;
  color: var(--muted);
}

.phone__hi {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.phone__balance {
  margin-top: 7px;
  padding: 10px;
  border-radius: 12px;
  background: var(--grad);
  color: #fff;
  box-shadow: 0 10px 18px -12px rgba(79, 70, 229, 0.9);
}

.phone__balance span {
  display: block;
  font-size: 0.5rem;
  opacity: 0.85;
}

.phone__balance strong {
  display: block;
  font-size: 0.94rem;
  letter-spacing: -0.03em;
}

.phone__balance em {
  font-style: normal;
  font-size: 0.48rem;
  font-weight: 700;
  opacity: 0.9;
}

.phone__actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-top: 9px;
}

.phone__actions span {
  aspect-ratio: 1;
  border-radius: 9px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.phone__list {
  margin-top: 9px;
  display: grid;
  gap: 5px;
}

.phone__list div {
  height: 22px;
  border-radius: 7px;
  background: var(--surface-2);
}

@keyframes floaty {
  0%,
  100% {
    transform: rotate(3.5deg) translateY(0);
  }
  50% {
    transform: rotate(2.5deg) translateY(-9px);
  }
}

.mock--float {
  position: absolute;
  top: 14px;
  left: -14px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px 9px 10px;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  animation: floaty2 6s ease-in-out infinite;
}

.mock--float strong {
  display: block;
  font-size: 0.7rem;
  letter-spacing: -0.01em;
}

.mock--float small {
  display: block;
  font-size: 0.6rem;
  color: var(--muted);
}

.float-ico {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.14);
  color: #16a34a;
  font-size: 0.72rem;
  font-weight: 800;
}

[data-theme="dark"] .float-ico {
  color: #4ade80;
}

@keyframes floaty2 {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

/* ---------- Logos / confianza ---------- */
.trust {
  border-block: 1px solid var(--line);
  background: var(--bg-elev);
}

.trust__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 40px;
  padding-block: 22px;
}

.trust__label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.trust__list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 30px;
  margin-left: auto;
}

.trust__list li {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink-soft);
  opacity: 0.85;
}

/* ---------- Servicios ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  gap: 18px;
}

.service {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 26px 24px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
}

.service::after {
  content: "";
  position: absolute;
  inset: auto -40% -70% auto;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.16), transparent 68%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.service:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
}

.service:hover::after {
  opacity: 1;
}

.icon-box {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: linear-gradient(140deg, rgba(99, 102, 241, 0.16), rgba(14, 165, 233, 0.14));
  border: 1px solid rgba(99, 102, 241, 0.16);
  color: var(--brand);
}

.icon-box svg {
  width: 22px;
  height: 22px;
}

.service h3 {
  margin-top: 20px;
  font-size: 1.13rem;
}

.service p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.service__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.service__tags li {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-soft);
}

/* ---------- Proceso ---------- */
.process {
  background: var(--bg-elev);
  border-block: 1px solid var(--line);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  counter-reset: step;
}

.step {
  position: relative;
  padding-top: 30px;
}

.step::before {
  content: "";
  position: absolute;
  top: 7px;
  left: 0;
  right: -22px;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

.step:last-child::before {
  background: linear-gradient(90deg, var(--line-strong), transparent 70%);
}

.step__num {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 2px solid var(--brand);
  background: var(--bg-elev);
}

.step h3 {
  margin-top: 12px;
  font-size: 1.04rem;
}

.step p {
  margin-top: 8px;
  font-size: 0.92rem;
  color: var(--muted);
}

/* ---------- Proyectos ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.project {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.project:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.project__thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 22px;
  background: linear-gradient(140deg, #6366f1, #0ea5e9 62%, #14b8a6);
}

.project:nth-child(2) .project__thumb {
  background: linear-gradient(140deg, #0f172a, #334155 55%, #0ea5e9);
}

.project:nth-child(3) .project__thumb {
  background: linear-gradient(140deg, #7c3aed, #db2777 70%, #f59e0b);
}

.project__thumb::before {
  content: "";
  position: absolute;
  width: 60%;
  aspect-ratio: 1;
  top: -22%;
  right: -12%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  filter: blur(2px);
}

.mini {
  position: relative;
  width: 100%;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 30px -18px rgba(4, 10, 24, 0.7);
  padding: 10px;
  display: grid;
  gap: 7px;
  transform: translateY(2px);
}

.mini__head {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mini__head span {
  height: 7px;
  border-radius: 4px;
  background: #cbd5e1;
}

.mini__head span:first-child {
  width: 34%;
  background: #4f46e5;
}

.mini__head span:last-child {
  width: 16%;
  margin-left: auto;
  background: #e2e8f0;
}

.mini__row {
  height: 9px;
  border-radius: 5px;
  background: #eef2f8;
}

.mini__row--short {
  width: 62%;
}

.mini__blocks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.mini__blocks span {
  height: 26px;
  border-radius: 6px;
  background: linear-gradient(180deg, #eef2ff, #e0e7ff);
}

.mini__bars {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 40px;
  padding-top: 4px;
}

.mini__bars span {
  flex: 1;
  border-radius: 3px 3px 2px 2px;
  background: linear-gradient(180deg, #818cf8, #6366f1);
}

.project__body {
  padding: 20px 22px 22px;
}

.project__kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
}

.project__body h3 {
  margin-top: 8px;
  font-size: 1.08rem;
}

.project__body p {
  margin-top: 8px;
  font-size: 0.93rem;
  color: var(--muted);
}

.project__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.project__tags li {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ink-soft);
}

/* ---------- Stack ---------- */
.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.chip {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.chip:hover {
  border-color: var(--brand);
  color: var(--brand);
  transform: translateY(-2px);
}

/* ---------- Sobre nosotros ---------- */
.about {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

.about__text p + p {
  margin-top: 16px;
}

.about__text p {
  color: var(--muted);
  font-size: 1.02rem;
}

.about__panel {
  position: relative;
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.about__panel::before {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.22), transparent 70%);
}

.checklist {
  display: grid;
  gap: 14px;
  position: relative;
}

.checklist li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.95rem;
}

.checklist svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--teal);
}

.checklist strong {
  display: block;
  font-size: 0.97rem;
}

.checklist span {
  color: var(--muted);
  font-size: 0.89rem;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: clamp(36px, 5vw, 56px);
  padding-top: clamp(28px, 4vw, 40px);
  border-top: 1px solid var(--line);
}

.fact strong {
  display: block;
  font-size: 1.28rem;
  letter-spacing: -0.03em;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.fact span {
  display: block;
  margin-top: 4px;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ---------- FAQ ---------- */
.faq {
  max-width: 840px;
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq details:first-child {
  border-top: 1px solid var(--line);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 4px;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  cursor: pointer;
  list-style: none;
}

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

.faq summary::after {
  content: "";
  flex: none;
  width: 11px;
  height: 11px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.25s ease;
}

.faq details[open] summary::after {
  transform: rotate(-135deg) translateY(-2px);
}

.faq details p {
  padding: 0 4px 22px;
  color: var(--muted);
  font-size: 0.96rem;
  max-width: 72ch;
}

/* ---------- Contacto ---------- */
.contact {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  background: var(--bg-elev);
}

.contact__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 5vw, 60px);
  align-items: start;
}

.contact__info {
  position: sticky;
  top: calc(var(--header-h) + 32px);
}

.contact__info h2 {
  margin-top: 4px;
}

.contact__info > p {
  margin-top: 16px;
  color: var(--muted);
  max-width: 46ch;
}

.info-list {
  display: grid;
  gap: 4px;
  margin-top: 30px;
}

.info-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.info-item:first-child {
  border-top: 1px solid var(--line);
}

.info-item svg {
  width: 19px;
  height: 19px;
  margin-top: 3px;
  color: var(--brand);
  flex: none;
}

.info-item small {
  display: block;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.info-item div > span,
.info-item div > a,
.email-slot {
  display: block;
  margin-top: 2px;
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--ink);
}

.info-item .email-slot {
  display: inline-block;
}

.email-slot a {
  color: var(--brand);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(79, 70, 229, 0.35);
  text-underline-offset: 3px;
}

.email-slot a:hover {
  text-decoration-color: currentColor;
}

.email-fallback {
  display: inline-flex;
  align-items: center;
}

.email-fallback img {
  height: 18px;
  width: auto;
}

[data-theme="dark"] .email-fallback img {
  filter: invert(1);
}

.copy-email {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  vertical-align: middle;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.copy-email:hover {
  color: var(--brand);
  border-color: var(--brand);
}

.copy-email svg {
  width: 12px;
  height: 12px;
}

/* Formulario */
.form-card {
  padding: clamp(22px, 3.4vw, 34px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  display: grid;
  gap: 6px;
}

.field--full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.field label .req {
  color: #e11d48;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 0.94rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
  appearance: none;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%235b6580' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.14);
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
  opacity: 0.75;
}

.check-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  grid-column: 1 / -1;
  font-size: 0.84rem;
  color: var(--muted);
}

.check-row input {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: var(--brand);
  flex: none;
}

.check-row a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
}

.form-note {
  font-size: 0.8rem;
  color: var(--muted);
  max-width: 34ch;
}

.form-status {
  display: none;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 11px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #15803d;
  font-size: 0.88rem;
}

[data-theme="dark"] .form-status {
  color: #86efac;
}

.form-status.is-visible {
  display: block;
}

/* ---------- CTA ---------- */
.cta {
  position: relative;
  margin-block: clamp(48px, 7vw, 88px);
  padding: clamp(32px, 5vw, 56px);
  border-radius: 26px;
  overflow: hidden;
  background: linear-gradient(125deg, #1e1b4b, #0f172a 55%, #082f49);
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: var(--shadow-lg);
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 15% 20%, rgba(99, 102, 241, 0.55), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(20, 184, 166, 0.4), transparent 45%);
}

.cta > * {
  position: relative;
}

.cta h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
}

.cta p {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.72);
  max-width: 52ch;
}

.cta .btn--primary {
  background: #fff;
  color: #1e1b4b;
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.6);
}

/* ---------- Footer ---------- */
.site-footer {
  background: #070b16;
  color: #a9b4cd;
  padding-block: 60px 28px;
}

.footer__top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer .brand {
  color: #fff;
}

.site-footer .brand__text small {
  color: #7d89a6;
}

.footer__about {
  margin-top: 16px;
  max-width: 38ch;
  font-size: 0.92rem;
  color: #8d99b5;
}

.footer__col h3 {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 14px;
}

.footer__col ul {
  display: grid;
  gap: 9px;
}

.footer__col a,
.footer__col button {
  font-size: 0.92rem;
  color: #a9b4cd;
  transition: color 0.18s ease;
  text-align: left;
  padding: 0;
}

.footer__col a:hover,
.footer__col button:hover {
  color: #fff;
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 24px;
  font-size: 0.82rem;
  color: #7d89a6;
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}

.footer__legal a:hover {
  color: #fff;
}

.footer__legal a[aria-current="page"] {
  color: #fff;
}

/* ---------- Cookies ---------- */
.cookie-banner {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: min(940px, calc(100% - 28px));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: cookieIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cookieIn {
  from {
    opacity: 0;
    transform: translate(-50%, 16px);
  }
}

.cookie-banner__text {
  flex: 1 1 380px;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.5;
}

.cookie-banner__text strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.92rem;
  color: var(--ink);
}

.cookie-banner__text a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cookie-banner__actions .btn {
  padding: 0.62rem 1.05rem;
  font-size: 0.84rem;
}

.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(6, 10, 22, 0.58);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
}

.cookie-modal[hidden] {
  display: none;
}

.cookie-dialog {
  width: min(560px, 100%);
  max-height: min(86vh, 760px);
  overflow: auto;
  padding: 26px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.cookie-dialog h2 {
  font-size: 1.32rem;
}

.cookie-dialog > p {
  margin-top: 10px;
  font-size: 0.89rem;
  color: var(--muted);
}

.cookie-group {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.cookie-group:first-of-type {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.cookie-group strong {
  display: block;
  font-size: 0.94rem;
}

.cookie-group p {
  margin-top: 3px;
  font-size: 0.82rem;
  color: var(--muted);
  max-width: 40ch;
}

.switch {
  position: relative;
  flex: none;
  width: 44px;
  height: 25px;
  margin-top: 3px;
}

.switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--line-strong);
  transition: background-color 0.2s ease;
  pointer-events: none;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease;
}

.switch input:checked + span {
  background: var(--brand);
}

.switch input:checked + span::after {
  transform: translateX(19px);
}

.switch input:disabled + span {
  opacity: 0.65;
}

.switch input:focus-visible + span {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.cookie-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.cookie-dialog__actions .btn {
  flex: 1 1 150px;
}

body.no-scroll {
  overflow: hidden;
}

/* ---------- Páginas legales ---------- */
.page-hero {
  position: relative;
  padding-block: clamp(40px, 6vw, 72px) clamp(28px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
  overflow: hidden;
}

.page-hero::after {
  content: "";
  position: absolute;
  top: -140px;
  right: -80px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.16), transparent 68%);
  pointer-events: none;
}

.page-hero h1 {
  margin-top: 14px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.page-hero p {
  margin-top: 12px;
  color: var(--muted);
  max-width: 66ch;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--brand);
}

.breadcrumb span[aria-current] {
  color: var(--ink-soft);
}

.legal-layout {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  padding-block: clamp(36px, 5vw, 56px) clamp(64px, 8vw, 100px);
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: calc(var(--header-h) + 28px);
  font-size: 0.87rem;
}

.legal-toc h2 {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.legal-toc ol {
  display: grid;
  gap: 2px;
  counter-reset: toc;
}

.legal-toc a {
  display: block;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--muted);
  border-left: 2px solid transparent;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.legal-toc a:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.prose {
  max-width: 74ch;
}

.prose h2 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  margin-top: 2.6rem;
  padding-top: 0.4rem;
  scroll-margin-top: calc(var(--header-h) + 20px);
}

.prose h2:first-child {
  margin-top: 0;
}

.prose .updated + h2 {
  margin-top: 1.2rem;
}

.prose h3 {
  font-size: 1.05rem;
  margin-top: 1.7rem;
}

.prose p,
.prose li {
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.prose p {
  margin-top: 0.85rem;
}

.prose ul,
.prose ol {
  margin-top: 0.85rem;
  padding-left: 1.25rem;
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li {
  margin-top: 0.35rem;
  padding-left: 0.2rem;
}

.prose li::marker {
  color: var(--brand);
}

.prose a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose strong {
  color: var(--ink);
}

.prose .updated {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--muted);
}

.data-box {
  margin-top: 1.4rem;
  padding: 22px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.data-box dl {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 10px 20px;
  margin: 0;
  font-size: 0.94rem;
}

.data-box dt {
  font-weight: 600;
  color: var(--muted);
}

.data-box dd {
  margin: 0;
  color: var(--ink-soft);
}

.note {
  margin-top: 1.4rem;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(14, 165, 233, 0.28);
  border-left: 3px solid var(--brand-2);
  background: rgba(14, 165, 233, 0.07);
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.note strong {
  color: var(--ink);
}

.table-wrap {
  margin-top: 1.2rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.89rem;
  min-width: 520px;
}

th,
td {
  padding: 11px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

th {
  background: var(--surface-2);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: 0;
}

td {
  color: var(--ink-soft);
}

.prose .email-slot,
.note .email-slot {
  display: inline;
}

.prose .email-fallback,
.note .email-fallback {
  display: inline-flex;
  vertical-align: middle;
}

.prose code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  padding: 1px 5px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-soft);
}

/* ---------- Animaciones de entrada ---------- */
/* Solo se ocultan si JavaScript está disponible (clase .js en <html>) */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--d, 0ms);
}

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

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .hero__visual {
    min-height: 420px;
    max-width: 620px;
  }

  .hero__lead {
    max-width: 60ch;
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 22px;
  }

  .step::before {
    display: none;
  }

  .projects-grid {
    grid-template-columns: 1fr 1fr;
  }

  .projects-grid .project:last-child {
    grid-column: 1 / -1;
  }

  .projects-grid .project:last-child .project__thumb {
    aspect-ratio: 21 / 8;
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: grid;
  }

  .nav-links {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: 55;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0;
    padding: 10px 20px 22px;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 1rem;
  }

  .nav-actions {
    margin-left: auto;
  }

  .nav-actions .btn {
    display: none;
  }

  .about,
  .contact__grid {
    grid-template-columns: 1fr;
  }

  .contact__info {
    position: static;
  }

  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-toc {
    position: static;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
  }

  .legal-toc ol {
    grid-template-columns: 1fr 1fr;
    column-gap: 8px;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }

  .hero {
    padding-top: 32px;
  }

  .hero__visual {
    min-height: 380px;
  }

  .mock--phone {
    width: 150px;
    bottom: -22px;
    right: -4px;
  }

  .mock--float {
    left: -6px;
    top: 4px;
    padding: 8px 11px 8px 9px;
  }

  .mock--float small {
    display: none;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .projects-grid .project:last-child .project__thumb {
    aspect-ratio: 16 / 10;
  }

  .facts {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .footer__top {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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

  .cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-banner {
    bottom: 10px;
    padding: 16px;
    max-height: 74vh;
    overflow-y: auto;
  }

  .cookie-banner__actions {
    width: 100%;
  }

  .cookie-banner__actions .btn {
    flex: 1 1 45%;
  }

  .data-box dl {
    grid-template-columns: 1fr;
    gap: 2px 0;
  }

  .data-box dd {
    margin-bottom: 10px;
  }

  .legal-toc ol {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero__visual {
    min-height: 320px;
  }

  .mock--phone {
    width: 128px;
  }

  .dash-rows {
    display: none;
  }

  .dash-chart {
    height: 70px;
  }

  .hero__actions .btn {
    width: 100%;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js .reveal,
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Impresión ---------- */
@media print {
  .site-header,
  .site-footer,
  .cookie-banner,
  .cookie-modal,
  .cta,
  .hero__visual,
  .legal-toc {
    display: none !important;
  }

  body {
    background: #fff;
    color: #000;
  }

  .legal-layout {
    display: block;
  }
}
