/* =========================================================
   GIOVANNA — MEDIA PAGE
   SEOUL INTERNATIONAL BOOK FAIR

   Visual direction:
   - Historical
   - Warm
   - Editorial
   - Cinematic
   - Elegant
   - Same palette as About page
========================================================= */

/* =========================================================
   VARIABLES
========================================================= */

:root {
  --media-gold: #d6a84f;
  --media-gold-light: #f4d98b;
  --media-gold-soft: #e7c36d;
  --media-gold-dark: #9b6b29;

  --media-orange: #c86b32;
  --media-burnt-orange: #a74c27;
  --media-orange-light: #dd8040;

  --media-burgundy: #632421;
  --media-burgundy-dark: #351416;

  --media-brown: #43261c;
  --media-brown-light: #704532;

  --media-cream: #f1e3c7;
  --media-cream-light: #fff7e5;
  --media-cream-dark: #d7c6a8;

  --media-text: #dfd1b9;
  --media-text-light: #eee1ca;
  --media-text-muted: #b9a990;

  --media-black: #0a0808;
  --media-charcoal: #151010;
  --media-dark-brown: #21120f;

  --media-serif: "Cormorant Garamond", Georgia, serif;

  --media-garamond: "EB Garamond", Georgia, serif;

  --media-display: "Cinzel", Georgia, serif;
}

/* =========================================================
   PAGE
========================================================= */

main {
  overflow: hidden;
}

.sibf-section,
.sibf-gallery,
.sibf-closing {
  position: relative;
}

/* =========================================================
   HERO
========================================================= */

