:root {
  --void: #050404;
  --abyss: #0a0706;
  --shadow: #110d0b;
  --blood: #8b1a1a;
  --blood-bright: #c0272d;
  --crimson: #e03030;
  --ash: #c8bfb5;
  --bone: #e8e0d5;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

body {
  background: var(--void);
  color: var(--ash);
  font-family: 'EB Garamond', serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==================== INTRO ==================== */
#intro {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.intro-content {
  text-align: center;
  position: relative;
  z-index: 2;
}

.intro-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(4rem, 8vw, 7rem);
  font-weight: 700;
  color: var(--bone);
  opacity: 0;
  text-shadow: 0 0 60px rgba(192,39,45,0.6);
  letter-spacing: 0.05em;
}

.intro-subtitle {
  font-family: 'Raleway', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--blood-bright);
  margin-top: 1rem;
  opacity: 0;
}

.intro-mist {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(139,26,26,0.25) 0%, transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(192,39,45,0.2) 0%, transparent 60%);
  animation: mistPulse 8s ease-in-out infinite;
  pointer-events: none;
}

.particle {
  position: absolute;
  background: rgba(192,39,45,0.6);
  border-radius: 50%;
  animation: particleFloat 15s linear infinite;
  opacity: 0;
}

body.loaded #intro { animation: fadeOutIntro 1.2s ease forwards; }

@keyframes fadeOutIntro { to { opacity: 0; visibility: hidden; } }
@keyframes mistPulse { 0%,100% { opacity: 0.6; } 50% { opacity: 0.85; } }
@keyframes particleFloat {
  0%   { transform: translateY(100vh) scale(0.5); opacity: 0; }
  10%  { opacity: 0.7; }
  90%  { opacity: 0.7; }
  100% { transform: translateY(-100vh) scale(1.2); opacity: 0; }
}

/* ==================== GRAIN ==================== */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='0.055'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: overlay;
}

* { cursor: crosshair; }
a, button { cursor: pointer; }

/* ==================== NAV ==================== */
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 98;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.nav-backdrop.active {
  display: block;
  opacity: 1;
}

nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 5rem;
  background: linear-gradient(to bottom, rgba(5,4,4,0.97) 0%, rgba(5,4,4,0.6) 80%, transparent 100%);
  z-index: 100;
  animation: fadeDown .8s ease forwards;
  transition: padding 0.3s ease, background 0.3s ease;
}
nav.nav-scrolled {
  padding: 1rem 5rem;
  background: rgba(5,4,4,0.96);
  border-bottom: 1px solid rgba(139,26,26,0.18);
  box-shadow: 0 4px 24px rgba(0,0,0,0.6);
}

.nav-logo {
  font-family: 'Cinzel', serif;
  font-size: .95rem;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--blood-bright);
  text-decoration: none;
  text-shadow: 0 0 20px rgba(192,39,45,0.5);
  transition: text-shadow 0.3s;
}
.nav-logo:hover { text-shadow: 0 0 32px rgba(224,48,48,0.9); }

.nav-links {
  position: fixed;
  top: 0;
  right: 5rem;
  height: auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 3rem;
  list-style: none;
  margin: 0;
  padding: 1.4rem 0;
  z-index: 99;
  transition: padding 0.3s ease;
}
.nav-links.nav-scrolled { padding: 1rem 0; }

.nav-links a {
  font-family: 'Raleway', sans-serif;
  font-size: .7rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--ash);
  text-decoration: none;
  opacity: .5;
  transition: opacity .3s, color .3s, text-shadow .3s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--crimson);
  transition: width 0.3s ease;
}
.nav-links a:hover { opacity: 1; color: var(--crimson); text-shadow: 0 0 12px rgba(224,48,48,0.6); }
.nav-links a:hover::after { width: 100%; }
.nav-links .nav-cta {
  color: var(--crimson);
  opacity: 1;
  border: 1px solid rgba(192,39,45,0.4);
  padding: .45rem 1.1rem;
  border-radius: 2px;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s, color 0.3s;
}
.nav-links .nav-cta:hover {
  background: rgba(192,39,45,0.15);
  border-color: var(--crimson);
  box-shadow: 0 0 16px rgba(224,48,48,0.3);
}
.nav-links .nav-cta::after { display: none; }
.nav-link-active { color: var(--crimson) !important; opacity: 1 !important; text-shadow: 0 0 12px rgba(224,48,48,0.6); }
.nav-link-active::after { width: 100% !important; }

/* Hamburger Toggle Button */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid rgba(139,26,26,0.3);
  border-radius: 4px;
  cursor: pointer;
  padding: 9px 10px;
  z-index: 101;
  min-height: 44px;
  min-width: 44px;
  transition: border-color 0.3s, background 0.3s;
}
.nav-toggle:hover {
  border-color: rgba(192,39,45,0.7);
  background: rgba(139,26,26,0.1);
}
.hamburger-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--bone);
  border-radius: 2px;
  transition: transform 0.35s cubic-bezier(.4,0,.2,1),
              opacity  0.25s ease,
              width    0.3s ease;
  transform-origin: center;
}
/* X animation when open */
.nav-toggle.open .hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open .hamburger-bar:nth-child(2) {
  opacity: 0;
  width: 0;
}
.nav-toggle.open .hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ==================== HERO ==================== */
#hero {
  min-height: 100vh;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 0 5rem;
  overflow: hidden;
}

.hero-atmosphere {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 70% at 65% 50%, rgba(139,26,26,0.13) 0%, transparent 60%),
    radial-gradient(ellipse 30% 40% at 10% 80%, rgba(192,39,45,0.07) 0%, transparent 50%);
}

