/* =========================================================
   JOHNNY PEPPERSTEIN — BLOG PAGE

   Sage / Gold / Old Literature Theme

   NOTE:
   Header / Navigation styling is NOT included here.
   It is handled by NavBar.css
========================================================= */

/* =========================================================
   VARIABLES
========================================================= */

:root {
  --sage-dark: #26382f;
  --sage: #536b59;
  --sage-light: #718575;

  --gold: #c6a55b;
  --gold-light: #dfc987;
  --gold-dark: #a98335;

  --cream: #f4efe3;
  --paper: #ebe4d4;
  --paper-dark: #ddd4c0;
  --white: #fffdf7;

  --ink: #263029;
  --muted: #657066;

  --rust: #8a4a2e;

  --max-width: 1180px;

  --serif: "EB Garamond", Georgia, serif;
  --display: "Cormorant Garamond", Georgia, serif;
  --old: "IM Fell English", Georgia, serif;
  --blackletter: "UnifrakturMaguntia", serif;

  --shadow: 0 18px 40px rgba(30, 35, 30, 0.16);
  --shadow-sm: 0 8px 20px rgba(30, 35, 30, 0.12);
}

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

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);

  font-family: var(--serif);
  font-size: 18px;

  overflow-x: hidden;

  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: 3px;
}

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

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
}

/* =========================================================
   EYEBROW
========================================================= */

.eyebrow {
  margin: 0;

  color: var(--gold-light);

  font-family: var(--old);
  font-size: 14px;
  font-weight: 400;

  letter-spacing: 0.25em;
  text-transform: uppercase;
}

/* =========================================================
   BLOG PAGE HERO
========================================================= */

.page-header {
  position: relative;

  min-height: 430px;

  display: flex;
  flex-direction: column;

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

  padding: 70px 20px;

  text-align: center;

  overflow: hidden;

  background: linear-gradient(rgba(38, 56, 47, 0.96), rgba(38, 56, 47, 0.96));
}

/* =========================================================
   HERO PAPER TEXTURE
========================================================= */

.page-header::before {
  content: "";

  position: absolute;
  inset: 0;

  opacity: 0.12;

  background-image: radial-gradient(
    rgba(255, 255, 255, 0.4) 1px,
    transparent 1px
  );

  background-size: 8px 8px;

  pointer-events: none;
}

/* =========================================================
   HERO GOLD BOTTOM LINE
========================================================= */

.page-header::after {
  content: "";

  position: absolute;

  left: 6%;
  right: 6%;
  bottom: 22px;

  height: 1px;

  background: linear-gradient(90deg, transparent, var(--gold), transparent);

  opacity: 0.6;
}

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

.page-header .eyebrow,
.page-header h1 {
  position: relative;
  z-index: 2;
}

/* =========================================================
   BLOG HERO EYEBROW
========================================================= */

.page-header .eyebrow {
  color: var(--gold-light);
}

/* =========================================================
   BLOG HERO TITLE
========================================================= */

.page-header h1 {
  margin: 0;

  color: var(--cream);

  font-family: var(--display);

  font-size: clamp(58px, 9vw, 105px);

  line-height: 0.85;

  font-weight: 600;

  letter-spacing: -0.04em;
}

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

.page-header .eyebrow::after {
  content: " ✦ ";

  color: var(--gold);
  margin-left: 10px;
}

/* =========================================================
   BLOG SECTION
========================================================= */

#blog {
  padding: 120px 30px;

  background: linear-gradient(135deg, var(--cream), var(--paper));
}

/* =========================================================
   BLOG INNER CONTAINER
========================================================= */

.inner {
  width: min(100%, var(--max-width));
  margin: 0 auto;
}

/* =========================================================
   BLOG GRID
========================================================= */

.blog-grid {
  display: flex;
  flex-direction: column;

  gap: 56px;
}

/* =========================================================
   GALLERY GROUP
========================================================= */

