/* ==========================================================================
   KINTSUGI — style.css — base, layout, components
   ========================================================================== */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body, h1, h2, h3, p, figure { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }

html, body {
  background: var(--bg-1);
  color: var(--text-primary);
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Texture base ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.04) 0, transparent 100%),
    radial-gradient(1px 1px at 70% 60%, rgba(255,255,255,0.03) 0, transparent 100%),
    radial-gradient(1px 1px at 40% 80%, rgba(255,255,255,0.03) 0, transparent 100%);
  background-size: 340px 340px;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold);
  color: var(--bg-0);
  padding: 0.8em 1.4em;
  z-index: 1000;
  font-family: var(--font-ui);
  font-weight: 600;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Focus ---------- */
:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Selection ---------- */
::selection { background: var(--gold-deep); color: var(--bg-0); }

/* ---------- Containers ---------- */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 3rem);
  position: relative;
  z-index: 2;
}
.container--narrow { max-width: var(--content-narrow); }

section { position: relative; z-index: 1; }

/* ---------- Eyebrow / labels ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-ui);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gradient-gold);
}

/* ---------- Headings ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; color: var(--text-primary); }

.section-title {
  font-size: var(--fs-h2);
  line-height: 1.18;
  font-weight: 600;
  color: var(--text-primary);
  max-width: 18ch;
}
.section-title--spaced {
  margin-bottom: 1.2rem;
}
.section-title em {
  font-style: italic;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead {
  font-size: var(--fs-lead);
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 56ch;
}

.section-head {
  margin-bottom: var(--space-lg);
}
.section-head--center {
  text-align: center;
  margin-inline: auto;
  max-width: 760px;
}
.section-head--center .section-title { max-width: none; margin-inline: auto; }
.section-head--center .lead {
  margin-inline: auto;
  max-width: 58ch;
}
.section-head::after {
  content: "";
  display: block;
  width: clamp(4.5rem, 8vw, 7rem);
  height: 1px;
  margin-top: var(--space-sm);
  background: linear-gradient(90deg, transparent, rgba(247, 200, 75, 0.82), transparent);
  opacity: 0.95;
}
.section-head--center::after {
  margin-inline: auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.95em 1.9em;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform var(--dur-fast) var(--ease-soft), box-shadow var(--dur-fast) var(--ease-soft), background var(--dur-fast) var(--ease-soft), border-color var(--dur-fast) var(--ease-soft);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--gold {
  background: var(--gradient-gold);
  color: var(--bg-0);
  box-shadow: 0 10px 30px rgba(247, 200, 75, 0.25);
}
.btn--gold:hover {
  box-shadow: 0 14px 38px rgba(255, 215, 106, 0.4);
}

.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: rgba(246, 241, 232, 0.3);
}
.btn--ghost:hover {
  border-color: var(--gold);
  color: var(--gold-light);
}
.btn--compact {
  padding: 0.5em 1.2em;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(12,7,22,0.85), rgba(12,7,22,0));
  backdrop-filter: blur(0px);
  transition: background var(--dur-fast) var(--ease-soft), backdrop-filter var(--dur-fast) var(--ease-soft), padding var(--dur-fast) var(--ease-soft);
}
.nav.is-scrolled {
  background: rgba(12, 7, 22, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: var(--border-hairline);
  padding-block: 0.75rem;
}
.nav__mark {
  font-family: var(--font-mark);
  font-size: 1.9rem;
  color: var(--gold-light);
  line-height: 1;
}
.nav__links {
  display: flex;
  gap: clamp(1rem, 2vw, 2.2rem);
  font-family: var(--font-ui);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}
.nav__links a {
  color: var(--text-secondary);
  position: relative;
  padding-bottom: 4px;
  transition: color var(--dur-fast) var(--ease-soft);
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 1px;
  background: var(--gold);
  transition: right var(--dur-fast) var(--ease-soft);
}
.nav__links a:hover { color: var(--text-primary); }
.nav__links a:hover::after { right: 0; }

.nav__toggle {
  display: none;
  background: none;
  border: 1px solid rgba(246,241,232,0.3);
  border-radius: 8px;
  width: 42px;
  height: 38px;
  color: var(--text-primary);
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--bg-0);
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 78% 35%;
  transform: scale(1.04);
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: var(--gradient-hero-overlay);
  z-index: 1;
}
.hero__veil {
  position: absolute;
  inset: 0;
  background: var(--gradient-veil);
  z-index: 1;
}
.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: 6rem;
}
.hero__inner {
  max-width: 640px;
  position: relative;
  padding: clamp(1.35rem, 2.8vw, 2.1rem);
  border-radius: calc(var(--radius-lg) + 6px);
  background: linear-gradient(135deg, rgba(12,7,22,0.26) 0%, rgba(12,7,22,0.08) 56%, rgba(12,7,22,0.02) 100%);
  border: 1px solid rgba(247,200,75,0.08);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.16);
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
  overflow: hidden;
}
.hero__inner::before {
  content: "";
  position: absolute;
  top: 1rem;
  bottom: 1rem;
  left: 0;
  width: 3px;
  background: linear-gradient(180deg, transparent, rgba(247,200,75,0.9), transparent);
  box-shadow: 0 0 18px rgba(247,200,75,0.22);
  opacity: 0.85;
}
.hero__inner > * {
  position: relative;
  z-index: 1;
}
.hero__kicker {
  font-family: var(--font-ui);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  display: block;
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid rgba(247,200,75,0.15);
  width: fit-content;
  max-width: 100%;
}
.hero__title {
  font-family: var(--font-mark);
  font-size: var(--fs-mark);
  line-height: 0.92;
  font-weight: 400;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 30px rgba(247, 200, 75, 0.22));
  margin-bottom: 0.1em;
}
.hero__subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.2rem, 1rem + 1.1vw, 1.9rem);
  letter-spacing: 0.03em;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  text-transform: uppercase;
  max-width: 16ch;
}
.hero__lead {
  font-family: var(--font-body);
  font-size: var(--fs-lead);
  color: var(--text-secondary);
  max-width: 42ch;
  margin-bottom: var(--space-lg);
}
.hero__byline {
  margin-top: var(--space-lg);
  padding-top: var(--space-sm);
  border-top: 1px solid rgba(247,200,75,0.12);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}
.hero__byline strong {
  color: var(--gold);
  font-weight: 600;
}
.hero__scroll {
  position: absolute;
  bottom: clamp(0.5rem, 1.5vh, 1.4rem);
  left: clamp(1.25rem, 4vw, 3rem);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.7em;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.hero__scroll--below {
  position: static;
  bottom: auto;
  left: auto;
  margin: 0;
}
.hero__scroll-line {
  width: 1px;
  height: 38px;
  background: linear-gradient(var(--gold), transparent);
  position: relative;
  overflow: hidden;
}
.hero__scroll-line::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gold-light);
  animation: scrollPulse 2.4s var(--ease-soft) infinite;
}

/* ---------- Crack seam divider (signature element) ---------- */
.seam {
  position: relative;
  height: 112px;
  width: 100%;
  overflow: hidden;
  z-index: 2;
  margin-block: 0.35rem 0.8rem;
  pointer-events: none;
}
.seam svg { width: 100%; height: 100%; display: block; }
.seam path.crack-line {
  fill: none;
  stroke: url(#seamGold);
  stroke-width: 1.4;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(247,200,75,0.35));
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  transition: stroke-dashoffset 1.6s var(--ease-silk);
}
.seam.is-visible path.crack-line { stroke-dashoffset: 0; }
.seam .seam-spark {
  opacity: 0;
  transition: opacity 0.6s ease 1s;
}
.seam.is-visible .seam-spark { opacity: 1; }
.seam--flush-end {
  margin-block: 0;
}
.hero__scroll-band {
  position: relative;
  z-index: 2;
  padding-block: 1.95rem 0.35rem;
}
.hero__scroll-band .container {
  display: flex;
  justify-content: flex-start;
}

