/* ============================================================
   LE MONDE DES GABBARDONS — Design System
   Fantasy Cosmique · Or & Noir · FR / EN / PT
   ============================================================ */

:root {
  /* Fonds — bleu nuit */
  --color-bg:           #04101f;
  --color-bg-section:   rgba(3, 11, 26, 0.55);
  --color-bg-card:      rgba(9, 24, 48, 0.62);
  --color-bg-overlay:   rgba(2,9,22,0.72);
  --color-navy-deep:    #030c19;

  /* Or */
  --color-gold:         #D8B24C;
  --color-gold-bright:  #F0D277;
  --color-gold-dark:    #8A6A18;
  --color-gold-muted:   #B59A55;

  /* Accents */
  --color-blue-crystal: #2C7FC0;
  --color-teal-portal:  #00C9D4;
  --color-eye-green:    #5BA94E;

  /* Texte */
  --color-text:         #EFE7D6;
  --color-text-muted:   #A9B6C9;
  --color-text-dim:     #5E7088;

  /* Bordures */
  --color-border:       rgba(120, 150, 190, 0.18);
  --color-border-gold:  rgba(216,178,76,0.34);

  /* Typo — EB Garamond partout */
  --font-display: 'EB Garamond', serif;
  --font-heading: 'EB Garamond', serif;
  --font-body:    'EB Garamond', serif;

  --size-hero:  clamp(2.2rem, 6vw, 5.5rem);
  --size-h2:    clamp(1.7rem, 3.6vw, 2.9rem);
  --size-h3:    clamp(1.2rem, 2.5vw, 1.8rem);
  --size-body:  clamp(1.05rem, 1.4vw, 1.22rem);
  --size-small: clamp(0.85rem, 1.2vw, 1rem);

  --maxw: 1240px;
  --header-h: 56px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--size-body);
  line-height: 1.7;
  /* Fond bleu nuit du site */
  background-image:
    radial-gradient(120% 75% at 50% 8%, rgba(216,178,76,0.05), transparent 55%),
    url('assets/opt/site-bg-nebula.png');
  background-repeat: no-repeat, no-repeat;
  background-size: cover, cover;
  background-position: center top, center center;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: rgba(216,178,76,0.32); color: #fff; }

/* Faint starfield texture overlay */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(238,244,255,0.55), transparent),
    radial-gradient(1px 1px at 70% 60%, rgba(238,244,255,0.45), transparent),
    radial-gradient(1px 1px at 40% 80%, rgba(238,244,255,0.4), transparent),
    radial-gradient(1px 1px at 85% 15%, rgba(238,244,255,0.45), transparent),
    radial-gradient(1px 1px at 10% 70%, rgba(238,244,255,0.35), transparent),
    radial-gradient(1.5px 1.5px at 55% 25%, rgba(238,244,255,0.5), transparent);
  background-size: 100% 100%;
  opacity: 0.6;
}

/* Particles canvas */
#particles {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 1;
}

main, header, footer { position: relative; z-index: 2; }

/* ---------- Typography helpers ---------- */
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.12; }
p { margin: 0 0 1.1em; text-wrap: pretty; }

.section-title {
  font-family: var(--font-heading);
  font-size: var(--size-h2);
  color: var(--color-gold);
  font-weight: 700;
  letter-spacing: 0.045em;
  font-variant: small-caps;
  text-align: center;
  text-shadow: 0 0 28px rgba(216,178,76,0.30), 0 0 70px rgba(216,178,76,0.12);
}
.section-title-logo { display: block; max-width: min(360px, 70vw); height: auto; margin: 0 auto 1.6rem; }
.eyebrow {
  font-family: var(--font-heading);
  font-size: var(--size-small);
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--color-gold-muted);
  text-align: center;
  margin-bottom: 0.8rem;
  font-weight: 500;
}

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 5vw, 56px); }
section { position: relative; padding: clamp(72px, 11vh, 140px) 0; scroll-margin-top: 160px; }
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 3000;
  background: var(--color-gold); color: #1a1407; padding: 12px 20px; border-radius: 4px;
  font-family: var(--font-heading); font-weight: 600; transition: top 0.2s;
}
.skip-link:focus { top: 12px; }
.section-alt { background: var(--color-bg-section); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }

/* Section divider ornament — trois points en triangle isocèle */
.section-divider { display: flex; align-items: center; gap: 20px; max-width: 360px; margin: 0 auto 2.6rem; }
.section-divider .line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--color-gold-muted)); }
.section-divider .line:last-child { background: linear-gradient(90deg, var(--color-gold-muted), transparent); }
.tri-dots {
  position: relative; width: 20px; height: 16px; flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(216,178,76,0.55));
}
.tri-dots i {
  position: absolute; width: 4.5px; height: 4.5px; border-radius: 50%;
  background: var(--color-gold);
}
.tri-dots i:nth-child(1) { top: 0; left: 50%; transform: translateX(-50%); }
.tri-dots i:nth-child(2) { bottom: 0; left: 1px; }
.tri-dots i:nth-child(3) { bottom: 0; right: 1px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 0.8s cubic-bezier(.16,1,.3,1), transform 0.8s cubic-bezier(.16,1,.3,1); }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ============================================================
   SPLASH / WELCOME
   ============================================================ */
.splash-screen {
  position: fixed; inset: 0; z-index: 5000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3rem;
  background: radial-gradient(120% 90% at 50% 40%, rgba(216,178,76,0.06), transparent 60%), var(--color-navy-deep);
  background-image: url('assets/opt/splash-bg.png'), radial-gradient(120% 90% at 50% 40%, rgba(216,178,76,0.06), transparent 60%);
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  transition: opacity 0.6s ease, visibility 0.6s;
}
.splash-screen.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-video { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center center; z-index: -1; }
.splash-screen.page-leaving { opacity: 0; transition: opacity 0.4s ease; }
@media (prefers-reduced-motion: reduce) {
  .splash-screen.page-leaving { transition: opacity 0.15s linear; }
}
.splash-social { display: flex; gap: 16px; position: absolute; top: clamp(28px, 5vh, 56px); left: 50%; transform: translateX(-50%); }
.splash-social a { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; color: var(--color-gold); transition: color 0.2s, transform 0.2s; }
.splash-social a:hover { color: var(--color-gold-bright); transform: translateY(-2px); }
.splash-social svg { width: 22px; height: 22px; }
.splash-center { display: flex; flex-direction: column; align-items: center; gap: 1.6rem; text-align: center; padding: 0 24px; }
.splash-title-logo { max-width: min(720px, 82vw); height: auto; }
.splash-tagline { font-family: var(--font-heading); letter-spacing: 0.28em; text-transform: uppercase; font-size: clamp(0.9rem, 1.35vw, 1.14rem); font-weight: 500; color: #F4EFE4; text-shadow: 0 2px 4px rgba(0,0,0,0.75), 0 0 12px rgba(0,0,0,0.35); }
.splash-title-logo { max-width: min(720px, 82vw); height: auto; }
.splash-lang { position: static; margin-top: 0.4rem; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; background: rgba(5,8,15,0.55); border: 1px solid rgba(255,255,255,0.12); border-radius: 6px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: 0 4px 18px rgba(0,0,0,0.28); }
.splash-lang a { font-size: 15px; color: #F4EFE4; opacity: 0.9; }
.splash-lang a:hover { color: #fff; opacity: 1; transform: translateY(-1px); }
.splash-lang a.active { color: #E8C46A; opacity: 1; background: none; }
.splash-lang .separator { color: rgba(255,255,255,0.3); }
@media (max-width: 768px) {
  .splash-lang { padding: 10px 14px; }
  .splash-lang a { font-size: 15px; padding: 6px 8px; }
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; flex-direction: column; width: 100%;
  background: transparent;
  transition: background 0.3s;
}
.site-header.scrolled { background: transparent; }
.header-top {
  position: relative; z-index: 1; display: flex; align-items: center; justify-content: center;
  padding: 20px clamp(20px, 5vw, 56px) 14px; min-height: 96px;
  background-color: #030c19;
  border-top: 1px solid var(--color-border-gold);
}
.header-social { position: absolute; left: clamp(20px, 5vw, 56px); top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 12px; }
.header-top .lang-switcher { position: absolute; right: clamp(20px, 5vw, 56px); top: 50%; transform: translateY(-50%); }
.header-social a {
  display: flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border: 1px solid var(--color-border-gold); border-radius: 50%; color: var(--color-text-muted);
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}
.header-social a:hover { color: var(--color-gold-bright); border-color: var(--color-gold); transform: translateY(-1px); }
.header-social svg { width: 17px; height: 17px; }
.header-title-link { display: flex; }
.header-title-link img { height: 64px; width: auto; filter: drop-shadow(0 0 20px rgba(216,178,76,0.25)); }
.header-bottom {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: flex-start; gap: 24px;
  height: var(--header-h);
  padding: 0 clamp(20px, 5vw, 56px);
  border-top: 1px solid var(--color-gold);
  border-bottom: 1px solid var(--color-gold);
  background: rgba(3, 11, 26, 0.94);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  width: 100%;
  box-sizing: border-box;
}
.header-logo { display: flex; align-items: center; flex-shrink: 0; }
.header-logo img { height: 32px; width: auto; filter: drop-shadow(0 0 14px rgba(216,178,76,0.3)); transition: opacity 0.3s; }

.site-nav { display: flex; align-items: center; gap: clamp(14px, 1.8vw, 30px); margin-right: auto; margin-left: 24px; }
.site-nav a {
  font-family: var(--font-heading);
  font-size: 0.86rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  position: relative;
  padding: 4px 0;
  font-weight: 500;
  transition: color 0.25s;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1px; width: 0;
  background: var(--color-gold-bright); transition: width 0.3s;
}
.site-nav a:hover, .site-nav a.active { color: var(--color-gold-bright); }
.site-nav a:hover::after, .site-nav a.active::after { width: 100%; }

.lang-switcher { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.lang-switcher a {
  color: var(--color-text-dim);
  font-family: var(--font-heading); font-size: 0.92rem; letter-spacing: 0.06em; font-weight: 500;
  padding: 5px 7px; border-radius: 3px; transition: color 0.2s, background 0.2s;
}
.lang-switcher a:hover { color: var(--color-gold-muted); }
.lang-switcher a.active { color: var(--color-gold-bright); background: rgba(216,178,76,0.12); }
.lang-switcher .separator { color: var(--color-text-dim); font-size: 0.7rem; }

.burger-menu {
  display: none;
  background: none; border: 1px solid var(--color-border-gold); border-radius: 4px;
  color: var(--color-gold); font-size: 1.3rem; width: 44px; height: 44px;
  align-items: center; justify-content: center;
}

/* Mobile menu overlay */
.mobile-menu {
  position: fixed; inset: 0; z-index: 1500;
  background: rgba(3, 11, 26, 0.97);
  backdrop-filter: blur(8px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 30px;
  opacity: 0; visibility: hidden; transition: opacity 0.4s, visibility 0.4s;
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu a {
  font-family: var(--font-heading); font-size: 1.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--color-gold-muted); font-variant: small-caps; font-weight: 600;
}
.mobile-menu a:hover { color: var(--color-gold-bright); }
.mm-lang { display: flex; gap: 14px; margin-top: 18px; }
.mobile-menu .mm-lang a {
  background: none; border: 1px solid var(--color-border-gold); color: var(--color-text-muted);
  font-family: var(--font-heading); padding: 8px 16px; border-radius: 4px; font-size: 0.9rem;
}
.mobile-menu .mm-lang a.active { color: var(--color-gold-bright); border-color: var(--color-gold); }
.mobile-menu .mm-close {
  position: absolute; top: 24px; right: 24px; background: none; border: none;
  color: var(--color-gold); font-size: 2rem; line-height: 1;
}

/* ============================================================
   HERO — page d'accueil de l'auteur
   ============================================================ */
.hero {
  position: relative;
  min-height: calc(78vh - (var(--header-h) / 2));
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.2rem;
  padding: clamp(30px, 5vh, 70px) 0;
  overflow: hidden;
  text-align: center;
  background-image: linear-gradient(rgba(4,16,31,0.55), rgba(4,16,31,0.72)), url('assets/opt/site-bg-nebula.png');
  background-size: cover;
  background-position: center;
}
.hero-cards { display: flex; gap: clamp(20px, 3vw, 40px); z-index: 2; }
.hero-card-col { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; width: clamp(210px, 26vw, 340px); }
.hero-card-col .btn { width: 100%; max-width: 380px; justify-content: center; white-space: nowrap; }
.hero-card { display: block; width: 100%; border-radius: 5px; overflow: hidden; border: 1px solid var(--color-border-gold); box-shadow: 0 18px 60px rgba(0,0,0,0.5), 0 0 40px rgba(216,178,76,0.15); transition: transform 0.3s, box-shadow 0.3s; }
.hero-card:hover { transform: translateY(-4px); box-shadow: 0 24px 70px rgba(0,0,0,0.6), 0 0 50px rgba(216,178,76,0.25); }
.hero-card img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3/4; }
.hero-mascot { position: absolute; left: clamp(8px, 3vw, 40px); bottom: clamp(4px, 2vh, 20px); width: clamp(128px, 16vw, 220px); height: auto; z-index: 2; }
.hero-inner { position: relative; z-index: 2; text-align: left; max-width: 1000px; padding: 0 24px; display: flex; flex-direction: row; align-items: stretch; gap: clamp(28px, 5vw, 60px); }
.hero-logo {
  width: auto; height: 100%; object-fit: contain; object-position: top; margin: 0; flex-shrink: 0;
  filter: drop-shadow(0 6px 50px rgba(0,0,0,0.55)) drop-shadow(0 0 60px rgba(216,178,76,0.28));
  animation: logoGlow 6s ease-in-out infinite;
}
@keyframes logoGlow {
  0%, 100% { filter: drop-shadow(0 6px 50px rgba(0,0,0,0.55)) drop-shadow(0 0 50px rgba(216,178,76,0.22)); }
  50% { filter: drop-shadow(0 6px 50px rgba(0,0,0,0.55)) drop-shadow(0 0 78px rgba(216,178,76,0.42)); }
}
.hero-name {
  font-family: var(--font-display); color: var(--color-gold);
  font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 700; letter-spacing: 0.06em;
  font-variant: small-caps; line-height: 1; margin-bottom: 0.8rem;
  text-shadow: 0 0 36px rgba(216,178,76,0.35);
}
.hero-eyebrow {
  font-family: var(--font-heading); font-size: clamp(0.8rem, 1.2vw, 1rem);
  letter-spacing: 0.36em; text-transform: uppercase; color: var(--color-gold-muted);
  margin-bottom: 1rem; font-weight: 500;
}
.hero-subtitle {
  font-family: var(--font-heading); font-size: var(--size-h3);
  color: var(--color-gold-muted); font-weight: 500; letter-spacing: 0.04em;
  font-variant: small-caps; margin-bottom: 1.1rem;
}
.hero-tagline {
  font-family: var(--font-body); font-style: italic; font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: var(--color-text); max-width: 560px; margin: 0 0 1.6rem; line-height: 1.5;
  text-shadow: 0 2px 18px rgba(0,0,0,0.6);
}
.scroll-hint {
  position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  color: var(--color-gold-muted); font-size: 1.4rem; z-index: 2;
  animation: bob 2.2s ease-in-out infinite;
}
.scroll-hint-up {
  bottom: auto; top: 20px; transform: translateX(-50%) rotate(180deg);
}
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-heading);
  font-weight: 600; letter-spacing: 0.1em; font-size: 1.02rem; padding: 14px 32px;
  border-radius: 3px; transition: all 0.3s ease; border: 1px solid transparent; text-transform: uppercase; }
.btn-primary {
  background: linear-gradient(135deg, var(--color-gold-dark), var(--color-gold) 55%, var(--color-gold-bright));
  color: #1a1407; border-color: var(--color-gold-bright);
  box-shadow: 0 0 22px rgba(216,178,76,0.35);
}
.btn-primary:hover { box-shadow: 0 0 40px rgba(216,178,76,0.7); transform: translateY(-2px); }
.btn-outline { background: rgba(8,22,46,0.4); border-color: var(--color-gold-muted); color: var(--color-gold-muted); }
.btn-outline:hover { border-color: var(--color-gold-bright); color: var(--color-gold-bright); box-shadow: 0 0 24px rgba(216,178,76,0.18); }

/* ============================================================
   BOOK
   ============================================================ */
.book-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
.book-cover-wrap { position: relative; max-width: 380px; margin: 0 auto; }
.book-cover {
  width: 100%; border-radius: 4px; border: 1px solid var(--color-border-gold);
  box-shadow: 0 18px 70px rgba(0,0,0,0.55), 0 0 60px rgba(216,178,76,0.18);
}
.book-cover-wrap::after {
  content: ""; position: absolute; inset: -8px; border: 1px solid var(--color-border-gold);
  border-radius: 6px; pointer-events: none; opacity: 0.4;
}
.book-text h2 { text-align: left; }
.book-text .section-divider { margin-left: 0; }
.book-text p { color: var(--color-text); text-align: justify; }
.book-tags { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.8rem 0; }
.book-tag {
  font-family: var(--font-heading); font-size: 0.92rem; letter-spacing: 0.08em;
  color: var(--color-gold-muted); border: 1px solid var(--color-border-gold);
  padding: 6px 15px; border-radius: 2px; display: inline-flex; align-items: center; gap: 8px;
}
.book-tag::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--color-gold); box-shadow: 0 0 6px rgba(216,178,76,0.6); }
.book-isbn { font-size: 0.9rem; color: var(--color-text-dim); letter-spacing: 0.03em; margin-top: 0.6rem; }

/* ============================================================
   ORDER
   ============================================================ */
.order-grid { display: grid; grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; gap: clamp(32px, 5vw, 64px); align-items: start; }
.order-block h3 { font-family: var(--font-heading); color: var(--color-text); font-size: 1.5rem; margin-bottom: 0.4rem; letter-spacing: 0.03em; font-variant: small-caps; font-weight: 600; }
.order-block > p { color: var(--color-text-muted); font-size: 1.05rem; margin-bottom: 1.6rem; }
.order-separator { width: 1px; background: linear-gradient(to bottom, transparent, var(--color-border-gold), transparent); }

.amazon-links { display: flex; flex-direction: column; gap: 12px; }
.amazon-card {
  background: var(--color-bg-card); border: 1px solid var(--color-border-gold); border-radius: 4px;
  padding: 16px 22px; display: flex; align-items: center; gap: 16px;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s; position: relative;
}
.amazon-card:hover { border-color: var(--color-gold); box-shadow: 0 6px 28px rgba(216,178,76,0.18); transform: translateX(4px); }
.amazon-card .flag { font-size: 1.7rem; line-height: 1; }
.amazon-card .info { display: flex; flex-direction: column; gap: 2px; }
.amazon-card .country { font-family: var(--font-heading); color: var(--color-gold); font-size: 1.08rem; letter-spacing: 0.04em; font-weight: 600; }
.amazon-card .format { font-family: var(--font-body); color: var(--color-text-muted); font-size: 0.98rem; }
.amazon-card .arrow { margin-left: auto; color: var(--color-gold-muted); font-size: 1.2rem; transition: transform 0.3s, color 0.3s; }
.amazon-card:hover .arrow { color: var(--color-gold-bright); transform: translateX(4px); }
.amazon-card[data-soon="true"]::after {
  content: attr(data-tooltip); position: absolute; top: -10px; right: 14px;
  font-family: var(--font-heading); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--color-gold-dark); color: var(--color-text); padding: 2px 9px; border-radius: 2px;
  opacity: 0; transition: opacity 0.25s;
}
.amazon-card[data-soon="true"]:hover::after { opacity: 1; }
.pt-note { font-size: 0.9rem; color: var(--color-text-dim); font-style: italic; margin-top: 12px; }

