/* ==========================================================================
   GOKUL PORTFOLIO - HERO SECTION STYLES
   Resolution Baseline: 1920 x 1080 (Full HD Monitor)
   ========================================================================== */

/* --- Font Declarations --- */
@font-face {
  font-family: 'Gilroy';
  src: url('./fonts/Gilroy-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gilroy';
  src: url('./fonts/Gilroy-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Gilroy';
  src: url('./fonts/Gilroy-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Moglan Demo';
  src: url('./fonts/Moglan_DEMO.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Moglan';
  src: url('./fonts/Moglan_DEMO.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* --- Global Reset & Variables --- */
:root {
  --primary-red: #8f0e19;
  --bg-deep-red: #7c0b15;
  --text-cream: #fbf7ee;
  --text-muted: rgba(255, 255, 255, 0.78);
  --border-glass: rgba(255, 255, 255, 0.16);
  --font-serif: 'Moglan', 'Noto Serif JP', 'Instrument Serif', Georgia, serif;
  --font-sans: 'Gilroy', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

/* Screen Reader Only Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: #FFF9EF;
}

body {
  font-family: var(--font-sans);
  background-color: #1a0205;
  color: var(--text-cream);
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Artboard Container (1920px Frame) --- */
.artboard-container {
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  position: relative;
  background-color: #FFF9EF;
  box-shadow: 0 0 80px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

/* --- Page Content Wrapper (Smooth iOS Anticipation Zoom & Blur) --- */
.page-content-wrapper {
  position: relative;
  width: 100%;
  transform-origin: 50% 0;
}

/* --- Hero Section --- */
.hero-section {
  position: relative;
  width: 100%;
  height: 1080px;
  min-height: 1080px;
  overflow: hidden;
  background-color: var(--bg-deep-red);
  perspective: 1200px;
}

/* Textured Oil Painting Canvas Background */
.hero-bg-texture {
  position: absolute;
  inset: 0;
  background-image: url('./hero/bg red.png');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  z-index: 1;
  pointer-events: none;
  transform: scale(1.02);
  transition: transform 0.4s ease-out;
}

/* Ambient Radial Glow & Vignette */
.hero-ambient-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 30%,
    rgba(255, 255, 255, 0.05) 0%,
    rgba(0, 0, 0, 0) 55%,
    rgba(30, 0, 4, 0.4) 100%
  );
  z-index: 2;
  pointer-events: none;
}

/* --- Subtle Renaissance Shooting Stars (Delicate & Rare) --- */
.shooting-stars-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 12;
  overflow: hidden;
}

.shooting-star {
  position: absolute;
  height: 2px;
  background: linear-gradient(
    -45deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 240, 190, 0.8) 25%,
    rgba(218, 165, 32, 0.35) 65%,
    transparent 100%
  );
  border-radius: 999px;
  filter: drop-shadow(0 0 5px rgba(255, 235, 170, 0.85));
  opacity: 0;
  will-change: transform, opacity;
}

.shooting-star::before {
  content: '';
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 3.5px;
  height: 3.5px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 7px 2px rgba(255, 245, 200, 0.95);
}

/* Streak 1: Upper Right Sky (Past Frame) */
.star-streak-1 {
  top: 115px;
  right: 180px;
  width: 105px;
  transform: rotate(-35deg);
  animation: shootStar1 6.5s cubic-bezier(0.25, 0.1, 0.25, 1) 0.4s infinite;
}

/* Streak 2: Upper Mid Sky (Between Text & Frame) */
.star-streak-2 {
  top: 160px;
  left: 560px;
  width: 120px;
  transform: rotate(-38deg);
  animation: shootStar2 7.5s cubic-bezier(0.25, 0.1, 0.25, 1) 2.8s infinite;
}

/* Streak 3: Mid Left Sky (Above Bio) */
.star-streak-3 {
  top: 125px;
  left: 240px;
  width: 95px;
  transform: rotate(-32deg);
  animation: shootStar3 7.0s cubic-bezier(0.25, 0.1, 0.25, 1) 5.0s infinite;
}

/* Streak 4: Upper High Sky (Above Frame) */
.star-streak-4 {
  top: 90px;
  right: 430px;
  width: 110px;
  transform: rotate(-36deg);
  animation: shootStar4 8.0s cubic-bezier(0.25, 0.1, 0.25, 1) 1.5s infinite;
}

/* Streak 5: Right Perimeter Sky (Subtle & high) */
.star-streak-5 {
  top: 195px;
  right: 85px;
  width: 88px;
  transform: rotate(-41deg);
  animation: shootStar5 7.2s cubic-bezier(0.25, 0.1, 0.25, 1) 3.8s infinite;
}

@keyframes shootStar1 {
  0% {
    transform: rotate(-35deg) translateX(0);
    opacity: 0;
  }
  3% {
    opacity: 0.85;
  }
  12% {
    transform: rotate(-35deg) translateX(-240px);
    opacity: 0;
  }
  100% {
    transform: rotate(-35deg) translateX(-240px);
    opacity: 0;
  }
}

@keyframes shootStar2 {
  0% {
    transform: rotate(-38deg) translateX(0);
    opacity: 0;
  }
  3% {
    opacity: 0.75;
  }
  12% {
    transform: rotate(-38deg) translateX(-260px);
    opacity: 0;
  }
  100% {
    transform: rotate(-38deg) translateX(-260px);
    opacity: 0;
  }
}

@keyframes shootStar3 {
  0% {
    transform: rotate(-32deg) translateX(0);
    opacity: 0;
  }
  3% {
    opacity: 0.78;
  }
  12% {
    transform: rotate(-32deg) translateX(-190px);
    opacity: 0;
  }
  100% {
    transform: rotate(-32deg) translateX(-190px);
    opacity: 0;
  }
}

@keyframes shootStar4 {
  0% {
    transform: rotate(-36deg) translateX(0);
    opacity: 0;
  }
  3% {
    opacity: 0.8;
  }
  12% {
    transform: rotate(-36deg) translateX(-230px);
    opacity: 0;
  }
  100% {
    transform: rotate(-36deg) translateX(-230px);
    opacity: 0;
  }
}

@keyframes shootStar5 {
  0% {
    transform: rotate(-41deg) translateX(0);
    opacity: 0;
  }
  3% {
    opacity: 0.7;
  }
  12% {
    transform: rotate(-41deg) translateX(-180px);
    opacity: 0;
  }
  100% {
    transform: rotate(-41deg) translateX(-180px);
    opacity: 0;
  }
}

/* --- Navigation Bar (Fixed across all sections) --- */
.navbar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translate3d(-50%, 0, 0);
  width: 100%;
  max-width: 1920px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-glass);
  z-index: 1000;
  background: rgba(143, 14, 25, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-sizing: border-box;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* Auto-hide off-screen state (smooth vertical transition, zero horizontal shift) */
.navbar.nav-hidden {
  transform: translate3d(-50%, calc(-100% - 10px), 0);
  pointer-events: none;
}

/* Scrolled state: lighter dark-grey translucent blurred theme with white text and icon strokes */
.navbar.is-scrolled {
  background: rgba(34, 34, 38, 0.72);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
}

.navbar.is-scrolled .nav-left {
  border-right-color: rgba(255, 255, 255, 0.12);
}

.navbar.is-scrolled .nav-right {
  border-left-color: rgba(255, 255, 255, 0.12);
}

.navbar.is-scrolled .nav-item {
  color: rgba(255, 255, 255, 0.92);
}

.navbar.is-scrolled .nav-item:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.navbar.is-scrolled .nav-item.active {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.navbar.is-scrolled .logo-g-img {
  filter: brightness(1.15) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

/* Nav Left: "g" logo box */
.nav-left {
  height: 100%;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--border-glass);
  padding: 0 32px;
}

.nav-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-logo:hover {
  transform: scale(1.1) rotate(-4deg);
}

.logo-g-img {
  height: 31px;
  width: auto;
  display: block;
}

/* Nav Center: Links */
.nav-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-links {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 12px;
}

.nav-item {
  text-decoration: none;
  color: var(--text-cream);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.2px;
  padding: 7px 18px;
  border-radius: 6px;
  transition: all 0.25s ease;
  position: relative;
  display: inline-block;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  transform: translateY(-1px);
}

/* Nav Right: Resume button with Refined Hover State */
.nav-right {
  height: 100%;
  display: flex;
  align-items: center;
  border-left: 1px solid var(--border-glass);
  padding: 0 28px;
  position: relative;
}

/* Accessibility Controls Group inside Hero Section (Top-Right Controls Group) */
.hero-controls-group {
  position: absolute;
  top: 105px;
  right: 55px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 35;
}

.hero-control-btn {
  width: 42px;
  height: 42px;
  background: rgba(45, 8, 14, 0.45);
  border: 1px solid rgba(218, 165, 32, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35), 0 0 12px rgba(218, 165, 32, 0.15);
  color: var(--text-cream);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  outline: none;
}

.hero-control-btn:hover {
  background: rgba(70, 12, 22, 0.7);
  color: #ffffff;
  border-color: rgba(255, 230, 160, 0.6);
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45), 0 0 18px rgba(255, 230, 180, 0.35);
}

.hero-control-btn:active {
  transform: translateY(0) scale(0.96);
}

.hero-control-btn:focus-visible {
  box-shadow: 0 0 0 2px rgba(218, 165, 32, 0.8), 0 0 14px rgba(218, 165, 32, 0.5);
}

.hero-control-btn svg {
  display: block;
  transition: transform 0.2s ease;
}

/* Sound Button Muted State */
.sound-toggle-btn.is-muted {
  opacity: 0.6;
  color: var(--text-muted);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Reduce Motion Toggle States (Matching Audio Icon Color & Stroke Exactly) */
.reduce-motion-btn {
  color: var(--text-cream);
}

.reduce-motion-btn:hover {
  color: #ffffff;
}

.reduce-motion-btn.is-active {
  background: rgba(70, 12, 22, 0.6);
  border-color: rgba(218, 165, 32, 0.6);
  color: var(--text-cream);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4), 0 0 14px rgba(218, 165, 32, 0.3);
}

.reduce-motion-btn.is-active:hover {
  background: rgba(70, 12, 22, 0.85);
  border-color: rgba(255, 230, 160, 0.7);
  color: #ffffff;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45), 0 0 18px rgba(255, 230, 180, 0.35);
}

/* Global Reduced Motion Overrides */
html.reduced-motion *,
html.reduced-motion *::before,
html.reduced-motion *::after {
  animation-duration: 0.001s !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.05s !important;
}

html.reduced-motion {
  scroll-behavior: auto !important;
}

html.reduced-motion .shooting-stars-wrap,
html.reduced-motion .shooting-star {
  display: none !important;
}

html.reduced-motion .star-sparkle {
  animation: none !important;
  opacity: 0.7 !important;
}

html.reduced-motion .hero-bg-texture,
html.reduced-motion .star-1,
html.reduced-motion .star-2,
html.reduced-motion .clouds-bridge-horizon {
  transform: none !important;
  transition: none !important;
}

html.reduced-motion .frame-card {
  transform: none !important;
  transition: none !important;
}

html.reduced-motion .title-micro-sparkle,
html.reduced-motion .resume-click-sparkle,
html.reduced-motion .cloud-puff-wisp {
  display: none !important;
}

html.reduced-motion .story-word,
html.reduced-motion .story-signature-wrap {
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
  transition: none !important;
}

.resume-btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: 5px;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s ease,
              filter 0.35s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Refined Specular Sheen Sweep on Hover */
.resume-btn-link::after {
  content: '';
  position: absolute;
  top: -60%;
  left: -120%;
  width: 60%;
  height: 220%;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(255, 255, 255, 0.5) 50%,
    transparent 100%
  );
  transform: rotate(25deg);
  transition: none;
  pointer-events: none;
}

.resume-btn-link:hover {
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.03);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35), 0 0 16px rgba(255, 230, 180, 0.3);
}

.resume-btn-link:hover::after {
  left: 200%;
  transition: left 0.75s ease-in-out;
}

.resume-btn-link:active {
  transform: translateY(0px) scale(0.98);
}

.resume-content-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 36px;
  min-width: 112px;
}

