/* =======================================================================
   TOLARIAN ARMY — Impresiones 3D funcionales para TCG
   Estilo propio (Bootstrap 5.3 por encima).
   Estética: negro profundo, tipografía serif clásica, acento dorado sutil.
   ===================================================================== */

/* ------------------------- VARS / DESIGN TOKENS ------------------------- */
:root {
   --bg: #000000;
   --bg-soft: #050505;
   --ink: #f3eee3;          /* off-white cálido tipo pergamino */
   --ink-soft: rgba(243, 238, 227, 0.72);
   --ink-faint: rgba(243, 238, 227, 0.45);
   --gold: #c9a24b;         /* acento dorado, uso muy contenido */
   --gold-soft: rgba(201, 162, 75, 0.55);
   --line: rgba(243, 238, 227, 0.14);
   --line-strong: rgba(243, 238, 227, 0.28);

   --serif-display: 'Cinzel', 'Times New Roman', serif;
   --serif-text: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;

   --nav-h: 72px;
   --gap: clamp(1rem, 4vw, 2.5rem);
   --section-pad: clamp(4rem, 9vw, 8rem);
   --max-text: 64ch;
   --radius: 2px;

   --shadow-frame: 0 30px 60px -30px rgba(0, 0, 0, 0.9),
      0 0 0 1px rgba(243, 238, 227, 0.06) inset;
   --shadow-frame-hover: 0 18px 46px -18px rgba(0, 0, 0, 0.95),
      0 0 40px -10px rgba(201, 162, 75, 0.12),
      0 0 0 1px rgba(201, 162, 75, 0.35) inset;
}

/* ----------------------------- RESET BASE ----------------------------- */
*,
*::before,
*::after {
   box-sizing: border-box;
}

html {
   scroll-behavior: smooth;
   scroll-padding-top: calc(var(--nav-h) + 10px);
}

body {
   margin: 0;
   background: var(--bg);
   color: var(--ink);
   font-family: var(--serif-text);
   font-size: 1.125rem;
   line-height: 1.75;
   -webkit-font-smoothing: antialiased;
   text-rendering: optimizeLegibility;
   overflow-x: hidden;
}

img {
   max-width: 100%;
   height: auto;
   display: block;
}

/* Fondo con viñeta ambiental muy sutil, tipo "sala oscura" */
body::before {
   content: '';
   position: fixed;
   inset: 0;
   z-index: -1;
   background:
      radial-gradient(120% 80% at 50% -10%, rgba(201, 162, 75, 0.06), transparent 55%),
      radial-gradient(140% 120% at 50% 120%, rgba(0, 0, 0, 0.9), transparent 60%),
      var(--bg);
   pointer-events: none;
}

::selection {
   background: var(--gold);
   color: #000;
}

/* ============================ NAVBAR ============================ */
.tol-nav {
   background: transparent;
   border-bottom: 1px solid transparent;
   transition: background 0.4s ease, border-color 0.4s ease, padding 0.4s ease,
      backdrop-filter 0.4s ease;
   padding-top: 0.4rem;
   padding-bottom: 0.4rem;
}

/* Estado "scrolled": se solidifica en negro con viñeta */
.tol-nav.tol-nav--scrolled {
   background: rgba(0, 0, 0, 0.82);
   backdrop-filter: blur(10px);
   border-bottom-color: var(--line);
   padding-top: 0.15rem;
   padding-bottom: 0.15rem;
}

.tol-nav__brand {
   display: inline-flex;
   align-items: center;
   gap: 0.75rem;
   padding: 0;
   text-decoration: none;
   color: var(--ink);
}

.tol-nav__logo {
   width: 54px;
   height: auto;
   object-fit: contain;
   filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.6));
}

.tol-nav__wordmark {
   font-family: var(--serif-display);
   font-weight: 600;
   letter-spacing: 0.32em;
   text-transform: uppercase;
   font-size: 0.95rem;
   color: var(--ink);
   white-space: nowrap;
}

/* Menú desktop */
.tol-nav__menu .nav-link {
   font-family: var(--serif-display);
   text-transform: uppercase;
   letter-spacing: 0.22em;
   font-size: 0.72rem;
   color: var(--ink-soft);
   padding: 0.4rem 1.15rem;
   position: relative;
   transition: color 0.3s ease;
}