/* ---------- Generic section paddings ---------- */
.section {
  padding-block: calc(var(--space-2xl) + 0.9rem);
}
.section--alt { background: var(--gradient-section); }
.section--tight { padding-block: var(--space-xl); }
.seam + .section,
.seam + .cta {
  padding-top: calc(var(--space-2xl) + 2.25rem);
}

/* ---------- Sobre el libro ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(3rem, 6vw, 5rem);
  align-items: center;
}
.about__cover {
  position: relative;
  justify-self: center;
}
.about__cover-frame {
  position: relative;
  width: min(340px, 70vw);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-deep);
  border: 1px solid rgba(247,200,75,0.25);
}
.about__cover-frame img { width: 100%; height: auto; display: block; }
.about__cover-glow {
  position: absolute;
  inset: -40px;
  background: radial-gradient(circle, rgba(247,200,75,0.18), transparent 70%);
  z-index: -1;
  filter: blur(10px);
}
.about__text .section-title { max-width: 16ch; margin-bottom: var(--space-sm); }
.about__text p + p { margin-top: 1.1em; }
.about__text p { color: var(--text-secondary); font-size: var(--fs-body); }
.about__meta {
  margin-top: var(--space-lg);
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
}
.about__meta-item {
  font-family: var(--font-ui);
}
.about__meta-item dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin-bottom: 0.3em;
}
.about__meta-item dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--text-primary);
}

/* ---------- Historia (editorial block w/ pull quote) ---------- */
.story {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(3rem, 6vw, 5rem);
  align-items: center;
}
.story__pull {
  position: relative;
  padding-left: var(--space-md);
  border-left: 1px solid;
  border-image: var(--gradient-gold) 1;
}
.story__pull blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.3rem, 1.1rem + 1vw, 1.9rem);
  line-height: 1.45;
  color: var(--text-primary);
}
.story__pull cite {
  display: block;
  margin-top: var(--space-sm);
  font-style: normal;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}