.resume-state-default {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.resume-btn-img {
  height: 36px;
  width: auto;
  display: block;
}

.resume-state-thankyou {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #fffdf8 0%, #faefe0 100%);
  border: 1px solid rgba(190, 140, 75, 0.5);
  border-radius: 5px;
  padding: 0 10px;
  box-sizing: border-box;
  opacity: 0;
  transform: scale(0.85);
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.thankyou-text {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  color: #8b121a;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.thankyou-emoji {
  font-size: 15px;
  line-height: 1;
  display: inline-block;
  transform-origin: 70% 70%;
  animation: emojiWave 1.1s ease-in-out infinite alternate;
}

@keyframes emojiWave {
  0% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.18) rotate(10deg); }
  100% { transform: scale(1) rotate(-8deg); }
}

/* Active Thank You State on Resume Button */
.resume-btn-link.is-thankyou .resume-state-default {
  opacity: 0;
  transform: scale(0.82) translateY(-2px);
  pointer-events: none;
}

.resume-btn-link.is-thankyou .resume-state-thankyou {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.resume-btn-link.is-thankyou {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 16px rgba(255, 230, 180, 0.45);
}

/* Celebratory Golden Sparkles around Resume Button */
.resume-sparkles-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
  z-index: 60;
}

.resume-click-sparkle {
  position: absolute;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: resumeSparkleGlide var(--dur, 1.15s) cubic-bezier(0.12, 0.82, 0.28, 1) forwards;
  z-index: 65;
  will-change: transform;
}

.resume-click-sparkle svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 0 7px rgba(255, 235, 150, 0.95));
  animation: resumeSparkleTwinkle var(--dur, 1.15s) cubic-bezier(0.16, 0.85, 0.35, 1) forwards;
  will-change: transform, opacity;
}

@keyframes resumeSparkleGlide {
  0% {
    transform: translate(-50%, -50%);
  }
  100% {
    transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 0px)));
  }
}

@keyframes resumeSparkleTwinkle {
  0% {
    opacity: 0;
    transform: scale(0.1) rotate(0deg);
  }
  18% {
    opacity: 1;
    transform: scale(1.15) rotate(var(--rot-mid, 40deg));
    filter: drop-shadow(0 0 10px rgba(255, 245, 180, 1));
  }
  60% {
    opacity: 0.9;
    transform: scale(0.9) rotate(var(--rot-end, 100deg));
  }
  100% {
    opacity: 0;
    transform: scale(0.1) rotate(calc(var(--rot-end, 100deg) + 30deg));
    filter: drop-shadow(0 0 2px rgba(218, 165, 32, 0));
  }
}

/* --- Hero Body --- */
.hero-body {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 10;
}

/* --- Left Intro Column (Centered Composition on 1920 baseline) --- */
.hero-intro {
  position: absolute;
  top: 250px;
  left: calc(50% - 490px);
  width: 480px;
  max-width: 480px;
  z-index: 60;
  pointer-events: auto;
}

/* Animated Editorial Greeting Box */
.hero-greeting-box {
  height: 38px;
  overflow: hidden;
  position: relative;
  display: block;
  margin-bottom: 6px;
}

.greeting-word {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 28px;
  color: #f7ede0;
  letter-spacing: 0.4px;
  font-weight: 400;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  transform: translateY(0);
  opacity: 1;
  filter: blur(0px);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity, filter;
}

/* Editorial Transition States */
.greeting-word.is-hidden-up {
  transform: translateY(-120%);
  opacity: 0;
  filter: blur(4px);
}

.greeting-word.is-hidden-down {
  transform: translateY(120%);
  opacity: 0;
  filter: blur(4px);
  transition: none !important;
}

/* Title Container with Warm Gold Light Glint */
.hero-title-wrap {
  margin-bottom: 22px;
}

.title-glint-wrapper {
  position: relative;
  display: inline-block;
  width: 445px;
  max-width: 100%;
  padding-right: 45px;
  margin-right: -45px;
}

.hero-name-img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.3));
}

/* Warm Gold Specular Glint Across "Gokul" */
.title-gold-glint {
  position: absolute;
  inset: 0;
  -webkit-mask-image: url('./hero/I am Gokul.png');
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-image: url('./hero/I am Gokul.png');
  mask-size: contain;
  mask-repeat: no-repeat;
  background: linear-gradient(
    115deg,
    transparent 0%,
    transparent 42%,
    rgba(218, 165, 32, 0.8) 50%,
    rgba(255, 242, 185, 0.98) 54%,
    rgba(218, 165, 32, 0.8) 58%,
    transparent 66%,
    transparent 100%
  );
  background-size: 260% 100%;
  background-position: 180% 0;
  pointer-events: none;
  animation: goldGlintSlow 7s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes goldGlintSlow {
  0% {
    background-position: 180% 0;
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  42% {
    background-position: -80% 0;
    opacity: 1;
  }
  50%, 100% {
    background-position: -80% 0;
    opacity: 0;
  }
}

/* Interactive Hover Micro-Sparkles on "I am Gokul" - Free Traveling */
.title-sparkle-layer {
  position: absolute;
  inset: -60px -150px -60px -40px;
  pointer-events: none;
  overflow: visible !important;
  z-index: 25;
}

.title-micro-sparkle {
  position: absolute;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: sparklePopFree 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: transform, opacity;
}

.title-micro-sparkle.is-test-frozen {
  animation: none !important;
  opacity: 1 !important;
  transform: translate(-50%, -50%) scale(1) rotate(20deg) !important;
}

.title-micro-sparkle svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 6px rgba(255, 235, 170, 0.95)) drop-shadow(0 0 2px #ffd700);
}

@keyframes sparklePopFree {
  0% {
    transform: translate(-50%, -50%) scale(0) rotate(0deg);
    opacity: 0;
  }
  25% {
    transform: translate(calc(-50% + var(--dx, 0px) * 0.35), calc(-50% + var(--dy, -25px) * 0.35)) scale(1.2) rotate(25deg);
    opacity: 1;
  }
  70% {
    transform: translate(calc(-50% + var(--dx, 0px) * 0.8), calc(-50% + var(--dy, -25px) * 0.8)) scale(0.85) rotate(60deg);
    opacity: 0.85;
  }
  100% {
    transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, -25px))) scale(0.1) rotate(90deg);
    opacity: 0;
  }
}

/* Subtle Specular Sheen lift on hover */
.title-glint-wrapper:hover .title-gold-glint {
  filter: brightness(1.25);
  transition: filter 0.3s ease;
}

.hero-bio {
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.62;
  font-weight: 400;
  color: var(--text-muted);
  max-width: 440px;
  letter-spacing: 0.15px;
  margin-bottom: 26px;
  text-align: justify;
  text-justify: inter-word;
}

.hero-divider {
  width: 100%;
  max-width: 440px;
  height: 1px;
  background: rgba(255, 255, 255, 0.22);
  pointer-events: auto;
}

/* --- 3D Living Portrait Baroque Frame (Centered Composition on 1920 baseline) --- */
.frame-3d-wrapper {
  position: absolute;
  top: 135px;
  right: calc(50% - 480px);
  width: 326px;
  height: 490px;
  z-index: 60;
  perspective: 1200px;
  transform-style: preserve-3d;
  cursor: pointer;
  pointer-events: auto;
}

.frame-card {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.15s cubic-bezier(0.2, 0, 0.3, 1);
  will-change: transform;
}

/* Video inside pristine frame oval */
.frame-video-wrap {
  position: absolute;
  left: 20.8%;
  top: 25.2%;
  width: 58.4%;
  height: 53.0%;
  border-radius: 50%;
  overflow: hidden;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #24140e;
  transform: none;
}