.mist { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.mist-layer {
  position: absolute;
  width: 200%; height: 100%;
  background: repeating-linear-gradient(90deg, transparent 0%, rgba(139,26,26,0.02) 10%, transparent 20%);
  animation: drift var(--dur, 25s) linear infinite;
  opacity: 0.6;
  will-change: transform;
  transform: translateZ(0);
}
.mist-layer:nth-child(2) { --dur: 35s; animation-direction: reverse; top: 30%; opacity: .4; }
.mist-layer:nth-child(3) { --dur: 45s; top: 60%; opacity: .3; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.hero-text { position: relative; z-index: 2; padding: 8rem 0 4rem; }

.hero-eyebrow {
  font-family: 'Raleway', sans-serif;
  font-size: .68rem;
  letter-spacing: .45em;
  text-transform: uppercase;
  color: var(--blood-bright);
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp .8s ease .4s forwards;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 40px; height: 1px;
  background: var(--blood-bright);
  box-shadow: 0 0 8px var(--blood-bright);
}

.hero-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(3rem, 5.5vw, 5.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: .02em;
  color: var(--bone);
  text-shadow: 0 0 40px rgba(192,39,45,0.4), 0 2px 4px rgba(0,0,0,0.9);
  opacity: 0;
  animation: fadeUp .9s ease .6s forwards;
}
.hero-title .title-red {
  color: var(--crimson);
  text-shadow: 0 0 30px rgba(224,48,48,0.7), 0 0 60px rgba(224,48,48,0.3), 0 2px 4px rgba(0,0,0,0.9);
  display: block;
  font-size: .72em;
  margin-top: .15em;
  font-style: italic;
}

.hero-divider {
  width: 120px; height: 1px;
  background: linear-gradient(to right, var(--blood-bright), transparent);
  box-shadow: 0 0 10px rgba(192,39,45,0.5);
  margin: 2rem 0;
  opacity: 0;
  animation: fadeUp .8s ease .8s forwards;
}

.hero-tagline {
  font-size: 1.2rem;
  font-style: italic;
  line-height: 1.85;
  color: rgba(200,191,181,.62);
  max-width: 430px;
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeUp .9s ease 1s forwards;
}

.hero-actions {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  opacity: 0;
  animation: fadeUp .8s ease 1.2s forwards;
}

/* ==================== BUTTONS ==================== */
.btn-blood {
  font-family: 'Cinzel', serif;
  font-size: .75rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--bone);
  background: var(--blood);
  border: 1px solid var(--blood-bright);
  padding: 1rem 2.8rem;
  text-decoration: none;
  display: inline-block;
  position: relative;
  overflow: hidden;
  transition: all .4s;
  box-shadow: 0 0 20px rgba(139,26,26,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-blood::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--blood-bright), #d4451a);
  opacity: 0;
  transition: opacity .4s;
}
.btn-blood:hover { box-shadow: 0 0 35px rgba(192,39,45,0.65); }
.btn-blood:hover::before { opacity: 1; }
.btn-blood span { position: relative; z-index: 1; }

.btn-ghost-dark {
  font-family: 'Raleway', sans-serif;
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(200,191,181,.5);
  text-decoration: none;
  border-bottom: 1px solid rgba(200,191,181,.2);
  padding-bottom: 2px;
  transition: all .3s;
}
.btn-ghost-dark:hover { color: var(--bone); border-color: var(--blood-bright); }

/* ==================== COVER ==================== */
.hero-cover {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8rem 0 4rem;
  opacity: 0;
  animation: riseIn 1.2s ease .5s forwards;
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(40px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

.cover-frame { position: relative; width: 270px; }
.cover-img {
  width: 270px; height: 380px;
  object-fit: cover;
  object-position: top center;
  display: block;
  box-shadow: 0 30px 80px rgba(0,0,0,.9), 0 0 40px rgba(139,26,26,.3), -5px 0 20px rgba(0,0,0,.6);
  border: 1px solid rgba(139,26,26,.3);
  filter: contrast(1.05) saturate(1.1);
  transition: transform .6s ease, box-shadow .6s ease;
}
@media (hover: hover) {
  .cover-img:hover {
    transform: scale(1.02) translateY(-4px);
    box-shadow: 0 40px 100px rgba(0,0,0,.95), 0 0 60px rgba(192,39,45,.45);
  }
}
.cover-frame::before {
  content: '';
  position: absolute;
  top: -30px; left: -40px; right: -40px; bottom: -30px;
  background: radial-gradient(ellipse at center, rgba(139,26,26,.22) 0%, transparent 65%);
  pointer-events: none;
  animation: pulse 4s ease-in-out infinite;
}
.cover-frame::after {
  content: '';
  position: absolute;
  bottom: -25px; left: 15px; right: 15px; height: 40px;
  background: radial-gradient(ellipse, rgba(139,26,26,.4) 0%, transparent 70%);
  filter: blur(12px);
}

/* ==================== SHARED SECTION ==================== */
.section-eyebrow {
  font-family: 'Raleway', sans-serif;
  font-size: .68rem;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--blood-bright);
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: .8rem;
}
.section-eyebrow::before { content: ''; display: block; width: 25px; height: 1px; background: var(--blood-bright); }
.section-eyebrow--center { justify-content: center; }

.section-heading {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--bone);
  margin-bottom: 2rem;
  text-shadow: 0 2px 20px rgba(0,0,0,.8);
}
.section-heading em {
  font-family: 'Cinzel Decorative', serif;
  font-style: normal;
  color: var(--crimson);
  text-shadow: 0 0 20px rgba(224,48,48,.4);
}

.blood-border { height: 1px; background: linear-gradient(to right, transparent, rgba(139,26,26,.45), transparent); }

/* ==================== SYNOPSIS ==================== */
#synopsis {
  padding: 8rem 5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7rem;
  align-items: center;
  background: linear-gradient(to bottom, var(--void), var(--abyss), var(--void));
  position: relative;
  overflow: hidden;
}
#synopsis::before {
  content: '"';
  position: absolute;
  top: -2rem; left: 3rem;
  font-family: 'EB Garamond', serif;
  font-size: 22rem;
  font-weight: 400;
  color: rgba(139,26,26,.05);
  line-height: 1;
  pointer-events: none;
}

.synopsis-text p { font-size: 1.15rem; line-height: 1.95; color: rgba(200,191,181,.72); margin-bottom: 1.4rem; }
.synopsis-text p strong { color: var(--bone); font-weight: 500; }

.pull-quote {
  border-left: 2px solid var(--blood-bright);
  box-shadow: -4px 0 20px rgba(139,26,26,.15);
  padding: 1.2rem 0 1.2rem 2rem;
  margin: 2.5rem 0;
  font-size: 1.35rem;
  font-style: italic;
  color: var(--bone);
  line-height: 1.65;
}
.pull-quote em { color: var(--crimson); font-style: normal; }

