/* =========================================================
   THE WIZARDING WORLD
   Cinematic Magical Experience
========================================================= */

:root {
  --black: #03050b;
  --deep: #07101d;
  --navy: #0b1729;
  --gold: #c8a45d;
  --gold-light: #f1d58a;
  --cream: #eee5d1;
  --muted: #a99f8a;

  --red: #7e1818;
  --green: #123e2b;
  --blue: #173c64;
  --yellow: #9b7918;

  --display: "Cinzel", serif;
  --body: "EB Garamond", serif;

  --ease: cubic-bezier(.22,1,.36,1);
}


/* =========================================================
   RESET
========================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--black);
  color: var(--cream);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Twinkling starfield, layered above the black background, below all content */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 10% 20%, rgba(241,213,138,.9), transparent),
    radial-gradient(1px 1px at 30% 70%, rgba(238,203,122,.7), transparent),
    radial-gradient(2px 2px at 50% 15%, rgba(241,213,138,.8), transparent),
    radial-gradient(1px 1px at 70% 45%, rgba(238,203,122,.6), transparent),
    radial-gradient(1.5px 1.5px at 85% 80%, rgba(241,213,138,.85), transparent),
    radial-gradient(1px 1px at 15% 90%, rgba(238,203,122,.6), transparent),
    radial-gradient(1.5px 1.5px at 95% 30%, rgba(241,213,138,.7), transparent),
    radial-gradient(1px 1px at 60% 92%, rgba(238,203,122,.55), transparent);
  background-repeat: repeat;
  background-size: 100% 100%;
  animation: twinkle 6s ease-in-out infinite alternate;
  opacity: .55;
}

@keyframes twinkle {
  0%   { opacity: .25; }
  50%  { opacity: .65; }
  100% { opacity: .35; }
}

img {
  width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

section {
  position: relative;
  overflow: hidden;
}

.section-container {
  width: min(1200px, 90%);
  margin: auto;
}


/* =========================================================
   LOADER
========================================================= */

.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center,
      #111c35 0,
      #03050b 65%);
  transition: opacity 1s ease, visibility 1s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  text-align: center;
}

.loader-wand {
  width: 80px;
  height: 2px;
  margin: auto;
  position: relative;
  transform: rotate(-45deg);
}

.loader-wand::before {
  content: "";
  position: absolute;
  width: 75px;
  height: 4px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--gold-light),
    transparent
  );
  box-shadow: 0 0 25px var(--gold);
  animation: wandGlow 1.5s infinite;
}

.loader-content p {
  margin-top: 35px;
  font-family: var(--display);
  color: var(--gold-light);
  letter-spacing: 3px;
  font-size: 13px;
}

.loader-line {
  width: 180px;
  height: 1px;
  margin: 20px auto;
  background: rgba(255,255,255,.1);
}

.loader-line span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--gold);
  animation: loading 2s forwards;
}

@keyframes loading {
  to { width: 100%; }
}

@keyframes wandGlow {
  50% {
    box-shadow:
      0 0 50px var(--gold-light),
      0 0 90px var(--gold);
  }
}


/* =========================================================
   PARTICLES
========================================================= */

#particle-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  opacity: .7;
}


/* =========================================================
   CURSOR
========================================================= */

.cursor-glow {
  position: fixed;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 4;
  transform: translate(-50%,-50%);
  background:
    radial-gradient(
      circle,
      rgba(241,213,138,.12),
      transparent 70%
    );
}


/* =========================================================
   FOG
========================================================= */

.fog {
  position: fixed;
  width: 700px;
  height: 250px;
  border-radius: 50%;
  filter: blur(70px);
  background: rgba(130,150,180,.025);
  pointer-events: none;
  z-index: 2;
  animation: fogMove 18s ease-in-out infinite alternate;
}

.fog-one {
  bottom: 10%;
  left: -20%;
}

.fog-two {
  top: 30%;
  right: -20%;
  animation-delay: 5s;
}

@keyframes fogMove {
  from {
    transform: translateX(-100px);
  }
  to {
    transform: translateX(150px);
  }
}