.frame-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  will-change: opacity;
  transition: opacity 0.85s cubic-bezier(0.4, 0, 0.2, 1);
}

.frame-video-a {
  opacity: 1;
  z-index: 1;
}

.frame-video-b {
  opacity: 0;
  z-index: 2;
}

.frame-overlay-img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 25px 35px rgba(0, 0, 0, 0.65)) drop-shadow(0 8px 14px rgba(0, 0, 0, 0.45));
  pointer-events: none;
  user-select: none;
  z-index: 2;
}

/* --- Giant Display Title: "Product Designer" --- */
.display-title-wrapper {
  position: absolute;
  top: 490px;
  left: 50%;
  transform: translateX(-50%);
  width: 1780px;
  max-width: calc(100% - 80px);
  z-index: 22;
  pointer-events: none;
}

.display-title-img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.35));
  pointer-events: none;
}

/* Dedicated Interactive Hit-Zone Strictly Anchored to "Product Designer" Typography */
.product-lens-hit-zone {
  position: absolute;
  top: 465px;
  left: 50%;
  transform: translateX(-50%);
  width: 1800px;
  max-width: calc(100% - 60px);
  height: 380px;
  z-index: 65; /* Sits above frameWrapper (60) across the typography, but below scroll-badge (70) */
  pointer-events: auto;
  cursor: crosshair;
}

/* Apple Liquid Glass Convex Lens (z-index: 80 to float in front of hit-zone, portrait frame, clouds, and title) */
.liquid-glass-lens {
  position: absolute;
  top: 0;
  left: 0;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.65);
  transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 80;
  will-change: transform, opacity;
  overflow: visible;
}

.liquid-glass-lens.is-active {
  opacity: 1;
}

/* Glass Viewport (Opaque base completely occludes unmagnified text behind - ZERO double text!) */
.lens-viewport {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  background-color: var(--bg-deep-red);
  box-shadow: inset 0 0 25px rgba(255, 235, 175, 0.3),
              inset 0 0 8px rgba(0, 0, 0, 0.45);
}

/* 1. Magnified Canvas Texture Background */
.lens-scene-bg {
  position: absolute;
  top: 0;
  left: 0;
  background-image: url('./hero/bg red.png');
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 1;
  will-change: transform;
}

/* 2. Magnified "Product Designer" Title Typography */
.lens-magnified-title {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  height: auto;
  display: block;
  pointer-events: none;
  z-index: 2;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.45)) brightness(1.1);
  will-change: transform;
}

/* 3. Magnified Living Portrait Baroque Frame & Video under the Glass */
.lens-magnified-frame {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 3;
  will-change: transform;
}

.lens-magnified-frame .frame-video-wrap {
  position: absolute;
  left: 20.8%;
  top: 25.2%;
  width: 58.4%;
  height: 53.0%;
  border-radius: 50%;
  overflow: hidden;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #24140e;
}

.lens-magnified-frame .frame-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
  transition: opacity 0.85s cubic-bezier(0.4, 0, 0.2, 1);
}

.lens-magnified-frame .frame-video-a {
  opacity: 1;
  z-index: 1;
}

.lens-magnified-frame .frame-video-b {
  opacity: 0;
  z-index: 2;
}

.lens-magnified-frame .frame-overlay-img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 25px 35px rgba(0, 0, 0, 0.65)) drop-shadow(0 8px 14px rgba(0, 0, 0, 0.45));
  pointer-events: none;
  user-select: none;
  z-index: 3;
}

/* 4. Magnified Golden Star under the Glass */
.lens-magnified-star {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 4;
  will-change: transform;
}

.lens-magnified-star img {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 0 12px rgba(255, 235, 175, 0.7));
}

/* 5. Magnified Renaissance Clouds (immersing the bottom of letters in the lens) */
.lens-magnified-clouds {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  height: auto;
  display: block;
  pointer-events: none;
  z-index: 5;
  opacity: 0.98;
  will-change: transform;
}

/* Optical Spherical Shading (simulates convex glass curvature) */
.lens-spherical-shade {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 245, 220, 0.04) 40%,
    rgba(180, 120, 50, 0.16) 75%,
    rgba(40, 10, 15, 0.55) 100%
  );
  pointer-events: none;
}

/* Apple Liquid Glass Specular Highlight Glare */
.lens-specular-glare {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(
    circle at 34% 26%,
    rgba(255, 255, 255, 0.85) 0%,
    rgba(255, 255, 255, 0.3) 18%,
    rgba(255, 255, 255, 0.06) 42%,
    transparent 65%
  );
  pointer-events: none;
  mix-blend-mode: screen;
}

/* Prismatic Caustic Glass Rim (Razor sharp refractive edge) */
.lens-caustic-rim {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.82);
  box-shadow: 
    inset 0 2px 4px rgba(255, 255, 255, 0.95),
    inset 0 -2.5px 5px rgba(35, 10, 15, 0.55),
    0 14px 38px rgba(0, 0, 0, 0.52),
    0 0 26px rgba(255, 225, 140, 0.48);
  pointer-events: none;
}

/* --- Circular Scroll Down Indicator (Elevated to z-index: 70 for 100% Unobstructed Clickability) --- */
.scroll-badge-wrapper {
  position: absolute;
  top: 520px;
  right: calc(50% - 650px);
  width: 92px;
  height: 92px;
  z-index: 70;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-badge-wrapper:hover {
  transform: scale(1.15);
}

.scroll-badge-wrapper.is-auto-scrolling {
  transform: scale(1.08);
}

.scroll-badge-wrapper.is-auto-scrolling .scroll-badge-img {
  animation: spinSlow 8s linear infinite;
  filter: drop-shadow(0 0 16px rgba(255, 249, 239, 0.65));
}

.scroll-badge-img {
  width: 100%;
  height: 100%;
  display: block;
  animation: spinSlow 20s linear infinite;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

@keyframes spinSlow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* --- Floating Golden Star Sparkles --- */
.star-sparkle {
  position: absolute;
  pointer-events: none;
  animation: starPulse 3.5s ease-in-out infinite;
}

.star-1 {
  top: 555px;
  right: calc(50% - 780px);
  width: 48px;
  height: 48px;
  z-index: 50;
  pointer-events: none;
  animation-delay: 0s;
}

.star-2 {
  top: 165px;
  right: calc(50% - 595px);
  width: 18px;
  height: 18px;
  z-index: 25;
  opacity: 0.8;
  animation-delay: 1.8s;
}

.star-sparkle img {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 0 12px rgba(255, 235, 175, 0.7));
}

@keyframes starPulse {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.22) rotate(15deg);
    opacity: 1;
    filter: drop-shadow(0 0 18px rgba(255, 245, 200, 0.95));
  }
}

/* --- Transitional Clouds Horizon (Bridging Hero and About) --- */
.clouds-horizon-bridge {
  position: absolute;
  top: -375px;
  left: -4%;
  width: 108%;
  z-index: 30;
  pointer-events: none;
  overflow: visible;
}

.clouds-drift-wrap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  will-change: transform;
  pointer-events: none;
}

/* Foreground Cloud: Crisp, Natural Wind Float */
.clouds-drift-fore {
  position: relative;
  z-index: 2;
  animation: windFloatFore 16s ease-in-out infinite alternate;
}

.transitional-cloud-img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
  cursor: pointer;
}

.cloud-puff-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 15;
}

/* Individual organic cloud puff wisps (Zero rectangular container, zero clipping edges) */
.cloud-puff-wisp {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle closest-side, rgba(255, 255, 255, 0.78) 0%, rgba(250, 252, 255, 0.48) 38%, rgba(238, 244, 252, 0.16) 72%, transparent 100%);
  filter: blur(6px);
  will-change: transform, opacity;
  transform-origin: center center;
  animation: cloudWispFloat 1.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes cloudWispFloat {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.35);
  }
  18% {
    opacity: 0.8;
  }
  50% {
    opacity: 0.55;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift-x, 0px), var(--drift-y, -65px), 0) scale(var(--drift-scale, 1.45));
  }
}

/* Subtle Wind Float Animation */
@keyframes windFloatFore {
  0% {
    transform: translate3d(-18px, 0px, 0) scale(1.02);
  }
  25% {
    transform: translate3d(-4px, -6px, 0) scale(1.02);
  }
  50% {
    transform: translate3d(16px, 2px, 0) scale(1.02);
  }
  75% {
    transform: translate3d(4px, -5px, 0) scale(1.02);
  }
  100% {
    transform: translate3d(-18px, 0px, 0) scale(1.02);
  }
}

/* --- Section 2: About Section (Pastoral Landscape) --- */
.about-section {
  position: relative;
  width: 100%;
  background-color: #dceaf7;
  overflow: visible;
}

/* GSAP injects a .pin-spacer div when the About section is pinned.
   Without a background it shows as white when scrolling back up.
   Match the About section background so the gap is invisible. */
.about-section + .pin-spacer,
.pin-spacer:has(> #about),
#about.pin-spacer {
  background-color: #dceaf7 !important;
}

/* --- Pastoral Landscape Canvas Wrap --- */
.about-landscape-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: #FFF9EF;
  line-height: 0;
}

.about-landscape-img {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* --- Atmospheric Progressive Depth-of-Field Blur on Manuscript Paper Hover --- */
/* Gradually fades out toward both the top and bottom edges; strongest around the letter/card area */
.about-blur-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
  backdrop-filter: blur(14px) brightness(0.95);
  -webkit-backdrop-filter: blur(14px) brightness(0.95);
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.02) 6%,
    rgba(0, 0, 0, 0.18) 16%,
    rgba(0, 0, 0, 0.58) 26%,
    rgba(0, 0, 0, 0.92) 36%,
    black 44%,
    black 58%,
    rgba(0, 0, 0, 0.92) 66%,
    rgba(0, 0, 0, 0.58) 76%,
    rgba(0, 0, 0, 0.18) 86%,
    rgba(0, 0, 0, 0.02) 94%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.02) 6%,
    rgba(0, 0, 0, 0.18) 16%,
    rgba(0, 0, 0, 0.58) 26%,
    rgba(0, 0, 0, 0.92) 36%,
    black 44%,
    black 58%,
    rgba(0, 0, 0, 0.92) 66%,
    rgba(0, 0, 0, 0.58) 76%,
    rgba(0, 0, 0, 0.18) 86%,
    rgba(0, 0, 0, 0.02) 94%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity;
}