/* ==================== BUY CARD ==================== */
.buy-card {
  background: linear-gradient(135deg, rgba(139,26,26,.12), rgba(10,7,6,.8));
  border: 1px solid rgba(139,26,26,.3);
  padding: 3rem;
  position: relative;
  overflow: hidden;
}
.buy-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 150px; height: 150px;
  background: radial-gradient(circle at top right, rgba(192,39,45,.12), transparent 65%);
}
.buy-card-label {
  font-family: 'Raleway', sans-serif;
  font-size: .65rem;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--blood-bright);
  margin-bottom: 1rem;
}
.buy-card-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.4rem;
  color: var(--bone);
  margin-bottom: .4rem;
  line-height: 1.3;
}
.buy-card-author {
  font-family: 'Cinzel', serif;
  font-size: .85rem;
  letter-spacing: .2em;
  color: rgba(200,191,181,.5);
  margin-bottom: 2rem;
}
.buy-card-divider {
  width: 100%; height: 1px;
  background: linear-gradient(to right, var(--blood), transparent);
  margin-bottom: 2rem;
}
.buy-card p { font-size: 1rem; font-style: italic; color: rgba(200,191,181,.55); margin-bottom: 2rem; line-height: 1.7; }
.buy-card .btn-blood { width: 100%; text-align: center; display: block; }

/* ==================== SAGA ==================== */
#saga {
  padding: 8rem 5rem;
  background: var(--abyss);
  position: relative;
  overflow: hidden;
}

.saga-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(139,26,26,.06) 0%, transparent 65%);
  pointer-events: none;
}

.saga-intro {
  text-align: center;
  margin-bottom: 5rem;
}

.saga-intro .section-heading { font-size: clamp(2rem, 3.5vw, 3.2rem); }

.saga-intro p {
  font-size: 1.1rem;
  font-style: italic;
  color: rgba(200,191,181,.45);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.8;
}

.saga-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  position: relative;
  z-index: 2;
}

/* 3D Flip Card Container */
.saga-card {
  perspective: 1200px;
  background: transparent !important;
  border: none !important;
  overflow: visible !important;
  cursor: pointer;
}

/* Click-hint pulse overlay */
.saga-click-hint {
  position: absolute;
  bottom: 1.1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
  pointer-events: none;
  transition: opacity .4s ease;
}
.saga-click-hint-ring {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(192,39,45,.75);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: clickPulseRing 2s ease-in-out infinite;
}
.saga-click-hint-ring::before,
.saga-click-hint-ring::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(192,39,45,.4);
  animation: clickPulseRipple 2s ease-in-out infinite;
}
.saga-click-hint-ring::after {
  inset: -12px;
  border-color: rgba(192,39,45,.18);
  animation-delay: .35s;
}
.saga-click-hint-icon {
  width: 16px;
  height: 16px;
  fill: rgba(192,39,45,.9);
  animation: clickPulseIcon 2s ease-in-out infinite;
}
.saga-click-hint-label {
  font-family: 'Raleway', sans-serif;
  font-size: .52rem;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: rgba(192,39,45,.75);
  text-shadow: 0 0 8px rgba(192,39,45,.5);
  animation: clickPulseLabel 2s ease-in-out infinite;
  white-space: nowrap;
}

/* Hide hint once card is flipped */
.saga-card.flipped .saga-click-hint {
  opacity: 0;
}

@keyframes clickPulseRing {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192,39,45,.5), 0 0 10px rgba(192,39,45,.25); border-color: rgba(192,39,45,.6); }
  50%       { box-shadow: 0 0 0 6px rgba(192,39,45,.0), 0 0 18px rgba(192,39,45,.5); border-color: rgba(220,60,60,.9); }
}
@keyframes clickPulseRipple {
  0%   { opacity: 1; transform: scale(1); }
  70%  { opacity: 0; transform: scale(1.6); }
  100% { opacity: 0; transform: scale(1.6); }
}
@keyframes clickPulseIcon {
  0%, 100% { opacity: .7; transform: scale(1); }
  50%       { opacity: 1; transform: scale(1.15); }
}
@keyframes clickPulseLabel {
  0%, 100% { opacity: .5; }
  50%       { opacity: 1; text-shadow: 0 0 12px rgba(192,39,45,.7); }
}

/* Card Inner Wrapper */
.saga-card-inner {
  position: relative;
  width: 100%;
  height: 440px;
  transition: transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform-style: preserve-3d;
  will-change: transform;
}

.saga-card.flipped .saga-card-inner {
  transform: rotateY(180deg);
}

/* Front & Back Faces */
.saga-card-front,
.saga-card-back {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 0;
  box-sizing: border-box;
}

/* Front Face */
.saga-card-front {
  border: 1px solid rgba(139,26,26,.35);
  background: linear-gradient(160deg, rgba(139,26,26,.1), rgba(5,4,4,.7));
  z-index: 2;
  transform: rotateY(0deg);
  overflow: hidden;
  transition: border-color .4s;
}
@media (hover: hover) {
  .saga-card:hover .saga-card-front {
    border-color: rgba(192,39,45,.5);
  }
  .saga-card:hover .saga-card-inner {
    box-shadow: 0 0 40px rgba(139,26,26,.2);
  }
  .saga-card:hover .saga-card-img {
    transform: scale(1.04);
  }
}

.saga-card--dim .saga-card-front {
  border-color: rgba(139,26,26,.2);
  background: linear-gradient(160deg, rgba(17,13,11,.9), rgba(5,4,4,.95));
}
.saga-card--dimmer .saga-card-front {
  border-color: rgba(139,26,26,.12);
  background: linear-gradient(160deg, rgba(10,7,6,.9), rgba(5,4,4,.98));
}

