:root {

  --bg: #d7d6c6;
  --panel: rgba(231,227,196,0.96);
  --gold: #9f9361;
  --text: #4d4730;
  --shadow: rgba(0,0,0,0.25);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #0f0c08;
}

/* INTRO OVERLAY */
#intro {
  position: fixed;
  inset: 0;
  background: linear-gradient(to bottom, #0f0c08, #1a140d);

  display: flex;
  justify-content: center;
  align-items: center;

  z-index: 9999;

  opacity: 1;
  visibility: visible;

  transition:
    opacity 1.5s ease,
    visibility 1.5s ease;
}

/* Fade state */
#intro.fade-out {
  opacity: 0;
  visibility: hidden;
}

/* TEXT */
#intro-text {
  color: #d4b06a;

  font-family: 'Parisienne', cursive;
  font-size: clamp(1.4rem, 2vw, 2.4rem);
  font-weight: 400;

  white-space: nowrap;
  overflow: hidden;

  border-right: 1px solid #d4b06a;

  width: 0;
  display: inline-block;

  animation:
    typing 3s steps(43, end) forwards,
    blink 0.8s step-end infinite;
}

.intro-content {

  display: flex;

  flex-direction: column;

  align-items: center;
}

.loading-dots {

  display: flex;

  gap: 12px;

  margin-top: 28px;

  opacity: 0;

  animation:
    dotsReveal 1s ease forwards;

  animation-delay: 3s;
}

.loading-dots span {

  width: 8px;
  height: 8px;

  border-radius: 999px;

  background: #d4b06a;

  opacity: 0.25;

  box-shadow:
    0 0 8px rgba(212,176,106,0.35);

  animation:
    pulseDot 1.4s infinite ease-in-out;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes pulseDot {

  0%, 80%, 100% {

    transform: scale(0.7);

    opacity: 0.25;
  }

  40% {

    transform: scale(1);

    opacity: 1;
  }
}

@keyframes dotsReveal {

  to {

    opacity: 1;
  }
}

/* GALLERY */
#gallery-content {

  opacity: 0;

  animation:
    galleryFade 2s ease forwards;

  animation-delay: 5s;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 21ch;
  }
}

@keyframes blink {
  50% {
    border-color: transparent;
  }
}

@keyframes galleryFade {
  to {
    opacity: 1;
  }
}

.top-banner {

  position: sticky;

  top: 0;

  z-index: 1000;

  background: var(--panel);

  border-bottom:
  1px solid rgba(159, 147, 97, 0.35);

  padding: 28px 24px;

  backdrop-filter: blur(6px);

  box-shadow:
    0 2px 8px rgba(0,0,0,0.06),
    0 1px 0 rgba(255,255,255,0.35) inset;

  transition:
    padding 0.35s ease,
    background 0.35s ease,
    box-shadow 0.35s ease;
}

.top-banner h1 {

  margin: 0;

  color: var(--gold);

  font-size: clamp(2rem, 5vw, 3.2rem);

  font-weight: 500;

  letter-spacing: 0.08em;

  text-align: center;

  transition:
    font-size 0.35s ease,
    letter-spacing 0.35s ease;
}

.top-banner.collapsed {

  padding: 12px 24px;

  background:
  rgba(231,227,196,0.88);
}

.top-banner.collapsed h1 {

  font-size: clamp(1.2rem, 2vw, 1.6rem);

  letter-spacing: 0.04em;
}

body {

  margin: 0;

  color: var(--text);

  font-family: "Cormorant Garamond", serif;

  background-color: #d7d6c6;

  background-image:
    linear-gradient(
      rgba(215,214,198,0.94),
      rgba(215,214,198,0.94)
    );

  background-attachment: fixed;

  overflow-x: hidden;

  min-height: 100vh;

  position: relative;
}

header {

  text-align: center;

  padding: 60px 20px 10px;

  position: relative;
  z-index: 2;
}

header h1 {

  font-size: 3rem;

  letter-spacing: 4px;

  font-weight: 700;

  color: var(--gold);

  text-transform: uppercase;

  text-shadow:
  0 1px 0 rgba(255,255,255,0.25),
  0 2px 10px rgba(159,147,97,0.15);
}