.story__body p { color: var(--text-secondary); }
.story__body p + p { margin-top: 1.1em; }

/* ---------- Qué descubrirás — cards ---------- */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 1.8vw, 1.4rem);
  align-items: stretch;
}
.discover-card {
  background: linear-gradient(160deg, rgba(255,255,255,0.035), rgba(255,255,255,0.01));
  border: var(--border-hairline);
  border-radius: calc(var(--radius-md) + 2px);
  padding: clamp(1.25rem, 2vw, 1.7rem);
  position: relative;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: transform var(--dur-fast) var(--ease-soft), border-color var(--dur-fast) var(--ease-soft), box-shadow var(--dur-fast) var(--ease-soft);
}
.discover-card:hover {
  transform: translateY(-6px);
  border-color: rgba(247,200,75,0.45);
  box-shadow: var(--shadow-gold);
}
.discover-card__icon {
  width: 42px; height: 42px;
  margin-bottom: var(--space-xs);
  color: var(--gold);
}
.discover-card__icon svg { width: 100%; height: 100%; }
.discover-card h3 {
  font-size: 1.12rem;
  line-height: 1.22;
  max-width: 18ch;
  text-wrap: balance;
  margin-bottom: 0.55em;
}
.discover-card p {
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.62;
  overflow-wrap: anywhere;
}

