/* =====================================================
   PORCELLO · LINKS — luxury dark + gold gradient
   Paleta: ink #232323 · cream #fcf8f1 · gold #C98C4C
   Tipografía: Grift
   ===================================================== */

/* ---------- FUENTES ---------- */
@font-face {
  font-family: 'Grift';
  src: url('../fonts/Grift-Light.woff2') format('woff2'),
       url('../fonts/Grift-Light.woff') format('woff');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Grift';
  src: url('../fonts/Grift-Regular.woff2') format('woff2'),
       url('../fonts/Grift-Regular.woff') format('woff');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Grift';
  src: url('../fonts/Grift-Medium.woff2') format('woff2'),
       url('../fonts/Grift-Medium.woff') format('woff');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Grift';
  src: url('../fonts/Grift-Bold.woff2') format('woff2'),
       url('../fonts/Grift-Bold.woff') format('woff');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Grift';
  src: url('../fonts/Grift-Black.woff2') format('woff2'),
       url('../fonts/Grift-Black.woff') format('woff');
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Grift';
  src: url('../fonts/Grift-Italic.woff2') format('woff2'),
       url('../fonts/Grift-Italic.woff') format('woff');
  font-weight: 400; font-style: italic; font-display: swap;
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ---------- TOKENS ---------- */
:root {
  --ink:        #232323;
  --ink-700:    #2c2c2c;
  --ink-900:    #1a1a1a;
  --cream:      #fcf8f1;
  --gold-1:     #E8C393;
  --gold-2:     #D9A267;
  --gold:       #C98C4C;
  --gold-3:     #A57339;

  --gold-grad:  linear-gradient(135deg, #E8C393 0%, #D9A267 35%, #C98C4C 70%, #A57339 100%);
  --gold-grad-soft: linear-gradient(135deg, rgba(232,195,147,.10) 0%, rgba(201,140,76,.16) 50%, rgba(165,115,57,.10) 100%);

  --radius:     16px;
  --radius-lg:  22px;
  --shadow:     0 20px 60px rgba(0,0,0,.45), 0 0 0 1px rgba(252,248,241,.04);
  --easing:     cubic-bezier(.22, 1, .36, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Grift', Georgia, serif;
  background: var(--ink);
  color: var(--cream);
  min-height: 100dvh;
  overflow-x: hidden;
  position: relative;
  letter-spacing: -0.005em;
}

::selection { background: var(--gold); color: var(--ink); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #161616; }
::-webkit-scrollbar-thumb { background: var(--gold-3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ============ FONDO DECORATIVO ============ */
.bg-decor {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.halo {
  position: absolute;
  width: 60vmax; height: 60vmax;
  border-radius: 50%;
  filter: blur(120px);
  opacity: .55;
  animation: float 18s ease-in-out infinite;
}
.halo--gold {
  top: -25vmax; left: -15vmax;
  background: radial-gradient(circle, rgba(201,140,76,.35), transparent 60%);
}
.halo--gold-2 {
  bottom: -25vmax; right: -15vmax;
  background: radial-gradient(circle, rgba(232,195,147,.22), transparent 60%);
  animation-delay: -9s;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(20px, -30px) scale(1.05); }
}
.grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1, 0 0 0 0 1, 0 0 0 0 1, 0 0 0 .25 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .08;
  mix-blend-mode: overlay;
}

/* ============ PRELOADER · Saisei (tres aros) ============ */
.cpl {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background-color: #1A1A1A;
  opacity: 1;
  transition: opacity .6s cubic-bezier(.22, 1, .36, 1);
}
.cpl.cpl--out {
  opacity: 0;
  pointer-events: none;
}
.cpl__halo {
  position: absolute; inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(201,140,76,0.12) 0%, transparent 60%);
}
.cpl__rings {
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.cpl__ring {
  position: absolute;
  width: 280px; height: 280px;
}
.cpl__ring svg { width: 100%; height: 100%; display: block; }

.cpl__ring--outer {
  width: 280px; height: 280px;
  animation: cplSpin 6s linear infinite;
}
.cpl__ring--middle {
  width: 220px; height: 220px;
  animation: cplSpinReverse 4s linear infinite;
}
.cpl__inner {
  position: absolute;
  width: 180px; height: 180px;
}

.cpl__progress {
  stroke-dasharray: 503;
  stroke-dashoffset: 503;
  animation: cplDrawArc 1.3s cubic-bezier(.22, 1, .36, 1) forwards;
}

.cpl__logo {
  position: relative; z-index: 10;
  width: 120px; height: 120px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transform: scale(.85);
  animation: cplLogoIn .7s cubic-bezier(.22, 1, .36, 1) forwards;
}
.cpl__logo img { width: 100%; height: 100%; display: block; }

.cpl__label {
  position: absolute;
  bottom: 3rem; left: 0; right: 0;
  text-align: center;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(252, 248, 241, 0.5);
  opacity: 0;
  transform: translateY(8px);
  animation: cplLabelIn .6s ease forwards .3s;
}

@media (min-width: 640px) {
  .cpl__ring--outer { width: 360px; height: 360px; }
  .cpl__ring--middle { width: 280px; height: 280px; }
  .cpl__inner { width: 220px; height: 220px; }
  .cpl__logo { width: 150px; height: 150px; }
  .cpl__label { font-size: 12px; }
}

@keyframes cplSpin {
  to { transform: rotate(360deg); }
}
@keyframes cplSpinReverse {
  to { transform: rotate(-360deg); }
}
@keyframes cplDrawArc {
  to { stroke-dashoffset: 0; }
}
@keyframes cplLogoIn {
  to { opacity: 1; transform: scale(1); }
}
@keyframes cplLabelIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ============ PAGE ============ */
.page {
  position: relative; z-index: 2;
  min-height: 100dvh;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 56px 22px 40px;
  display: flex; flex-direction: column;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .9s var(--easing), transform .9s var(--easing);
}
body.loaded .page {
  opacity: 1; transform: translateY(0);
}

/* ---------- HERO ---------- */
.hero {
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.logo-link {
  display: inline-block;
  transition: transform .5s var(--easing);
}
.logo-link:hover { transform: scale(1.02); }
.logo {
  width: clamp(220px, 60vw, 300px);
  height: auto;
  filter: drop-shadow(0 10px 30px rgba(201,140,76,.18));
}

.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border: 1px solid rgba(252,248,241,.10);
  background: rgba(252,248,241,.025);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(252,248,241,.65);
}
.badge__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #6ed27f;
  box-shadow: 0 0 0 3px rgba(110,210,127,.18);
  animation: blink 2s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: .35; }
}

.title {
  font-family: 'Grift', Georgia, serif;
  font-weight: 500;
  font-size: clamp(26px, 7vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-top: 4px;
}
.title em {
  font-style: italic; font-weight: 800;
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  display: inline-block;
}
.subtitle {
  font-size: 14px;
  color: rgba(252,248,241,.55);
  max-width: 32ch;
  line-height: 1.5;
}
.rule {
  width: 60px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin-top: 8px;
}

/* ---------- LINKS ---------- */
.links {
  margin-top: 38px;
  display: flex; flex-direction: column; gap: 12px;
}

.link {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: rgba(252,248,241,.035);
  border: 1px solid rgba(252,248,241,.08);
  color: var(--cream);
  overflow: hidden;
  transition: transform .45s var(--easing), border-color .35s, background .35s;
  isolation: isolate;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.link::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--gold-grad-soft);
  opacity: 0;
  transition: opacity .5s var(--easing);
  z-index: -1;
}
.link::after {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--gold-grad);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .5s var(--easing);
}
.link:hover {
  transform: translateY(-2px);
  border-color: rgba(232,195,147,.45);
  background: rgba(252,248,241,.05);
}
.link:hover::before { opacity: 1; }
.link:hover::after  { transform: scaleY(1); }
.link:active { transform: translateY(0); }

.link__icon {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(252,248,241,.04);
  border: 1px solid rgba(252,248,241,.08);
  color: var(--cream);
  transition: color .4s, border-color .4s, background .4s, transform .5s var(--easing);
  flex-shrink: 0;
}
.link__icon svg { width: 20px; height: 20px; }
.link:hover .link__icon {
  color: var(--gold-1);
  border-color: rgba(232,195,147,.4);
  background: rgba(201,140,76,.10);
  transform: rotate(-4deg) scale(1.04);
}

.link__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.link__label {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .02em;
}
.link__sub {
  font-size: 11.5px;
  color: rgba(252,248,241,.5);
  letter-spacing: .04em;
}
.link__arrow {
  font-size: 18px;
  color: rgba(252,248,241,.35);
  transition: color .4s, transform .5s var(--easing);
}
.link:hover .link__arrow {
  color: var(--gold-1);
  transform: translateX(4px);
}

/* ---------- LINK PRIMARY (TIENDA) ---------- */
.link--primary {
  background: linear-gradient(135deg, rgba(232,195,147,.14), rgba(201,140,76,.06));
  border-color: rgba(232,195,147,.35);
}
.link--primary .link__icon {
  background: var(--gold-grad);
  border-color: transparent;
  color: var(--ink);
  box-shadow: 0 6px 20px rgba(201,140,76,.35);
}
.link--primary .link__label { color: var(--cream); }
.link--primary .link__sub  { color: rgba(232,195,147,.7); }
.link--primary .link__arrow { color: var(--gold-1); }
.link--primary:hover {
  border-color: rgba(232,195,147,.7);
}

/* ---------- LINK WHATS ---------- */
.link--whats .link__icon {
  background: rgba(37, 211, 102, .12);
  border-color: rgba(37, 211, 102, .35);
  color: #25D366;
}
.link--whats:hover .link__icon {
  background: rgba(37, 211, 102, .18);
  border-color: rgba(37, 211, 102, .55);
  color: #4cd87f;
}

/* ---------- SHARE ---------- */
.share {
  margin-top: 28px;
  display: flex; justify-content: center;
}
.share__btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(252,248,241,.12);
  background: rgba(252,248,241,.03);
  color: rgba(252,248,241,.7);
  font-size: 12px; letter-spacing: .15em; text-transform: uppercase;
  transition: all .35s var(--easing);
}
.share__btn:hover {
  color: var(--gold-1);
  border-color: rgba(232,195,147,.5);
  background: rgba(201,140,76,.08);
}

/* ---------- FOOTER ---------- */
.footer {
  margin-top: auto;
  padding-top: 48px;
  text-align: center;
}
.footer__rule {
  width: 40px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232,195,147,.4), transparent);
  margin: 0 auto 18px;
}
.footer__copy {
  font-size: 12px; letter-spacing: .04em;
  color: rgba(252,248,241,.5);
}
.footer__copy strong {
  color: var(--cream);
  font-weight: 600;
}
.footer__sub {
  font-size: 10px; letter-spacing: .35em; text-transform: uppercase;
  color: rgba(252,248,241,.3);
  margin-top: 6px;
}