/* Back Face */
.saga-card-back {
  border: 1px solid rgba(192,39,45,.5);
  background: linear-gradient(160deg, rgba(139,26,26,.15), rgba(5,4,4,.95));
  transform: rotateY(180deg) translateZ(1px);
  -webkit-transform: rotateY(180deg) translateZ(1px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  transition: border-color .4s;
  scrollbar-width: thin;
  scrollbar-color: var(--crimson) var(--shadow);
}
.saga-card-back::-webkit-scrollbar {
  width: 4px;
}
.saga-card-back::-webkit-scrollbar-track {
  background: var(--shadow);
}
.saga-card-back::-webkit-scrollbar-thumb {
  background: var(--crimson);
  border-radius: 2px;
}
.saga-card-back .saga-card-desc {
  font-size: 0.82rem;
  line-height: 1.65;
  margin-bottom: 0.8rem;
}
.saga-card-back .saga-card-desc:last-of-type {
  margin-bottom: 1.2rem;
}
.saga-card:hover .saga-card-back {
  border-color: rgba(192,39,45,.7);
}
.saga-card--dim .saga-card-back {
  border-color: rgba(139,26,26,.4);
  background: linear-gradient(160deg, rgba(17,13,11,.98), rgba(5,4,4,.99));
}
.saga-card--dimmer .saga-card-back {
  border-color: rgba(139,26,26,.25);
  background: linear-gradient(160deg, rgba(10,7,6,.99), rgba(5,4,4,1));
}

.saga-card-media {
  position: relative;
  overflow: hidden;
  height: 100%;
}

.saga-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  filter: contrast(1.05) saturate(1.1);
  transition: transform .6s ease;
}

.saga-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}
.saga-card-placeholder--ii { background: linear-gradient(145deg, #150a08, #0a0504); }
.saga-card-placeholder--iii { background: linear-gradient(145deg, #0d0806, #050303); }

.saga-placeholder-ring {
  position: relative;
  width: 130px; height: 130px;
}
.saga-placeholder-ring-outer {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(139,26,26,.5);
  border-radius: 50%;
  animation: pulse 3s ease-in-out infinite;
}
.saga-placeholder-ring-outer--faint { border-color: rgba(139,26,26,.3); animation-duration: 4s; }
.saga-placeholder-ring-inner {
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(139,26,26,.25);
  border-radius: 50%;
}
.saga-placeholder-ring-inner--faint { border-color: rgba(139,26,26,.15); }
.saga-placeholder-numeral {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel Decorative', serif;
  font-size: 3.8rem;
  color: rgba(192,39,45,.55);
  animation: glowPulse 3s ease-in-out infinite;
}
.saga-placeholder-numeral--faint { color: rgba(192,39,45,.45); }
@keyframes glowPulse {
  0%, 100% { text-shadow: 0 0 12px rgba(192,39,45,.2); opacity: .7; }
  50%       { text-shadow: 0 0 28px rgba(224,48,48,.65); opacity: 1; }
}

.saga-placeholder-sub {
  text-align: center;
  padding: 0 1.5rem;
}
.saga-placeholder-label {
  font-family: 'Raleway', sans-serif;
  font-size: .6rem;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: rgba(200,191,181,.18);
  margin-bottom: .5rem;
}
.saga-placeholder-label--faint { color: rgba(200,191,181,.12); }
.saga-placeholder-rule {
  width: 60px; height: 1px;
  background: linear-gradient(to right, transparent, rgba(139,26,26,.35), transparent);
  margin: 0 auto;
}
.saga-placeholder-rule--faint { background: linear-gradient(to right, transparent, rgba(139,26,26,.2), transparent); }

.saga-card-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(5,4,4,1) 0%, rgba(5,4,4,.2) 50%, transparent 100%);
}

.saga-card-badge {
  position: absolute;
  top: 1rem; left: 1rem;
  font-family: 'Cinzel', serif;
  font-size: .65rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--blood-bright);
  background: rgba(5,4,4,.8);
  padding: .3rem .8rem;
  border: 1px solid rgba(139,26,26,.4);
}
.saga-card-badge--dim { color: rgba(139,26,26,.6); border-color: rgba(139,26,26,.2); }
.saga-card-badge--dimmer { color: rgba(139,26,26,.35); border-color: rgba(139,26,26,.12); }

.saga-card-status {
  position: absolute;
  top: 1rem; right: 1rem;
  font-family: 'Raleway', sans-serif;
  font-size: .58rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: rgba(200,191,181,.25);
  background: rgba(5,4,4,.85);
  padding: .3rem .8rem;
  border: 1px solid rgba(200,191,181,.08);
}
.saga-card-status--faint { color: rgba(200,191,181,.18); border-color: rgba(200,191,181,.06); }

.saga-card-body { padding: 2rem; }

.saga-card-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.1rem;
  color: var(--bone);
  margin-bottom: .4rem;
  line-height: 1.3;
}
.saga-card-title--dim { font-size: 1.05rem; color: rgba(232,224,213,.5); letter-spacing: .03em; }
.saga-card-title--dimmer { color: rgba(232,224,213,.35); letter-spacing: .03em; }

.saga-card-avail {
  font-family: 'Raleway', sans-serif;
  font-size: .65rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(200,191,181,.4);
  margin-bottom: 1.2rem;
}
.saga-card-avail--dim { color: rgba(200,191,181,.25); font-size: .62rem; }
.saga-card-avail--dimmer { color: rgba(200,191,181,.18); font-size: .62rem; }

.saga-card-desc {
  font-size: 1rem;
  font-style: italic;
  line-height: 1.75;
  color: rgba(200,191,181,.6);
  margin-bottom: 1.5rem;
}
.saga-card-desc--dim { color: rgba(200,191,181,.38); line-height: 1.8; }
.saga-card-desc--dimmer { color: rgba(200,191,181,.28); line-height: 1.8; }

.saga-card-link {
  font-family: 'Cinzel', serif;
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--crimson);
  text-decoration: none;
  border-bottom: 1px solid rgba(192,39,45,.3);
  padding-bottom: 2px;
  transition: all .3s;
}
.saga-card-link:hover { color: var(--bone); border-color: var(--bone); }

.saga-card-coming {
  display: flex;
  align-items: center;
  gap: .8rem;
}
.saga-card-coming-rule {
  width: 20px; height: 1px;
  background: rgba(139,26,26,.4);
}
.saga-card-coming-rule--faint { background: rgba(139,26,26,.25); }
.saga-card-coming-text {
  font-family: 'Cinzel', serif;
  font-size: .65rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: rgba(139,26,26,.5);
}
.saga-card-coming-text--faint { color: rgba(139,26,26,.35); }

