/* ─────────────────────────────────────────────
   Tibidabo DPP — hoja de estilos
   ───────────────────────────────────────────── */

:root {
  --indigo-50:  #eef2ff;
  --indigo-100: #e0e7ff;
  --indigo-200: #c7d2fe;
  --indigo-400: #818cf8;
  --indigo-500: #6366f1;
  --indigo-600: #4f46e5;
  --indigo-700: #4338ca;
  --indigo-900: #312e81;

  --teal-500: #14b8a6;
  --amber-500: #f59e0b;

  --ink:      #0f1226;
  --ink-soft: #3d4166;
  --muted:    #6b7090;
  --line:     #e6e8f2;
  --bg:       #ffffff;
  --bg-soft:  #f7f8fc;

  --radius: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 18, 38, .06), 0 4px 12px rgba(15, 18, 38, .05);
  --shadow-md: 0 8px 24px rgba(15, 18, 38, .08), 0 2px 6px rgba(15, 18, 38, .04);
  --shadow-lg: 0 30px 70px rgba(49, 46, 129, .18), 0 8px 24px rgba(15, 18, 38, .08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  overflow-x: hidden;
}

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

a { color: inherit; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.025em; margin: 0; }

p { margin: 0; }

.wrap {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* ── Ambient glows ─────────────────────────── */
.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
}
.glow--a {
  width: 620px; height: 620px;
  top: -260px; right: -180px;
  background: radial-gradient(circle, rgba(99, 102, 241, .28), transparent 68%);
}
.glow--b {
  width: 520px; height: 520px;
  top: 340px; left: -240px;
  background: radial-gradient(circle, rgba(20, 184, 166, .20), transparent 68%);
}

/* ── Nav ───────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(14px);
  background: rgba(255, 255, 255, .78);
  border-bottom: 1px solid rgba(230, 232, 242, .9);
}
.nav__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand__mark {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(140deg, var(--indigo-500), var(--indigo-700));
  box-shadow: 0 4px 12px rgba(79, 70, 229, .32);
  flex: none;
}
.brand__mark svg { width: 19px; height: 19px; }
.brand__text strong { font-weight: 800; }

.nav__links {
  display: flex;
  gap: 26px;
  margin-left: auto;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-soft);
}
.nav__links a {
  text-decoration: none;
  position: relative;
  padding-block: 4px;
  transition: color .18s ease;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  border-radius: 2px;
  background: var(--indigo-600);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}
.nav__links a:hover { color: var(--indigo-700); }
.nav__links a:hover::after { transform: scaleX(1); }

/* ── Buttons ───────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, var(--indigo-600), var(--indigo-700));
  box-shadow: 0 8px 20px rgba(79, 70, 229, .28);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(79, 70, 229, .34); }
.btn--sm { padding: 9px 18px; font-size: 14px; margin-left: 4px; }
.btn--ghost {
  background: transparent;
  color: var(--indigo-700);
  box-shadow: none;
  border: 1px solid var(--indigo-200);
}
.btn--ghost:hover { background: var(--indigo-50); box-shadow: none; }
.btn--light { background: #fff; color: var(--indigo-700); box-shadow: 0 10px 26px rgba(0, 0, 0, .18); }
.btn--ghost-light { color: #fff; border-color: rgba(255, 255, 255, .38); background: transparent; }
.btn--ghost-light:hover { background: rgba(255, 255, 255, .12); }

/* ── Eyebrow ───────────────────────────────── */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--indigo-600);
  margin-bottom: 18px;
}
.eyebrow--center { display: flex; justify-content: center; }
.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--teal-500);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, .18);
}

