/* ==========================================================
   Digital Store · Página de enlaces
   Mobile first · escritorio desde 960px
   ========================================================== */

:root {
  /* Marca */
  --sky: #BFE6F8;          /* fondo del encabezado / panel */
  --orange: #F7931E;       /* acento naranja */
  --blue: #0A76B3;         /* íconos y enlaces azules */
  --wa: #25D366;           /* verde WhatsApp */
  --wa-dark: #128C4A;
  --wa-text: #0B5E34;
  --orange-ink: #B85A00;   /* íconos naranja sobre tinte */
  --orange-text: #9A4A00;  /* texto naranja legible sobre blanco */

  /* Neutros */
  --bg: #F5FAFD;
  --white: #FFFFFF;
  --ink: #0C1424;
  --ink-2: #24344F;
  --muted: #4A5670;
  --muted-2: #5A6680;
  --chev: #8793A8;
  --line: #D6E9F4;
  --line-soft: #EAF3F9;
  --tint-blue: #E1F3FC;
  --tint-orange: #FFF0DE;

  /* Sombras internas de los botones de acción */
  --glow-wa: inset 0 -18px 24px -18px rgba(37, 211, 102, .45);
  --glow-orange: inset 0 -18px 24px -18px rgba(247, 147, 30, .45);

  --font-display: 'Sora', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 12px; }