/* ==================== AUTHOR ==================== */
#author {
  padding: 8rem 5rem;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 7rem;
  align-items: start;
  position: relative;
}
#author::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 40% 60% at 15% 50%, rgba(139,26,26,.07) 0%, transparent 60%);
  pointer-events: none;
}

.author-frame { position: relative; }
.author-photo {
  width: 260px; height: 320px;
  object-fit: cover;
  object-position: top center;
  display: block;
  border: 1px solid rgba(139,26,26,.25);
  box-shadow: 0 20px 60px rgba(0,0,0,.8), 0 0 30px rgba(139,26,26,.2);
  filter: contrast(1.05) saturate(1.1) grayscale(0.15);
  transition: transform .6s ease, box-shadow .6s ease, filter .6s ease;
}
@media (hover: hover) {
  .author-photo:hover {
    transform: scale(1.02) translateY(-4px);
    box-shadow: 0 30px 80px rgba(0,0,0,.9), 0 0 50px rgba(192,39,45,.35);
    filter: contrast(1.05) saturate(1.15) grayscale(0);
  }
}
.author-frame::after {
  content: '';
  position: absolute;
  top: 14px; left: 14px; right: -14px; bottom: -14px;
  border: 1px solid rgba(139,26,26,.2);
  z-index: -1;
}

.author-bio p { font-size: 1.15rem; line-height: 1.95; color: rgba(200,191,181,.7); margin-bottom: 1.3rem; }
.author-bio-note {
  font-family: 'Cinzel', serif;
  font-size: .9rem;
  letter-spacing: .1em;
  color: var(--blood-bright);
  margin-top: .5rem;
}

.social-row { display: flex; gap: 1rem; margin-top: 2.5rem; flex-wrap: wrap; }
.social-btn {
  font-family: 'Raleway', sans-serif;
  font-size: .68rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--ash);
  text-decoration: none;
  border: 1px solid rgba(139,26,26,.35);
  padding: .7rem 1.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  transition: all .3s;
  min-height: 44px;
}
.social-btn:hover {
  background: rgba(139,26,26,.2);
  border-color: var(--blood-bright);
  color: var(--bone);
  box-shadow: 0 0 15px rgba(139,26,26,.2);
}

/* ==================== MINHAS TELAS / OBRAS ==================== */
#obras {
  padding: 6rem 0 4rem;
  background: var(--abyss);
  position: relative;
  overflow: hidden;
}
#obras::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 40%, rgba(139,26,26,.06) 0%, transparent 60%);
  pointer-events: none;
}

.obras-intro {
  text-align: center;
  margin-bottom: 4rem;
  padding: 0 2rem;
}
.obras-desc {
  font-size: 1.1rem;
  font-style: italic;
  color: rgba(200,191,181,.45);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.8;
}

/* Carousel wrapper */
.carousel-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* Edge gradient fades */
.carousel-gradient {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 10;
  pointer-events: none;
}
.carousel-gradient--left {
  left: 0;
  background: linear-gradient(to right, var(--abyss), transparent);
}
.carousel-gradient--right {
  right: 0;
  background: linear-gradient(to left, var(--abyss), transparent);
}

/* Carousel row wrapper (parallax target) */
.carousel-row-wrap {
  overflow: hidden;
  margin-bottom: 1.5rem;
  /* Removed transition — it caused janky repaints during scroll parallax */
  will-change: transform;
  contain: layout style;
}
.carousel-row-wrap:last-child {
  margin-bottom: 0;
}

/* Carousel rows (infinite scroll animation) */
.carousel-row {
  display: flex;
  gap: 1.5rem;
  width: max-content;
  animation: carouselScroll 40s linear infinite;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
}
.carousel-row--reverse {
  animation: carouselScrollReverse 50s linear infinite;
}

/* Pause on hover */
.carousel-wrapper:hover .carousel-row {
  animation-play-state: paused;
}

@keyframes carouselScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes carouselScrollReverse {
  0%   { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* Individual slides */
.carousel-slide {
  position: relative;
  flex-shrink: 0;
  width: 320px;
  height: 240px;
  overflow: hidden;
  border: 1px solid rgba(139,26,26,.2);
  background: #050404;
  transform: translateZ(0);           /* GPU layer per slide */
  transition: transform .4s cubic-bezier(.25,.8,.25,1), box-shadow .4s ease, border-color .4s ease;
  contain: layout;                    /* isolate slide layout from page */
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: saturate(0.8) contrast(1.05);
  transition: transform .5s cubic-bezier(.25,.8,.25,1), filter .5s ease;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(139,26,26,.15) 0%, rgba(5,4,4,.4) 100%);
  transition: opacity .5s ease;
  pointer-events: none;
}

/* Hover effects — Otherside-inspired "float up" */
@media (hover: hover) {
  .carousel-slide:hover {
    transform: translateY(-12px) scale(1.04);
    box-shadow: 0 25px 60px rgba(0,0,0,.8), 0 0 40px rgba(139,26,26,.25);
    border-color: rgba(192,39,45,.5);
    z-index: 5;
  }
  .carousel-slide:hover img {
    transform: scale(1.08);
    filter: saturate(1.2) contrast(1.1);
  }
  .carousel-slide:hover .slide-overlay {
    opacity: 0;
  }
}

/* ==================== NEWSLETTER ==================== */
#newsletter {
  padding: 8rem 5rem;
  background: var(--shadow);
  text-align: center;
  position: relative;
  overflow: hidden;
}
#newsletter::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(139,26,26,.08) 0%, transparent 60%);
}
.newsletter-inner { position: relative; z-index: 2; }
.newsletter-eyebrow {
  font-family: 'Raleway', sans-serif;
  font-size: .65rem;
  letter-spacing: .5em;
  text-transform: uppercase;
  color: var(--blood-bright);
  margin-bottom: 1.5rem;
  opacity: .8;
}
#newsletter h2 {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  color: var(--bone);
  margin-bottom: 1rem;
  line-height: 1.25;
  text-shadow: 0 0 40px rgba(192,39,45,.3);
}
#newsletter h2 em { font-style: italic; color: var(--crimson); text-shadow: 0 0 25px rgba(224,48,48,.5); }
.newsletter-inner > p {
  font-size: 1.1rem;
  font-style: italic;
  color: rgba(200,191,181,.45);
  margin: 0 auto 3.5rem;
  max-width: 460px;
  line-height: 1.8;
}