.tol-nav__menu .nav-link::after {
   content: '';
   position: absolute;
   left: 1.15rem;
   right: 1.15rem;
   bottom: 0.15rem;
   height: 1px;
   background: var(--gold);
   transform: scaleX(0);
   transform-origin: left;
   transition: transform 0.35s ease;
}

.tol-nav__menu .nav-link:hover,
.tol-nav__menu .nav-link:focus {
   color: var(--ink);
}

.tol-nav__menu .nav-link:hover::after,
.tol-nav__menu .nav-link:focus::after {
   transform: scaleX(1);
}

/* Toggle (hamburguesa) */
.tol-nav__toggle {
   border: 1px solid var(--line);
   border-radius: var(--radius);
   padding: 0.45rem 0.6rem;
}
.tol-nav__toggle:focus {
   box-shadow: 0 0 0 2px var(--gold-soft);
   outline: none;
}
.tol-nav__toggle span {
   display: block;
   width: 24px;
   height: 1.5px;
   background: var(--ink);
   margin: 5px 0;
   transition: transform 0.3s ease, opacity 0.3s ease;
}

@keyframes spin-toggle {
   to {
      transform: rotate(360deg);
   }
}

/* Menú colapsable (mobile) */
.tol-nav .navbar-collapse {
   background: rgba(0, 0, 0, 0.92);
   backdrop-filter: blur(10px);
   border-top: 1px solid var(--line);
   margin-top: 0.5rem;
}
.tol-nav .navbar-collapse .nav-link {
   padding-block: 0.65rem;
   border-bottom: 1px solid var(--line);
}

/* ============================ HERO ============================ */
.tol-hero {
   min-height: 100svh;
   display: flex;
   align-items: center;
   justify-content: center;
   text-align: center;
   padding: calc(var(--nav-h) + 3rem) 0 5rem;
   position: relative;
   overflow: hidden;
}

.tol-hero__inner {
   max-width: 880px;
   position: relative;
}

.tol-hero__logo {
   margin: 0 auto 2.4rem;
   max-width: min(560px, 90vw);
   width: auto;
   object-fit: contain;
   filter:
      drop-shadow(0 0 50px rgba(201, 162, 75, 0.08))
      drop-shadow(0 20px 60px rgba(0, 0, 0, 0.7));
}

.tol-eyebrow {
   font-family: var(--serif-display);
   font-weight: 500;
   text-transform: uppercase;
   letter-spacing: 0.28em;
   font-size: clamp(0.95rem, 2vw, 1.35rem);
   color: var(--ink);
   margin: 2.2rem 0 1.6rem;
   position: relative;
   padding-top: 2.4rem;
}

/* Ornamento "— ✦ —" sobre el eyebrow, al estilo del logotipo */
.tol-eyebrow::before,
.tol-eyebrow::after {
   content: '';
   position: absolute;
   top: 0;
   width: clamp(30px, 8vw, 64px);
   height: 1px;
   background: linear-gradient(90deg, transparent, var(--gold-soft));
}
.tol-eyebrow::before {
   right: calc(50% + 1.4rem);
   transform: scaleX(-1);
}
.tol-eyebrow::after {
   left: calc(50% + 1.4rem);
}

.tol-lead {
   font-family: var(--serif-text);
   font-size: clamp(1.15rem, 1.6vw, 1.4rem);
   color: var(--ink-soft);
   max-width: 60ch;
   margin: 0 auto 1.5rem;
   line-height: 1.85;
}

.tol-muted {
   font-family: var(--serif-text);
   font-size: clamp(1rem, 1.4vw, 1.15rem);
   color: var(--ink-faint);
   max-width: 64ch;
   margin: 0 auto 2.8rem;
   line-height: 1.85;
   font-style: italic;
}

/* Cita de scroll */
.tol-scroll-cue {
   display: inline-flex;
   align-items: center;
   gap: 0.7rem;
   font-family: var(--serif-display);
   text-transform: uppercase;
   letter-spacing: 0.24em;
   font-size: 0.72rem;
   color: var(--ink-soft);
   text-decoration: none;
   transition: color 0.3s ease;
   position: relative;
}
.tol-scroll-cue:hover,
.tol-scroll-cue:focus {
   color: var(--gold);
}
.tol-scroll-cue__line {
   display: inline-block;
   width: 34px;
   height: 1px;
   background: var(--gold-soft);
   animation: cue-pulse 2.6s ease-in-out infinite;
}
@keyframes cue-pulse {
   0%,
   100% {
      transform: scaleX(0.4);
      opacity: 0.4;
      transform-origin: left;
   }
   50% {
      transform: scaleX(1);
      opacity: 1;
   }
}