/* ============================================================
   UNIVERSE
   ============================================================ */
.universe-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.universe-card {
  position: relative; border-radius: 5px; overflow: hidden; aspect-ratio: 3 / 4;
  border: 1px solid var(--color-border-gold); cursor: default;
}
.universe-card:focus-visible { outline: 2px solid var(--color-gold-bright); outline-offset: 2px; }
.universe-card .u-img { position: absolute; inset: 0; background-size: cover; background-position: center;
  filter: brightness(0.66) saturate(1.15);
  transition: transform 0.6s cubic-bezier(.16,1,.3,1), filter 0.6s;
}
.universe-card:hover .u-img, .universe-card:focus-within .u-img { transform: scale(1.07); filter: brightness(0.46) saturate(1.4); }
.universe-card .u-grad {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(3,11,26,0.94) 0%, rgba(3,11,26,0.4) 45%, transparent 75%);
}
.universe-card .u-content {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 24px;
  transform: translateY(8px); transition: transform 0.5s;
}
.universe-card:hover .u-content, .universe-card:focus-within .u-content { transform: translateY(0); }
.universe-card .u-num { font-family: var(--font-heading); color: var(--color-gold-muted); font-size: 0.8rem; letter-spacing: 0.2em; }
.universe-card h3 {
  font-family: var(--font-heading); color: var(--color-gold); font-size: 1.5rem; margin: 6px 0 0;
  font-variant: small-caps; letter-spacing: 0.03em; font-weight: 600; text-shadow: 0 0 20px rgba(216,178,76,0.3);
}
.universe-card .u-text {
  color: var(--color-text); font-size: 1.04rem; line-height: 1.55; margin-top: 10px; text-align: justify;
  max-height: 0; opacity: 0; overflow: hidden; transition: max-height 0.55s ease, opacity 0.45s, margin-top 0.4s;
}
.universe-card:hover .u-text, .universe-card:focus-within .u-text { max-height: 200px; opacity: 1; }
.universe-card .u-rule { height: 1px; width: 36px; background: var(--color-gold); margin-top: 12px; transition: width 0.5s; }
.universe-card:hover .u-rule, .universe-card:focus-within .u-rule { width: 64px; }