/* ==================== KIT FORM OVERRIDES ==================== */
.kit-form-wrapper {
  max-width: 540px;
  margin: 0 auto 1.5rem;
}

/* Reset Kit container and center it */
.kit-form-wrapper .formkit-form[data-uid="5d364723c3"] {
  max-width: 100% !important;
  font-family: 'EB Garamond', serif !important;
  margin: 0 auto !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

/* Row layout */
.kit-form-wrapper .formkit-fields {
  display: flex !important;
  gap: 0 !important;
  flex-wrap: nowrap !important;
  justify-content: center !important;
}

.kit-form-wrapper .formkit-field {
  flex: 1 1 auto !important;
  margin-bottom: 0 !important;
}

/* Mobile responsive stacking for Kit form */
@media (max-width: 640px) {
  .kit-form-wrapper .formkit-fields {
    flex-direction: column !important;
  }
  .kit-form-wrapper .formkit-input {
    border-right: 1px solid rgba(139,26,26,.35) !important;
    border-bottom: none !important;
    border-radius: 0 !important;
    text-align: center !important;
  }
  .kit-form-wrapper .formkit-submit {
    width: 100% !important;
  }
}

/* Email input */
.kit-form-wrapper .formkit-input {
  flex: 1 !important;
  padding: 1rem 1.5rem !important;
  font-family: 'EB Garamond', serif !important;
  font-size: 1rem !important;
  font-style: italic !important;
  background: rgba(200,191,181,.04) !important;
  border: 1px solid rgba(139,26,26,.35) !important;
  border-right: none !important;
  border-radius: 0 !important;
  color: var(--bone) !important;
  outline: none !important;
  transition: border-color .3s, box-shadow .3s !important;
  min-height: 54px !important;
}
.kit-form-wrapper .formkit-input::placeholder {
  color: rgba(200,191,181,.3) !important;
  opacity: 1 !important;
}
.kit-form-wrapper .formkit-input:focus {
  border-color: rgba(192,39,45,.6) !important;
  box-shadow: 0 0 20px rgba(139,26,26,.15) !important;
}

/* Submit button */
.kit-form-wrapper .formkit-submit {
  font-family: 'Cinzel', serif !important;
  font-size: .72rem !important;
  letter-spacing: .2em !important;
  text-transform: uppercase !important;
  color: var(--bone) !important;
  background: var(--blood) !important;
  border: 1px solid var(--blood-bright) !important;
  border-radius: 0 !important;
  padding: 1rem 2rem !important;
  cursor: pointer !important;
  transition: all .3s !important;
  white-space: nowrap !important;
  min-height: 54px !important;
  margin-bottom: 0 !important;
  flex: 0 0 auto !important;
}
.kit-form-wrapper .formkit-submit:hover {
  background: var(--blood-bright) !important;
  box-shadow: 0 0 25px rgba(192,39,45,.4) !important;
}
.kit-form-wrapper .formkit-submit > span {
  padding: 0 !important;
}

/* Success / error alerts */
.kit-form-wrapper .formkit-alert-error {
  background: rgba(139,26,26,.15) !important;
  border-color: rgba(192,39,45,.4) !important;
  color: rgba(200,191,181,.8) !important;
  border-radius: 0 !important;
  margin-bottom: .8rem !important;
}

/* "Built with Kit" footer link — hidden */
.kit-form-wrapper .formkit-powered-by-convertkit-container {
  display: none !important;
}

/* Legacy selectors (kept for safety) */
.email-form { display: flex; max-width: 500px; margin: 0 auto 1.2rem; }
.email-input { flex: 1; padding: 1rem 1.5rem; font-family: 'EB Garamond', serif; font-size: 1rem; font-style: italic; background: rgba(200,191,181,.04); border: 1px solid rgba(139,26,26,.35); border-right: none; color: var(--bone); outline: none; transition: border-color .3s, box-shadow .3s; min-height: 44px; }
.email-input::placeholder { color: rgba(200,191,181,.25); }
.email-input:focus { border-color: rgba(192,39,45,.6); box-shadow: 0 0 20px rgba(139,26,26,.15); }
.email-btn { font-family: 'Cinzel', serif; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--bone); background: var(--blood); border: 1px solid var(--blood-bright); padding: 1rem 2rem; cursor: pointer; transition: all .3s; white-space: nowrap; min-height: 44px; }
.email-btn:hover { background: var(--blood-bright); box-shadow: 0 0 25px rgba(192,39,45,.4); }
.email-btn:disabled { opacity: .6; cursor: default; }
.email-btn.success { background: #2a5a2a; border-color: #3a7a3a; }

.form-note {
  font-family: 'Raleway', sans-serif;
  font-size: .63rem;
  letter-spacing: .12em;
  color: rgba(200,191,181,.2);
  text-transform: uppercase;
}

/* ==================== FOOTER ==================== */
footer {
  padding: 3rem 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(139,26,26,.15);
  background: var(--void);
}
.footer-logo {
  font-family: 'Cinzel Decorative', serif;
  font-size: .85rem;
  color: var(--blood-bright);
  text-shadow: 0 0 15px rgba(192,39,45,.4);
}
.footer-copy {
  font-family: 'Raleway', sans-serif;
  font-size: .63rem;
  letter-spacing: .15em;
  color: rgba(200,191,181,.2);
  text-transform: uppercase;
}

/* ==================== REVEAL ==================== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal-d { transition-delay: .18s; }

/* ==================== KEYFRAMES ==================== */
@keyframes fadeUp   { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: none; } }
@keyframes pulse    { 0%,100% { opacity: .6; } 50% { opacity: 1; } }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 640px) {
  /* nav padding handled by the 960px block — don't override drawer here */
  nav { padding: .85rem 1rem; }
  nav.nav-scrolled { padding: .75rem 1rem; }
  .nav-logo { font-size: .78rem; letter-spacing: .2em; }

  #hero { grid-template-columns: 1fr; padding: 5rem 1rem 2rem; text-align: center; gap: 2rem; }
  .hero-text { padding: 4rem 0 2rem; }
  .hero-title { font-size: clamp(2rem, 7vw, 3rem); }
  .hero-tagline { font-size: 1rem; max-width: 100%; }
  .hero-actions { flex-direction: column; gap: 1rem; }
  .btn-blood, .btn-ghost-dark { font-size: .65rem; padding: .8rem 1.5rem; }

  #synopsis { grid-template-columns: 1fr; padding: 4rem 1rem; gap: 2.5rem; }
  #synopsis::before { font-size: 10rem; left: .5rem; }
  .synopsis-text p { font-size: 1rem; line-height: 1.8; }
  .pull-quote { font-size: 1.1rem; padding: 1rem 0 1rem 1.5rem; margin: 1.5rem 0; }

  #saga { padding: 4rem 1rem; }
  .saga-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .saga-intro p { font-size: 1rem; }

  #obras { padding: 4rem 0 2rem; }
  .obras-intro { margin-bottom: 2rem; }
  .carousel-slide { width: 220px; height: 165px; }
  .carousel-row { gap: 1rem; }

  #author { grid-template-columns: 1fr; padding: 4rem 1rem; gap: 2rem; }
  .author-photo { width: 100%; max-width: 260px; margin: 0 auto; display: block; }

  #newsletter { padding: 4rem 1rem; }
  #newsletter h2 { font-size: clamp(1.4rem, 5vw, 2rem); }
  .email-form { flex-direction: column; max-width: 100%; }
  .email-input { border-right: 1px solid rgba(139,26,26,.35); border-bottom: none; }
  .email-btn { min-height: 44px; padding: 1rem 1.5rem; }

  footer { padding: 1.5rem 1rem; }
  .footer-logo { font-size: .75rem; }
  .footer-copy { font-size: .55rem; }

  .cover-img { width: 200px; height: 280px; }
  .cover-frame { width: 200px; }
  .social-btn { font-size: .6rem; padding: .6rem 1.2rem; min-height: 44px; }
}