/* ============================ SECCIONES ============================ */
.tol-section {
   padding-block: var(--section-pad);
   position: relative;
}

/* Divisor sutil entre secciones */
.tol-section + .tol-section,
.tol-hero + .tol-section {
   border-top: 1px solid var(--line);
}

.tol-section__head {
   margin-bottom: 3rem;
}

.tol-title {
   font-family: var(--serif-display);
   font-weight: 600;
   text-transform: uppercase;
   letter-spacing: 0.2em;
   color: var(--ink);
   font-size: clamp(1.9rem, 4.6vw, 3.6rem);
   line-height: 1.1;
   margin: 0 0 1rem;
   text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
}

.tol-subtitle {
   font-family: var(--serif-text);
   font-style: italic;
   text-transform: uppercase;
   letter-spacing: 0.18em;
   color: var(--gold);
   font-size: clamp(0.85rem, 1.4vw, 1.05rem);
   margin: 0;
   font-weight: 500;
}

/* Listas de características (centradas) */
.tol-feats,
.tol-verse {
   list-style: none;
   padding: 0;
   margin: 0 auto 2.4rem;
   max-width: 56ch;
}

.tol-feats li,
.tol-verse li {
   font-family: var(--serif-text);
   text-transform: uppercase;
   letter-spacing: 0.16em;
   font-size: clamp(0.9rem, 1.4vw, 1.05rem);
   color: var(--ink-soft);
   padding: 0.5rem 0.75rem;
   position: relative;
   line-height: 1.6;
}

/* Marca tipo guion con acento dorado a la izquierda */
.tol-feats li::before,
.tol-verse li::before {
   content: '—';
   color: var(--gold);
   margin-right: 0.85rem;
   font-weight: 600;
}

.tol-verse--tight li {
   padding-top: 0.32rem;
   padding-bottom: 0.32rem;
}

.tol-verse--tight li::before {
   content: '·';
   font-size: 1.3rem;
   vertical-align: -0.25rem;
}

/* Textos de cierre */
.tol-closing {
   font-family: var(--serif-display);
   text-transform: uppercase;
   letter-spacing: 0.16em;
   font-size: clamp(0.95rem, 1.5vw, 1.15rem);
   color: var(--ink);
   max-width: 40ch;
   margin: 0 auto 3.4rem;
   font-weight: 500;
}
.tol-closing--tight {
   margin-bottom: 0;
   max-width: 52ch;
}
.tol-closing--emph {
   font-size: clamp(1.1rem, 2.2vw, 1.6rem);
   color: var(--gold);
   border-top: 1px solid var(--line);
   border-bottom: 1px solid var(--line);
   padding: 1.2rem 0;
   margin-bottom: 3.4rem;
   max-width: 30ch;
}

/* ============================ PRODUCTOS ============================ */
.tol-duo {
   margin-top: 1rem;
}

.tol-product {
   margin: 0;
   text-align: center;
   height: 100%;
   display: flex;
   flex-direction: column;
   justify-content: center;
}

.tol-product__frame {
   position: relative;
   background:
      radial-gradient(120% 120% at 50% 0%, rgba(243, 238, 227, 0.03), transparent 60%),
      var(--bg-soft);
   border: 1px solid var(--line);
   border-radius: var(--radius);
   padding: 1.5rem;
   box-shadow: var(--shadow-frame);
   transition: box-shadow 0.5s ease, transform 0.5s ease, border-color 0.5s ease;
   overflow: hidden;
}

.tol-product__frame::after {
   /* brillo sutil al pasar el cursor */
   content: '';
   position: absolute;
   inset: 0;
   background: linear-gradient(
      130deg,
      transparent 35%,
      rgba(201, 162, 75, 0.08) 50%,
      transparent 65%
   );
   opacity: 0;
   transition: opacity 0.5s ease;
   pointer-events: none;
}

.tol-product__frame img {
   width: 100%;
   height: auto;
   margin: 0 auto;
   border-radius: 1px;
   filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.6));
}

.tol-product__frame:hover {
   box-shadow: var(--shadow-frame-hover);
   transform: translateY(-4px);
   border-color: var(--line-strong);
}
.tol-product__frame:hover::after {
   opacity: 1;
}