.about-section.is-paper-hovered .about-blur-overlay,
.about-section:has(.parchment-scroll-card:hover) .about-blur-overlay {
  opacity: 1;
}

/* --- Section 2: Bottom Transition Gradient/Fade to Cream (#FFF9EF) --- */
.about-bottom-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  z-index: 6; /* In front of landscape canvas (0) and blur overlay (5), behind parchment scroll (25) */
  line-height: 0;
}

.about-gradient-blend {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 240px;
  background: linear-gradient(
    to bottom,
    rgba(255, 249, 239, 0) 0%,
    rgba(255, 249, 239, 0.25) 25%,
    rgba(255, 249, 239, 0.65) 50%,
    rgba(255, 249, 239, 0.92) 75%,
    #FFF9EF 92%,
    #FFF9EF 100%
  );
  pointer-events: none;
  z-index: 10;
}

.about-gradient-img {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}



/* --- Section 2: Classic Parchment Scroll Story Stage --- */
.parchment-scroll-stage {
  position: absolute;
  top: 250px; /* Elegantly translated down, comfortably centered with ample top/bottom margin */
  left: 50%;
  transform: translate3d(-50%, 0, 0);
  width: 618px; /* Reduced by 5% to grant abundant padding on top and bottom of section */
  max-width: 90%;
  z-index: 25;
  line-height: normal;
  perspective: 1200px;
  will-change: transform, opacity;
}

.parchment-scroll-card {
  position: relative;
  width: 100%;
  background: radial-gradient(ellipse at 50% 0%, #fffefb 0%, #faf3e2 38%, #f3e6ca 82%, #ebd8b6 100%);
  border: 1px solid rgba(198, 156, 75, 0.45);
  border-radius: 12px;
  padding: 58px 54px 50px 54px; /* Generous top and bottom padding for manuscript breathing room */
  box-shadow: 
    0 12px 32px rgba(15, 25, 20, 0.20),
    0 4px 12px rgba(40, 20, 10, 0.10),
    inset 0 0 60px rgba(185, 142, 85, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.78);
  transform-style: preserve-3d;
  user-select: text;
  will-change: transform, box-shadow;
  transition: box-shadow 0.35s ease;
}

.parchment-scroll-card.is-hovered {
  box-shadow: 
    0 16px 38px rgba(15, 25, 20, 0.25),
    0 6px 16px rgba(40, 20, 10, 0.14),
    inset 0 0 75px rgba(185, 142, 85, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.92);
}

/* 3D Dynamic Specular Lighting Sheen Overlay */
.parchment-specular-shine {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: radial-gradient(
    circle 380px at var(--shine-x, 50%) var(--shine-y, 50%),
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 240, 190, 0.22) 35%,
    transparent 70%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  mix-blend-mode: overlay;
  z-index: 12;
}

.parchment-scroll-card.is-hovered .parchment-specular-shine {
  opacity: 1;
}

/* Golden Wax Seal at Crest */
.parchment-seal-wrap {
  position: absolute;
  top: -36px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 72px;
  z-index: 15;
  cursor: pointer;
}

.parchment-seal-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 10px 18px rgba(35, 18, 8, 0.55));
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}

.parchment-seal-wrap:hover .parchment-seal-img {
  transform: scale(1.08) rotate(2deg);
  filter: drop-shadow(0 12px 24px rgba(218, 165, 32, 0.65));
}

.seal-gleam-glow {
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 225, 120, 0.45) 0%, rgba(218, 165, 32, 0.15) 45%, transparent 70%);
  pointer-events: none;
  opacity: 0.75;
  animation: sealGleamPulse 4s ease-in-out infinite;
}

@keyframes sealGleamPulse {
  0%, 100% {
    transform: scale(0.95);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.95;
  }
}

/* Corner Antique Filigree Ornaments */
.parchment-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 1.5px solid rgba(190, 148, 75, 0.55);
  pointer-events: none;
}

.parchment-corner.top-left {
  top: 10px;
  left: 10px;
  border-right: none;
  border-bottom: none;
  border-top-left-radius: 4px;
}

.parchment-corner.top-right {
  top: 10px;
  right: 10px;
  border-left: none;
  border-bottom: none;
  border-top-right-radius: 4px;
}

.parchment-corner.bottom-left {
  bottom: 10px;
  left: 10px;
  border-right: none;
  border-top: none;
  border-bottom-left-radius: 4px;
}

.parchment-corner.bottom-right {
  bottom: 10px;
  right: 10px;
  border-left: none;
  border-top: none;
  border-bottom-right-radius: 4px;
}

/* Manuscript Rubric Header */
.parchment-header {
  text-align: center;
  margin-bottom: 14px;
}

.parchment-rubric {
  font-family: 'Cinzel', var(--font-serif);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.28em;
  color: #8c6a35;
  text-transform: uppercase;
  display: block;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.85);
  margin-bottom: 4px;
}

.parchment-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  opacity: 0.75;
}

.divider-line {
  width: 44px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(190, 148, 75, 0.65), transparent);
}

.divider-gem {
  font-size: 9px;
  color: #b88628;
  line-height: 1;
}

/* Manuscript Body & Inscription Units */
.parchment-story-body {
  position: relative;
  z-index: 5;
}

.story-unit {
  position: relative;
  margin-bottom: 9px;
  opacity: 1;
  filter: none;
  transform: none;
  cursor: default;
}

/* Individual Story Word for Progressive Scroll Reveal */
.story-word {
  display: inline-block;
  opacity: 0.15;
  filter: blur(2.5px);
  transform: translateY(3.5px);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              color 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, filter, transform;
}

.story-word.is-revealed,
.story-word.is-permanently-visible {
  opacity: 1;
  filter: blur(0px);
  transform: translateY(0);
}

/* Freshly Inscribed Warm Ink Luminous Accent */
.story-word.just-inscribed {
  color: #8c1a1e;
  text-shadow: 0 0 6px rgba(184, 134, 40, 0.45);
}

.story-p {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 15.6px;
  line-height: 1.56;
  color: #2b170c;
  letter-spacing: 0.01em;
  margin: 0;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Drop-Cap for Lead Paragraph */
.story-p.lead-p {
  font-size: 16.6px;
  line-height: 1.56;
}

.drop-cap {
  font-family: 'Cinzel', 'Cormorant Garamond', Georgia, serif;
  font-size: 42px;
  line-height: 0.82;
  float: left;
  margin-right: 10px;
  margin-top: 1px;
  color: #8c1a1e;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  display: inline-block;
}

/* Lumia Highlight Line */
.story-p.emph-p {
  font-style: italic;
  font-weight: 600;
  font-size: 17px;
  color: #4a2110;
  letter-spacing: 0.02em;
}

/* Thoughtful Quote Highlight */
.story-p.quote-p {
  padding-left: 12px;
  border-left: 2px solid rgba(198, 156, 75, 0.55);
  margin-top: 3px;
  margin-bottom: 9px;
}

.story-quote {
  font-style: italic;
  color: #3d1b0d;
  font-weight: 500;
}

.story-p.conclusion-p {
  line-height: 1.58;
}

/* Manuscript Signature */
.story-signature-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(198, 156, 75, 0.25);
  opacity: 0.18;
  filter: blur(2px);
  transform: translateY(8px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.story-signature-wrap.is-active {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

.sig-sparkle-star img {
  width: 15px;
  height: 15px;
  display: block;
  filter: drop-shadow(0 0 6px rgba(235, 185, 75, 0.8));
  animation: starPulse 3s ease-in-out infinite;
}

.sig-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 20px;
  font-weight: 600;
  color: #421e10;
  letter-spacing: 0.04em;
}

/* Dynamic Stardust Sparkle Layer & Inscription Sparklets */
.parchment-sparkle-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
  z-index: 25;
}

.inscribe-sparkle {
  position: absolute;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: inscribeSparkleBurst 0.95s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  z-index: 30;
  will-change: transform, opacity;
}

.inscribe-sparkle svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 0 8px rgba(255, 235, 160, 0.95));
}

@keyframes inscribeSparkleBurst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2) rotate(0deg);
  }
  25% {
    opacity: 1;
    transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, 0px))) scale(1.15) rotate(40deg);
    filter: drop-shadow(0 0 10px rgba(255, 240, 170, 0.95));
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + calc(var(--dx, 0px) * 1.5)), calc(-50% + calc(var(--dy, 0px) * 1.5))) scale(0.15) rotate(90deg);
    filter: drop-shadow(0 0 2px rgba(218, 165, 32, 0.3));
  }
}

.inscribe-sparkle.is-test-frozen {
  animation: none !important;
  opacity: 1 !important;
  transform: translate(-50%, -50%) scale(1) rotate(20deg) !important;
}

/* --- Responsive Scaling --- */
@media (max-width: 1512px) {
  .artboard-container {
    max-width: 1512px;
  }
  .navbar {
    max-width: 1512px;
  }
  .hero-section {
    height: 982px;
    min-height: 982px;
  }
  .hero-intro {
    top: 220px;
    left: 315px;
    width: 445px;
    max-width: 445px;
  }
  .frame-3d-wrapper {
    top: 128px;
    right: 310px;
    width: 293px;
    height: 440px;
  }
  .display-title-wrapper {
    top: 470px;
    left: 50px;
    transform: none;
    width: 1410px;
    max-width: calc(100% - 100px);
  }
  .product-lens-hit-zone {
    top: 440px;
    left: 45px;
    transform: none;
    width: 1420px;
    max-width: calc(100% - 90px);
    height: 330px;
  }
  .scroll-badge-wrapper {
    top: 505px;
    right: 140px;
    width: 86px;
    height: 86px;
  }
  .star-1 {
    top: 575px;
    right: 65px;
  }
  .star-2 {
    top: 155px;
    right: 195px;
  }
  .clouds-horizon-bridge {
    top: -340px;
  }
  .works-container,
  .drawings-container {
    max-width: 1220px;
  }
  .works-decor-left-paper {
    width: 395px;
  }
  .works-decor-right-paper {
    width: 335px;
  }
  .works-decor-left-rose {
    width: 385px;
  }
  .works-decor-right-rose {
    width: 345px;
  }
}