h1, h2, p { margin: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Íconos ---------- */
.ic {
  width: 22px; height: 22px; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.ic-sm { width: 16px; height: 16px; }
.ic-blue { color: var(--blue); }
.ic-chev { color: var(--chev); }

/* ---------- Layout base (móvil) ---------- */
.page {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.side { position: relative; }

/* ---------- Encabezado ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--sky);
  padding: 40px 20px 76px;
  border-radius: 0 0 32px 32px;
  text-align: center;
}

.hex-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hex { position: absolute; height: auto; }
.hex polygon { stroke-linejoin: round; }
.hex-1 { width: 150px; top: -60px; right: -44px; opacity: .92; }
.hex-1 polygon { fill: var(--orange); }
.hex-2 { width: 112px; top: 168px; left: -46px; opacity: .8; }
.hex-2 polygon { fill: none; stroke: var(--white); stroke-width: 10; }
.hex-3 { width: 40px; top: 34px; left: 28px; opacity: .85; }
.hex-3 polygon { fill: var(--white); }
.hex-4 { width: 34px; top: 214px; right: 30px; opacity: .9; }
.hex-4 polygon { fill: none; stroke: var(--orange); stroke-width: 12; }

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.logo, .logo-img {
  width: 88px; height: 88px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 6px 18px rgba(10, 118, 179, .18);
}
.logo {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 800; font-size: 28px; letter-spacing: -1px;
  color: var(--blue);
}
.logo span { color: var(--orange); }
/* Logo sin tarjeta: PNG transparente a tamaño completo */
.logo-img {
  display: block; flex-shrink: 0; object-fit: contain;
  width: 280px; height: auto;
  padding: 0; border-radius: 0;
  background: none; box-shadow: none;
}

.intro { display: flex; flex-direction: column; gap: 6px; }
.intro h1 {
  font-family: var(--font-display);
  font-weight: 700; font-size: 28px; letter-spacing: -.5px;
  line-height: 1.1;
}
.intro p { font-size: 15px; line-height: 1.5; color: var(--ink-2); max-width: 300px; margin: 0 auto; }

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--white);
  font-size: 13px; font-weight: 500;
}
.chip .ic { width: 16px; height: 16px; }

/* ---------- Bloque de contacto ---------- */
.contact {
  position: relative;
  z-index: 2;
  margin: -48px 20px 0;
  padding: 16px;
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 10px 28px rgba(10, 118, 179, .12);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn {
  display: flex; align-items: center; gap: 14px;
  min-height: 68px;
  padding: 0 16px 0 12px;
  border-radius: 16px;
  background: var(--white);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-icon {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.btn-icon .ic { width: 24px; height: 24px; }
.btn-icon img { display: block; width: 26px; height: 26px; object-fit: contain; }
.btn-text { display: flex; flex-direction: column; flex-grow: 1; min-width: 0; }
.btn-title { font-weight: 700; font-size: 16px; color: var(--ink); }
.btn-sub { font-size: 13px; }

.btn-wa {
  border: 1px solid rgba(37, 211, 102, .28);
  box-shadow: var(--glow-wa);
  color: var(--wa-text);
}
.btn-wa .btn-icon { background: var(--wa); color: var(--white); }
.btn-wa .btn-icon { background: none; }
.btn-wa .btn-icon img { width: 100%; height: 100%; }
.btn-wa .btn-sub { color: var(--wa-text); }

.btn-credit {
  border: 1px solid rgba(247, 147, 30, .3);
  box-shadow: var(--glow-orange);
  color: var(--orange-text);
}
.btn-credit .btn-icon { background: var(--orange); color: #1F1405; }
.btn-credit .btn-icon .ic { width: 22px; height: 22px; }
.btn-credit .btn-sub { color: var(--orange-text); }

.locales { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.btn-local {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px;
  border-radius: 12px;
  background: var(--white);
  border: 1px solid rgba(37, 211, 102, .28);
  box-shadow: var(--glow-wa);
  font-weight: 600; font-size: 15px;
  transition: transform .15s ease;
}
.btn-local .ic { width: 20px; height: 20px; color: var(--wa-dark); }
.btn-local img { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; }
.desk-only { display: none; }

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

/* ---------- Contenido ---------- */
.content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px 20px 0;
}

.block { display: flex; flex-direction: column; gap: 12px; }
.block-head { display: flex; align-items: center; justify-content: space-between; }

.title {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 18px; font-weight: 700;
}
.title::before {
  content: "";
  width: 6px; height: 20px; border-radius: 3px;
}
.title-orange::before { background: var(--orange); }
.title-sky::before { background: var(--sky); }

/* Categorías */
.cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cat {
  display: flex; flex-direction: column; gap: 10px;
  min-height: 96px;
  padding: 16px;
  border-radius: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  font-weight: 600; font-size: 15px;
  transition: border-color .15s ease, transform .15s ease;
}
.cat:hover { border-color: var(--blue); transform: translateY(-1px); }
.cat-ic {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--tint-blue); color: var(--blue);
}
/* Alternancia azul/naranja en 2 columnas: b o / o b / b o */
.cat:nth-child(4n+2) .cat-ic,
.cat:nth-child(4n+3) .cat-ic { background: var(--tint-orange); color: var(--orange-ink); }

.see-all {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-weight: 600; font-size: 15px; color: var(--blue);
}
.see-all-block { min-height: 48px; border-radius: 12px; border: 1.5px solid var(--blue); }
.see-all-inline { display: none; }

/* Soporte */
.support {
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.sup {
  display: flex; align-items: center; gap: 14px;
  min-height: 60px;
  padding: 0 16px;
  font-weight: 500; font-size: 15px;
  border-bottom: 1px solid var(--line-soft);
}
.sup:last-child { border-bottom: 0; }
.sup span { flex-grow: 1; }
.sup:hover span { color: var(--blue); }

/* Pie */
.foot {
  margin-top: auto;
  padding: 8px 0 32px;
  display: flex; flex-direction: column; align-items: center; gap: 24px;
  text-align: center;
}
.social { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.social-label { font-size: 14px; font-weight: 600; color: var(--muted); }
.social-row { display: flex; gap: 12px; }
.soc {
  width: 52px; height: 52px; border-radius: 16px;
  background: var(--sky); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  transition: transform .15s ease;
}
.soc:hover { transform: translateY(-2px); }
.legal { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted-2); }
.legal-links { display: flex; justify-content: center; gap: 14px; }
.legal-links a { text-decoration: underline; }

/* ==========================================================
   Escritorio
   ========================================================== */
@media (min-width: 960px) {
  body { font-size: 16px; }

  .page {
    max-width: 1440px;
    display: grid;
    grid-template-columns: minmax(400px, 520px) minmax(0, 1fr);
    gap: 32px;
    padding: 32px;
  }

  /* Panel izquierdo fijo */
  .side {
    position: sticky;
    top: 32px;
    align-self: start;
    height: calc(100vh - 64px);
    min-height: 720px;
    overflow: hidden;
    background: var(--sky);
    border-radius: 28px;
    padding: 48px;
    display: flex;
    flex-direction: column;
  }

  .hero {
    position: static;           /* los hexágonos se posicionan contra .side */
    overflow: visible;
    background: none;
    padding: 0;
    border-radius: 0;
    text-align: left;
  }
  .hex-1 { width: 230px; top: -90px; right: -70px; }
  .hex-2 { width: 170px; top: 250px; right: -78px; left: auto; }
  .hex-2 polygon { stroke-width: 8; }
  .hex-3 { width: 58px; top: 40px; left: 52px; right: auto; }
  .hex-4 { width: 44px; top: 470px; right: 150px; }

  .hero-content { align-items: flex-start; gap: 20px; }
  .logo, .logo-img { width: 96px; height: 96px; border-radius: 26px; }
  .logo-img { width: 320px; height: auto; border-radius: 0; align-self: center; }
  .logo { font-size: 32px; }
  .intro { gap: 10px; }
  .intro h1 { font-size: 44px; letter-spacing: -1px; line-height: 1.05; }
  .intro p { font-size: 17px; line-height: 1.55; max-width: 380px; margin: 0; }
  .chip { font-size: 14px; }

  .contact {
    margin: auto 0 0;          /* empuja el bloque al fondo del panel */
    padding: 0;
    background: none;
    box-shadow: none;
    border-radius: 0;
    gap: 12px;
  }
  .btn { min-height: 76px; padding: 0 20px 0 14px; border-radius: 18px; gap: 16px; }
  .btn-icon { width: 48px; height: 48px; }
  .btn-icon .ic { width: 26px; height: 26px; }
  .btn-credit .btn-icon .ic { width: 24px; height: 24px; }
  .btn-title { font-size: 17px; }
  .btn-sub { font-size: 14px; }
  .locales { gap: 12px; }
  .btn-local { min-height: 56px; border-radius: 14px; }
  .desk-only { display: inline; }

  /* Columna derecha */
  .content { padding: 16px 16px 0 0; gap: 36px; }
  .block { gap: 16px; }
  .title { font-size: 22px; gap: 12px; }
  .title::before { height: 24px; }

  .see-all-inline { display: flex; }
  .see-all-block { display: none; }

  .cats { gap: 14px; }
  .cat {
    flex-direction: row; align-items: center; gap: 14px;
    min-height: 0; padding: 20px; border-radius: 18px; font-size: 16px;
  }
  .cat-ic { width: 48px; height: 48px; border-radius: 12px; }
  .cat-ic .ic { width: 24px; height: 24px; }

  .support {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px;
    background: none; border: 0; border-radius: 0;
  }
  .sup {
    min-height: 68px; padding: 0 20px; font-size: 16px;
    background: var(--white); border: 1px solid var(--line); border-radius: 16px;
  }
  .sup:last-child { border-bottom: 1px solid var(--line); }

  .foot {
    flex-direction: row; justify-content: space-between; align-items: center;
    padding: 20px 0 16px;
    border-top: 1px solid var(--line);
    text-align: left;
  }
  .social-label { display: none; }
  .social-row { gap: 10px; }
  .soc { width: 48px; height: 48px; border-radius: 14px; }
  .soc .ic { width: 20px; height: 20px; }
  .legal { flex-direction: row; align-items: center; gap: 18px; font-size: 14px; }
  .legal-links { gap: 18px; }
}

/* Pie en escritorio angosto: no cabe en una fila, se apila */
@media (min-width: 960px) and (max-width: 1199px) {
  .foot { flex-direction: column; align-items: flex-start; gap: 16px; }
  .legal { flex-wrap: wrap; gap: 8px 18px; }
}

/* Alternancia azul/naranja en 3 columnas: b o b / o b o */
@media (min-width: 1200px) {
  .cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cat:nth-child(n) .cat-ic { background: var(--tint-blue); color: var(--blue); }
  .cat:nth-child(even) .cat-ic { background: var(--tint-orange); color: var(--orange-ink); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