/* ---------- Temas — chips/cards ---------- */
.themes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: rgba(247,200,75,0.14);
  border: var(--border-hairline);
  border-radius: var(--radius-md);
  overflow: hidden;
  align-items: stretch;
}
.theme-cell {
  background: var(--bg-2);
  padding: clamp(1.15rem, 2vw, 1.55rem) var(--space-sm);
  text-align: center;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: background var(--dur-fast) var(--ease-soft);
}
.theme-cell:hover { background: var(--bg-3); }
.theme-cell__num {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--gold-deep);
  font-size: 0.85rem;
  display: block;
  margin-bottom: 0.6em;
}
.theme-cell h3 {
  font-size: 1.1rem;
  margin-bottom: 0.35em;
}
.theme-cell p {
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* ---------- Frases destacadas ---------- */
.quotes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 1.8vw, 1.35rem);
}
.quote-card {
  position: relative;
  padding: var(--space-lg) var(--space-md) var(--space-md);
  background: var(--bg-2);
  border-radius: var(--radius-md);
  border: var(--border-hairline);
  min-height: 100%;
  display: flex;
  flex-direction: column;
}
.quote-card::before {
  content: "\201C";
  position: absolute;
  top: 0.2em;
  left: 0.35em;
  font-family: var(--font-display);
  font-size: 3.4rem;
  color: var(--gold-deep);
  opacity: 0.55;
  line-height: 1;
}
.quote-card p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.18rem;
  line-height: 1.5;
  color: var(--text-primary);
  max-width: 24ch;
}
.quote-card span {
  display: block;
  margin-top: auto;
  padding-top: var(--space-sm);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- Transformación — timeline ---------- */
.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(0.85rem, 1.4vw, 1.2rem);
}
.timeline::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(247,200,75,0.45) 8%, rgba(247,200,75,0.45) 92%, transparent);
}
.timeline-step {
  position: relative;
  text-align: center;
  padding-top: var(--space-lg);
  min-height: 170px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.timeline-step__dot {
  position: absolute;
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--bg-1);
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 6px rgba(247,200,75,0.08);
}
.timeline-step h3 {
  font-size: 1.05rem;
  color: var(--gold-light);
  margin-bottom: 0.5em;
}
.timeline-step p {
  font-size: 0.88rem;
  line-height: 1.55;
  max-width: 18ch;
  color: var(--text-muted);
}

/* ---------- Autora ---------- */
.author {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(3rem, 6vw, 5rem);
  align-items: center;
}
.author__portrait {
  position: relative;
  justify-self: center;
  width: min(300px, 60vw);
}
.author__portrait-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 4.5;
  border: 1px solid rgba(247,200,75,0.3);
  box-shadow: var(--shadow-deep);
}
.author__portrait-frame img {
  width: 100%; height: 100%; object-fit: cover; object-position: center top;
  filter: saturate(1.05) contrast(1.03);
}
.author__portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, rgba(42,23,64,0.25), rgba(12,7,22,0.05) 40%, rgba(12,7,22,0.35) 100%);
  mix-blend-mode: multiply;
}
.author__crack {
  position: absolute;
  inset: -18px;
  z-index: -1;
  opacity: 0.7;
}
.author__text .section-title { max-width: none; }
.author__text p { color: var(--text-secondary); }
.author__text p + p { margin-top: 1.05em; }
.author__sign {
  margin-top: var(--space-md);
  font-family: var(--font-mark);
  font-size: 2.1rem;
  color: var(--gold-light);
}

/* ---------- Dónde comprar ---------- */
.buy {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(3rem, 6vw, 5rem);
  align-items: center;
}
.buy__book {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: var(--space-sm);
}
.buy__book-frame {
  position: relative;
  width: min(340px, 70vw);
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(247, 200, 75, 0.24);
  box-shadow: var(--shadow-deep);
  background: var(--bg-2);
}
.buy__book-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.buy__book-caption {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: center;
}
.buy__text {
  display: flex;
  justify-content: center;
}
.buy__actions {
  display: grid;
  gap: var(--space-sm);
  width: min(100%, 360px);
}
.buy__button {
  width: 100%;
  justify-content: flex-start;
  padding: 1rem 1.25rem;
  text-align: left;
  white-space: normal;
}
.buy__button-icon {
  display: inline-flex;
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
}
.buy__button-icon svg {
  width: 100%;
  height: 100%;
}
.buy__button-label {
  flex: 1;
}