@media (max-width: 960px) {
  body::after { display: none !important; }
  nav { padding: 1rem 1.5rem; }
  nav.nav-scrolled { padding: .85rem 1.5rem; }
  .nav-toggle { display: inline-flex; }

  /* ── Drawer: full-height side panel from the right ── */
  .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(78vw, 290px);
    background: #0b0606;
    border-left: 1px solid rgba(139,26,26,0.2);
    padding: 0;
    gap: 0;
    text-align: left;
    box-shadow: -12px 0 50px rgba(0,0,0,0.9);
    z-index: 99;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(.4,0,.2,1);
    pointer-events: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .nav-links.nav-scrolled::before {
    padding-top: 1rem;
  }
  .nav-links.nav-active {
    transform: translateX(0);
    pointer-events: auto;
  }

  /* Decorative top bar inside the drawer */
  .nav-links::before {
    content: 'AMBU';
    display: block;
    font-family: 'Cinzel', serif;
    font-size: .75rem;
    letter-spacing: .4em;
    color: var(--blood-bright);
    text-shadow: 0 0 18px rgba(192,39,45,0.6);
    padding: 2rem 1.8rem 1.5rem;
    border-bottom: 1px solid rgba(139,26,26,0.18);
    flex-shrink: 0;
  }

  /* Decorative bottom rule inside the drawer */
  .nav-links::after {
    content: '';
    display: block;
    margin: auto 1.8rem 2rem;
    height: 1px;
    background: linear-gradient(to right, rgba(139,26,26,0.5), transparent);
    flex-shrink: 0;
  }

  /* List items */
  .nav-links li {
    border-bottom: 1px solid rgba(255,255,255,0.04);
    position: relative;
    opacity: 0;
    transform: translateX(16px);
    transition: opacity 0.32s ease, transform 0.32s ease;
  }
  .nav-links li:last-child { border-bottom: none; }

  /* Stagger items when drawer opens */
  .nav-links.nav-active li:nth-child(1) { opacity:1; transform:none; transition-delay:.06s; }
  .nav-links.nav-active li:nth-child(2) { opacity:1; transform:none; transition-delay:.10s; }
  .nav-links.nav-active li:nth-child(3) { opacity:1; transform:none; transition-delay:.14s; }
  .nav-links.nav-active li:nth-child(4) { opacity:1; transform:none; transition-delay:.18s; }
  .nav-links.nav-active li:nth-child(5) { opacity:1; transform:none; transition-delay:.22s; }
  .nav-links.nav-active li:nth-child(6) { opacity:1; transform:none; transition-delay:.28s; }

  /* Links */
  .nav-links a {
    font-family: 'Raleway', sans-serif;
    font-size: .72rem;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: rgba(200,191,181,0.7);
    opacity: 1;
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: 1.1rem 1.8rem;
    text-decoration: none;
    transition: color 0.2s, background 0.2s, padding-left 0.2s;
  }
  /* Crimson dot accent before each link */
  .nav-links a::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(192,39,45,0.4);
    flex-shrink: 0;
    transition: background 0.2s, box-shadow 0.2s;
  }
  .nav-links a::after { display: none; }
  .nav-links a:hover,
  .nav-links a:active {
    color: #fff;
    background: rgba(139,26,26,0.08);
    padding-left: 2.2rem;
  }
  .nav-links a:hover::before,
  .nav-links a:active::before {
    background: var(--crimson);
    box-shadow: 0 0 8px rgba(224,48,48,0.7);
  }

  /* CTA button inside drawer */
  .nav-links .nav-cta {
    font-size: .72rem;
    letter-spacing: .22em;
    color: var(--crimson) !important;
    border: none;
    border-radius: 0;
    padding: 1.1rem 1.8rem;
    background: rgba(139,26,26,0.06);
    border-top: 1px solid rgba(139,26,26,0.2);
    margin-top: auto;
    text-align: left;
  }
  .nav-links .nav-cta::before {
    background: var(--crimson);
    box-shadow: 0 0 6px rgba(224,48,48,0.5);
  }
  .nav-links .nav-cta:hover {
    background: rgba(139,26,26,0.14);
    box-shadow: none;
  }

  #hero { grid-template-columns: 1fr; padding: 7rem 1.5rem 4rem; text-align: center; gap: 3rem; }
  .hero-eyebrow { justify-content: center; }
  .hero-tagline { margin: 0 auto 2.5rem; }
  .hero-actions { justify-content: center; flex-wrap: wrap; }
  .hero-cover { order: -1; }

  #synopsis { grid-template-columns: 1fr; padding: 5rem 1.5rem; gap: 4rem; }

  #saga { padding: 5rem 1.5rem; }
  .saga-grid { grid-template-columns: 1fr; }

  /* Mobile: Flat flip with auto-expanding height to prevent scroll bug */
  .saga-card {
    height: auto !important;
  }
  .saga-card-inner {
    height: 440px;
    transform-style: flat !important;
    transition: height 0.4s ease, opacity 0.4s ease;
  }
  .saga-card.flipped .saga-card-inner {
    transform: none !important;
    height: auto !important;
  }
  .saga-card-front {
    transition: opacity 0.4s ease;
  }
  .saga-card.flipped .saga-card-front {
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
  }
  .saga-card-back {
    transform: none !important;
    -webkit-transform: none !important;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    inset: 0;
    height: 100%;
    transition: opacity 0.4s ease;
  }
  .saga-card.flipped .saga-card-back {
    opacity: 1 !important;
    pointer-events: auto !important;
    position: relative !important;
    height: auto !important;
    overflow-y: visible !important;
  }

  #obras { padding: 5rem 0 3rem; }
  .carousel-slide { width: 260px; height: 195px; }

  #author { grid-template-columns: 1fr; padding: 5rem 1.5rem; gap: 3rem; }
  .author-photo { width: 100%; max-width: 300px; margin: 0 auto; display: block; }

  #newsletter { padding: 5rem 1.5rem; }
  .email-form { flex-direction: column; }
  .email-input { border-right: 1px solid rgba(139,26,26,.35); border-bottom: none; }

  footer { flex-direction: column; gap: 1rem; text-align: center; padding: 2rem 1.5rem; }
}

