/* Catálogo Seven Cat Studio — base compartida (reset, utilidades, animaciones).
   Cada web define sus tokens en styles.css: --bg --ink --accent --serif --sans */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; overflow-x: clip; }
body { font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; list-style: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; font-weight: 400; }
input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent, currentColor); outline-offset: 3px; border-radius: 4px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 9999; padding: .6rem 1rem; border-radius: 8px; background: var(--ink); color: var(--bg); font-weight: 600; }
.skip-link:focus { top: 1rem; }

/* Aparición al hacer scroll */
.is-armed .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s cubic-bezier(.16,1,.3,1), transform 1s cubic-bezier(.16,1,.3,1); transition-delay: var(--d, 0s); }
.is-armed .reveal.is-in { opacity: 1; transform: none; }
.is-armed .reveal-img { clip-path: inset(0 0 100% 0); transition: clip-path 1.3s cubic-bezier(.77,0,.18,1); transition-delay: var(--d, 0s); }
.is-armed .reveal-img.is-in { clip-path: inset(0 0 0 0); }

/* Titulares palabra por palabra */
[data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
[data-split] .wi { display: inline-block; transform: translateY(105%); transition: transform 1.1s cubic-bezier(.16,1,.3,1); }
[data-split].is-split .wi { transform: none; }

/* Imagen con parallax: el contenedor recorta */
.px-wrap { overflow: hidden; }
.px-wrap > img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); will-change: transform; }

/* Barra de progreso */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 200; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