.sibf-section {
  min-height: 88vh;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 150px 7% 120px;

  position: relative;

  overflow: hidden;

  isolation: isolate;

  text-align: center;

  background: linear-gradient(180deg, #21110f, #351c15);
}

/* =========================================================
   HERO BACKGROUND — ss.webp
========================================================= */

.sibf-background {
  position: absolute;

  inset: -5%;

  z-index: -3;

  background-image: url("../assets/ss.webp");

  background-size: cover;

  background-position: center center;

  background-repeat: no-repeat;

  transform: scale(1.06);

  will-change: transform;

  filter: saturate(0.82) contrast(1.05) sepia(0.08);

  transition: transform 0.3s ease;
}

/* dark cinematic overlay */

.sibf-overlay {
  position: absolute;

  inset: 0;

  z-index: -2;

  background: linear-gradient(
    180deg,
    rgba(10, 8, 8, 0.42),
    rgba(33, 17, 15, 0.6) 45%,
    rgba(21, 10, 10, 0.92)
  );

  pointer-events: none;
}

/* warm glow */

.sibf-section::before {
  content: "";

  position: absolute;

  width: 700px;
  height: 700px;

  top: 50%;
  left: 50%;

  z-index: -1;

  border-radius: 50%;

  transform: translate(-50%, -50%);

  background: radial-gradient(
    circle,
    rgba(214, 168, 79, 0.18),
    rgba(174, 71, 31, 0.1) 35%,
    transparent 70%
  );

  filter: blur(15px);

  animation: mediaHeroGlow 8s ease-in-out infinite alternate;

  pointer-events: none;
}

/* =========================================================
   HERO CONTENT
========================================================= */

.sibf-content {
  width: min(1000px, 100%);

  position: relative;

  z-index: 5;

  margin: 0 auto;

  --mouse-x: 0px;
  --mouse-y: 0px;

  transform: translate3d(var(--mouse-x), var(--mouse-y), 0);

  will-change: transform, opacity;

  animation: mediaHeroEntrance 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* =========================================================
   EYEBROW
========================================================= */

.sibf-eyebrow {
  display: inline-block;

  margin-bottom: 20px;

  font-family: var(--media-display);

  font-size: 0.76rem;

  font-weight: 700;

  letter-spacing: 0.28em;

  line-height: 1.5;

  text-transform: uppercase;

  color: var(--media-gold-light);

  opacity: 0;

  transform: translateY(25px);

  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.sibf-eyebrow.is-visible {
  opacity: 1;

  transform: translateY(0);
}

/* =========================================================
   HERO TITLE
========================================================= */

.sibf-section h1 {
  margin: 0;

  font-family: var(--media-serif);

  font-size: clamp(4rem, 9vw, 8rem);

  font-weight: 600;

  line-height: 0.88;

  letter-spacing: -0.045em;

  color: var(--media-cream-light);

  text-shadow:
    0 5px 30px rgba(0, 0, 0, 0.65),
    0 0 40px rgba(214, 168, 79, 0.08);
}

.sibf-section h1 span {
  display: block;

  margin-top: 0.12em;

  color: var(--media-gold);

  font-style: italic;

  text-shadow:
    0 0 30px rgba(214, 168, 79, 0.22),
    0 5px 25px rgba(0, 0, 0, 0.6);
}

/* =========================================================
   RULE
========================================================= */

.sibf-rule {
  position: relative;

  width: 115px;
  height: 2px;

  margin: 30px auto;

  background: linear-gradient(
    90deg,
    transparent,
    var(--media-gold),
    transparent
  );

  opacity: 0;

  transform: scaleX(0);

  transform-origin: center;

  transition:
    opacity 0.8s ease,
    transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.sibf-rule.is-visible {
  opacity: 1;

  transform: scaleX(1);
}

.sibf-rule::before,
.sibf-rule::after {
  content: "";

  position: absolute;

  top: 50%;

  width: 7px;
  height: 7px;

  background: var(--media-gold);

  transform: translateY(-50%) rotate(45deg);
}

.sibf-rule::before {
  left: 15px;
}

.sibf-rule::after {
  right: 15px;
}

/* =========================================================
   HERO INTRO
========================================================= */

.sibf-intro {
  max-width: 700px;

  margin: 0 auto;

  font-family: var(--media-garamond);

  font-size: clamp(1.15rem, 2vw, 1.45rem);

  font-weight: 500;

  line-height: 1.7;

  color: var(--media-cream);

  opacity: 0;

  transform: translateY(25px);

  animation: mediaIntroEntrance 1s 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.sibf-intro em {
  color: var(--media-gold-light);

  font-weight: 600;
}

/* =========================================================
   HERO DECORATIVE LINE
========================================================= */

.sibf-section::after {
  content: "";

  position: absolute;

  width: min(1000px, 80%);

  height: 1px;

  bottom: 12%;

  left: 50%;

  transform: translateX(-50%);

  background: linear-gradient(
    90deg,
    transparent,
    rgba(214, 168, 79, 0.65),
    transparent
  );

  opacity: 0.7;
}

/* =========================================================
   GALLERY SECTION
========================================================= */

.sibf-gallery {
  padding: 130px 6%;

  background:
    radial-gradient(
      circle at 10% 30%,
      rgba(168, 77, 40, 0.12),
      transparent 32%
    ),
    radial-gradient(
      circle at 90% 75%,
      rgba(214, 168, 79, 0.08),
      transparent 30%
    ),
    linear-gradient(135deg, #f7f3ea 0%, #f7f3ea 48%, #f7f3ea 100%);

  color: var(--media-brown);
}

/* =========================================================
   GALLERY HEADING
========================================================= */

.sibf-gallery-heading {
  max-width: 900px;

  margin: 0 auto 65px;

  text-align: center;
}

.sibf-gallery-heading .sibf-eyebrow {
  color: var(--media-burnt-orange);
}

.sibf-gallery-heading h2 {
  margin: 0;

  font-family: var(--media-serif);

  font-size: clamp(2.8rem, 6vw, 5rem);

  font-weight: 600;

  line-height: 1;

  letter-spacing: -0.025em;

  color: var(--media-burgundy-dark);

  opacity: 0;

  transform: translateY(35px);

  transition:
    opacity 0.9s ease,
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.sibf-gallery-heading h2.is-visible {
  opacity: 1;

  transform: translateY(0);
}

/* =========================================================
   GALLERY GRID
========================================================= */

.sibf-grid {
  width: min(1250px, 100%);

  margin: 0 auto;

  display: grid;

  grid-template-columns:
    1.15fr
    0.85fr;

  grid-template-rows:
    390px
    300px;

  gap: 24px;

  align-items: stretch;
}

/* =========================================================
   IMAGE CONTAINERS
========================================================= */

.sibf-image {
  position: relative;

  min-width: 0;
  min-height: 0;

  overflow: hidden;

  cursor: pointer;

  background: var(--media-brown);

  border: 1px solid rgba(99, 36, 33, 0.25);

  box-shadow: 0 18px 40px rgba(53, 20, 22, 0.2);

  opacity: 0;

  transform: translateY(55px) scale(0.97);

  transition:
    opacity 0.9s ease,
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.45s ease;
}

.sibf-image.is-visible {
  opacity: 1;

  transform: translateY(0) scale(1);
}

/* =========================================================
   IMAGE POSITIONS
========================================================= */

/* image 1 */

.sibf-image-large {
  grid-column: 1;
  grid-row: 1 / 3;
}

/* image 2 */

.sibf-image:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}

/* image 3 */

.sibf-image:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}

/* image 4 */

.sibf-image-wide {
  grid-column: 1 / 3;
  grid-row: 3;

  height: 340px;
}

/* =========================================================
   IMAGE
========================================================= */

.sibf-image img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;

  object-position: center;

  filter: saturate(0.9) contrast(1.03) sepia(0.04);

  transition:
    transform 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.6s ease;
}

/* =========================================================
   IMAGE OVERLAY
========================================================= */

.sibf-image::after {
  content: "";

  position: absolute;

  inset: 0;

  pointer-events: none;

  background: linear-gradient(180deg, transparent 50%, rgba(21, 10, 10, 0.35));

  opacity: 0;

  transition: opacity 0.45s ease;
}

/* =========================================================
   IMAGE HOVER
========================================================= */

.sibf-image:hover {
  box-shadow:
    0 25px 55px rgba(53, 20, 22, 0.32),
    0 0 0 1px rgba(214, 168, 79, 0.35);
}

.sibf-image:hover img {
  transform: scale(1.065);

  filter: saturate(1) contrast(1.08) sepia(0);
}

.sibf-image:hover::after {
  opacity: 1;
}

/* =========================================================
   IMAGE GOLD CORNER
========================================================= */

.sibf-image::before {
  content: "";

  position: absolute;

  top: 14px;
  left: 14px;

  width: 35px;
  height: 35px;

  z-index: 3;

  border-top: 1px solid rgba(244, 217, 139, 0.9);

  border-left: 1px solid rgba(244, 217, 139, 0.9);

  opacity: 0;

  transition:
    opacity 0.4s ease,
    width 0.4s ease,
    height 0.4s ease;
}

.sibf-image:hover::before {
  opacity: 1;

  width: 55px;
  height: 55px;
}

/* =========================================================
   CLOSING SECTION
========================================================= */

.sibf-closing {
  min-height: 65vh;

  display: flex;

  flex-direction: column;

  align-items: center;

  justify-content: center;

  padding: 120px 7%;

  text-align: center;

  overflow: hidden;

  background:
    radial-gradient(
      ellipse at center,
      rgba(174, 71, 31, 0.24),
      transparent 62%
    ),
    linear-gradient(135deg, #482319, #2a1410, #140a0a);

  color: var(--media-cream-light);
}

/* glowing circle */

.sibf-closing::before {
  content: "";

  position: absolute;

  width: 650px;
  height: 650px;

  left: 50%;
  top: 50%;

  border: 1px solid rgba(214, 168, 79, 0.13);

  border-radius: 50%;

  transform: translate(-50%, -50%);

  box-shadow:
    0 0 0 70px rgba(214, 168, 79, 0.025),
    0 0 0 140px rgba(214, 168, 79, 0.015);

  pointer-events: none;

  animation: closingCircle 10s ease-in-out infinite alternate;
}

/* =========================================================
   CLOSING TITLE
========================================================= */

.sibf-closing h2 {
  max-width: 900px;

  margin: 0;

  position: relative;

  z-index: 2;

  font-family: var(--media-serif);

  font-size: clamp(3.2rem, 7vw, 6rem);

  font-weight: 600;

  line-height: 0.98;

  letter-spacing: -0.035em;

  color: var(--media-cream-light);

  opacity: 0;

  transform: translateY(40px) scale(0.97);

  transition:
    opacity 1s ease,
    transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.sibf-closing.is-visible h2 {
  opacity: 1;

  transform: translateY(0) scale(1);
}

.sibf-closing h2 span {
  display: block;

  margin-top: 0.08em;

  color: var(--media-gold);

  font-style: italic;
}

/* =========================================================
   CLOSING BUTTON
========================================================= */

.sibf-button {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  min-width: 230px;
  min-height: 58px;

  margin-top: 20px;

  padding: 17px 34px;

  position: relative;

  z-index: 5;

  overflow: hidden;

  font-family: var(--media-display);

  font-size: 0.75rem;

  font-weight: 700;

  letter-spacing: 0.16em;

  text-transform: uppercase;

  text-decoration: none;

  color: #28130e;

  background: linear-gradient(135deg, #f2d98e, #d6a84f, #a86d27);

  border: 1px solid rgba(255, 233, 174, 0.75);

  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);

  opacity: 0;

  transform: translateY(25px);

  transition:
    opacity 0.8s 0.3s ease,
    transform 0.8s 0.3s ease,
    box-shadow 0.35s ease;
}

.sibf-closing.is-visible .sibf-button {
  opacity: 1;

  transform: translateY(0);
}

/* button shine */

.sibf-button::before {
  content: "";

  position: absolute;

  top: 0;
  left: -130%;

  width: 80%;
  height: 100%;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.55),
    transparent
  );

  transform: skewX(-20deg);

  transition: left 0.75s ease;
}

.sibf-button:hover::before {
  left: 140%;
}

.sibf-button:hover {
  box-shadow:
    0 20px 45px rgba(0, 0, 0, 0.5),
    0 0 35px rgba(214, 168, 79, 0.2);
}

/* =========================================================
   SCROLL PROGRESS
========================================================= */

.media-scroll-progress {
  position: fixed;

  top: 0;
  left: 0;

  width: 0%;
  height: 3px;

  z-index: 99999;

  background: linear-gradient(
    90deg,
    var(--media-burnt-orange),
    var(--media-gold),
    var(--media-gold-light)
  );

  box-shadow: 0 0 10px rgba(214, 168, 79, 0.45);

  pointer-events: none;
}

/* =========================================================
   LIGHTBOX
========================================================= */

.media-lightbox {
  position: fixed;

  inset: 0;

  z-index: 999999;

  display: flex;

  align-items: center;
  justify-content: center;

  padding: 40px;

  background: rgba(10, 8, 8, 0.94);

  backdrop-filter: blur(12px);

  -webkit-backdrop-filter: blur(12px);

  opacity: 0;

  visibility: hidden;

  transition:
    opacity 0.4s ease,
    visibility 0.4s ease;
}

.media-lightbox.active {
  opacity: 1;

  visibility: visible;
}

.media-lightbox-image {
  max-width: min(90vw, 1100px);

  max-height: 85vh;

  object-fit: contain;

  border: 8px solid var(--media-cream);

  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(214, 168, 79, 0.5);

  transform: scale(0.94);

  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.media-lightbox.active .media-lightbox-image {
  transform: scale(1);
}

/* =========================================================
   LIGHTBOX BUTTONS
========================================================= */

.media-lightbox-close,
.media-lightbox-prev,
.media-lightbox-next {
  position: absolute;

  z-index: 10;

  width: 52px;
  height: 52px;

  display: flex;

  align-items: center;
  justify-content: center;

  border: 1px solid rgba(244, 217, 139, 0.5);

  border-radius: 50%;

  background: rgba(33, 17, 15, 0.85);

  color: var(--media-gold-light);

  font-family: Georgia, serif;

  cursor: pointer;

  transition:
    background 0.3s ease,
    color 0.3s ease,
    transform 0.3s ease;
}

.media-lightbox-close {
  top: 30px;
  right: 30px;

  font-size: 2rem;
}

.media-lightbox-prev {
  left: 30px;

  font-size: 3rem;
}

.media-lightbox-next {
  right: 30px;

  font-size: 3rem;
}

.media-lightbox-close:hover,
.media-lightbox-prev:hover,
.media-lightbox-next:hover {
  background: var(--media-gold);

  color: var(--media-burgundy-dark);

  transform: scale(1.08);
}

body.lightbox-open {
  overflow: hidden;
}

/* =========================================================
   NAV SCROLL
========================================================= */

.site-nav.nav-scrolled {
  background: rgba(19, 10, 9, 0.94);

  backdrop-filter: blur(14px);

  -webkit-backdrop-filter: blur(14px);

  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
}

/* =========================================================
   ANIMATIONS
========================================================= */

@keyframes mediaHeroEntrance {
  0% {
    opacity: 0;

    transform: translateY(45px) scale(0.96);

    filter: blur(5px);
  }

  100% {
    opacity: 1;

    transform: translateY(0) scale(1);

    filter: blur(0);
  }
}

@keyframes mediaIntroEntrance {
  0% {
    opacity: 0;

    transform: translateY(25px);
  }

  100% {
    opacity: 1;

    transform: translateY(0);
  }
}

@keyframes mediaHeroGlow {
  0% {
    transform: translate(-50%, -50%) scale(0.88);

    opacity: 0.55;
  }

  100% {
    transform: translate(-50%, -50%) scale(1.12);

    opacity: 1;
  }
}

@keyframes closingCircle {
  0% {
    transform: translate(-50%, -50%) scale(0.94);
  }

  100% {
    transform: translate(-50%, -50%) scale(1.06);
  }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 900px) {
  .sibf-section {
    min-height: 78vh;

    padding: 140px 6% 100px;
  }

  .sibf-grid {
    grid-template-columns: 1fr 1fr;

    grid-template-rows:
      350px
      300px
      280px;

    gap: 18px;
  }

  .sibf-image-large {
    grid-column: 1 / 3;

    grid-row: 1;
  }

  .sibf-image:nth-child(2) {
    grid-column: 1;

    grid-row: 2;
  }

  .sibf-image:nth-child(3) {
    grid-column: 2;

    grid-row: 2;
  }

  .sibf-image-wide {
    grid-column: 1 / 3;

    grid-row: 3;

    height: auto;
  }

  .sibf-gallery {
    padding: 110px 5%;
  }

  .sibf-closing {
    min-height: 60vh;

    padding: 110px 6%;
  }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {
  .sibf-section {
    min-height: 76vh;

    padding: 120px 20px 90px;
  }

  .sibf-background {
    background-position: center center;
  }

  .sibf-section h1 {
    font-size: clamp(3.5rem, 15vw, 5.5rem);
  }

  .sibf-intro {
    padding: 0 8px;

    font-size: 1.1rem;
  }

  .sibf-gallery {
    padding: 85px 20px;
  }

  .sibf-gallery-heading {
    margin-bottom: 45px;
  }

  .sibf-gallery-heading h2 {
    font-size: 2.9rem;
  }

  .sibf-grid {
    display: grid;

    grid-template-columns: 1fr;

    grid-template-rows: repeat(4, 300px);

    gap: 16px;
  }

  .sibf-image-large,
  .sibf-image:nth-child(2),
  .sibf-image:nth-child(3),
  .sibf-image-wide {
    grid-column: 1;

    grid-row: auto;

    height: 300px;
  }

  .sibf-closing {
    min-height: 65vh;

    padding: 90px 20px;
  }

  .sibf-closing h2 {
    font-size: 3rem;
  }

  .sibf-button {
    width: 100%;

    max-width: 280px;
  }

  .media-lightbox {
    padding: 20px;
  }

  .media-lightbox-image {
    max-width: 94vw;

    max-height: 78vh;

    border-width: 5px;
  }

  .media-lightbox-close {
    top: 15px;
    right: 15px;
  }

  .media-lightbox-prev {
    left: 10px;
  }

  .media-lightbox-next {
    right: 10px;
  }

  .media-lightbox-close,
  .media-lightbox-prev,
  .media-lightbox-next {
    width: 44px;
    height: 44px;
  }
}

/* =========================================================
   ACCESSIBILITY
========================================================= */

:focus-visible {
  outline: 2px solid var(--media-gold-light);

  outline-offset: 4px;
}

::selection {
  background: var(--media-gold);

  color: var(--media-burgundy-dark);
}

/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;

    animation-iteration-count: 1 !important;

    scroll-behavior: auto !important;

    transition-duration: 0.01ms !important;
  }

  .sibf-content {
    transform: none !important;
  }

  .sibf-eyebrow,
  .sibf-rule,
  .sibf-gallery-heading h2,
  .sibf-image,
  .sibf-closing h2,
  .sibf-button {
    opacity: 1 !important;

    transform: none !important;
  }
}
/* =========================================================
   LARGER MEDIA HERO SECTION
========================================================= */

.sibf-section {
  min-height: 100vh;

  padding-top: 180px;
  padding-bottom: 160px;
}


/* Make the hero content feel larger */
.sibf-content {
  max-width: 1100px;
}


/* Larger hero title */
.sibf-section h1 {
  font-size: clamp(5rem, 12vw, 10rem);
  line-height: 0.9;
}


/* Larger intro text */
.sibf-intro {
  max-width: 800px;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

  .sibf-section {
    min-height: 90vh;

    padding-top: 160px;
    padding-bottom: 130px;
  }

  .sibf-section h1 {
    font-size: clamp(4.5rem, 12vw, 8rem);
  }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

  .sibf-section {
    min-height: 88vh;

    padding-top: 140px;
    padding-bottom: 110px;
  }

  .sibf-section h1 {
    font-size: clamp(3.8rem, 18vw, 6rem);
    line-height: 0.95;
  }

  .sibf-intro {
    font-size: 1.1rem;
    line-height: 1.65;
  }

}