@media (max-width: 1280px) {
  .hero-section {
    height: 900px;
    min-height: 900px;
  }
  .hero-intro {
    left: 140px;
  }
  .frame-3d-wrapper {
    right: 220px;
    width: 310px;
  }
  .display-title-wrapper {
    top: 450px;
  }
  .scroll-badge-wrapper {
    right: 140px;
    top: 460px;
  }
}

@media (max-width: 1024px) {
  .hero-intro {
    left: 50px;
    top: 140px;
  }
  .frame-3d-wrapper {
    right: 50px;
    width: 260px;
  }
  .display-title-wrapper {
    top: 440px;
    left: 30px;
    width: calc(100% - 60px);
  }
  .scroll-badge-wrapper {
    right: 40px;
    top: 430px;
    width: 76px;
    height: 76px;
  }
}

/* ==========================================================================
   INTERACTIVE GOLDEN SPARKLES BURST
   Triggered on clicking Gokul's living portrait frame
   ========================================================================== */

.fire-magic-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 45;
  pointer-events: none;
  opacity: 1;
}

/* ==========================================================================
   SECTION 3: WORKS SECTION (Renaissance Romance & Product Showcase)
   ========================================================================== */

.works-section {
  position: relative;
  width: 100%;
  background-color: #FFF9EF;
  margin-top: -1px; /* Subpixel seam alignment, 100% preserving Section 2 bottom spacing */
  padding-bottom: 140px;
  overflow: visible;
  scroll-margin-top: 60px;
}

/* Seamless Transition Meadow Bridge - Handled natively by About/gradiant.png */
.works-transition-overlay {
  display: none;
}

/* --- Layer 1: Antique Manuscript Paper Layer (Behind Mockups, z-index: 5) --- */
.works-paper-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

/* Left Paper: Touches left frame with bleed, completely static under the first phone mockup */
.works-decor-left-paper {
  position: absolute;
  top: -40px;
  left: -10px;
  width: 440px;
  pointer-events: none;
}

.decor-paper-left {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 15px 30px rgba(60, 25, 10, 0.12));
  user-select: none;
  -webkit-user-drag: none;
}

/* Right Paper: Touches right frame with bleed, completely static */
.works-decor-right-paper {
  position: absolute;
  top: -120px;
  right: -10px;
  width: 380px;
  pointer-events: none;
}

.decor-paper-right {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 15px 30px rgba(60, 25, 10, 0.12));
  user-select: none;
  -webkit-user-drag: none;
}

/* --- Layer 2: Crimson Rose Clusters (On Top of Mockups, z-index: 35) --- */
.works-rose-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 35;
}

/* Left Rose: Touches left frame with bleed, animated organically via GSAP */
.works-decor-left-rose {
  position: absolute;
  top: -155px;
  left: -10px;
  width: 440px;
  pointer-events: auto;
  cursor: pointer;
  transform-origin: 0% 12%;
  will-change: transform;
}

.decor-rose-left {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 20px 40px rgba(70, 15, 20, 0.22));
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: 0% 25%;
  will-change: transform;
  transition: filter 0.3s ease;
}

.works-decor-left-rose:hover .decor-rose-left {
  filter: drop-shadow(0 25px 45px rgba(180, 20, 35, 0.36)) brightness(1.04);
}

/* Right Rose: Touches right frame with bleed, animated organically via GSAP */
.works-decor-right-rose {
  position: absolute;
  top: -135px;
  right: -10px;
  width: 400px;
  pointer-events: auto;
  cursor: pointer;
  transform-origin: 100% 12%;
  will-change: transform;
}

.decor-rose-right {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 20px 40px rgba(70, 15, 20, 0.22));
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: 100% 25%;
  will-change: transform;
  transition: filter 0.3s ease;
}

.works-decor-right-rose:hover .decor-rose-right {
  filter: drop-shadow(0 25px 45px rgba(180, 20, 35, 0.36)) brightness(1.04);
}

/* --- Layer 3: Interactive Falling Rose Petals Layer (Free-Flowing, z-index: 100) --- */
.works-petals-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 100;
}

.falling-petal {
  position: absolute;
  pointer-events: none;
  user-select: none;
  will-change: transform, opacity;
  filter: drop-shadow(0 4px 10px rgba(80, 10, 20, 0.28));
  overflow: visible;
}

/* Section Header */
.works-header {
  position: relative;
  z-index: 10;
  text-align: center;
  padding-top: 105px;
  padding-bottom: 155px; /* Moved projects down for enhanced visual breathing room */
}

.works-title-img {
  width: 320px;
  max-width: 85%;
  height: auto;
  display: inline-block;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 6px 16px rgba(143, 14, 25, 0.12));
  transition: transform 0.3s ease;
}

.works-title-img:hover {
  transform: scale(1.02);
}

/* Works Projects Container */
.works-container {
  position: relative;
  z-index: 10;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  flex-direction: column;
  gap: 120px;
}

/* Project Card (Cohesive Centered Grouping: Left 3 Phones, Right Details) */
.work-project-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px; /* Intimately grouped without excessive spacing */
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Mockups Group (3 Phones Side by Side) */
.work-mockups-group {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  flex: 0 0 auto;
}

.work-mockup-wrap {
  flex: 0 0 215px;
  width: 215px;
  max-width: 220px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.work-phone-img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 16px 30px rgba(30, 20, 15, 0.14));
  transition: filter 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.work-mockup-wrap:hover {
  transform: translateY(-8px) scale(1.025);
}

.work-mockup-wrap:hover .work-phone-img {
  filter: drop-shadow(0 26px 45px rgba(30, 20, 15, 0.24));
}

/* Right Column: Project Details & Meta */
.work-details-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  flex: 0 1 420px;
  max-width: 420px;
}

/* Title Row: Logo + App Name */
.work-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.work-logo-img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.08));
}

.work-title {
  margin: 0;
  display: flex;
  align-items: center;
  line-height: 1;
}

.work-title-wordmark {
  height: 24px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

/* Date Badge Pill */
.work-date-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background-color: #F2ECE2;
  border-radius: 6px;
  user-select: none;
}

.work-date-pill span {
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  color: #726D65;
  letter-spacing: 0.01em;
}

/* Description */
.work-description {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.68;
  color: #4A463F;
  margin: 4px 0 10px 0;
  font-weight: 400;
}

/* Action Link (View Case Study) */
.work-action-wrap {
  margin-top: 2px;
}

.work-case-study-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  color: #242220;
  text-decoration: none;
  transition: color 0.25s ease;
  cursor: pointer;
}

.work-case-study-btn .btn-text {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
  transition: text-decoration-color 0.25s ease;
}

.work-case-study-btn:hover {
  color: #8F0E19;
}

.work-case-study-btn:hover .btn-text {
  text-decoration-color: #8F0E19;
}