.card {

  position: relative;

  width: 100%;

  aspect-ratio: 2 / 3;

  perspective: 1000px;

  transition:
    transform 0.35s ease,
    filter 0.35s ease;

  cursor: pointer;
}

.flip-card-inner {

  position: relative;

  width: 100%;
  height: 100%;

  transform-style: preserve-3d;

  transition: transform 0.55s ease;

  will-change: transform;

  transform: translateZ(0);

  backface-visibility: hidden;
}

.card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.card.revealed .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {

  position: absolute;

  inset: 0;

  width: 100%;
  height: 100%;

  backface-visibility: hidden;
}

.flip-card-back {
  transform: rotateY(180deg);
}

.gallery-card {

  width: 100%;

  display: block;

  border-radius: 18px;

  box-shadow:
  0 12px 25px rgba(0,0,0,0.18);

  backface-visibility: hidden;

  transform: translateZ(0);
}

.gallery {

  display: grid;

  grid-template-columns:
  repeat(5, 1fr);

  column-gap: 30px;

  row-gap: 90px;

  padding: 40px;

  max-width: 1400px;

  margin: auto;

  position: relative;
  z-index: 2;
}

@media (max-width: 1200px) {

  .gallery {

    grid-template-columns:
    repeat(4, 1fr);

    row-gap: 70px;
  }
}

@media (max-width: 900px) {

  .gallery {

    grid-template-columns:
    repeat(3, 1fr);

    row-gap: 50px;
  }
}

@media (max-width: 600px) {

  .gallery {

    grid-template-columns:
    repeat(2, 1fr);

    row-gap: 40px;
  }
}

.card:hover {

  transform: translateY(-10px);
}

.gallery-card {

  width: 100%;

  display: block;

  border-radius: 18px;

  box-shadow:
  0 12px 25px rgba(0,0,0,0.18);
}

.modal {

  position: fixed;

  inset: 0;

  display: flex;

  align-items: center;

  justify-content: center;

  padding: 40px;

  background: rgba(0,0,0,0.72);

  z-index: 999;

  overflow-y: auto;
}

.hidden {
  display: none;
}

.modal-content {

  background: var(--panel);

  width: min(1200px, 95vw);

  border-radius: 28px;

  padding: 45px;

  position: relative;

  box-shadow:
  0 20px 50px rgba(0,0,0,0.25);

  animation: fadeIn 0.35s ease;

  margin: auto;
}

@keyframes fadeIn {

  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-layout {

  display: flex;

  gap: 40px;

  align-items: flex-start;
}

.modal-text {

  flex: 1;

  min-width: 0;
}

.modal-text h1 {

  margin-top: 0;

  font-size: 2.8rem;

  color: var(--gold);

  font-weight: normal;
}

.title-row {

  display: flex;

  align-items: baseline;

  gap: 18px;

  flex-wrap: wrap;

  margin-bottom: 20px;
}

#modal-card-name {

  font-size: 2.5rem;

  font-variant: small-caps;

  letter-spacing: 2px;

  color: var(--gold);

  font-weight: normal;
}

.title-divider {

  font-size: 2rem;

  opacity: 0.4;

  color: var(--gold);
}

#modal-oc-name {

  font-size: 2.2rem;

  font-style: italic;

  font-family: "Parisienne", cursive;

  color: #8f8458;

  font-weight: normal;
}

.modal-text h2 {

  margin-top: 30px;

  letter-spacing: 1px;

  font-size: 1.1rem;
}

.tags {

  display: flex;

  flex-wrap: wrap;

  gap: 10px;
}

.tags span {

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

  padding: 8px 14px;

  border-radius: 999px;

  background: rgba(159,147,97,0.12);

  font-size: 0.92rem;
}

.artist {

  margin-top: 40px;

  opacity: 0.7;

  font-style: italic;
}

.close-btn {

  position: absolute;

  top: 18px;
  right: 25px;

  background: none;

  border: none;

  font-size: 2rem;

  cursor: pointer;

  color: var(--gold);
}

.nav-btn {

  position: absolute;

  top: 50%;

  transform: translateY(-50%);

  border: none;

  background: rgba(255,255,255,0.4);

  width: 48px;
  height: 48px;

  border-radius: 999px;

  font-size: 2rem;

  cursor: pointer;

  color: var(--gold);
}