/* Firma del catálogo */
.studio-credit { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px; padding: 14px 16px; font: 500 12px/1.4 system-ui, -apple-system, Segoe UI, sans-serif; letter-spacing: .02em; background: #0b0a0f; color: #cfcdd5; text-align: center; }
.studio-credit b { color: #d4ff3a; font-weight: 700; }
.studio-credit a { color: #0b0a0f; background: #d4ff3a; padding: 5px 12px; border-radius: 999px; font-weight: 700; }
.photo-credits { font-size: 11px; opacity: .6; line-height: 1.5; }
.photo-credits a { text-decoration: underline; }

/* Botón flotante de WhatsApp */
.wa-float { position: fixed; right: 18px; bottom: 18px; z-index: 90; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #25d366; color: #fff; box-shadow: 0 12px 30px -8px rgba(37,211,102,.6); transition: transform .4s cubic-bezier(.16,1,.3,1); }
.wa-float:hover { transform: scale(1.08); }

@media (prefers-reduced-motion: reduce) {
  .marquee-track, [data-loop] { animation-duration: 120s !important; }
}

[hidden] { display: none !important; }

/* Filtros */
.is-hidden { display: none !important; }

/* Carrito → WhatsApp (toma los colores de cada web) */
.cart-fab { position: fixed; right: 18px; bottom: 86px; z-index: 91; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); box-shadow: 0 14px 30px -10px rgba(0,0,0,.45); transform: scale(0); transition: transform .5s cubic-bezier(.34,1.56,.64,1); }
.cart.has-items .cart-fab, .cart.is-open .cart-fab { transform: scale(1); }
.cart-fab.bump { animation: cartBump .5s cubic-bezier(.34,1.56,.64,1); }
@keyframes cartBump { 40% { transform: scale(1.18); } }
.cart-n { position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; background: var(--accent); color: #fff; font: 700 12px/1 system-ui, sans-serif; }
.cart-panel { position: fixed; right: 18px; bottom: 154px; z-index: 92; width: min(380px, calc(100vw - 36px)); max-height: min(70vh, 560px); display: flex; flex-direction: column; border-radius: 20px; background: var(--bg); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0,0,0,.45), 0 0 0 1px rgba(0,0,0,.06); overflow: hidden; font-family: var(--sans, system-ui); }
.cart-panel[hidden] { display: none; }
.cart-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid rgba(127,127,127,.2); }
.cart-x { font-size: 26px; line-height: 1; width: 32px; height: 32px; }
.cart-list { overflow: auto; padding: 6px 18px; flex: 1; }
.cart-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(127,127,127,.15); font-size: 14px; }
.cart-list li small { display: block; opacity: .65; }
.cart-empty { opacity: .6; justify-content: center !important; }
.cart-q { display: flex; align-items: center; gap: 8px; }
.cart-q button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(127,127,127,.35); }
.cart-foot { padding: 16px 18px 18px; display: grid; gap: 10px; border-top: 1px solid rgba(127,127,127,.2); }
.cart-tot { display: flex; justify-content: space-between; font-size: 15px; }
.cart-send { display: block; text-align: center; padding: 14px; border-radius: 999px; background: #25d366; color: #fff; font-weight: 700; }
.cart-note { font-size: 12px; opacity: .6; text-align: center; }

/* Las celdas de grilla pueden encogerse (evita desbordes en celular) */
[class*="-grid"] > *, [class*="-row"] > *, .grid > *, .hero-in > *, form > *, fieldset { min-width: 0; }

/* ===== v3: efectos de alta gama (opcionales, se activan por atributo) ===== */
/* Imágenes que aparecen: además del telón, la foto se asienta desde un leve acercamiento */
.is-armed .reveal-img > img:not([data-parallax]), .is-armed .reveal-img > picture > img { transform: scale(1.14); transition: transform 1.8s cubic-bezier(.16,1,.3,1); transition-delay: var(--d, 0s); }
.is-armed .reveal-img.is-in > img:not([data-parallax]), .is-armed .reveal-img.is-in > picture > img { transform: none; }
.reveal-img { overflow: hidden; }
/* Variante de aparición con desenfoque suave */
.is-armed .reveal.soft { filter: blur(10px); transition-property: opacity, transform, filter; }
.is-armed .reveal.soft.is-in { filter: none; }

/* Cortina de entrada */
.intro { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; background: var(--intro-bg, var(--ink, #111)); color: var(--intro-fg, var(--bg, #fff)); animation: introOut .9s cubic-bezier(.77,0,.18,1) 1.05s forwards; pointer-events: none; }
.intro > * { animation: introIn .9s cubic-bezier(.16,1,.3,1) both; }
.intro .intro-line { position: absolute; left: 50%; bottom: 38%; width: 120px; height: 1px; margin-left: -60px; background: currentColor; opacity: .35; transform-origin: 0 50%; animation: introLine 1s cubic-bezier(.77,0,.18,1) .1s both; }
@keyframes introIn { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } }
@keyframes introLine { from { transform: scaleX(0); } }
@keyframes introOut { to { clip-path: inset(0 0 100% 0); visibility: hidden; } }
.no-intro .intro { display: none; }

/* Imagen que se expande al hacer scroll: [data-expand] con un hijo img */
[data-expand] { --xp: 1; overflow: hidden; clip-path: inset(calc((1 - var(--xp)) * 9%) calc((1 - var(--xp)) * 11%) round calc((1 - var(--xp)) * 32px + var(--xr, 0px))); will-change: clip-path; }
[data-expand] > img { width: 100%; height: 100%; object-fit: cover; transform: scale(calc(1.18 - var(--xp) * .18)); will-change: transform; }

/* Texto que se entinta */
[data-ink] .ink { opacity: .18; transition: opacity .35s ease; }
[data-ink] .ink.on { opacity: 1; }

/* Marquesina */
[data-marquee] { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.mq-track { display: flex; width: max-content; animation: mq 38s linear infinite; }
.mq-group { display: flex; flex: none; align-items: center; }
[data-marquee]:hover .mq-track { animation-play-state: paused; }
@keyframes mq { to { transform: translateX(-50%); } }

/* Cursor personalizado */
.cur-dot, .cur-ring { position: fixed; left: 0; top: 0; z-index: 9500; pointer-events: none; opacity: 0; transition: opacity .3s; }
.cur-on .cur-dot, .cur-on .cur-ring { opacity: 1; }
.cur-field .cur-dot, .cur-field .cur-ring { opacity: 0; }
.cur-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--cursor, var(--accent, #111)); }
.cur-ring { width: 38px; height: 38px; margin: -19px 0 0 -19px; }
.cur-ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--cursor, var(--accent, #111)); opacity: .55; transition: transform .45s cubic-bezier(.16,1,.3,1), background .3s, opacity .3s, border-color .3s; }
.cur-ring.is-link::before { transform: scale(1.6); opacity: .35; background: color-mix(in srgb, var(--cursor, var(--accent, #111)) 12%, transparent); }
.cur-ring.is-label::before { transform: scale(2.3); opacity: 1; background: var(--cursor, var(--accent, #111)); border-color: transparent; }
.cur-ring.is-down::before { transform: scale(.8); }
.cur-ring span { position: absolute; inset: 0; display: grid; place-items: center; font: 600 10px/1 var(--sans, system-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--cursor-ink, #fff); opacity: 0; transition: opacity .25s; white-space: nowrap; }
.cur-ring.is-label span { opacity: 1; }

/* Brillo que cruza (metales, botones premium): .sheen */
.sheen { position: relative; overflow: hidden; }
.sheen::after { content: ""; position: absolute; inset: -20% auto -20% -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent); transform: skewX(-18deg); transition: left .9s cubic-bezier(.16,1,.3,1); pointer-events: none; }
.sheen:hover::after { left: 130%; }

/* Grano fotográfico sutil para fondos oscuros: .grain */
.grain { position: relative; isolation: isolate; }
.grain::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .07; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

@media (prefers-reduced-motion: reduce) {
  .intro { display: none; }
  .mq-track { animation-duration: 160s; }
}