.work-case-study-btn .btn-arrow {
  display: inline-block;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.work-case-study-btn:hover .btn-arrow {
  transform: translate(3px, -3px);
}

/* Glitch Easter Egg for View Case Study Button */
.work-case-study-btn.is-glitching {
  animation: caseStudyGlitch 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
  color: #8F0E19;
}

.work-case-study-btn.is-glitching .btn-text {
  text-shadow: 
    -2.5px 0 #FF2A4D, 
    2.5px 0 #00E5FF, 
    0 0 10px rgba(143, 14, 25, 0.45);
  animation: textGlitchJitter 0.6s steps(2) both;
}

.work-case-study-btn.is-glitching .btn-arrow {
  transform: translate(6px, -6px) scale(1.3);
  color: #FF2A4D;
  text-shadow: 2px -2px #00E5FF;
}

@keyframes caseStudyGlitch {
  0% {
    transform: translate(0, 0);
  }
  12% {
    transform: translate(-3.5px, 1.5px) skewX(-4deg);
    filter: drop-shadow(0 0 6px rgba(255, 42, 77, 0.5));
  }
  24% {
    transform: translate(3.5px, -1.5px) skewX(3deg);
  }
  38% {
    transform: translate(-2px, 0.5px) skewX(-2deg);
  }
  52% {
    transform: translate(2px, -0.5px) skewX(1deg);
  }
  68% {
    transform: translate(-1px, 0.5px);
  }
  82% {
    transform: translate(0.5px, -0.2px);
  }
  100% {
    transform: translate(0, 0);
    filter: none;
  }
}

@keyframes textGlitchJitter {
  0% {
    clip-path: inset(0 0 0 0);
  }
  15% {
    clip-path: inset(18% 0 32% 0);
    transform: translate(-1.5px, 0);
  }
  35% {
    clip-path: inset(45% 0 12% 0);
    transform: translate(2px, -1px);
  }
  55% {
    clip-path: inset(8% 0 58% 0);
    transform: translate(-2px, 1px);
  }
  75% {
    clip-path: inset(65% 0 6% 0);
    transform: translate(1px, 0);
  }
  100% {
    clip-path: inset(0 0 0 0);
    transform: translate(0, 0);
  }
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
  .work-project-card {
    flex-direction: column;
    gap: 40px;
  }
  .work-mockups-group {
    width: 100%;
    justify-content: center;
  }
  .work-mockup-wrap {
    flex: 1 1 0;
    max-width: 200px;
  }
  .work-details-content {
    max-width: 100%;
    align-items: center;
    text-align: center;
  }
  .works-decor-left-paper,
  .works-decor-left-rose,
  .works-decor-right-paper,
  .works-decor-right-rose {
    width: 240px;
  }
}

@media (max-width: 680px) {
  .work-mockups-group {
    gap: 10px;
  }
  .works-title-img {
    width: 260px;
  }
  .works-decor-left-paper,
  .works-decor-left-rose,
  .works-decor-right-paper,
  .works-decor-right-rose {
    width: 170px;
  }
  .work-title-wordmark {
    height: 22px;
    max-width: 180px;
  }
  .work-logo-img {
    width: 26px;
    height: 26px;
  }
}

/* ==========================================================================
   --- EDITORIAL GALLERY SECTIONS (Photography & Drawings) ---
   ========================================================================== */
.gallery-section {
  position: relative;
  width: 100%;
  background-color: #FFF9EF;
  border-top: 1px solid rgba(143, 14, 25, 0.12);
  padding: 130px 40px 140px;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
}

.drawings-section {
  margin-top: 360px;
  position: relative;
  z-index: 5;
  padding: 140px 0 150px;
  background-color: #FFF9EF;
  border-top: none;
}

.gallery-inner {
  max-width: 820px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-eyebrow {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: #8f0e19;
  font-weight: 600;
  margin-bottom: 12px;
}

.gallery-title {
  font-family: 'Cinzel', var(--font-serif);
  font-size: clamp(36px, 4.5vw, 54px);
  font-weight: 600;
  color: #2a0408;
  letter-spacing: 0.04em;
  margin: 0 0 16px;
  line-height: 1.15;
}

.gallery-ornament-line {
  width: 64px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #c8963e, transparent);
  margin: 0 auto 24px;
}

.gallery-description {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  color: #5c3a28;
  max-width: 640px;
  margin: 0 auto 40px;
  font-style: italic;
}

.gallery-card-preview {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(200, 150, 62, 0.35);
  border-radius: 12px;
  padding: 36px 48px;
  box-shadow: 0 10px 30px rgba(60, 20, 10, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 540px;
  width: 100%;
  box-sizing: border-box;
}

.gallery-badge-wrap {
  display: flex;
  justify-content: center;
}

.gallery-status-badge {
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #8f0e19;
  background: rgba(143, 14, 25, 0.08);
  border: 1px solid rgba(143, 14, 25, 0.22);
  padding: 6px 16px;
  border-radius: 999px;
}

.gallery-curation-text {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: #7a503a;
  margin: 0;
}

/* ==========================================================================
   DRAWINGS SECTION — ARTWORK GRID, HOVER, SCROLL REVEAL & LIGHTBOX
   ========================================================================== */

/* ── Section container (Shares responsive scale & padding with Works section) ── */
.drawings-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  box-sizing: border-box;
}

/* ── Two-column header (Title left, Description right) ── */
.drawings-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: clamp(108px, 8.5vw, 136px);
  width: 100%;
}

.drawings-title-col {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.drawings-title {
  margin: 0;
  padding: 0;
  line-height: 1;
}

.drawings-title-img {
  width: clamp(340px, 28vw, 440px);
  max-width: 100%;
  height: auto;
  display: block;
  user-select: none;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawings-title-img:hover {
  transform: scale(1.02);
}

.drawings-desc-col {
  flex: 0 1 484px;
  max-width: 484px;
  margin-left: auto;
  display: flex;
  justify-content: flex-end;
  padding-top: 14px;
}

.drawings-desc {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.65;
  color: #4a4038;
  margin: 0;
  text-align: justify;
  text-justify: inter-word;
}

/* ── Rows layout ── */
.drawings-rows {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 2.4vw, 36px);
  width: 100%;
}

.drawings-row {
  display: flex;
  gap: clamp(24px, 2.4vw, 36px);
  width: 100%;
  align-items: stretch;
}

/* Row 1: two equal wide artworks */
.drawings-row-1 .drawing-item {
  flex: 1;
  aspect-ratio: 1.39 / 1;
}

/* Row 2: left item wide + right diptych pair */
.drawings-row-2 .di-wide-left {
  flex: 1;
  aspect-ratio: 1.43 / 1;
}

.drawings-pair {
  flex: 1;
  display: flex;
  gap: 0; /* Direct seamless contact, matching reference */
  align-items: stretch;
  overflow: hidden;
  border-radius: 2px;
}

.drawings-pair .di-pair-item {
  height: 100%;
}

.drawings-pair .di-pair-item:first-child {
  flex: 625 1 0;
}

.drawings-pair .di-pair-item:last-child {
  flex: 581 1 0;
}

/* ── Each artwork wrapper: scroll-reveal initial state ── */
.drawing-item {
  opacity: 0;
  transform: translateY(22px);
  will-change: opacity, transform;
  cursor: pointer;
  outline: none;
  position: relative;
}

.drawing-item.is-drawing-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── Paper frame — physical print feel ── */
.drawing-frame {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 2px;
  overflow: hidden;
  box-shadow:
    0 2px 8px rgba(40, 18, 8, 0.08),
    0 1px 2px rgba(40, 18, 8, 0.05);
  transition:
    box-shadow 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  transform:
    scale(var(--draw-scale, 1))
    rotate(var(--draw-rot, 0deg));
  transform-origin: center center;
}

.drawing-item.is-hovered {
  z-index: 5;
}

.drawing-item.is-hovered .drawing-frame {
  box-shadow:
    0 14px 34px rgba(40, 18, 8, 0.18),
    0 4px 12px rgba(40, 18, 8, 0.10);
}

.drawing-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* ── Header reveal initial state ── */
.drawing-reveal-header {
  opacity: 0;
  transform: translateY(18px);
  will-change: opacity, transform;
}
.drawing-reveal-header.is-drawing-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── Reduced motion ── */
html.reduced-motion .drawing-item,
html.reduced-motion .drawing-reveal-header {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}
html.reduced-motion .drawing-frame {
  transition: none !important;
  transform: none !important;
}

/* ── Lightbox ── */
.drawing-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.drawing-lightbox:not([hidden]) { pointer-events: auto; }

.drawing-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 7, 3, 0.85);
  opacity: 0;
  transition: opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.drawing-lightbox.is-open .drawing-lightbox-backdrop { opacity: 1; }

.drawing-lightbox-stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(88vw, 920px);
  max-height: 92vh;
  opacity: 0;
  transform: scale(0.9) translateY(16px);
  transition:
    opacity 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
.drawing-lightbox.is-open .drawing-lightbox-stage {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.drawing-lightbox-img {
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  height: auto;
  display: block;
  border-radius: 3px;
  box-shadow: 0 28px 72px rgba(0,0,0,0.55), 0 8px 20px rgba(0,0,0,0.32);
  object-fit: contain;
}

.drawing-lightbox-caption {
  margin-top: 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: rgba(255, 248, 230, 0.85);
  text-align: center;
  letter-spacing: 0.04em;
}
.drawing-lightbox-caption strong {
  font-family: var(--font-serif);
  font-size: 15px;
  color: #fff;
  letter-spacing: 0.06em;
}
.drawing-lightbox-caption span {
  color: rgba(255, 248, 230, 0.65);
  font-size: 13px;
}

.drawing-lightbox-close {
  position: absolute;
  top: -48px;
  right: 0;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(255,248,230,0.75);
  transition: background 0.2s, color 0.2s;
  padding: 0;
}
.drawing-lightbox-close:hover { background: rgba(255,255,255,0.22); color: #fff; }
.drawing-lightbox-close svg { width: 18px; height: 18px; }

/* ── Responsive ── */
@media (max-width: 1280px) {
  .drawings-container {
    padding: 0 36px;
  }
  .drawings-title-img {
    width: 340px;
  }
  .drawings-desc-col {
    flex: 0 1 452px;
    max-width: 452px;
    padding-top: 10px;
  }
  .drawings-desc {
    font-size: 14px;
  }
}

@media (max-width: 820px) {
  .drawings-header {
    flex-direction: column;
    gap: 16px;
    margin-bottom: 44px;
  }
  .drawings-desc-col {
    margin-left: 0;
    flex: 1 1 100%;
    padding-top: 0;
  }
  .drawings-title-img {
    width: 280px;
    max-width: 85%;
  }
  .drawings-row {
    flex-direction: column;
    gap: 20px;
  }
  .drawings-row-1 .drawing-item,
  .drawings-row-2 .di-wide-left {
    aspect-ratio: 1.4 / 1;
  }
  .drawings-pair {
    aspect-ratio: 1.54 / 1;
  }
  .drawings-container {
    padding: 0 24px;
  }
}

@media (max-width: 480px) {
  .drawings-container {
    padding: 0 16px;
  }
  .drawings-title-img {
    width: 230px;
  }
}

/* ==========================================================================
   SECTION 4: RENAISSANCE CATHEDRAL PHOTOGRAPHY 3D CAROUSEL
   ========================================================================== */
.photography-section {
  position: relative;
  background-color: #FFF9EF;
  padding: 120px 0 80px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  overflow: visible;
  z-index: 10;
}

.cathedral-wrapper {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 28px;
  box-sizing: border-box;
}

.cathedral-arch-container {
  position: relative;
  width: 100%;
  min-height: 1180px;
  background-color: #141416;
  border-radius: 720px 720px 0 0;
  box-shadow: 0 35px 80px rgba(18, 18, 20, 0.2), 0 10px 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

/* Delicate Dashed Inner Arch Border */
.cathedral-inner-border {
  position: absolute;
  top: 26px;
  left: 26px;
  right: 26px;
  bottom: 0;
  border: 1.5px dashed rgba(255, 249, 239, 0.3);
  border-bottom: none;
  border-radius: 694px 694px 0 0;
  pointer-events: none;
  z-index: 5;
}

/* Diamond Stars Anchored from Bottom of Layout */
.cathedral-hanging-star {
  position: absolute;
  top: 250px;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 6;
  pointer-events: none;
}

.cathedral-hanging-star.star-left {
  left: 17%;
}

.cathedral-hanging-star.star-right {
  right: 17%;
}

.cathedral-star-icon {
  width: 44px;
  height: auto;
  margin-bottom: -2px;
  filter: drop-shadow(0 0 14px rgba(255, 249, 239, 0.55));
  pointer-events: auto;
  flex-shrink: 0;
  user-select: none;
  -webkit-user-drag: none;
}

.cathedral-hanging-star .star-cord {
  width: 1px;
  flex: 1;
  background: linear-gradient(
    to bottom,
    rgba(255, 249, 239, 0.28) 0px,
    rgba(255, 249, 239, 0.28) 150px,
    rgba(255, 249, 239, 0) 190px,
    rgba(255, 249, 239, 0) 590px,
    rgba(255, 249, 239, 0.28) 635px,
    rgba(255, 249, 239, 0.28) 100%
  );
}

/* Editorial Headline & Narrative */
.photography-header {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 600px;
  margin: 168px auto 26px;
  padding: 0 20px;
  box-sizing: border-box;
}

.photography-title {
  margin: 0 0 36px;
  line-height: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.photography-title-img {
  width: 440px;
  max-width: 86%;
  height: auto;
  display: inline-block;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.55));
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.photography-title-img:hover {
  transform: scale(1.02);
}

.photography-narrative {
  font-family: var(--font-sans);
  font-size: clamp(14px, 1.1vw, 15px);
  line-height: 1.72;
  color: rgba(255, 249, 239, 0.88);
  text-align: justify;
  text-justify: inter-word;
  margin: 0 auto;
  max-width: 560px;
  font-weight: 400;
  letter-spacing: 0.012em;
  text-wrap: pretty;
}

.photo-drop-cap {
  float: left;
  font-size: 40px;
  line-height: 0.84;
  padding: 0;
  margin-top: 7px;
  margin-right: 6px;
  font-family: 'Moglan Demo', 'Moglan', serif;
  font-weight: normal;
  color: #FFF9EF;
}

/* 3D Rotating Carousel Viewport & Cards */
.photo-carousel-viewport {
  position: relative;
  width: 100%;
  height: 520px;
  z-index: 15;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: grab;
  perspective: 1400px;
  -webkit-perspective: 1400px;
  touch-action: pan-y;
  outline: none;
  user-select: none;
  margin-top: 14px;
}

.photo-carousel-viewport:active {
  cursor: grabbing;
}

.photo-carousel-stage {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: auto;
}

.photo-card {
  position: absolute;
  width: 320px;
  height: 400px;
  will-change: transform, opacity, filter;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  cursor: pointer;
  border-radius: 4px;
  outline: none;
  transition: filter 0.3s ease;
}

.photo-card:focus-visible {
  outline: 2px solid #FFF9EF;
  outline-offset: 4px;
}

.photo-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 4px;
  overflow: hidden;
  background-color: #0d0d0f;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 2px 10px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: box-shadow 0.4s ease, border-color 0.4s ease, transform 0.4s ease;
}

.photo-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
}

.photo-card-sheen {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.photo-card-meta {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 34px 16px 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.45) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.photo-card-title {
  font-family: 'Playfair Display', 'Cormorant Garamond', serif;
  font-size: 15.5px;
  color: #FFF9EF;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.photo-card-sub {
  font-family: var(--font-sans);
  font-size: 11px;
  color: rgba(255, 249, 239, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.photo-card.is-active .photo-card-meta,
.photo-card:hover .photo-card-meta {
  opacity: 1;
  transform: translateY(0);
}

.photo-card.is-active .photo-card-inner {
  border-color: rgba(255, 249, 239, 0.35);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.8), 0 0 24px rgba(255, 249, 239, 0.12);
}

/* Carousel Controls & Pagination */
.photo-carousel-nav {
  position: absolute;
  bottom: -18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  z-index: 28;
  pointer-events: auto;
}

.photo-nav-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(26, 26, 30, 0.8);
  border: 1px solid rgba(255, 249, 239, 0.25);
  color: #FFF9EF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.photo-nav-btn:hover {
  background: rgba(255, 249, 239, 0.2);
  border-color: rgba(255, 249, 239, 0.6);
  transform: scale(1.08);
}

.photo-nav-btn:active {
  transform: scale(0.95);
}

.photo-nav-btn:focus-visible {
  outline: 2px solid #FFF9EF;
  outline-offset: 3px;
}

.photo-carousel-indicators {
  display: flex;
  gap: 8px;
  align-items: center;
}

.photo-indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 249, 239, 0.25);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.35s ease;
}

.photo-indicator-dot.is-active {
  width: 24px;
  border-radius: 999px;
  background: #FFF9EF;
  box-shadow: 0 0 10px rgba(255, 249, 239, 0.5);
}

/* Full-Width Billowing Atmospheric Clouds Horizon (Outside cathedral arch, full width like Hero section) */
.photography-full-clouds-horizon {
  position: absolute;
  bottom: -320px;
  left: -4%;
  width: 108%;
  z-index: 25;
  pointer-events: none;
  overflow: visible;
}

.photography-full-clouds-drift {
  position: relative;
  width: 100%;
  will-change: transform;
  animation: windFloatFore 16s ease-in-out infinite alternate;
  pointer-events: none;
  overflow: visible;
}


.photography-full-clouds-img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
  cursor: pointer;
}