.prev-btn {
  left: -20px;
}

.next-btn {
  right: -20px;
}

header,
.gallery {

  position: relative;

  z-index: 2;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.particles {

  position: fixed;

  inset: 0;

  pointer-events: none;

  z-index: 1;

  overflow: hidden;
}

.particles span {

  position: absolute;

  width: 3px;
  height: 3px;

  background: rgba(255,255,255,0.55);

  border-radius: 999px;

  animation: floatStar linear infinite;
}

.particles span:nth-child(1) {
  top: 10%;
  left: 20%;
  animation-duration: 18s;
}

.particles span:nth-child(2) {
  top: 30%;
  left: 70%;
  animation-duration: 26s;
}

.particles span:nth-child(3) {
  top: 60%;
  left: 40%;
  animation-duration: 22s;
}

.particles span:nth-child(4) {
  top: 80%;
  left: 85%;
  animation-duration: 30s;
}

.particles span:nth-child(5) {
  top: 15%;
  left: 55%;
  animation-duration: 20s;
}

.particles span:nth-child(6) {
  top: 45%;
  left: 10%;
  animation-duration: 24s;
}

.particles span:nth-child(7) {
  top: 75%;
  left: 60%;
  animation-duration: 28s;
}

.particles span:nth-child(8) {
  top: 50%;
  left: 90%;
  animation-duration: 32s;
}

@keyframes floatStar {

  from {

    transform:
    translateY(0px);

    opacity: 0.2;
  }

  50% {

    opacity: 0.8;
  }

  to {

    transform:
    translateY(-120px);

    opacity: 0.2;
  }
}

@media (max-width: 900px) {

  .modal-layout {

    flex-direction: column;
  }

  .modal-image {

    width: 100%;

    max-width: 340px;

    margin: auto;
  }

}

.modal-image {

  flex: 0 0 340px;
}

.modal-image img {

  width: 100%;

  display: block;

  border-radius: 18px;

  box-shadow:
  0 15px 35px rgba(0,0,0,0.2);
}

.modal-content {
  position: relative;
  z-index: 10000;
}

  .prev-btn {
    left: 5px;
  }

  .next-btn {
    right: 5px;
  }

html {
  scroll-behavior: smooth;
}

.floating-nav {

  position: fixed;

  right: 24px;
  bottom: 24px;

  display: flex;

  flex-direction: column;

  gap: 14px;

  z-index: 8000;
}

.nav-circle {

  width: 72px;
  height: 72px;

  display: flex;

  align-items: center;
  justify-content: center;

  border-radius: 999px;

  text-decoration: none;

  background: var(--panel);

  color: var(--gold);

  border:
  1px solid rgba(159,147,97,0.35);

  box-shadow:
    0 6px 18px rgba(0,0,0,0.12),
    0 1px 0 rgba(255,255,255,0.35) inset;

  backdrop-filter: blur(6px);

  font-size: 0.9rem;

  letter-spacing: 0.05em;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.nav-circle:hover {

  transform: translateY(-3px);

  background:
  rgba(231,227,196,1);

  box-shadow:
    0 10px 24px rgba(0,0,0,0.16),
    0 1px 0 rgba(255,255,255,0.4) inset;
}

.flip-controls {

  display: flex;

  justify-content: center;

  margin-top: 30px;
}

#flip-all-btn {

  font-family: "Cormorant Garamond", serif;

  font-size: 0.9rem;

  letter-spacing: 0.05em;

  cursor: pointer;
}

.section-toggle {

  width: 100%;

  display: flex;

  align-items: center;

  justify-content: center;

  gap: 12px;

  background: none;

  border: none;

  color: var(--gold);

  font-family: "Cormorant Garamond", serif;

  font-size: 2rem;

  letter-spacing: 0.08em;

  padding: 30px 20px 10px;

  cursor: pointer;

  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.section-toggle:hover {

  opacity: 0.8;
}

.toggle-icon {

  font-size: 1.4rem;

  transition: transform 0.3s ease;
}

.hidden-gallery {

  display: none;
}