/* TOQUIA Cinematic — Shared scene skeleton, atmosphere, status badges, footer.
   Scene-specific visuals arrive in Phase 2/3 (css/scene-*.css). */

/* ── Atmosphere: one fixed backdrop that changes colour between scenes ──
   Scenes are transparent while motion is active, so the backdrop crossfades
   continuously instead of the page cutting between eight coloured blocks. */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--atmo-bg, var(--tq-cinema-black));
}
.atmosphere::before,
.atmosphere::after {
  content: "";
  position: absolute;
  inset: -10%;
  pointer-events: none;
}
/* Emerald light pool: position/intensity driven by --glow-* custom properties */
.atmosphere::before {
  background: radial-gradient(
    ellipse 60% 50% at var(--glow-x, 50%) var(--glow-y, 60%),
    rgba(var(--glow-rgb, 79,174,138), var(--glow-a, .16)),
    transparent 70%);
}
/* Subtle film grain for depth (pure CSS, no image request). No blend mode: blending a fixed
   full-screen layer forces a full repaint on every scroll frame. Desktop with fine pointer only. */
.atmosphere::after {
  display: none;
  opacity: .035;
  background-image:
    repeating-radial-gradient(circle at 17% 32%, rgba(255,255,255,.5) 0 1px, transparent 1px 3px),
    repeating-radial-gradient(circle at 73% 68%, rgba(255,255,255,.35) 0 1px, transparent 1px 4px);
}
@media (hover: hover) and (pointer: fine) and (min-width: 1024px) { [data-tier="high"] .atmosphere::after { display: block; } }

.motion .scene { background: transparent; }

/* Cinematic cut used for long jumps between distant scenes */
.scene-cut {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-nav) - 1);
  background: var(--tq-cinema-black);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--ease-in-out);
}
.scene-cut.is-on { opacity: 1; }

/* ── Scene skeleton ────────────────────────────────────────────── */
.scene {
  scroll-margin-top: 0;
}
.scene-grid {
  display: grid;
  gap: var(--space-lg);
  align-items: center;
  width: 100%;
}
@media (min-width: 960px) {
  .scene-grid.split { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .scene-grid.split.reverse { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
  .scene-grid.split.reverse > .scene-copy { order: 2; }
}
.scene-copy { display: grid; gap: var(--space-sm); max-width: 38rem; }
.scene-copy.centered { margin-inline: auto; text-align: center; justify-items: center; }
.scene-copy .lead { color: var(--ink-muted); }
.scene-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: var(--space-xs); }
.scene-copy.centered .scene-actions { justify-content: center; }

/* Scene number, top-left; reinforces the "chapter" feeling */
.scene-index {
  position: absolute;
  top: calc(72px + var(--space-sm));
  left: var(--gutter);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: .14em;
  opacity: .45;
  font-variant-numeric: tabular-nums;
}

/* ── Stage: where each scene's visual system mounts ────────────── */
.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  perspective: 1400px;
  perspective-origin: 50% 40%;
}
.stage.wide { aspect-ratio: 16 / 9; }
.stage.tall { aspect-ratio: 3 / 4; max-height: 70vh; margin-inline: auto; }
/* Phase-1 placeholder frame — removed when the real stage is built */
.stage-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 28px;
  border: 1px dashed rgba(var(--ink-rgb),.18);
  background:
    radial-gradient(circle at 50% 40%, rgba(var(--accent-rgb),.10), transparent 60%),
    rgba(var(--ink-rgb),.02);
  color: var(--ink-muted);
  font-size: var(--fs-small);
  text-align: center;
  padding: var(--space-md);
}
.stage-placeholder strong { display: block; color: inherit; font-weight: 600; margin-bottom: .25rem; }