/* Reduced Motion Support */
html.reduced-motion .photography-full-clouds-drift {
  animation: none !important;
}

html.reduced-motion .cathedral-hanging-star .cathedral-star-icon {
  animation: none !important;
}

/* Responsive Adjustments */
@media (max-width: 1280px) {
  .cathedral-arch-container {
    border-radius: 560px 560px 0 0;
    min-height: 980px;
  }
  .cathedral-inner-border {
    border-radius: 534px 534px 0 0;
  }
  .photo-card {
    width: 280px;
    height: 350px;
  }
  .photography-header {
    margin-top: 90px;
  }
}

@media (max-width: 768px) {
  .cathedral-arch-container {
    border-radius: 360px 360px 0 0;
    min-height: 860px;
  }
  .cathedral-inner-border {
    border-radius: 334px 334px 0 0;
    top: 16px;
    left: 16px;
    right: 16px;
  }
  .photography-header {
    margin-top: 75px;
    padding: 0 16px;
  }
  .photo-card {
    width: 220px;
    height: 275px;
  }
  .photo-carousel-viewport {
    height: 380px;
  }
  .cathedral-hanging-star.star-left {
    left: 8%;
  }
  .cathedral-hanging-star.star-right {
    right: 8%;
  }
  .cathedral-hanging-star .star-cord {
    height: 110px;
  }
  .cathedral-star-icon {
    width: 32px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SECTION 6: CLOSING / ONE LAST THOUGHT
   ═══════════════════════════════════════════════════════════════════════════ */
.closing-section {
  position: relative;
  width: 100%;
  background-color: var(--bg-cream, #FFF9EF);
  margin-top: clamp(60px, 6vw, 100px);
  padding: 0 0 clamp(40px, 4vw, 60px);
  box-sizing: border-box;
  overflow: hidden;
}

/* Ornate Tapestry Ribbon Border */
.closing-border-wrap {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  line-height: 0;
  font-size: 0;
  overflow: hidden;
}

.closing-border-img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  pointer-events: none;
}

/* Main Visual Stage */
.closing-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  margin: calc(-1 * clamp(12px, 1.2vw, 20px)) auto 0;
  box-sizing: border-box;
  padding: 0;
  line-height: 0;
  font-size: 0;
}

.closing-landscape-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  line-height: 0;
  font-size: 0;
  overflow: hidden;
}

.closing-landscape-bg {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
  user-select: none;
  object-fit: cover;
  margin-top: calc(-1 * clamp(35px, 4vw, 70px));
}

/* Header overlaid on the landscape sky */
.closing-header {
  position: absolute;
  top: 19.8%;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2.5vw, 36px);
  padding: 0 clamp(16px, 4vw, 48px);
  box-sizing: border-box;
  transform: translateY(-50%);
  z-index: 5;
}

.closing-flank-line {
  flex: 0 1 clamp(60px, 14vw, 190px);
  height: 1.5px;
  background-color: #9C0608;
  opacity: 0.85;
}

.closing-title {
  margin: 0;
  padding: 0;
  line-height: 1;
  flex: 0 0 auto;
}

.closing-title-img {
  width: clamp(230px, 28vw, 420px);
  max-width: 100%;
  height: auto;
  display: block;
  user-select: none;
}

/* Tactile Open Book Graphic */
.closing-book-wrap {
  position: absolute;
  top: 39%;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(280px, 72%, 920px);
  z-index: 6;
  pointer-events: auto;
}

.closing-book-inner {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
  transform-origin: center center;
  container-type: inline-size;
}

.closing-book-img {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
  filter: drop-shadow(0 14px 30px rgba(40, 25, 15, 0.12));
  transition: filter 0.5s ease;
}

.closing-book-wrap:hover .closing-book-inner {
  transform: translateY(-6px) scale(1.015);
}

.closing-book-wrap:hover .closing-book-img {
  filter: drop-shadow(0 24px 44px rgba(40, 25, 15, 0.20));
}

/* Magic Canvas for Sparkling Particles */
.closing-magic-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

/* Inscribed Text Layer */
.closing-book-pages-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 5;
}

/* Left Page Content */
.closing-page-content.left-page {
  position: absolute;
  left: 31.0%;
  top: 44.5%;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}

/* Right Page Content */
.closing-page-content.right-page {
  position: absolute;
  left: 69.15%;
  top: 44.6%;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}

/* Line Magic Transitions - Stable Text Layer (NO translation/shifts) */
.closing-magic-line {
  position: relative;
  display: block;
  opacity: 0;
  filter: blur(4px);
  /* Stationary in-place fade */
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, filter;
}

.closing-magic-line.is-visible {
  opacity: 1;
  filter: blur(0px);
}