.universe-videos { display: grid; grid-template-columns: repeat(2, minmax(220px, 340px)); gap: 28px; justify-content: center; margin-top: 3rem; }
.universe-video-item { border-radius: 8px; overflow: hidden; border: 1px solid var(--color-border-gold); box-shadow: 0 18px 50px rgba(0,0,0,0.4), 0 0 30px rgba(216,178,76,0.1); }
.universe-video-frame { position: relative; width: 100%; aspect-ratio: 9 / 16; background: #000; }
.universe-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ============================================================
   AUTHOR
   ============================================================ */
.author { position: relative; overflow: hidden; }
.author-bg { position: absolute; inset: 0; background: url('assets/opt/character-shadow.jpg') center 20% / cover no-repeat; opacity: 0.12; z-index: 0; }
.author-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to right, var(--color-navy-deep), transparent, var(--color-navy-deep)); }
.author-card {
  position: relative; z-index: 2; max-width: 860px; margin: 0 auto;
  border-left: 4px solid var(--color-gold); padding: 8px 0 8px clamp(24px, 4vw, 48px);
}
.author-card .author-name {
  font-family: var(--font-display); color: var(--color-gold); font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700; letter-spacing: 0.03em; margin-bottom: 1.4rem; font-variant: small-caps;
  text-shadow: 0 0 30px rgba(216,178,76,0.3);
}
.author-card p { color: var(--color-text); font-size: 1.16rem; text-align: justify; }
.author-actions { margin-top: 2rem; display: flex; gap: 16px; flex-wrap: wrap; }