/* ── Availability badges (driven by data/feature-status) ───────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  width: fit-content;
  padding: 0.35em 0.85em;
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.06em;
  border-radius: 99px;
  border: 1px solid currentColor;
}
.status-badge::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status-badge[data-status="proximamente"] { color: var(--detail); }
.status-badge[data-status="disponible"]   { color: var(--accent); }
.status-badge[hidden] { display: none; }

.status-note {
  font-size: var(--fs-small);
  color: var(--tq-gold);
  border-left: 2px solid var(--tq-gold);
  padding-left: 0.85rem;
  max-width: 34rem;
}

/* ── Scroll cue (hero) ─────────────────────────────────────────── */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: var(--space-md);
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: .6;
}
.scroll-cue i {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, currentColor, transparent);
  animation: cue 2.2s var(--ease-in-out) infinite;
  transform-origin: top;
}
@keyframes cue {
  0%   { transform: scaleY(0); opacity: 1; }
  60%  { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ── Hero specifics that belong to the skeleton ────────────────── */
.scene-hero .scene-copy { max-width: 52rem; }
.scene-hero .hero-title { line-height: 1.02; }
.hero-modules {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  margin-top: var(--space-md);
  font-size: var(--fs-small);
  color: var(--ink-muted);
}
.hero-modules li { display: inline-flex; align-items: center; gap: .45rem; }
.hero-modules li::before {
  content: "";
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
}

/* ── Contact list (scene 8) ────────────────────────────────────── */
.contact-lines {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.5rem;
  font-size: var(--fs-small);
  color: var(--ink-muted);
}
.contact-lines a:hover { color: var(--tq-warm-white); }

/* ── Footer ────────────────────────────────────────────────────── */
.site-footer {
  position: relative;
  z-index: var(--z-scene);
  padding: var(--space-xl) var(--gutter) var(--space-lg);
  background: var(--tq-cinema-black);
  border-top: 1px solid rgba(var(--ink-rgb),.06);
  font-size: var(--fs-small);
  color: var(--ink-muted);
}
.site-footer .content {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  align-items: center;
  justify-content: space-between;
}
.site-footer nav ul { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.site-footer a:hover { color: var(--tq-warm-white); }
.trademark-note {
  flex-basis: 100%;
  font-size: 0.75rem;
  opacity: .7;
}

/* ── Reveal primitives used by the scene engine ────────────────── */
/* Only hidden when the motion engine is running, so no-JS / failed-JS
   visitors always see every word. */
.motion [data-reveal] { opacity: 0; transform: translateY(24px); }
.motion [data-reveal].is-in { opacity: 1; transform: none; transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }

/* ── Mobile adjustments ────────────────────────────────────────── */
@media (max-width: 767px) {
  .scene-index { top: calc(64px + var(--space-xs)); }
  .stage { aspect-ratio: 1 / 1; }
  .stage.wide { aspect-ratio: 4 / 3; }
  .scene-inner { padding-block: calc(72px + var(--space-lg)) var(--space-xl); }
}

/* ── Complementary products (inside scene 07) ──────────── */
.complements {
  scroll-margin-top: 96px;
  display: grid;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(var(--ink-rgb),.08);
}
.complements-head { display: grid; gap: .4rem; }
.complements-head h3 { font-size: var(--fs-h2); }
.complements-list { display: grid; gap: var(--space-sm); }
@media (min-width: 860px) { .complements-list { grid-template-columns: repeat(3, 1fr); } }
.complements-list li {
  display: grid;
  align-content: start;
  gap: .5rem;
  padding: var(--space-md);
  border-radius: 20px;
  background: rgba(var(--ink-rgb),.035);
  border: 1px solid rgba(var(--ink-rgb),.08);
}
.complements-list h4 { font-size: var(--fs-h3); }
.complements-list p { font-size: var(--fs-small); color: var(--ink-muted); }
.complements-list a { margin-top: .25rem; font-weight: 600; color: var(--accent); }
.complements-list a:hover { text-decoration: underline; }

.menu-sub { font-size: var(--fs-small); color: var(--accent) !important; opacity: 1 !important; }

/* Scene headings receive programmatic focus after a jump (screen readers announce the scene).
   They are not interactive, so no focus ring is drawn on them. */
[data-scene-heading]:focus { outline: none; }
.stage-note { font-size: .74rem; letter-spacing: .03em; color: var(--ink-muted); opacity: .85; }

/* Tablets: leave room for the chapter number above the copy */
@media (min-width: 768px) and (max-width: 959px) {
  .scene-inner { padding-top: calc(96px + var(--space-sm)); }
}

/* Anchors kept from the previous home page (/#servicios, /#paquetes, /#precios): links from the
   service pages and from outside keep landing on the matching scene. */
.anchor-alias { position: absolute; top: 0; left: 0; width: 0; height: 0; }