.closing-left-title {
  font-family: 'Cinzel', Georgia, serif;
  font-size: clamp(10px, 2.38cqw, 24px);
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #271a10;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  line-height: 1;
  margin-bottom: clamp(4px, 0.95cqw, 11px);
  transform: rotate(10deg);
  transform-origin: center center;
}

.closing-page-content.left-page .closing-fleuron-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(3px, 0.7cqw, 7px);
  width: 82%;
  margin: 0 auto;
  transform: rotate(10deg);
  transform-origin: center center;
}

.closing-quote-line {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(10px, 2.72cqw, 28px);
  font-style: normal;
  font-weight: 500;
  color: #26190f;
  letter-spacing: 0.005em;
  line-height: 1.36;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
  white-space: nowrap;
  text-align: center;
  transform: rotate(-11deg);
  transform-origin: center center;
}

#closingLine2,
.closing-page-content.right-page #closingLine2,
.closing-page-content.right-page .closing-quote-line:nth-of-type(1) {
  transform: rotate(-11deg) translateX(-15px) !important;
}

#closingLine4,
.closing-page-content.right-page #closingLine4,
.closing-page-content.right-page .closing-quote-line:nth-of-type(3) {
  transform: rotate(-11deg) translateX(8px) !important;
}

.closing-page-content.right-page .closing-fleuron-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(3px, 0.7cqw, 7px);
  width: 68%;
  margin: clamp(2px, 0.65cqw, 7px) auto 0;
  align-self: center;
  transform: rotate(-11deg);
  transform-origin: center center;
}

.closing-fleuron-bar {
  flex: 1;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, #8a6639 50%, transparent);
  opacity: 0.8;
}

.closing-fleuron-icon {
  font-size: clamp(6px, 1.25cqw, 13px);
  color: #8a6639;
  line-height: 1;
  opacity: 0.9;
}

.closing-magic-line.shimmer-active {
  animation: magicTextGlow 1.2s ease-out forwards;
}

@keyframes magicTextGlow {
  0% {
    text-shadow: 0 0 14px #ffe285, 0 0 28px #f39c12, 0 0 42px #d35400;
  }
  50% {
    text-shadow: 0 0 8px #ffeaa7, 0 0 18px #f1c40f;
  }
  100% {
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
  }
}

/* Footer Socials & Colophon */
.closing-footer {
  width: 100%;
  max-width: 1440px;
  margin: clamp(24px, 3.5vw, 48px) auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  box-sizing: border-box;
  position: relative;
  z-index: 10;
}

.closing-social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 1.2vw, 16px);
  flex-wrap: wrap;
}

.closing-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: 5px;
  overflow: hidden;
  text-decoration: none;
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: 0 3px 8px rgba(156, 6, 8, 0.22);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s ease,
              filter 0.35s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  will-change: transform, box-shadow;
}

/* Specular Sheen Swipe Sweep on Hover */
.closing-social-btn::after {
  content: '';
  position: absolute;
  top: -60%;
  left: -130%;
  width: 65%;
  height: 220%;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(255, 255, 255, 0.55) 50%,
    transparent 100%
  );
  transform: rotate(25deg);
  transition: none;
  pointer-events: none;
  z-index: 2;
}

.closing-social-btn:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 10px 22px rgba(156, 6, 8, 0.36), 0 2px 6px rgba(156, 6, 8, 0.16);
  filter: brightness(1.05);
}

.closing-social-btn:hover::after {
  left: 200%;
  transition: left 0.75s ease-in-out;
}

.closing-social-btn:active {
  transform: translateY(-1px) scale(0.99);
  box-shadow: 0 4px 10px rgba(156, 6, 8, 0.24);
}

.closing-social-img {
  height: clamp(34px, 2.6vw, 38px);
  width: auto;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.closing-copyright {
  margin-top: clamp(20px, 2.2vw, 28px);
  font-family: var(--font-sans);
  font-size: clamp(12.5px, 0.9vw, 13.5px);
  color: #6a6056;
  text-align: center;
  letter-spacing: 0.02em;
}

.closing-heart {
  display: inline-block;
  position: relative;
  margin-left: 3px;
  font-size: 13px;
  line-height: 1;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  outline: none;
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.25s ease;
  will-change: transform, filter, opacity;
}

/* Playful, inviting hover & focus response */
.closing-heart:hover:not(.is-popping):not(.is-disappeared),
.closing-heart:focus-visible:not(.is-popping):not(.is-disappeared) {
  transform: scale(1.3) translateY(-1px);
  filter: drop-shadow(0 0 8px rgba(255, 45, 85, 0.65));
}

.closing-heart:focus-visible {
  outline: 2px solid rgba(156, 6, 8, 0.4);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Subtle glow / pop ring pulse */
.closing-heart.is-popping::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  margin-left: -7px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 45, 85, 0.85) 0%, rgba(255, 100, 130, 0.4) 45%, transparent 70%);
  box-shadow: 0 0 16px rgba(255, 45, 85, 0.7);
  animation: heartGlowRing 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: none;
  z-index: 1;
}

@keyframes heartGlowRing {
  0% {
    transform: scale(0.3);
    opacity: 0.95;
  }
  45% {
    transform: scale(2.6);
    opacity: 0.8;
  }
  100% {
    transform: scale(4.2);
    opacity: 0;
  }
}

/* Noticeable playful scale-up, glowing pop, then smooth scale-down & fade to disappear */
.closing-heart.is-popping {
  pointer-events: none;
  animation: heartPopAndDisappear 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes heartPopAndDisappear {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 rgba(255, 45, 85, 0));
    opacity: 1;
  }
  30% {
    /* Scale up noticeably with soft playful bounce and radiant glow */
    transform: scale(1.72) translateY(-2px);
    filter: drop-shadow(0 0 14px rgba(255, 45, 85, 0.95)) drop-shadow(0 0 24px rgba(255, 110, 140, 0.65));
    opacity: 1;
  }
  52% {
    /* Gentle suspension before shrinking */
    transform: scale(1.42) translateY(-3px);
    filter: drop-shadow(0 0 18px rgba(255, 45, 85, 0.9));
    opacity: 0.95;
  }
  100% {
    /* Smoothly scales down to zero and disappears */
    transform: scale(0) translateY(-6px);
    filter: drop-shadow(0 0 2px rgba(255, 45, 85, 0));
    opacity: 0;
    visibility: hidden;
  }
}

/* Post-pop vanished state: layout box stays in place to strictly prevent ANY text reflow */
.closing-heart.is-disappeared {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  cursor: default !important;
  transform: scale(0) !important;
}

/* Reappearing animation with soft blooming bounce and celestial glow */
.closing-heart.is-reappearing {
  pointer-events: none;
  animation: heartReappear 0.68s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes heartReappear {
  0% {
    transform: scale(0);
    filter: drop-shadow(0 0 16px rgba(255, 215, 0, 0.95)) drop-shadow(0 0 8px rgba(255, 77, 109, 0.85));
    opacity: 0;
    visibility: visible;
  }
  55% {
    /* Soft blooming overshoot */
    transform: scale(1.38) translateY(-2px);
    filter: drop-shadow(0 0 14px rgba(255, 215, 0, 0.9)) drop-shadow(0 0 8px rgba(255, 77, 109, 0.7));
    opacity: 1;
  }
  78% {
    transform: scale(0.92) translateY(0);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 rgba(255, 77, 109, 0));
    opacity: 1;
    visibility: visible;
  }
}

/* Micro sparkle motes radiating outward on pop */
.closing-heart-sparkle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--size, 4px);
  height: var(--size, 4px);
  margin-top: calc(var(--size, 4px) * -0.5);
  margin-left: calc(var(--size, 4px) * -0.5);
  background-color: var(--col, #ff4d6d);
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  box-shadow: 0 0 6px var(--col, #ff4d6d);
  animation: heartSparkleBurst 0.6s cubic-bezier(0.16, 1, 0.3, 1) var(--delay, 0s) forwards;
}

@keyframes heartSparkleBurst {
  0% {
    transform: translate(0, 0) scale(0);
    opacity: 1;
  }
  40% {
    transform: translate(calc(var(--tx) * 0.6), calc(var(--ty) * 0.6)) scale(1.35);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) scale(0);
    opacity: 0;
  }
}

/* Sparkles bursting when heart reappears */
.closing-heart-sparkle.sparkle-reappear {
  box-shadow: 0 0 8px var(--col, #ffd700), 0 0 14px rgba(255, 215, 0, 0.6);
  animation: heartSparkleReappear 0.7s cubic-bezier(0.16, 1, 0.3, 1) var(--delay, 0s) forwards;
}

@keyframes heartSparkleReappear {
  0% {
    transform: translate(0, 0) scale(0);
    opacity: 0;
  }
  25% {
    opacity: 1;
    transform: translate(calc(var(--tx) * 0.45), calc(var(--ty) * 0.45)) scale(1.45);
  }
  100% {
    transform: translate(var(--tx), var(--ty)) scale(0);
    opacity: 0;
  }
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .closing-heart {
    transition: none !important;
  }
  .closing-heart:hover,
  .closing-heart:focus-visible {
    transform: none !important;
    filter: none !important;
  }
  .closing-heart.is-popping {
    animation: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
  }
  .closing-heart.is-reappearing {
    animation: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }
  .closing-heart.is-popping::after,
  .closing-heart-sparkle {
    display: none !important;
  }
}

/* Responsive adjustments */
@media (max-width: 820px) {
  .closing-flank-line {
    flex: 0 1 40px;
  }
  .closing-social-links {
    gap: 8px;
  }
  .closing-social-img {
    height: 33px;
  }
}

@media (max-width: 600px) {
  .closing-flank-line {
    display: none;
  }
  .closing-header {
    top: 18%;
  }
  .closing-book-wrap {
    top: 36%;
    width: 88%;
  }
  .closing-social-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
    max-width: 280px;
    gap: 12px;
    margin: 0 auto;
    justify-items: center;
  }
  .closing-social-btn {
    justify-self: center;
  }
  .closing-social-img {
    height: 32px;
    width: auto;
  }
}