/* =========================================================
   NAVIGATION
========================================================= */

.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  transition: .4s ease;
}

.site-header.scrolled {
  background: rgba(3,5,11,.8);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(200,164,93,.15);
}

.navbar {
  width: min(1250px,92%);
  height: 80px;
  margin: auto;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 1px;

  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-symbol {
  color: var(--gold-light);
  font-size: 26px;
  text-shadow: 0 0 20px var(--gold);
}

.nav-menu {
  display: flex;
  gap: 30px;
  list-style: none;
}

.nav-menu a {
  position: relative;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--muted);
  transition: .3s;
}

.nav-menu a:hover {
  color: var(--gold-light);
}

.nav-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: .3s;
}

.nav-menu a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
}


/* =========================================================
   HERO
========================================================= */

.hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
}

.hero-image {
  position: absolute;
  inset: 0;

  background-image:
    url("https://images.pexels.com/photos/13180379/pexels-photo-13180379.jpeg?auto=compress&cs=tinysrgb&w=2200");

  background-size: cover;
  background-position: center;

  transform: scale(1.08);
  animation: heroZoom 12s ease-out forwards;
}

.hero-overlay {
  position: absolute;
  inset: 0;

  background:
    radial-gradient(
      circle at center,
      rgba(17,30,60,.15),
      rgba(3,5,11,.8) 65%,
      #03050b 100%
    ),

    linear-gradient(
      to bottom,
      rgba(3,5,11,.3),
      rgba(3,5,11,.95)
    );
}

@keyframes heroZoom {
  from { transform: scale(1.15); }
  to { transform: scale(1.03); }
}

.moon {
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;

  top: 18%;
  right: 13%;

  background: #f5e7b4;

  box-shadow:
    0 0 40px rgba(245,231,180,.3),
    0 0 100px rgba(245,231,180,.1);

  opacity: .65;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 900px;
  padding: 100px 20px 40px;
}

.hero-kicker,
.eyebrow {
  font-family: var(--display);
  color: var(--gold-light);
  font-size: 12px;
  letter-spacing: 5px;
  text-transform: uppercase;
}

.hero h1 {
  margin-top: 20px;

  font-family: var(--display);
  font-size: clamp(50px,8vw,110px);
  line-height: .95;
  font-weight: 600;

  text-shadow:
    0 0 30px rgba(200,164,93,.25),
    0 0 100px rgba(200,164,93,.15);
}

.hero h1 span {
  display: block;
  font-family: "Cinzel Decorative", serif;
  font-size: .62em;

  background: linear-gradient(
    100deg,
    var(--gold) 20%,
    var(--gold-light) 40%,
    #fff8e0 50%,
    var(--gold-light) 60%,
    var(--gold) 80%
  );
  background-size: 250% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 5s linear infinite;
}

@keyframes shimmer {
  to { background-position: -250% center; }
}

.hero-description {
  max-width: 600px;
  margin: 35px auto 0;
  color: #c3baa8;
  font-size: 21px;
}

.magic-button {
  display: inline-block;
  margin-top: 40px;

  padding: 15px 32px;

  border: 1px solid rgba(241,213,138,.6);
  color: var(--gold-light);

  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 2px;

  position: relative;
  overflow: hidden;

  transition: .4s var(--ease);
}

.magic-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gold-light);
  transform: translateY(100%);
  transition: .4s var(--ease);
  z-index: -1;
}

.magic-button {
  animation: buttonGlow 3s ease-in-out infinite;
}

@keyframes buttonGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(200,164,93,.1); }
  50%      { box-shadow: 0 0 25px rgba(200,164,93,.35); }
}

.magic-button:hover {
  color: var(--black);
  box-shadow: 0 0 40px rgba(200,164,93,.25);
  animation: none;
}

.screen-flash {
  position: fixed;
  inset: 0;
  z-index: 998;
  pointer-events: none;
  background: radial-gradient(circle, rgba(241,213,138,.55), transparent 70%);
  opacity: 0;
}

.screen-flash.flash {
  animation: screenFlash .6s ease-out;
}

