/* Royal Pets · nivel Max (22-oct-2026). Tesis: «la corona que cuida».
   Colores medidos del logo: amarillo #ffd403 y azul #0e96d3; el azul real oscuro solo para texto y la acción
   principal (contraste AA). Fuentes propias precargadas (Cinzel: acento romano como el del logo; Nunito: cercana).
   Fluidez: solo se animan transform y opacity; sin backdrop-filter ni fondos fijos. */
@font-face { font-family: "Nunito"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("./nunito-latin.woff2") format("woff2"); }
@font-face { font-family: "Cinzel"; font-style: normal; font-weight: 500 700; font-display: swap; src: url("./cinzel-latin.woff2") format("woff2"); }
:root {
  color-scheme: light;
  --y: #ffd403;
  --y-soft: #ffe46a;
  --cream: #fff8e2;
  --blue: #0e96d3;
  --royal: #0b5f93;
  --royal-deep: #083f63;
  --ink: #0b3550;
  --ink-soft: #24506b;
  --wa: #25d366;
  --card: #fffdf4;
  --line: #0b5f9326;
  --stage-h: clamp(268px, 82vw, 330px);
  --logo-fit: .9;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--y); }
body {
  position: relative;
  min-height: 100svh;
  padding: max(18px, env(safe-area-inset-top)) 22px max(22px, env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
  color: var(--ink);
  font-family: "Nunito", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  isolation: isolate;
  overflow-x: clip;
}
/* Cielo: amarillo de marca arriba que se aclara a crema; el sol y los rayos se centran en el logo */
body::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: 100vh; height: 100lvh; z-index: -2; pointer-events: none; background: linear-gradient(180deg, #ffd81f 0%, var(--y) 30%, #ffe27a 58%, var(--cream) 100%); }
.sky { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; --cy: calc(max(18px, env(safe-area-inset-top)) + var(--stage-h) / 2 + 4px); }
.sun, .rays { position: absolute; left: 50%; top: var(--cy); aspect-ratio: 1; border-radius: 50%; }
.sun { width: min(150vw, 760px); transform: translate(-50%, -50%); background: radial-gradient(circle, #fffdf0 0%, #fff8d2c4 17%, #fff3b000 50%); }
.rays { width: min(200vw, 1100px); opacity: 0; transform: translate(-50%, -50%) rotate(0deg); background: repeating-conic-gradient(from 3deg, #ffffff6e 0deg 4.5deg, #ffffff00 4.5deg 15deg); -webkit-mask-image: radial-gradient(circle, #000 9%, #0000 58%); mask-image: radial-gradient(circle, #000 9%, #0000 58%); transition: opacity 1.6s ease; animation: rays-spin 160s linear infinite; }
/* Los rayos se encienden cuando la corona aterriza (el motor 3D marca rp-landed); sin 3D, a los 1,4 s */
.rp-landed .rays { opacity: .85; }
html:not(.zt-3d) .rays { animation: rays-spin 160s linear infinite, fade-to-85 1.4s ease 1.4s forwards; }
/* Huellitas que suben muy despacio y casi transparentes (la cercanía de una tienda de mascotas) */
.paw { position: absolute; left: var(--x); top: var(--y); width: 24px; height: 24px; opacity: 0; transform: scale(var(--s)); background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%230e96d3'%3E%3Cellipse cx='12' cy='15.5' rx='5.2' ry='4.3'/%3E%3Cellipse cx='5.3' cy='10.2' rx='2.1' ry='2.7' transform='rotate(-18 5.3 10.2)'/%3E%3Cellipse cx='9.4' cy='6.4' rx='2.1' ry='2.8' transform='rotate(-6 9.4 6.4)'/%3E%3Cellipse cx='14.6' cy='6.4' rx='2.1' ry='2.8' transform='rotate(6 14.6 6.4)'/%3E%3Cellipse cx='18.7' cy='10.2' rx='2.1' ry='2.7' transform='rotate(18 18.7 10.2)'/%3E%3C/svg%3E") center / contain no-repeat; animation: paw-rise var(--t) linear var(--d) infinite; }

.wrap { position: relative; z-index: 1; width: 100%; max-width: 430px; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Logo 3D «Coronación» (motor royal-pets-logo3d.js) ---------- */
.brand-mark { position: relative; height: var(--stage-h); margin: 4px -14px 6px; -webkit-tap-highlight-color: transparent; }
.zt-3d .brand-mark { cursor: grab; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.zt-3d .brand-mark:active { cursor: grabbing; }
/* El lienzo sobresale 46 px arriba y abajo: la corona salta y los destellos no se cortan */
.logo-canvas { position: absolute; top: -46px; left: 0; z-index: 2; width: 100%; height: calc(100% + 92px); pointer-events: none; }
.logo-img { position: absolute; z-index: 1; left: 50%; top: 50%; width: calc(var(--stage-h) * var(--logo-fit) * .783); height: auto; transform: translate(-50%, -50%); opacity: 0; pointer-events: none; -webkit-user-drag: none; animation: fade-in .6s ease 1.1s forwards; }
.zt-3d .logo-img { opacity: 0; animation: none; }

/* ---------- Presentación ---------- */
.kicker { display: flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; font-family: "Cinzel", Georgia, serif; font-size: clamp(11.5px, 3.3vw, 13.5px); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.orn { position: relative; width: 20px; height: 1.5px; flex: none; background: linear-gradient(90deg, #0b5f9300, var(--royal)); transform-origin: right center; transform: scaleX(0); animation: orn-draw .9s cubic-bezier(.2, .7, .25, 1) 1.9s forwards; }
.orn + span + .orn { background: linear-gradient(270deg, #0b5f9300, var(--royal)); transform-origin: left center; }
.orn::after { content: ""; position: absolute; top: -2.5px; width: 6.5px; height: 6.5px; background: var(--royal); transform: rotate(45deg); }
.orn:first-child::after { right: -3px; }
.orn:last-child::after { left: -3px; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 11px auto 0; list-style: none; }
.chips li { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border-radius: 999px; background: #ffffff8c; border: 1px solid #0b5f9324; font-size: 12.5px; font-weight: 700; color: var(--ink); }
.chips svg { width: 15px; height: 15px; color: var(--royal); }
.place { display: inline-flex; align-items: center; gap: 5px; margin: 9px auto 16px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.place svg { width: 15px; height: 15px; color: var(--royal); }

/* ---------- Acción principal: un solo botón de WhatsApp para pedidos ---------- */
.actions { display: flex; flex-direction: column; gap: 10px; }
.button { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; gap: 13px; padding: 13px 18px 13px 13px; min-height: 74px; text-align: left; text-decoration: none; border-radius: 20px; -webkit-tap-highlight-color: transparent; transition: transform .2s ease, box-shadow .2s ease; }
.button:active { transform: scale(.98); }
.button-whatsapp { --icon: 46px; color: #ffffff; background: linear-gradient(135deg, #0d6aa3 0%, var(--royal) 45%, var(--royal-deep) 100%); box-shadow: 0 18px 34px -16px #083f63b3, inset 0 1px 0 #ffffff33; }
.b-icon { position: relative; display: grid; place-items: center; width: var(--icon); height: var(--icon); flex: none; border-radius: 50%; background: var(--wa); color: #ffffff; box-shadow: 0 6px 14px -6px #0006; }
.b-icon svg { width: 25px; height: 25px; }
/* Dos ondas que salen del ícono (solo transform/opacity) */
.b-icon::before, .b-icon::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50%; border: 2px solid #25d366; opacity: 0; animation: ping 4.8s ease-out 1.2s infinite; }
.b-icon::after { animation-delay: 1.65s; }
.b-text { font-size: 17px; font-weight: 800; line-height: 1.15; }
.b-text small { display: block; margin-top: 4px; font-size: 12.5px; font-weight: 600; color: #d6ecfb; }
.arrow { width: 21px; height: 21px; margin-left: auto; flex: none; transition: transform .2s ease; }
/* Brillo dorado que cruza el botón (el primero llega justo después de la coronación) */
.button-whatsapp::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, #ffd40300 35%, #ffd40347 50%, #ffd40300 65%); transform: translateX(-120%); animation: shine 6.5s ease-in-out 1.6s infinite; }
/* Pequeña corona de luz sobre el botón (detalle de marca) */
.button-whatsapp::before { content: ""; position: absolute; right: -30px; top: -40px; width: 120px; height: 120px; z-index: -1; border-radius: 50%; background: radial-gradient(circle, #0e96d366, #0e96d300 70%); }

/* ---------- Redes: íconos y nombres visibles ---------- */
.socials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.social { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 12px 4px 11px; color: var(--ink); text-decoration: none; border: 1px solid var(--line); background: var(--card); border-radius: 18px; box-shadow: 0 10px 22px -18px #6b5200; transition: transform .2s ease, box-shadow .2s ease; -webkit-tap-highlight-color: transparent; }
.social:active { transform: scale(.97); }
.social-icon { position: relative; display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 4px; color: #ffffff; background: linear-gradient(145deg, #23a6e0, var(--blue) 55%, #0b7fb5); border-radius: 50%; }
.social-icon svg { width: 21px; height: 21px; }
.social-icon::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #ffd403; opacity: 0; transform: scale(.9); pointer-events: none; animation: social-glow 9s ease-in-out infinite; }
.social:nth-child(2) .social-icon::after { animation-delay: -3s; }
.social:nth-child(3) .social-icon::after { animation-delay: -6s; }
.s-name { font-size: 13px; font-weight: 800; }
.social small { font-size: 11px; font-weight: 600; color: var(--ink-soft); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.button:focus-visible, .social:focus-visible, footer a:focus-visible { outline: 3px solid var(--royal-deep); outline-offset: 4px; }
footer { display: flex; justify-content: center; align-items: center; gap: 4px; margin-top: 18px; color: var(--ink-soft); font-size: 12px; }
footer a { color: var(--ink); text-decoration: none; font-weight: 800; }
.footer-line { width: 14px; height: 1px; margin-right: 5px; background: var(--ink-soft); }

@media (hover: hover) {
  .button:hover { transform: translateY(-2px); box-shadow: 0 22px 40px -16px #083f63cc, inset 0 1px 0 #ffffff33; }
  .button:hover .arrow { transform: translate(2px, -2px); }
  .social:hover { transform: translateY(-2px); box-shadow: 0 16px 26px -18px #6b5200; }
  footer a:hover { text-decoration: underline; }
}
@media (min-width: 700px) {
  :root { --stage-h: 330px; }
  body { align-items: center; padding-top: 34px; padding-bottom: 34px; }
  .sky { --cy: calc(50vh - 245px + var(--stage-h) / 2); }
  .wrap { max-width: 460px; padding: 22px 30px 24px; border: 1px solid #ffffffb3; border-radius: 30px; background: linear-gradient(180deg, #fffdf27a, #fff8e2e6 55%); box-shadow: 0 40px 90px -36px #7a5d0099, inset 0 1px 0 #ffffff; }
}
@media (max-width: 359px) {
  body { padding-right: 16px; padding-left: 16px; }
  .kicker { letter-spacing: .04em; gap: 6px; }
  .orn { width: 12px; }
  .chips li { font-size: 11.5px; padding: 5px 9px; }
  .button { gap: 10px; padding-left: 11px; padding-right: 13px; }
  .button-whatsapp { --icon: 40px; }
  .b-text { font-size: 15.5px; }
  .b-text small { font-size: 11.5px; }
  .socials { gap: 7px; }
  .s-name { font-size: 12px; }
  .social small { font-size: 10px; }
}

@keyframes fade-in { to { opacity: 1; } }
@keyframes fade-to-85 { to { opacity: .85; } }
@keyframes rays-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes paw-rise { 0% { opacity: 0; transform: translateY(0) rotate(-14deg) scale(var(--s)); } 15%, 80% { opacity: .17; } 100% { opacity: 0; transform: translateY(-240px) rotate(12deg) scale(var(--s)); } }
@keyframes orn-draw { to { transform: scaleX(1); } }
@keyframes ping { 0% { opacity: .9; transform: scale(1); } 40%, 100% { opacity: 0; transform: scale(1.75); } }
@keyframes shine { 0%, 60% { transform: translateX(-120%); } 80%, 100% { transform: translateX(120%); } }
@keyframes social-glow { 0%, 70%, 100% { opacity: 0; transform: scale(.9); } 82% { opacity: 1; transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .orn { transform: none; }
  .rays { opacity: .6; }
  html:not(.zt-3d) .logo-img { opacity: 1; }
  .paw { display: none; }
}