/* ── Hero ──────────────────────────────────── */
.hero {
  position: relative;
  z-index: 1;
  padding-block: clamp(48px, 7vw, 92px) clamp(56px, 8vw, 104px);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero h1 {
  font-size: clamp(34px, 5.1vw, 60px);
  font-weight: 800;
  margin-bottom: 22px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(110deg, var(--indigo-600), var(--teal-500) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  font-size: clamp(16px, 1.55vw, 18.5px);
  color: var(--ink-soft);
  max-width: 54ch;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 40px;
  margin: 42px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.stats div { max-width: 15ch; }
.stats dt {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--indigo-700);
  line-height: 1.1;
}
.stats dd {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.4;
}

/* ── Phone mockup ──────────────────────────── */
.hero__device { display: grid; justify-items: center; gap: 18px; }
.phone {
  width: min(330px, 84vw);
  animation: float 7s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}
@media (prefers-reduced-motion: reduce) {
  .phone { animation: none; }
  html { scroll-behavior: auto; }
}

.phone__frame {
  position: relative;
  padding: 11px;
  border-radius: 46px;
  background: linear-gradient(160deg, #2b2f45, #111327 45%, #2b2f45);
  box-shadow: var(--shadow-lg);
}
.phone__notch {
  position: absolute;
  top: 20px; left: 50%;
  transform: translateX(-50%);
  width: 92px; height: 24px;
  border-radius: 999px;
  background: #0a0b16;
  z-index: 3;
}
.phone__screen {
  position: relative;
  border-radius: 36px;
  overflow: hidden;
  background: #eef0f7;
  aspect-ratio: 9 / 18.4;
  display: flex;
  flex-direction: column;
}

.status {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 24px 0;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
}
.status__icons { display: inline-flex; align-items: center; gap: 5px; }
.status__icons svg { fill: currentColor; }

.shot {
  position: relative;
  margin: 0;
  height: 40%;
  flex: none;
}
.shot svg { width: 100%; height: 100%; display: block; }
.shot__more {
  position: absolute;
  right: 14px; bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 32px; height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
  cursor: default;
}
.shot__more span {
  width: 3.5px; height: 3.5px;
  border-radius: 50%;
  background: var(--indigo-600);
}

.sheet {
  position: relative;
  margin-top: -26px;
  flex: 1;
  border-radius: 26px 26px 0 0;
  background: #fff;
  padding: 20px 16px 16px;
  text-align: center;
  overflow: hidden;
}
.sheet__id {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.sheet__model { font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.sheet__model:first-of-type { margin-top: 4px; }
.sheet__loc {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 9.5px;
  color: var(--ink-soft);
}
.sheet__state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 7px;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-soft);
}
.pulse {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .55);
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  70%  { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 16px;
}
.tile {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-sm);
  padding: 12px 10px;
  text-align: left;
  min-height: 108px;
  display: flex;
  flex-direction: column;
}
.tile__icon {
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 9px;
  background: var(--indigo-50);
  color: var(--indigo-600);
  margin-bottom: auto;
}
.tile__icon svg { width: 17px; height: 17px; }
.tile__kicker {
  margin-top: 12px;
  font-size: 7.5px;
  font-weight: 600;
  color: var(--indigo-600);
  line-height: 1.35;
}
.tile__title { font-size: 12px; font-weight: 500; margin-top: 2px; }

.memory {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 9px;
  padding: 12px 11px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-sm);
  text-align: left;
}
.memory__thumbs { position: relative; width: 52px; height: 48px; flex: none; }
.memory__thumbs i {
  position: absolute;
  width: 28px; height: 32px;
  border-radius: 5px;
  border: 1.5px solid #fff;
  background: linear-gradient(150deg, var(--c1), var(--c2));
  box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
}
.memory__thumbs i:nth-child(1) { left: 0;   top: 9px; transform: rotate(-9deg); }
.memory__thumbs i:nth-child(2) { left: 12px; top: 5px; transform: rotate(3deg); }
.memory__thumbs i:nth-child(3) { left: 24px; top: 10px; transform: rotate(11deg); }
.memory__body { min-width: 0; }
.memory__kicker { font-size: 7.5px; font-weight: 600; color: var(--indigo-600); }
.memory__title { font-size: 12px; font-weight: 600; margin-top: 1px; }
.memory__text { font-size: 7.5px; color: var(--muted); line-height: 1.5; margin-top: 3px; }

.sheet__link {
  margin-top: 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--indigo-600);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.device__caption {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  max-width: 34ch;
}

/* ── Sections ──────────────────────────────── */
.section {
  position: relative;
  z-index: 1;
  padding-block: clamp(64px, 8vw, 110px);
}
.section--soft { background: var(--bg-soft); border-block: 1px solid var(--line); }
.section--dark {
  background: linear-gradient(165deg, #191c38, var(--indigo-900) 55%, #241f5c);
  color: #fff;
}
.section--dark .section__sub { color: rgba(226, 229, 255, .78); }
.section--dark .eyebrow { color: var(--indigo-200); }

.section__title {
  font-size: clamp(27px, 3.5vw, 40px);
  font-weight: 800;
  text-align: center;
  max-width: 20ch;
  margin-inline: auto;
}
.section__title--left { text-align: left; margin-inline: 0; max-width: 16ch; }
.section__sub {
  margin: 20px auto 0;
  max-width: 68ch;
  text-align: center;
  font-size: 16.5px;
  color: var(--ink-soft);
}
.section__sub--left { text-align: left; margin-inline: 0; }

/* ── Cards ─────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 22px;
  margin-top: 52px;
}
.card {
  padding: 30px 26px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--indigo-200);
}
.card__icon {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 14px;
  margin-bottom: 18px;
}
.card__icon svg { width: 23px; height: 23px; }
.card__icon--indigo { background: var(--indigo-50); color: var(--indigo-600); }
.card__icon--teal   { background: #e3f8f4; color: #0f9488; }
.card__icon--amber  { background: #fef3e2; color: #d97706; }
.card h3 { font-size: 19px; font-weight: 700; margin-bottom: 9px; }
.card p { font-size: 15px; color: var(--ink-soft); }

/* ── Layers ────────────────────────────────── */
.layers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
  gap: 20px;
  margin-top: 52px;
}
.layer {
  position: relative;
  padding: 30px 26px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .055);
  backdrop-filter: blur(6px);
}
.layer--accent {
  border-color: rgba(129, 140, 248, .55);
  background: linear-gradient(170deg, rgba(99, 102, 241, .24), rgba(255, 255, 255, .05));
  box-shadow: 0 16px 40px rgba(0, 0, 0, .25);
}
.layer__num {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--indigo-200);
}
.layer h3 { font-size: 21px; font-weight: 700; margin-top: 10px; }
.layer__who {
  font-size: 12.5px;
  color: rgba(226, 229, 255, .62);
  margin-top: 5px;
}
.layer ul {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 11px;
}
.layer li {
  position: relative;
  padding-left: 24px;
  font-size: 14.5px;
  color: rgba(232, 234, 255, .9);
}
.layer li::before {
  content: "";
  position: absolute;
  left: 4px; top: 8px;
  width: 7px; height: 7px;
  border-radius: 2px;
  background: var(--indigo-400);
  transform: rotate(45deg);
}