@keyframes screenFlash {
  0%   { opacity: 0; }
  15%  { opacity: 1; }
  100% { opacity: 0; }
}

.spell-display.casting {
  animation: castShake .5s var(--ease);
}

@keyframes castShake {
  0%, 100% { transform: translate(0,0); }
  20%      { transform: translate(-4px,2px); }
  40%      { transform: translate(4px,-2px); }
  60%      { transform: translate(-3px,1px); }
  80%      { transform: translate(3px,-1px); }
}

.magic-button:hover::before {
  transform: translateY(0);
}

.hero-bottom {
  position: absolute;
  bottom: 30px;
  z-index: 3;

  font-family: var(--display);
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--muted);
}

.scroll-arrow {
  width: 1px;
  height: 50px;
  background: linear-gradient(
    var(--gold),
    transparent
  );
  margin: 12px auto 0;
}


/* =========================================================
   SECTION HEADINGS
========================================================= */

.section-heading {
  max-width: 720px;
  margin-bottom: 70px;
}

.section-heading.center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.section-heading h2 {
  font-family: var(--display);
  font-size: clamp(35px,5vw,65px);
  line-height: 1.1;
  margin-top: 15px;
}

.section-heading h2 span {
  display: block;

  background: linear-gradient(
    100deg,
    var(--gold) 20%,
    var(--gold-light) 40%,
    #fff8e0 50%,
    var(--gold-light) 60%,
    var(--gold) 80%
  );
  background-size: 250% auto;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 5s linear infinite;
}

.section-heading > p:last-child {
  margin-top: 20px;
  color: var(--muted);
}


/* =========================================================
   HOGWARTS
========================================================= */

.hogwarts-section {
  padding: 150px 0;
  background:
    radial-gradient(
      ellipse at 50% 0,
      #152541,
      transparent 60%
    ),
    var(--black);
}

.hogwarts-feature {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 80px;
  align-items: center;
}

.hogwarts-image {
  position: relative;
}

.hogwarts-image img {
  height: 550px;
  object-fit: cover;
  filter: saturate(.7) brightness(.75);
}

.image-frame {
  position: absolute;
  inset: 20px;
  border: 1px solid rgba(241,213,138,.5);
  pointer-events: none;
}

.image-frame::before,
.image-frame::after {
  content: "";
  position: absolute;
  width: 50px;
  height: 50px;
  border: 1px solid var(--gold);
}

.image-frame::before {
  top: -10px;
  left: -10px;
  border-right: 0;
  border-bottom: 0;
}

.image-frame::after {
  right: -10px;
  bottom: -10px;
  border-left: 0;
  border-top: 0;
}

.hogwarts-story {
  position: relative;
}

.chapter-number {
  font-family: var(--display);
  font-size: 80px;
  color: rgba(200,164,93,.08);
}

.hogwarts-story h3 {
  font-family: var(--display);
  font-size: 40px;
  line-height: 1.1;
}

.hogwarts-story h3 em {
  color: var(--gold-light);
  font-family: "Cinzel Decorative",serif;
  font-style: normal;
}

.hogwarts-story p {
  color: var(--muted);
  margin-top: 20px;
}

.gold-link {
  display: inline-block;
  margin-top: 30px;
  color: var(--gold-light);
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 1px;
}


/* =========================================================
   HOUSES
========================================================= */

.houses-section {
  padding: 150px 0;
  background: #060a12;
}

.houses-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 18px;
}

.house-card {
  position: relative;
  min-height: 500px;
  overflow: hidden;

  border: 1px solid rgba(255,255,255,.08);

  transition:
    transform .5s var(--ease),
    border-color .5s;
}

.house-card:hover {
  transform: translateY(-12px);
}

.house-image,
.house-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.house-image img {
  object-fit: cover;
  filter: grayscale(.7) brightness(.4);
  transition: .8s var(--ease);
}

.house-card:hover img {
  transform: scale(1.08);
  filter: grayscale(.2) brightness(.55);
}

.house-content {
  position: absolute;
  inset: auto 25px 25px;

  z-index: 2;
}