/* ==================== PORTFOLIO PAGE ==================== */
#portfolio-hero {
  min-height: 100vh;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding: 0 5rem;
  overflow: hidden;
}

#portfolio-hero .hero-atmosphere,
#portfolio-hero .mist,
#portfolio-hero .mist-layer {
  /* Same styles as hero section */
}

#portfolio-hero .hero-text {
  position: relative;
  z-index: 2;
  padding: 8rem 0 4rem;
}

#portfolio-hero .hero-cover {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8rem 0 4rem;
  opacity: 0;
  animation: riseIn 1.2s ease .5s forwards;
}

.featured-intro,
.details-intro {
  text-align: center;
  margin-bottom: 5rem;
  padding: 0 5rem;
}

.featured-intro .section-heading,
.details-intro .section-heading {
  font-size: clamp(2rem, 3.5vw, 3.2rem);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  padding: 0 5rem;
}

.project-card {
  background: var(--abyss);
  border: 1px solid rgba(139,26,26,.2);
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}

@media (hover: hover) {
  .project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,.3);
  }
}

.project-media {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}

@media (hover: hover) {
  .project-card:hover .project-media img {
    transform: scale(1.05);
  }
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .3s ease;
}

@media (hover: hover) {
  .project-card:hover .project-overlay {
    opacity: 1;
  }
}

.project-links {
  display: flex;
  gap: 1rem;
}

.project-link {
  color: var(--bone);
  text-decoration: none;
  font-size: .9rem;
  letter-spacing: .1em;
  transition: color .2s ease;
}

.project-link:hover {
  color: var(--crimson);
  text-shadow: 0 0 8px rgba(224,48,48,.5);
}

.project-info {
  padding: 1.5rem;
}

.project-title {
  font-family: 'Cinzel', serif;
  font-size: 1.2rem;
  color: var(--bone);
  margin-bottom: .5rem;
}

.project-category {
  font-family: 'Raleway', sans-serif;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--blood-bright);
  margin-bottom: .8rem;
  display: inline-block;
}

.project-description {
  font-size: .95rem;
  line-height: 1.7;
  color: rgba(200,191,181,.7);
  margin-bottom: 1.2rem;
}

.tech-tag {
  display: inline-block;
  background: rgba(139,26,26,.2);
  color: var(--bone);
  padding: .2rem .6rem;
  border-radius: .3rem;
  font-size: .75rem;
  margin-right: .5rem;
  margin-bottom: .5rem;
}

.case-study {
  background: var(--shadow);
  border: 1px solid rgba(139,26,26,.2);
  margin: 2rem 0;
  padding: 2.5rem;
}

.case-study-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.case-study-header h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  color: var(--bone);
  margin: 0;
}

.case-study-meta {
  display: flex;
  gap: 1.5rem;
  font-size: .9rem;
  color: rgba(200,191,181,.6);
  flex-wrap: wrap;
}

.case-study-content {
  line-height: 1.8;
  color: rgba(200,191,181,.75);
}

.case-study-content p {
  margin-bottom: 1.5rem;
}

.case-study-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.case-study-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: .3rem;
  box-shadow: 0 5px 15px rgba(0,0,0,.3);
}

.case-study-link {
  display: inline-block;
  color: var(--crimson);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid rgba(224,48,48,.3);
  padding-bottom: .2rem;
  transition: all .2s ease;
}

.case-study-link:hover {
  border-color: var(--crimson);
  text-shadow: 0 0 8px rgba(224,48,48,.5);
}

/* Responsive adjustments for portfolio */
@media (max-width: 768px) {
  #portfolio-hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 0 2rem;
  }
  
  #portfolio-hero .hero-text {
    padding: 5rem 0 3rem;
    order: -1;
  }
  
  #portfolio-hero .hero-cover {
    padding: 3rem 0;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
    padding: 0 2rem;
  }

  .project-overlay {
    opacity: 1 !important;
    background: rgba(5, 4, 4, 0.65) !important;
  }

  @media (hover: none) {
    .project-card:hover {
      transform: none !important;
      box-shadow: none !important;
    }
    .project-card:hover .project-media img {
      transform: none !important;
    }
  }
  
  .case-study {
    padding: 1.5rem;
  }
  
  .case-study-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