/* ---------- TOAST ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px;
  transform: translate(-50%, 30px);
  background: var(--ink);
  color: var(--cream);
  border: 1px solid rgba(232,195,147,.35);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  opacity: 0; pointer-events: none;
  z-index: 50;
  transition: all .4s var(--easing);
  box-shadow: 0 12px 30px rgba(0,0,0,.4);
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- REVEAL ---------- */
.reveal {
  opacity: 0; transform: translateY(14px);
  transition: opacity .8s var(--easing), transform .8s var(--easing);
}
body.loaded .reveal {
  opacity: 1; transform: translateY(0);
}
body.loaded .reveal:nth-child(1) { transition-delay: .35s; }
body.loaded .reveal:nth-child(2) { transition-delay: .55s; }
body.loaded .reveal:nth-child(3) { transition-delay: .75s; }
body.loaded .reveal:nth-child(4) { transition-delay: .9s; }

/* Stagger para los links individuales */
body.loaded .links .link {
  opacity: 0; transform: translateY(10px);
  animation: linkIn .7s var(--easing) forwards;
}
body.loaded .links .link:nth-child(1) { animation-delay: .65s; }
body.loaded .links .link:nth-child(2) { animation-delay: .73s; }
body.loaded .links .link:nth-child(3) { animation-delay: .81s; }
body.loaded .links .link:nth-child(4) { animation-delay: .89s; }
body.loaded .links .link:nth-child(5) { animation-delay: .97s; }
body.loaded .links .link:nth-child(6) { animation-delay: 1.05s; }
@keyframes linkIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 380px) {
  .page { padding: 40px 18px 32px; }
  .link { padding: 14px 14px; gap: 12px; }
  .link__icon { width: 38px; height: 38px; }
  .link__icon svg { width: 18px; height: 18px; }
  .link__label { font-size: 14px; }
}
@media (min-width: 768px) {
  .page { padding-top: 80px; }
  .logo { width: 320px; }
  .title { font-size: 38px; }
  .links { margin-top: 44px; }
}

/* ---------- REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