.house-card::after {
  content: "";
  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      transparent 20%,
      rgba(3,5,11,.3) 45%,
      rgba(3,5,11,.95) 100%
    );
}

.house-number {
  font-family: var(--display);
  color: var(--gold);
  font-size: 11px;
}

.house-content h3 {
  font-family: var(--display);
  font-size: 28px;
  margin-top: 5px;
}

.house-motto {
  color: var(--gold-light);
  font-size: 13px;
}

.house-content p:last-child {
  color: var(--muted);
  font-size: 15px;
  margin-top: 8px;
}

.house-card {
  box-shadow: 0 0 0 rgba(0,0,0,0);
  transition:
    transform .5s var(--ease),
    border-color .5s,
    box-shadow .5s;
}

.gryffindor:hover {
  border-color: var(--red);
  box-shadow: 0 20px 60px -10px rgba(126,24,24,.55), 0 0 40px rgba(126,24,24,.25);
}

.slytherin:hover {
  border-color: var(--green);
  box-shadow: 0 20px 60px -10px rgba(18,62,43,.6), 0 0 40px rgba(18,62,43,.3);
}

.ravenclaw:hover {
  border-color: var(--blue);
  box-shadow: 0 20px 60px -10px rgba(23,60,100,.6), 0 0 40px rgba(23,60,100,.3);
}

.hufflepuff:hover {
  border-color: var(--yellow);
  box-shadow: 0 20px 60px -10px rgba(155,121,24,.55), 0 0 40px rgba(155,121,24,.25);
}


/* =========================================================
   CHARACTERS
========================================================= */

.characters-section {
  padding: 150px 0;
  background:
    linear-gradient(
      180deg,
      #060a12,
      #03050b
    );
}

.characters-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 22px;
}

.character-card {
  height: 500px;
  position: relative;
  overflow: hidden;

  background: var(--deep);
  border: 1px solid rgba(200,164,93,.12);

  transition: .5s var(--ease);
}

.character-card:hover {
  transform: translateY(-10px);
  border-color: rgba(241,213,138,.5);

  box-shadow:
    0 25px 60px rgba(0,0,0,.5),
    0 0 45px rgba(200,164,93,.2);
}

.character-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;

  background: linear-gradient(
    115deg,
    transparent 40%,
    rgba(241,213,138,.35) 50%,
    transparent 60%
  );
  background-size: 250% 250%;
  background-position: 150% 150%;
  transition: background-position 1.1s var(--ease);
}

.character-card:hover::before {
  background-position: -50% -50%;
}

.character-image,
.character-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.character-image img {
  object-fit: cover;
  transition: .8s var(--ease);
  filter: saturate(.7) brightness(.7);
}

.character-card:hover img {
  transform: scale(1.06);
  filter: saturate(1) brightness(.85);
}

.character-gradient {
  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      transparent 20%,
      rgba(3,5,11,.15) 40%,
      rgba(3,5,11,.98) 100%
    );
}

.character-info {
  position: absolute;
  z-index: 2;
  left: 25px;
  right: 25px;
  bottom: 25px;
}

.character-info span {
  color: var(--gold-light);
  font-family: var(--display);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.character-info h3 {
  font-family: var(--display);
  font-size: 27px;
  margin-top: 5px;
}

.details-button {
  margin-top: 15px;
  color: var(--gold-light);
  border-bottom: 1px solid rgba(241,213,138,.4);
  padding-bottom: 4px;
  font-size: 13px;
}


/* =========================================================
   MAGIC
========================================================= */

.magic-section {
  padding: 150px 0;

  background:
    radial-gradient(
      circle at center,
      #101d32,
      var(--black) 70%
    );
}

.magic-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 20px;
}

.magic-card {
  height: 360px;
  position: relative;
  overflow: hidden;
}

.magic-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.55) saturate(.7);

  transition: .7s var(--ease);
}

.magic-card:hover img {
  transform: scale(1.1);
  filter: brightness(.75) saturate(1);
}

.magic-card-overlay {
  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      transparent,
      rgba(3,5,11,.95)
    );
}

.magic-card-content {
  position: absolute;
  left: 25px;
  right: 25px;
  bottom: 25px;
}