/* ============================================================
   CONTACT
   ============================================================ */
.contact-intro { max-width: 640px; margin: 0 auto 2.4rem; text-align: justify; color: var(--color-text-muted); font-size: 1.1rem; }
.contact-person { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.contact-portrait { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 2px solid var(--color-border-gold); box-shadow: 0 0 20px rgba(216,178,76,0.2); }
.contact-email { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-heading); color: var(--color-gold); letter-spacing: 0.04em; font-size: 1.1rem; margin-top: 0.6rem; }
.contact-email:hover { color: var(--color-gold-bright); }
.youtube-video-wrapper { width: 100%; max-width: 900px; margin: 32px auto 0; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; }
.youtube-video-wrapper iframe { width: 100%; height: 100%; display: block; border: 0; }
.legal-wrap { max-width: 760px; }
.legal-meta { color: var(--color-text-dim); font-size: 0.95rem; margin-bottom: 2.4rem; }
.legal-body h2 { font-family: var(--font-heading); color: var(--color-gold); font-size: 1.4rem; font-weight: 600; margin: 2.2rem 0 0.8rem; }
.legal-body p { color: var(--color-text-muted); line-height: 1.8; margin: 0 0 1.1rem; word-break: break-word; text-align: justify; }
.legal-body a { color: var(--color-gold); text-decoration: underline; text-decoration-color: rgba(216,178,76,0.4); }
.legal-body a:hover { color: var(--color-gold-bright); }
.legal-back { display: inline-block; margin-top: 2.6rem; color: var(--color-gold-muted); font-size: 0.95rem; }
.legal-back:hover { color: var(--color-gold-bright); }
@media (max-width: 600px) {
  .legal-page { padding-top: 48px; }
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: rgba(2, 8, 18, 0.78); border-top: 1px solid var(--color-border-gold); padding: 60px 0 30px; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; align-items: start; }
.footer-logo img { height: 64px; width: auto; filter: drop-shadow(0 0 14px rgba(216,178,76,0.25)); margin-bottom: 14px; }
.footer-tagline { color: var(--color-text-muted); font-size: 1.02rem; font-style: italic; max-width: 320px; }
.footer-col h4 { font-family: var(--font-heading); color: var(--color-gold); font-size: 0.92rem; letter-spacing: 0.18em; text-transform: uppercase; margin: 0 0 16px; font-weight: 600; }
.footer-col nav { display: flex; flex-direction: column; gap: 10px; }
.footer-col nav a { color: var(--color-text-muted); font-size: 1.02rem; transition: color 0.2s; }
.footer-col nav a:hover { color: var(--color-gold-bright); }
.footer-social { display: flex; gap: 14px; }
.footer-social a {
  width: 42px; height: 42px; border: 1px solid var(--color-border-gold); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: var(--color-gold-muted);
  transition: all 0.25s;
}
.footer-social a:hover { color: var(--color-gold-bright); border-color: var(--color-gold); box-shadow: 0 0 18px rgba(216,178,76,0.25); transform: translateY(-2px); }
.footer-social svg { width: 19px; height: 19px; }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--color-border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--color-text-dim); font-size: 0.92rem; }
.footer-bottom a { color: var(--color-text-dim); }
.footer-bottom a:hover { color: var(--color-gold-muted); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1440px) {
  .header-top { min-height: 78px; padding: 14px clamp(16px, 4vw, 40px) 10px; }
  .header-title-link img { height: 50px; }
  .header-social a { width: 32px; height: 32px; }
  .header-social svg { width: 14px; height: 14px; }
  .site-nav { gap: clamp(10px, 1.4vw, 20px); }
  .site-nav a { font-size: 0.76rem; letter-spacing: 0.08em; }
  .lang-switcher a { font-size: 0.82rem; padding: 4px 5px; }
}
@media (max-width: 1024px) {
  .universe-grid { grid-template-columns: repeat(2, 1fr); }
  .universe-card .u-text { max-height: 200px; opacity: 1; } /* show text on touch */
  .universe-card .u-content { transform: none; }
  .site-nav { display: none; }
  .header-top .lang-switcher { display: none; }
  .header-social a { width: 32px; height: 32px; }
  .header-social svg { width: 14px; height: 14px; }
  .header-title-link img { height: 46px; }
  .burger-menu { display: flex; }
}
@media (max-width: 880px) {
  .book-grid { grid-template-columns: 1fr; gap: 36px; }
  .book-cover-wrap { max-width: 360px; margin: 0 auto; }
  .book-cover { width: 100% !important; height: auto !important; }
  .book-text h2, .book-text .section-divider { text-align: center; margin-left: auto; }
  .book-text .section-divider { margin-left: auto; margin-right: auto; }
  .order-grid { grid-template-columns: 1fr; gap: 40px; }
  .order-separator { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 600px) {
  .hero-mascot { display: none; }
  .universe-grid { grid-template-columns: 1fr; }
  .universe-card { aspect-ratio: 16 / 11; }
  .universe-videos { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
  /* Two hero columns cannot fit side by side on a phone: stack them. */
  .hero-cards { flex-direction: column; align-items: center; width: 100%; max-width: 100%; gap: 22px; }
  .hero-card-col { width: 100%; max-width: 340px; min-width: 0; }
  .hero-card { max-width: 100%; }
  .hero-card img { display: block; width: 100%; max-width: 100%; height: auto; }
  .hero-card-col .btn {
    width: 100%; max-width: 100%; min-width: 0; min-height: 48px;
    white-space: normal; line-height: 1.25; overflow-wrap: break-word;
    padding: 14px 18px; text-align: center;
    font-size: clamp(0.85rem, 3.6vw, 1rem);
  }
  /* The social row was overlapping the title banner on narrow screens. */
  .header-social { display: none; }
}

/* ---------- Smartphone: single-column hero ----------
   Below 480px the two hero columns (cover + Gabbardon) can no longer sit
   side by side without overflowing: 2 x clamp(210px,26vw,340px) + gap
   exceeds a 375px viewport. Stack them and let the CTA labels wrap. */
@media (max-width: 480px) {
  .hero-card-col { max-width: 300px; }
  .book-cover-wrap { max-width: 100%; min-width: 0; }
  /* beats the deliberate desktop inline width/height on this element */
  .book-cover { width: 100% !important; max-width: 320px !important; height: auto !important; margin: 0 auto; }
  .youtube-video-wrapper { margin-top: 24px; }
  .wrap { padding-left: 18px; padding-right: 18px; }
}

/* Hide nothing for print */
@media print { #particles, .scroll-hint { display: none; } }