/* ── Steps ─────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 26px;
  margin: 56px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps li { position: relative; padding-top: 6px; }
.steps li::after {
  content: "";
  position: absolute;
  top: 24px; left: 56px; right: -13px;
  height: 1px;
  background: linear-gradient(90deg, var(--indigo-200), transparent);
}
.steps li:last-child::after { display: none; }
.steps__n {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(140deg, var(--indigo-500), var(--indigo-700));
  box-shadow: 0 8px 18px rgba(79, 70, 229, .26);
}
.steps h3 { font-size: 17.5px; font-weight: 700; margin: 18px 0 8px; }
.steps p { font-size: 14.5px; color: var(--ink-soft); }

/* ── Normativa ─────────────────────────────── */
.normative {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
}
.normative .btn { margin-top: 28px; }
.facts {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}
.facts li {
  padding: 18px 20px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  font-size: 14.5px;
  color: var(--ink-soft);
}
.facts strong { color: var(--ink); font-weight: 700; }

/* ── CTA ───────────────────────────────────── */
.cta {
  position: relative;
  z-index: 1;
  padding-block: clamp(64px, 8vw, 104px);
  background: linear-gradient(135deg, var(--indigo-700), #5b3fd1 48%, #0f766e);
  color: #fff;
}
.cta__inner { text-align: center; }
.cta h2 {
  font-size: clamp(26px, 3.6vw, 40px);
  font-weight: 800;
  max-width: 20ch;
  margin-inline: auto;
}
.cta p {
  margin: 18px auto 0;
  max-width: 62ch;
  font-size: 16.5px;
  color: rgba(255, 255, 255, .86);
}
.cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
}

/* ── Footer ────────────────────────────────── */
.foot {
  position: relative;
  z-index: 1;
  padding-block: 46px;
  background: #0f1226;
  color: rgba(226, 229, 255, .7);
}
.foot__inner { display: grid; gap: 10px; justify-items: center; text-align: center; }
.brand--foot { color: #fff; }
.foot p { font-size: 14.5px; }
.foot__meta { font-size: 13px; color: rgba(226, 229, 255, .45); }

/* ── Responsive ────────────────────────────── */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__copy { text-align: center; }
  .hero__copy .lead { margin-inline: auto; }
  .eyebrow { justify-content: center; }
  .hero__cta { justify-content: center; }
  .stats { justify-content: center; text-align: center; }
  .stats div { max-width: none; }
  .normative { grid-template-columns: 1fr; }
  .section__title--left, .section__sub--left { text-align: center; margin-inline: auto; max-width: 22ch; }
  .section__sub--left { max-width: 68ch; }
  .normative .eyebrow { justify-content: center; display: flex; }
  .normative .btn { display: flex; width: fit-content; margin-inline: auto; }
  .steps li::after { display: none; }
}

@media (max-width: 720px) {
  .nav__links { display: none; }
  .btn--sm { margin-left: auto; }
}