.magic-card-content span {
  color: var(--gold);
  font-family: var(--display);
  font-size: 11px;
}

.magic-card-content h3 {
  font-family: var(--display);
  font-size: 25px;
  color: var(--gold-light);
}

.magic-card-content p {
  color: #c2b9a7;
  font-size: 15px;
}


/* =========================================================
   SPELLS
========================================================= */

.spells-section {
  padding: 150px 0;

  background: #03050b;
}

.spell-background {
  position: absolute;
  inset: 0;
  z-index: 0;

  background:
    url("https://images.pexels.com/photos/17841194/pexels-photo-17841194.jpeg?auto=compress&cs=tinysrgb&w=1600")
    center/cover;

  filter: brightness(.35) saturate(1.1);
  transform: scale(1.05);
  animation: driftBackground 22s ease-in-out infinite alternate;
}

.spell-background::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse at center,
      rgba(3,5,11,.5),
      #03050b 80%
    );
}

@keyframes driftBackground {
  from { transform: scale(1.05) translateY(0); }
  to   { transform: scale(1.12) translateY(-15px); }
}

.spell-container {
  position: relative;
  z-index: 2;
}

.spell-light {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  transform: translate(-50%,-50%);
  background: var(--gold-light);
  box-shadow:
    0 0 20px 10px rgba(241,213,138,.5),
    0 0 60px 30px rgba(241,213,138,.15);
  opacity: 0;
  transition: opacity .6s, width .6s, height .6s, box-shadow .6s;
  pointer-events: none;
}

.spell-display.active .spell-light {
  opacity: 1;
  width: 26px;
  height: 26px;
  box-shadow:
    0 0 40px 18px rgba(241,213,138,.6),
    0 0 100px 50px rgba(241,213,138,.2);
  animation: spellPulse 1.8s ease-in-out infinite;
}

@keyframes spellPulse {
  0%, 100% { box-shadow: 0 0 40px 18px rgba(241,213,138,.6), 0 0 100px 50px rgba(241,213,138,.2); }
  50%      { box-shadow: 0 0 55px 25px rgba(241,213,138,.75), 0 0 130px 65px rgba(241,213,138,.3); }
}

.spell-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.spell-buttons button {
  padding: 12px 22px;

  border: 1px solid rgba(200,164,93,.3);
  border-radius: 2px;

  color: var(--cream);

  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 1px;

  transition: .3s;
}

.spell-buttons button:hover,
.spell-buttons button.active {
  background: var(--gold-light);
  color: var(--black);
  box-shadow:
    0 0 30px rgba(241,213,138,.3);
}

.spell-display {
  position: relative;

  max-width: 700px;
  min-height: 220px;

  margin: 60px auto 0;

  display: grid;
  place-items: center;
  text-align: center;

  border: 1px solid rgba(200,164,93,.2);

  background:
    radial-gradient(
      circle,
      rgba(200,164,93,.08),
      transparent 60%
    );
}

.spell-display h3 {
  display: none;

  font-family: "Cinzel Decorative",serif;
  font-size: 38px;
  color: var(--gold-light);

  text-shadow:
    0 0 25px rgba(241,213,138,.6);
}

.spell-display p:last-child {
  display: none;
  max-width: 500px;
  color: var(--muted);
}

.spell-display.active h3,
.spell-display.active p:last-child {
  display: block;
}

.spell-display.active .spell-hint {
  display: none;
}


/* =========================================================
   FINAL
========================================================= */

.final-section {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
}

.final-image {
  position: absolute;
  inset: 0;

  background:
    url("https://images.pexels.com/photos/13180379/pexels-photo-13180379.jpeg?auto=compress&cs=tinysrgb&w=2000")
    center/cover;

  filter: brightness(.4);
}

.final-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      rgba(3,5,11,.3),
      #03050b
    );
}

.final-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.final-content h2 {
  font-family: var(--display);
  font-size: clamp(40px,6vw,75px);
  line-height: 1;
  margin-top: 20px;
}

.final-content h2 span {
  color: var(--gold-light);
}


