/* Florece Digital · Fábrica de páginas · base.css
   Cada página define sus colores y fuentes en :root (archivo marca.css).
   Aquí solo va lo que se repite: reset, botones, secciones y animaciones. */

:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --radius: 8px;
  --max: 1120px;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--font-body), system-ui, sans-serif; line-height: 1.55; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: 20px; }
.display { font-family: var(--font-display), Georgia, serif; }

/* barra de aviso (ejemplo / propuesta) */
.aviso { background: var(--text); color: var(--bg); font-size: .8125rem; text-align: center; padding: 8px 16px; }
.aviso a { font-weight: 600; }

/* encabezado */
.site-head { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.logo { text-decoration: none; font-family: var(--font-display), serif; font-size: 1.25rem; }
.nav { display: none; gap: 24px; font-size: .9375rem; }
.nav a { text-decoration: none; color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .nav a:hover { color: var(--text); } }

/* botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: var(--radius);
  font: inherit; font-weight: 600; text-decoration: none; border: 0; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease, color 200ms ease; }
.btn:active { transform: scale(.97); }
.btn-main { background: var(--accent); color: var(--on-accent); }
.btn-line { background: transparent; color: var(--text); border: 1.5px solid var(--line-strong); }
@media (hover: hover) and (pointer: fine) {
  .btn-main:hover { filter: brightness(1.08); }
  .btn-line:hover { border-color: var(--accent); color: var(--accent); }
}

/* secciones */
section { padding: 80px 0; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-size: .8125rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); }
h1 { font-family: var(--font-display), serif; font-size: clamp(2.6rem, 10vw, 5.6rem); line-height: .98; letter-spacing: -.02em; text-wrap: balance; }
h2 { font-family: var(--font-display), serif; font-size: clamp(2rem, 6.5vw, 3.2rem); line-height: 1.05; text-wrap: balance; }
.lead { color: var(--muted); font-size: 1.125rem; max-width: 34em; }
.title { max-width: 40rem; margin-bottom: 36px; }
.title.center { text-align: center; margin-inline: auto; }
.surface { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.note { margin-top: 14px; color: var(--muted); font-size: .8125rem; }
.grid-3 { display: grid; gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }

/* ===== Animaciones (Emil Kowalski: transform/opacity, ease-out fuerte, una sola vez) ===== */

/* titular que se descubre línea por línea */
.line { display: block; overflow: hidden; padding-bottom: .06em; }
.line > span { display: block; }
.js .line > span { transform: translateY(105%); animation: f-lineup 900ms var(--ease-out) forwards; }
.js .line:nth-child(2) > span { animation-delay: 120ms; }
.js .line:nth-child(3) > span { animation-delay: 240ms; }
@keyframes f-lineup { to { transform: none; } }

/* entrada al cargar */
.js .f-in { opacity: 0; transform: translateY(14px); animation: f-rise 700ms var(--ease-out) forwards; }
.js .f-in.d1 { animation-delay: 380ms; } .js .f-in.d2 { animation-delay: 500ms; } .js .f-in.d3 { animation-delay: 620ms; }
@keyframes f-rise { to { opacity: 1; transform: none; } }

/* revelar al hacer scroll: data-reveal="up|left|right|zoom" */
.js [data-reveal] { opacity: 0; transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
.js [data-reveal="up"] { transform: translateY(26px); }
.js [data-reveal="left"] { transform: translateX(-32px); }
.js [data-reveal="right"] { transform: translateX(32px); }
.js [data-reveal="zoom"] { transform: scale(.94); }
.js [data-reveal][data-visible] { opacity: 1; transform: none; }

/* grupos escalonados: data-stagger */
.js [data-stagger] > * { opacity: 0; transform: translateY(22px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
.js [data-stagger][data-visible] > * { opacity: 1; transform: none; }
[data-stagger] > *:nth-child(2) { transition-delay: 70ms; } [data-stagger] > *:nth-child(3) { transition-delay: 140ms; }
[data-stagger] > *:nth-child(4) { transition-delay: 210ms; } [data-stagger] > *:nth-child(5) { transition-delay: 280ms; }
[data-stagger] > *:nth-child(6) { transition-delay: 350ms; }

/* marquesina */
.marquee { overflow: hidden; background: var(--accent); color: var(--on-accent); padding: 14px 0; }
.marquee div { display: flex; gap: 46px; width: max-content; animation: f-slide 26s linear infinite; font-family: var(--font-display), serif; font-size: 1.375rem; white-space: nowrap; }
@keyframes f-slide { to { transform: translateX(-50%); } }

/* slider con fundido + zoom */
.slider { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; }
.slide.is-on { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.1); transition: transform 5s linear; }
.slide.is-on img { transform: scale(1); }

/* galería con filtros */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.filters button { min-height: 44px; padding: 0 16px; border-radius: var(--radius); border: 1px solid var(--line); background: transparent; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; transition: background-color 200ms ease, color 200ms ease; }
.filters button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.g { position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--surface); transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out); }
.g.is-hidden { opacity: .12; transform: scale(.96); }
.g img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .g:hover img { transform: scale(1.08); } }

/* franja con parallax */
.band { position: relative; overflow: hidden; padding: 110px 0; text-align: center; isolation: isolate; }
.band-bg { position: absolute; inset: -18% 0; z-index: -2; background-size: cover; background-position: center; will-change: transform; }
.band::after { content: ''; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--bg) 78%, transparent); }

/* botón volver arriba */
.to-top { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 15; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; cursor: pointer;
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity 250ms var(--ease-out), transform 250ms var(--ease-out); }
.to-top.is-on { opacity: 1; transform: none; pointer-events: auto; }

footer { border-top: 1px solid var(--line); padding: 26px 0 90px; color: var(--muted); font-size: .875rem; text-align: center; }

@media (min-width: 820px) {
  .nav { display: flex; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  footer { padding-bottom: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .line > span, .js .f-in { animation: none; transform: none; opacity: 1; }
  .js [data-reveal], .js [data-stagger] > * { transform: none !important; }
  .marquee div { animation: none; }
  .slide img { transition: none; transform: none; }
  .band-bg { transform: none !important; }
}
