/* Página principal de giftapulse.com (index.html + home.js). Mismos colores,
   tipografía (Fraunces) y ritmo del "latido" que la app y la página del
   regalo. Pensada primero para el teléfono: una columna, botones grandes. */

:root {
  color-scheme: dark;
  --bg-top: #0d0716;
  --bg-mid: #241636;
  --violet: #7c4fa0;
  --violet-soft: #9a68c4;
  --gold: #e2b56e;
  --gold-deep: #c8913f;
  --text: #f3ecff;
  --text-dim: #c9bfe0;
  --line: rgba(243, 236, 255, 0.12);
  --surface: rgba(255, 255, 255, 0.05);
  --serif: "Fraunces", "Georgia", "Iowan Old Style", ui-serif, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --beat: 1.6s;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg-top);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Luz ambiente arriba, como en la página del regalo. */
body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 900px;
  background: radial-gradient(ellipse at 50% 0%, var(--violet) 0%, var(--bg-mid) 45%, var(--bg-top) 80%);
  z-index: -1;
}

a { color: inherit; }

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

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 16px;
  background: var(--text);
  color: var(--bg-top);
  padding: 8px 12px;
  z-index: 10;
}

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- barra superior ---------- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.top-cta {
  font-size: 14px;
  text-decoration: none;
  padding: 10px 16px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.top-cta:hover { border-color: var(--gold); }

/* ---------- portada ---------- */

.hero {
  display: grid;
  gap: 32px;
  align-items: center;
  padding-top: 24px;
  padding-bottom: 56px;
  text-align: center;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 8vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}
.hero h1 em {
  font-style: italic;
  color: var(--gold);
}

.hero .lead {
  font-size: clamp(17px, 2.4vw, 19px);
  color: var(--text-dim);
  max-width: 34em;
  margin: 0 auto 28px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 14px 24px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.btn-primary {
  color: #2a1606;
  background: linear-gradient(135deg, #f3d08e, var(--gold-deep));
  box-shadow: 0 10px 30px rgba(200, 145, 63, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(200, 145, 63, 0.45); }
.btn-ghost {
  border: 1px solid var(--line);
  background: var(--surface);
}
.btn-ghost:hover { border-color: var(--gold); }

.trust {
  margin: 20px 0 0;
  font-size: 14px;
  color: var(--text-dim);
}

/* El regalo que late (mismo dibujo que el ícono de la app). */
.mark {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto;
}
.mark img {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 48px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  animation: beat var(--beat) var(--ease-out) infinite;
}
.mark::before,
.mark::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 56px;
  border: 2px solid rgba(226, 181, 110, 0.5);
  animation: ring calc(var(--beat) * 2) var(--ease-out) infinite;
}
.mark::after { animation-delay: var(--beat); }

@keyframes beat {
  0%, 100% { transform: scale(1); }
  12% { transform: scale(1.045); }
  24% { transform: scale(1); }
  36% { transform: scale(1.025); }
}
@keyframes ring {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.35); opacity: 0; }
}

/* ---------- secciones ---------- */

section { padding: 56px 0; }

.section-head {
  text-align: center;
  max-width: 40em;
  margin: 0 auto 32px;
}
.section-head h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 5vw, 38px);
  line-height: 1.15;
  margin: 0 0 10px;
}
.section-head p {
  margin: 0;
  color: var(--text-dim);
}

.grid {
  display: grid;
  gap: 16px;
}

.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
}
.tile h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
  margin: 12px 0 6px;
}
.tile p {
  margin: 0;
  color: var(--text-dim);
  font-size: 15px;
}

.icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(226, 181, 110, 0.12);
  color: var(--gold);
}
.icon svg { width: 24px; height: 24px; }

/* Pasos numerados */
.steps { counter-reset: step; }
.steps .tile { position: relative; }
.steps .tile::after {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 18px;
  right: 20px;
  font-family: var(--serif);
  font-size: 40px;
  line-height: 1;
  color: rgba(243, 236, 255, 0.12);
}

/* ---------- aperturas ---------- */

.openings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.opening {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-height: 84px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  font-size: 15px;
  transition: border-color 0.2s, transform 0.2s var(--ease-out);
}
.opening:hover { border-color: var(--gold); transform: translateY(-2px); }
.opening .tag {
  flex: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  color: #2a1606;
  background: var(--gold);
}
.opening .tag.free {
  color: var(--text);
  background: rgba(124, 79, 160, 0.6);
}

/* ---------- gratis / premium ---------- */

.plans {
  display: grid;
  gap: 16px;
}
.plan {
  border-radius: 24px;
  padding: 26px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.plan.premium {
  border-color: rgba(226, 181, 110, 0.55);
  background: linear-gradient(160deg, rgba(226, 181, 110, 0.12), rgba(124, 79, 160, 0.14));
}
.plan h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 24px;
  margin: 0 0 14px;
}
.plan.premium h3 { color: var(--gold); }
.plan ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.plan li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 15px;
}
.plan li::before {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  border-radius: 50%;
  background: rgba(226, 181, 110, 0.18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e2b56e' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* ---------- descarga + redes ---------- */

.download {
  text-align: center;
  border-radius: 28px;
  padding: 40px 22px;
  border: 1px solid var(--line);
  background: radial-gradient(ellipse at 50% 0%, rgba(124, 79, 160, 0.45), transparent 70%), var(--surface);
}
.download h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 5vw, 36px);
  margin: 0 0 8px;
}
.download > p { color: var(--text-dim); margin: 0 0 22px; }

/* stores.js: botones de tienda */
.app-invite p { display: none; }
.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.store-btn {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 14px 22px;
  border-radius: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--bg-top);
  background: var(--text);
}
.store-btn.soon {
  color: var(--text-dim);
  background: transparent;
  border: 1px dashed var(--line);
}

.social {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 26px;
}
.social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  text-decoration: none;
  font-size: 15px;
}
.social a:hover { border-color: var(--gold); }
.social svg { width: 20px; height: 20px; }

/* ---------- pie ---------- */

footer {
  padding: 40px 0 48px;
  text-align: center;
  font-size: 14px;
  color: var(--text-dim);
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: center;
  margin-bottom: 12px;
}
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ---------- pantallas medianas y grandes ---------- */

@media (min-width: 720px) {
  .hero {
    grid-template-columns: 1.2fr 1fr;
    text-align: left;
    padding-top: 48px;
    padding-bottom: 80px;
  }
  .hero .lead { margin-left: 0; }
  .actions { justify-content: flex-start; }
  .mark { width: 280px; height: 280px; }
  .grid.three { grid-template-columns: repeat(3, 1fr); }
  .grid.four { grid-template-columns: repeat(2, 1fr); }
  .openings { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .opening { min-height: 92px; }
  .plans { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 960px) {
  .grid.four { grid-template-columns: repeat(4, 1fr); }
}

/* Movimiento reducido: sin latido ni anillos. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mark img, .mark::before, .mark::after { animation: none; }
  .btn, .opening { transition: none; }
}

.inline-link {
  color: var(--gold);
  font-weight: 600;
  text-underline-offset: 3px;
}