/* =========================================================
   MODAL
========================================================= */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;

  display: grid;
  place-items: center;

  padding: 25px;

  background: rgba(0,0,0,.8);
  backdrop-filter: blur(15px);

  opacity: 0;
  visibility: hidden;

  transition: .4s;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.character-modal {
  width: min(850px,100%);
  max-height: 85vh;
  overflow: hidden;

  display: grid;
  grid-template-columns: .8fr 1fr;

  background: var(--navy);
  border: 1px solid rgba(241,213,138,.3);

  transform: scale(.9);
  transition: .4s var(--ease);

  position: relative;
}

.modal-overlay.open .character-modal {
  transform: scale(1);
}

.character-modal img {
  height: 100%;
  min-height: 450px;
  object-fit: cover;
}

.modal-content {
  padding: 60px 40px;
  align-self: center;
}

.modal-content p:first-child {
  color: var(--gold);
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 2px;
}

.modal-content h2 {
  font-family: var(--display);
  font-size: 40px;
  margin: 10px 0 20px;
}

.modal-content p:last-child {
  color: var(--muted);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;

  z-index: 5;

  font-size: 32px;
  color: var(--cream);
}

.modal-close:hover {
  color: var(--gold-light);
}


/* =========================================================
   FOOTER
========================================================= */

footer {
  background: #020409;
  border-top: 1px solid rgba(200,164,93,.15);
  padding: 70px 0 25px;
}

.footer-inner {
  width: min(1100px,90%);
  margin: auto;

  display: flex;
  justify-content: space-between;
  gap: 50px;
}

.footer-brand {
  font-family: var(--display);
  color: var(--gold-light);
}

.footer-brand span {
  font-size: 25px;
}

.footer-inner p {
  max-width: 350px;
  margin-top: 10px;
  color: var(--muted);
}

.footer-navigation {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-content: start;
}

.footer-navigation a {
  color: var(--muted);
  font-family: var(--display);
  font-size: 11px;
}

.footer-navigation a:hover {
  color: var(--gold-light);
}

.copyright {
  width: min(1100px,90%);
  margin: 50px auto 0;
  padding-top: 20px;

  border-top: 1px solid rgba(255,255,255,.06);

  text-align: center;
  color: #625e55;
  font-size: 13px;
}


/* =========================================================
   BACK TOP
========================================================= */

.back-top {
  position: fixed;
  right: 25px;
  bottom: 25px;

  width: 45px;
  height: 45px;

  border: 1px solid var(--gold);
  background: var(--navy);

  color: var(--gold-light);

  opacity: 0;
  visibility: hidden;

  z-index: 90;
}

.back-top.show {
  opacity: 1;
  visibility: visible;
}


/* =========================================================
   REVEAL
========================================================= */

.reveal {
  opacity: 0;
  transform: translateY(35px);
  transition:
    opacity .9s ease,
    transform .9s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media(max-width:1000px) {

  .houses-grid {
    grid-template-columns: repeat(2,1fr);
  }

  .hogwarts-feature {
    grid-template-columns: 1fr;
  }

  .characters-grid,
  .magic-grid {
    grid-template-columns: repeat(2,1fr);
  }

}

@media(max-width:700px) {

  .nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

  .nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--gold);
  }

  .nav-menu {
    position: fixed;
    inset: 0 0 0 auto;

    width: 280px;

    background: rgba(3,5,11,.98);
    backdrop-filter: blur(20px);

    flex-direction: column;
    justify-content: center;
    align-items: center;

    transform: translateX(100%);
    transition: .5s var(--ease);
  }

  .nav-menu.open {
    transform: translateX(0);
  }

  .houses-grid,
  .characters-grid,
  .magic-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 48px;
  }

  .moon {
    width: 80px;
    height: 80px;
  }

  .hogwarts-image img {
    height: 380px;
  }

  .character-modal {
    grid-template-columns: 1fr;
    max-height: 90vh;
    overflow-y: auto;
  }

  .character-modal img {
    height: 300px;
    min-height: 0;
  }

  .modal-content {
    padding: 30px;
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer-navigation {
    justify-content: center;
  }

}