/* ---------- Otros títulos ---------- */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1rem, 1.8vw, 1.35rem);
  align-items: stretch;
}
.catalog-card {
  background: linear-gradient(160deg, rgba(255,255,255,0.035), rgba(255,255,255,0.01));
  border: var(--border-hairline);
  border-radius: calc(var(--radius-md) + 2px);
  overflow: hidden;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform var(--dur-fast) var(--ease-soft), border-color var(--dur-fast) var(--ease-soft), box-shadow var(--dur-fast) var(--ease-soft);
}
.catalog-card:hover {
  transform: translateY(-6px);
  border-color: rgba(247,200,75,0.45);
  box-shadow: var(--shadow-gold);
}
.catalog-card--featured {
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.22);
}
.catalog-card__cover {
  position: relative;
  aspect-ratio: 2 / 3;
  background: var(--bg-2);
  border-bottom: 1px solid rgba(247, 200, 75, 0.16);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.catalog-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.catalog-card__cover--placeholder {
  text-align: center;
}
.catalog-card__cover--placeholder::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 28%, rgba(247,200,75,0.24), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0));
}
.catalog-card__cover--placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.03), transparent 45%, rgba(0,0,0,0.18));
}
.catalog-card__cover--placeholder span {
  position: relative;
  z-index: 1;
  font-family: var(--font-mark);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  color: var(--gold-light);
  text-shadow: 0 0 16px rgba(247, 200, 75, 0.24);
}
.catalog-card__cover--serendipity {
  background: linear-gradient(160deg, rgba(42,23,64,0.98), rgba(20,12,34,0.94));
}
.catalog-card__cover--epifania {
  background: linear-gradient(160deg, rgba(22,36,56,0.98), rgba(12,7,22,0.94));
}
.catalog-card__cover--malquevi {
  background: linear-gradient(160deg, rgba(56,33,18,0.98), rgba(20,12,34,0.94));
}
.catalog-card__body {
  padding: clamp(1.1rem, 2vw, 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}
.catalog-card__title {
  font-size: 1.12rem;
  line-height: 1.22;
  max-width: 20ch;
  text-wrap: balance;
}
.catalog-card__meta {
  margin-top: auto;
  padding-top: 0.7rem;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 1.75rem);
  bottom: clamp(1rem, 3vw, 1.75rem);
  z-index: calc(var(--z-nav) + 1);
  width: 52px;
  height: 52px;
  border: 1px solid rgba(247, 200, 75, 0.32);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(247, 200, 75, 0.92), rgba(216, 154, 30, 0.92));
  color: var(--bg-0);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28), 0 0 22px rgba(247, 200, 75, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease-soft), transform var(--dur-fast) var(--ease-soft), box-shadow var(--dur-fast) var(--ease-soft);
}
.back-to-top svg {
  width: 1.05rem;
  height: 1.05rem;
}
.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.back-to-top:hover {
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.32), 0 0 28px rgba(247, 200, 75, 0.28);
}

/* ---------- CTA ---------- */
.cta {
  position: relative;
  text-align: center;
  padding-block: var(--space-2xl);
  overflow: hidden;
}
.cta__bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(247,200,75,0.12), transparent 60%), var(--bg-1);
  z-index: 0;
}
.cta__content { position: relative; z-index: 1; }
.cta .section-title { max-width: 20ch; margin-inline: auto; }
.cta .lead { margin-inline: auto; margin-bottom: var(--space-lg); max-width: 58ch; }
.cta .btn-row { justify-content: center; }

/* ---------- Footer ---------- */
.footer {
  border-top: var(--border-hairline);
  padding-block: var(--space-xl) var(--space-lg);
  background: var(--bg-0);
}
.footer__top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}
.footer__mark {
  font-family: var(--font-mark);
  font-size: 2.4rem;
  color: var(--gold-light);
}
.footer__tag {
  margin-top: 0.4em;
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 36ch;
}
.footer__nav {
  display: flex;
  gap: var(--space-lg);
  flex-wrap: wrap;
}
.footer__col h4 {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-xs);
}
.footer__col ul li + li { margin-top: 0.5em; }
.footer__col a {
  color: var(--text-secondary);
  font-size: 0.92rem;
  transition: color var(--dur-fast) var(--ease-soft);
}
.footer__col a:hover { color: var(--gold-light); }
.footer__bottom {
  border-top: 1px solid rgba(246,241,232,0.08);
  padding-top: var(--space-md);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-xs);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ---------- Particles canvas ---------- */
.particles-canvas {
  position: absolute;
  inset: 0;
  z-index: var(--z-particles);
  pointer-events: none;
}

/* ---------- Reveal base state (JS controlled) ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-silk), transform 0.9s var(--ease-silk);
}
[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease-silk), transform 0.7s var(--ease-silk);
}
[data-reveal-stagger].is-revealed > * {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal-stagger] > * {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