.tol-product__label {
   font-family: var(--serif-display);
   text-transform: uppercase;
   letter-spacing: 0.3em;
   font-size: 0.78rem;
   color: var(--gold);
   margin-top: 1.2rem;
   font-weight: 500;
}

/* Imagen única (Bulk Box) */
.tol-single {
   max-width: 760px;
   margin: 3rem auto 0;
}
.tol-single .tol-product__frame {
   padding: 1.5rem;
}

/* ============================ GALLERÍA DE DETALLE ============================ */
.tol-gallery__grid {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
   gap: var(--gap);
}

.tol-gallery__item {
   margin: 0;
}
.tol-gallery__item img {
   width: 100%;
   height: auto;
   border: 1px solid var(--line);
   border-radius: var(--radius);
   box-shadow: var(--shadow-frame);
   transition: box-shadow 0.5s ease, transform 0.5s ease, border-color 0.5s ease;
}
.tol-gallery__item:hover img {
   box-shadow: var(--shadow-frame-hover);
   transform: translateY(-4px);
   border-color: var(--line-strong);
}

/* ============================ CARD SORTER (texto) ============================ */
.tol-sorter__text {
   max-width: 720px;
   margin: 0 auto 3.4rem;
}
.tol-sorter__text + .tol-duo {
   margin-top: 0;
}

/* ============================ FOOTER ============================ */
.tol-footer {
   text-align: center;
   padding: 4rem 0 5rem;
   border-top: 1px solid var(--line);
   background:
      radial-gradient(100% 100% at 50% 0%, rgba(201, 162, 75, 0.05), transparent 60%),
      var(--bg);
}
.tol-footer__wordmark {
   font-family: var(--serif-display);
   font-weight: 600;
   text-transform: uppercase;
   letter-spacing: 0.34em;
   font-size: 1.5rem;
   color: var(--ink);
   margin: 0 0 0.6rem;
}
.tol-footer__tag {
   font-family: var(--serif-text);
   text-transform: uppercase;
   letter-spacing: 0.2em;
   color: var(--gold);
   font-size: 0.8rem;
   margin: 0 0 1.8rem;
}
.tol-footer__legal {
   color: var(--ink-faint);
   font-size: 0.78rem;
   font-style: italic;
   letter-spacing: 0.04em;
   margin: 0;
   max-width: 44ch;
}

/* ============================ ANIMACIONES ============================ */
.reveal {
   opacity: 0;
   transform: translateY(26px);
   transition: opacity 0.8s ease, transform 0.8s ease;
   will-change: opacity, transform;
}
.reveal.is-in {
   opacity: 1;
   transform: none;
}

/* Stagger sutil para ítems de lista/grupos */
.tol-reveal-stagger .reveal {
   transition-delay: calc(var(--i, 0) * 90ms);
}

@media (prefers-reduced-motion: reduce) {
   html {
      scroll-behavior: auto;
   }
   .reveal {
      opacity: 1;
      transform: none;
      transition: none;
   }
   .tol-scroll-cue__line {
      animation: none;
   }
}

/* ============================ RESPONSIVE ============================ */
/* Tablet: columna en las duos de producto cuando sea muy justo */
@media (max-width: 991.98px) {
   .tol-nav__wordmark {
      font-size: 0.82rem;
   }
   .tol-nav__logo {
      width: 44px;
   }
}

/* Mobile: ajusta ritmo vertical y tamaños */
@media (max-width: 575.98px) {
   .tol-product__frame {
      padding: 0.9rem;
   }
   .tol-duo {
      gap: 0 !important;
   }
   .tol-product {
      margin-bottom: 2rem;
   }
   .tol-eyebrow {
      padding-top: 1.6rem;
   }
   .tol-closing {
      max-width: none;
   }
   .tol-closing--emph {
      max-width: none;
   }
}

/* Contenedor de producto en pantallas muy anchas: centrar y limitar ancho */
@media (min-width: 1400px) {
   .tol-duo .col-12.col-lg-6 {
      max-width: calc(50% - 1.25rem);
   }
   .tol-single {
      max-width: 820px;
   }
}

/* Parallax del hero: el transform se controla por script (inline). */
/* Se transiciona solo la opacidad, para que el movimiento de scroll sea nítido. */
.tol-hero__logo.reveal { transition: opacity 0.9s ease; transform: none; }