.gallery-group {
  position: relative;

  padding: 44px 44px 40px;

  background: linear-gradient(
    150deg,
    rgba(255, 253, 247, 0.85),
    rgba(235, 228, 212, 0.6)
  );

  border: 1px solid rgba(166, 130, 46, 0.28);

  box-shadow: var(--shadow-sm);

  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.gallery-group::after {
  content: "";

  position: absolute;

  top: 0;
  left: 44px;

  width: 55px;
  height: 4px;

  background: var(--gold);
}

.gallery-group:hover {
  transform: translateY(-6px);

  border-color: rgba(166, 130, 46, 0.55);

  box-shadow: var(--shadow);
}

/* =========================================================
   GROUP VISUAL
========================================================= */

.group-visual {
  display: grid;

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

  gap: 16px;

  margin-bottom: 32px;
}

/* =========================================================
   IMAGE FRAME
========================================================= */

.img-frame {
  position: relative;

  height: 230px;

  padding: 10px;

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

  background: var(--white);

  border: 1px solid rgba(166, 130, 46, 0.35);

  box-shadow: inset 0 0 0 1px rgba(166, 130, 46, 0.12);

  overflow: hidden;
}

/*
   The image stays fully visible inside the frame.
   No cropping.
*/

.img-frame img {
  width: 100%;
  height: 100%;

 

  cursor: zoom-in;

  filter: saturate(0.95) contrast(1.02);

  transition:
    transform 0.5s ease,
    filter 0.5s ease;
}

.img-frame:hover img {
  transform: scale(1.03);

  filter: saturate(1.05) contrast(1.04);
}

/* =========================================================
   SINGLE IMAGE
========================================================= */

.group-single .img-frame {
  height: 300px;

  max-width: 420px;

  margin: 0 auto;
}

/* =========================================================
   GROUP CAPTION
========================================================= */

.group-caption {
  max-width: 720px;

  margin: 0 auto;

  text-align: center;
}

/* =========================================================
   CATCH NUMBER
========================================================= */

.catch-no {
  display: inline-flex;

  align-items: center;

  gap: 10px;

  margin-bottom: 14px;

  color: var(--gold-dark);

  font-family: "Cormorant Garamond", serif;

  font-size: 0.82rem;

  font-weight: 600;

  letter-spacing: 0.22em;

  text-transform: uppercase;
}

.catch-no::before,
.catch-no::after {
  content: "";

  width: 22px;
  height: 1px;

  background: var(--gold);
}

/* =========================================================
   GROUP TITLE
========================================================= */

.group-caption h3 {
  margin-bottom: 14px;

  color: var(--sage-dark);

  font-family: var(--display);

  font-size: clamp(1.65rem, 2.5vw, 2.1rem);

  line-height: 1.08;

  font-weight: 600;
}

/* =========================================================
   GROUP DESCRIPTION
========================================================= */

.group-caption p {
  margin: 0 auto;

  max-width: 560px;

  color: #4d554e;

  font-family: var(--serif);

  font-size: 25px;

  line-height: 1.75;
}

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

.reveal {
  opacity: 0;

  transform: translateY(45px);

  filter: blur(4px);

  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.8s ease;
}

.reveal.visible,
.reveal.in {
  opacity: 1;

  transform: translateY(0);

  filter: blur(0);
}

/* =========================================================
   STAGGER ANIMATION
========================================================= */

.stagger > * {
  opacity: 0;

  transform: translateY(20px);

  animation: stagger-in 0.65s ease forwards;

  animation-play-state: paused;
}

.stagger.in > *,
.stagger.visible > * {
  animation-play-state: running;
}

.stagger > *:nth-child(1) {
  animation-delay: 0.05s;
}

.stagger > *:nth-child(2) {
  animation-delay: 0.15s;
}

.stagger > *:nth-child(3) {
  animation-delay: 0.25s;
}

.stagger > *:nth-child(4) {
  animation-delay: 0.35s;
}

@keyframes stagger-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   IMAGE LIGHTBOX
   Click image → show complete image
========================================================= */

.lightbox {
  position: fixed;

  inset: 0;

  z-index: 99999;

  display: flex;

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

  padding: 30px;

  background: rgba(20, 24, 21, 0.96);

  opacity: 0;

  visibility: hidden;

  pointer-events: none;

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

/* Open state */

.lightbox.active {
  opacity: 1;

  visibility: visible;

  pointer-events: auto;
}

/*
   IMPORTANT:
   contain = show the COMPLETE image.
   Nothing is cropped.
*/

.lightbox img {
  display: block;

  width: auto;
  height: auto;

  max-width: 95vw;
  max-height: 92vh;

  object-fit: contain;

  cursor: zoom-out;

  border: 1px solid rgba(198, 165, 91, 0.5);

  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.55);

  transform: scale(0.94);

  transition: transform 0.3s ease;
}

/* Image animation */

.lightbox.active img {
  transform: scale(1);
}

/* =========================================================
   LIGHTBOX CLOSE BUTTON
========================================================= */

.lightbox-close {
  position: absolute;

  top: 20px;
  right: 25px;

  width: 50px;
  height: 50px;

  padding: 0;

  display: flex;

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

  border: 1px solid rgba(223, 201, 135, 0.45);

  border-radius: 50%;

  background: rgba(38, 56, 47, 0.75);

  color: var(--cream);

  font-family: Arial, sans-serif;

  font-size: 34px;

  font-weight: 300;

  line-height: 1;

  cursor: pointer;

  z-index: 100000;

  transition:
    background 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease;
}

.lightbox-close:hover {
  background: var(--gold);

  color: var(--sage-dark);

  transform: rotate(90deg);
}

/* =========================================================
   PREVENT PAGE SCROLL WHEN LIGHTBOX IS OPEN
========================================================= */

body.lightbox-open {
  overflow: hidden;
}

/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation-duration: 0.001ms !important;

    transition-duration: 0.001ms !important;
  }

  .reveal {
    opacity: 1;

    transform: none;

    filter: none;
  }

  .stagger > * {
    opacity: 1;

    transform: none;

    animation: none;
  }

  .gallery-group:hover {
    transform: none;
  }

  .img-frame:hover img {
    transform: none;
  }

  .lightbox img {
    transform: none;
  }

  .lightbox.active img {
    transform: none;
  }
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {
  .page-header {
    min-height: 400px;

    padding: 80px 25px 75px;
  }

  .page-header h1 {
    font-size: clamp(55px, 11vw, 90px);
  }

  #blog {
    padding: 90px 25px;
  }

  .blog-grid {
    gap: 44px;
  }

  .gallery-group {
    padding: 36px 30px 32px;
  }

  .img-frame {
    height: 190px;
  }

  .group-single .img-frame {
    height: 260px;
  }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {
  .page-header {
    min-height: 370px;

    padding: 75px 20px 70px;
  }

  .page-header h1 {
    font-size: clamp(50px, 14vw, 70px);

    line-height: 0.88;
  }

  .page-header .eyebrow {
    font-size: 12px;

    letter-spacing: 0.2em;
  }

  #blog {
    padding: 85px 20px;
  }

  .blog-grid {
    width: 100%;

    max-width: 520px;

    margin: 0 auto;

    gap: 34px;
  }

  .gallery-group {
    padding: 30px 22px 28px;
  }

  .group-visual {
    grid-template-columns: 1fr;

    gap: 12px;
  }

  .img-frame,
  .group-single .img-frame {
    height: 220px;

    max-width: 100%;
  }

  .group-caption h3 {
    font-size: 1.75rem;
  }

  .group-caption p {
    font-size: 17px;
  }

  /* Lightbox on mobile */

  .lightbox {
    padding: 15px;
  }

  .lightbox img {
    max-width: 96vw;

    max-height: 88vh;
  }

  .lightbox-close {
    top: 12px;

    right: 12px;

    width: 44px;
    height: 44px;

    font-size: 30px;
  }
}

/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {
  .page-header {
    min-height: 350px;

    padding: 65px 18px;
  }

  .page-header h1 {
    font-size: 55px;
  }

  .page-header .eyebrow {
    font-size: 11px;
  }

  #blog {
    padding: 75px 18px;
  }

  .gallery-group {
    padding: 26px 18px 24px;
  }

  .gallery-group::after {
    left: 18px;
  }

  .img-frame,
  .group-single .img-frame {
    height: 190px;
  }

  .group-caption h3 {
    font-size: 1.55rem;
  }

  .group-caption p {
    font-size: 16.5px;
  }

  .lightbox {
    padding: 10px;
  }

  .lightbox img {
    max-width: 98vw;

    max-height: 86vh;
  }
}
