/* ==========================================================================
   DASHA MAKARUK — PHOTOGRAPHY & VISUAL ART
   Palette & Design Tokens (Clean, Minimal, Photo-Focused)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,400&family=Montserrat:wght@800;900&family=Caveat:wght@600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600&display=swap');

:root {
  /* Core Colors */
  --color-burgundy: #8B201E;         /* Акцентний бордовий з напису ПРАЙС */
  --color-burgundy-deep: #5A1211;    /* Глибокий кармін */
  --color-burgundy-glow: rgba(139, 32, 30, 0.16);
  
  --color-bg: #EAE6DF;               /* Теплий вишуканий алебастр / крем */
  --color-bg-card: #F3EFE9;          /* Картки у стилі референсу 2 */
  --color-bg-card-alt: #E3DDD4;
  --color-text-main: #1C1A17;        /* Глибокий графіт */
  --color-text-muted: #6B655E;       /* Приглушений текст */
  --color-border: #D5CEBF;           /* Тонкі рамки */
  --color-border-card: #201D1A;      /* Чорні тонкі контури карток */

  /* Typography */
  --font-wide: 'Montserrat', sans-serif;
  --font-script: 'Caveat', cursive;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', system-ui, sans-serif;

  /* Transitions */
  --radius-sm: 4px;
  --radius-card: 16px;
  --radius-pill: 999px;
  --ease-cinematic: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--color-bg);
  color: var(--color-text-main);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--color-bg);
  color: var(--color-text-main);
}

/* Grain overlay */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Custom Interactive Cursor (Desktop) */
.custom-cursor-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  background-color: var(--color-burgundy);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease-out;
}

.custom-cursor-follower {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-burgundy);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.18s var(--ease-cinematic), width 0.25s ease, height 0.25s ease, background-color 0.25s ease;
}

body.cursor-hover .custom-cursor-follower {
  width: 58px;
  height: 58px;
  background-color: rgba(139, 32, 30, 0.12);
}

@media (pointer: coarse) {
  .custom-cursor-dot, .custom-cursor-follower {
    display: none !important;
  }
}

/* Container */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 3rem;
  }
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(234, 230, 223, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 1.1;
}

.brand-sub {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--color-text-muted);
  margin-top: 2px;
}

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

.nav-link {
  text-decoration: none;
  color: var(--color-text-main);
  font-size: 0.88rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  position: relative;
  padding: 6px 0;
  transition: color 0.25s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--color-burgundy);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1.5px;
  background-color: var(--color-burgundy);
  transition: width 0.3s var(--ease-cinematic);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.social-icon-btn {
  color: var(--color-text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  transition: all 0.25s ease;
  text-decoration: none;
}

.social-icon-btn:hover {
  background-color: var(--color-burgundy);
  color: #FFFFFF;
  border-color: var(--color-burgundy);
  transform: translateY(-2px);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-main);
  padding: 8px;
  position: relative;
  z-index: 1002;
  transition: color 0.25s ease;
}

.burger-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 24px;
  height: 24px;
}

.burger-icon-wrap .icon-close {
  display: none;
}

.mobile-menu-btn.open .icon-burger {
  display: none;
}

.mobile-menu-btn.open .icon-close {
  display: block;
}

@media (max-width: 860px) {
  .mobile-menu-btn {
    display: flex;
  }

  .nav-links {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--color-bg);
    z-index: 1001; /* Covers header completely */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.2rem;
    padding: 2.5rem 1.5rem;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.96);
    transition: opacity 0.3s var(--ease-cinematic), transform 0.3s var(--ease-cinematic), visibility 0.3s;
  }
  
  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
    pointer-events: auto;
  }

  .nav-link {
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 8vw, 3.4rem);
    letter-spacing: 0.05em;
    font-weight: 400;
    text-transform: uppercase;
    color: var(--color-text-main);
    padding: 0.4rem 0.5rem;
    position: relative;
    display: inline-block;
    transition: color 0.25s ease, transform 0.25s ease;
  }

  .nav-link:hover, .nav-link.active {
    color: var(--color-burgundy);
    transform: none;
  }

  .nav-link::after {
    display: block;
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-burgundy);
    transition: width 0.3s var(--ease-cinematic);
  }

  .nav-link:hover::after, .nav-link.active::after {
    width: 100%;
  }
}

/* ==========================================================================
   MINIMAL PHOTO-FOCUSED HERO (No long text)
   ========================================================================== */
.hero-minimal {
  position: relative;
  padding: 3.5rem 0 2rem;
  text-align: center;
}

.hero-title-main {
  font-family: var(--font-wide);
  font-size: clamp(2.8rem, 7.5vw, 5.5rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--color-burgundy);
  text-transform: uppercase;
}

.hero-title-script {
  font-family: var(--font-script);
  font-size: clamp(2.6rem, 6.5vw, 4.8rem);
  color: var(--color-burgundy);
  line-height: 1;
  font-weight: 700;
  transform: rotate(-2.5deg);
  display: inline-block;
  margin-top: -0.2rem;
}

/* ==========================================================================
   VIEW SWITCHER (Grid vs Names List)
   ========================================================================== */
.view-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.view-heading {
  font-family: var(--font-wide);
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 900;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.view-heading-year {
  font-family: var(--font-script);
  font-size: 1.95rem;
  font-weight: 700;
  color: var(--color-burgundy);
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  transform: rotate(-2deg);
}

.view-toggle-group {
  display: inline-flex;
  background-color: var(--color-bg-card-alt);
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
}

.view-toggle-btn {
  border: none;
  background: none;
  padding: 0.45rem 1.1rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.25s ease;
}

.view-toggle-btn.active {
  background-color: var(--color-burgundy);
  color: #FFFFFF;
}

/* ==========================================================================
   PHOTO GRID (Photo First, minimal single-line name)
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 2.5rem 2rem;
}

@media (min-width: 640px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.photo-card {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  position: relative;
  background-color: var(--color-bg-card);
  border: 1px solid var(--color-border-card);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  transition: transform 0.4s var(--ease-cinematic), box-shadow 0.4s var(--ease-cinematic);
}

.photo-card:hover {
  transform: none;
  box-shadow: 0 16px 36px rgba(0,0,0,0.1);
}

.photo-card-media {
  position: relative;
  aspect-ratio: 4/5;
  background-color: #D3CDC2;
  overflow: hidden;
}

.photo-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-cinematic);
}

.photo-card:hover .photo-card-media img {
  transform: scale(1.05);
}

.photo-card-info {
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.photo-card-name {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.photo-card-arrow {
  font-size: 1rem;
  color: var(--color-burgundy);
  transition: transform 0.25s ease;
}

.photo-card:hover .photo-card-arrow {
  transform: translateX(4px);
}

/* Video grid inside portfolio tab */
.gallery-videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 360px));
  justify-content: center;
  gap: 2.5rem;
}

.video-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-card);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.06);
}

.video-card-inner {
  aspect-ratio: 9/16;
  background: #1c1a17;
  position: relative;
  overflow: hidden;
}

.video-card-inner video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Certificate page video showcase & hero card */
.cert-hero-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 3rem;
  align-items: center;
  margin-bottom: 4.5rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-card);
  border-radius: var(--radius-card);
  padding: clamp(1.5rem, 4vw, 3rem);
  box-shadow: 0 16px 40px rgba(0,0,0,0.06);
}

.cert-video-showcase {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  aspect-ratio: 9/16;
  max-height: 580px;
  margin: 0 auto;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  background: #1a1816;
}

/* Mobile responsive adjustments: crop height slightly & expand width to minimize side margins */
@media (max-width: 640px) {
  .cert-hero-card {
    padding: 1rem 0.75rem;
    gap: 1.8rem;
  }

  .cert-video-showcase {
    aspect-ratio: 4/5.5; /* трішки обрізано по висоті, розтягнуто по ширині */
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
  }

  .gallery-videos-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .video-card-inner {
    aspect-ratio: 4/5.5;
  }
}

/* Ensure video respects aspect ratio in fullscreen without stretching */
.video-card-inner video:fullscreen {
  object-fit: contain !important;
  background-color: #000000;
}

.video-card-inner video:-webkit-full-screen {
  object-fit: contain !important;
  background-color: #000000;
}

.video-cover-overlay {
  position: absolute;
  inset: 0;
  cursor: pointer;
  z-index: 5;
  transition: opacity 0.3s ease;
}

.video-cover-overlay img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-burgundy);
  border: 2px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: transform 0.3s var(--ease-cinematic), background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.3s ease;
}

.video-cover-overlay:hover .video-play-btn,
.video-play-btn:hover {
  transform: translate(-50%, -50%) scale(1.12);
  background: #FFFFFF !important;
  color: var(--color-burgundy) !important;
  border-color: #FFFFFF !important;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.55);
}

.video-play-btn svg {
  margin-left: 3px; /* visual center for play triangle */
  transition: transform 0.25s ease;
}

.video-cover-overlay:hover .video-play-btn svg,
.video-play-btn:hover svg {
  transform: scale(1.08);
}

/* ==========================================================================
   LIST VIEW (Names List with Hover Preview)
   ========================================================================== */
.gallery-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--color-border);
}

.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.8rem 1rem;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
  color: inherit;
  transition: background-color 0.2s ease, padding-left 0.25s ease;
  cursor: pointer;
}

.list-item:hover {
  background-color: rgba(139, 32, 30, 0.04);
  padding-left: 1.5rem;
}

.list-left {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
}

.list-index {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.list-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.list-item:hover .list-title {
  color: var(--color-burgundy);
}

.list-action {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

.list-category-group {
  margin-bottom: 2.5rem;
}

.list-category-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0.5rem;
  border-bottom: 1.5px solid var(--color-burgundy);
  margin-top: 1.5rem;
}

.list-category-tag {
  font-family: var(--font-wide);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-burgundy);
  font-weight: 800;
}

.list-category-title {
  font-family: var(--font-wide);
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-main);
}

.list-category-count {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.list-badge {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-burgundy);
  background: var(--color-burgundy-glow);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  margin-left: 0.5rem;
}

.photo-card-category {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-muted);
  font-weight: 600;
}

/* ==========================================================================
   PHOTO VIEWER MODAL
   ========================================================================== */
.photo-viewer-modal {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background-color: #FFFFFF;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, background-color 0.3s ease;
}

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

/* Light / Dark Mode in Viewer */
.photo-viewer-modal.theme-light {
  background-color: #FFFFFF;
  color: #111111;
}

.photo-viewer-modal.theme-dark {
  background-color: #121110;
  color: #F5F3EF;
}

.viewer-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.viewer-icon-btn {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.12);
  color: inherit;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.photo-viewer-modal.theme-dark .viewer-icon-btn {
  border-color: rgba(255, 255, 255, 0.2);
}

.viewer-icon-btn:hover {
  background-color: var(--color-burgundy);
  border-color: var(--color-burgundy);
  color: #FFFFFF;
  transform: scale(1.05);
}

.viewer-theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-viewer-modal.theme-light .icon-moon {
  display: block;
}
.photo-viewer-modal.theme-light .icon-sun {
  display: none;
}
.photo-viewer-modal.theme-dark .icon-moon {
  display: none;
}
.photo-viewer-modal.theme-dark .icon-sun {
  display: block;
}

/* Hide grain overlay when viewer is open for a completely clean pure background */
body.viewer-open .grain-overlay {
  display: none !important;
}

.viewer-body {
  position: relative;
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 1rem 0;
}

.viewer-image {
  max-width: 92vw;
  max-height: 76vh;
  object-fit: contain;
  user-select: none;
  box-shadow: none;
  border-radius: 2px;
  transition: opacity 0.25s ease;
}

.photo-viewer-modal.theme-dark .viewer-image {
  box-shadow: none;
}

.viewer-footer {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding-bottom: 0.5rem;
}

.viewer-download-bar {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.photo-viewer-modal.theme-dark .viewer-download-bar {
  background: rgba(30, 28, 26, 0.88);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.viewer-file-size {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

.photo-viewer-modal.theme-dark .viewer-file-size {
  color: #C5C0B7;
}

.viewer-btn-download {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #FFFFFF;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-pill);
  background-color: var(--color-burgundy);
  transition: all 0.25s var(--ease-cinematic);
}

.viewer-btn-download:hover {
  background-color: var(--color-burgundy-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(139, 32, 30, 0.35);
}

/* Floating Hover Preview Card (Trend 2027) */
.floating-preview {
  position: fixed;
  width: 260px;
  height: 330px;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 24px 50px rgba(0,0,0,0.28);
  border: 1px solid var(--color-border-card);
  pointer-events: none;
  z-index: 999;
  transform: translate(-50%, -50%) scale(0.85);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s var(--ease-cinematic);
}

.floating-preview.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.floating-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================================
   PROJECT FULL PAGE VIEW (When clicked on a photo)
   ========================================================================== */
.project-header {
  padding: 3rem 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--color-text-main);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transition: color 0.2s ease, transform 0.2s ease;
}

.back-link:hover {
  color: var(--color-burgundy);
  transform: translateX(-4px);
}

.project-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 400;
}

.project-photos-flow {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.project-photo-item {
  width: 100%;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--color-border-card);
  box-shadow: 0 16px 36px rgba(0,0,0,0.08);
  background-color: var(--color-bg-card);
}

.project-photo-item img {
  width: 100%;
  height: auto;
  display: block;
}

.project-photo-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.4rem;
  background-color: var(--color-bg-card);
  border-top: 1px solid rgba(0,0,0,0.06);
}

.photo-file-size {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-burgundy);
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-burgundy);
  background-color: transparent;
  transition: all 0.25s var(--ease-cinematic);
}

.btn-download:hover {
  background-color: var(--color-burgundy);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(139, 32, 30, 0.2);
}

.btn-download svg {
  flex-shrink: 0;
}

/* ==========================================================================
   PROCESS / BEFORE & AFTER PAGE (Interactive Split Slider)
   ========================================================================== */
.process-section {
  padding: 4rem 1rem 6rem;
}

.ba-container {
  position: relative;
  width: calc(100% - 2.5rem);
  max-width: 900px;
  margin: 2.5rem auto 4rem;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1.5px solid var(--color-border-card);
  box-shadow: 0 20px 45px rgba(0,0,0,0.12);
  user-select: none;
}

@media (max-width: 640px) {
  .ba-container {
    width: calc(100% - 1.5rem);
  }
}

.ba-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  overflow: hidden;
}

.ba-image-after {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.ba-image-before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  overflow: hidden;
  clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}

.ba-image-after img, .ba-image-before img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Before is raw unretouched */
.ba-image-before img {
  filter: saturate(0.65) contrast(0.85) brightness(1.05);
}

.ba-badge {
  position: absolute;
  bottom: 1.5rem;
  padding: 0.45rem 1.1rem;
  background: rgba(20, 18, 16, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFFFFF;
  font-family: var(--font-wide);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  pointer-events: none;
}

.ba-badge-before {
  left: 1.5rem;
}

.ba-badge-after {
  right: 1.5rem;
  background: var(--color-burgundy);
}

.ba-slider-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: #FFFFFF;
  box-shadow: 0 0 12px rgba(0,0,0,0.5);
  cursor: ew-resize;
  z-index: 10;
  transform: translateX(-50%);
}

.ba-slider-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid var(--color-burgundy);
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-burgundy);
}

/* ==========================================================================
   PRICING & FOOTER
   ========================================================================== */
.pricing-section {
  padding: 4rem 1.25rem 6rem;
}

.price-cards-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 2rem;
  padding: 0 0.5rem;
}

@media (min-width: 768px) {
  .price-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .price-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.price-card {
  position: relative;
  background-color: var(--color-bg-card);
  border: 1.5px solid #201D1A;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
}

.price-card.burgundy-theme {
  background-color: var(--color-burgundy);
  color: #FFFFFF;
  border-color: #5A1211;
}

.price-card.burgundy-theme .story-header {
  border-bottom-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.8);
}

.price-card.burgundy-theme .price-included-item {
  color: rgba(255, 255, 255, 0.9);
}

.price-card.burgundy-theme .price-val {
  color: #FFFFFF;
}

.price-card.burgundy-theme .price-card-title-wide,
.price-card.burgundy-theme .price-card-title-script {
  color: #FFFFFF;
}

.price-card-inner {
  padding: 1.8rem 1.6rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.price-card-title-wrap {
  margin-bottom: 1.25rem;
}

.price-card-title-wide {
  font-family: var(--font-wide);
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--color-burgundy);
}

.price-card-title-script {
  font-family: var(--font-script);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-burgundy);
  display: block;
}

.price-card-thumb {
  width: 100%;
  height: 190px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1.4rem;
}

.price-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.price-included-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.82rem;
  line-height: 1.4;
  margin: 1rem 0 2rem;
  flex-grow: 1;
}

.price-included-item {
  position: relative;
  padding-left: 1.2rem;
  color: var(--color-text-muted);
}

.price-included-item::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--color-burgundy);
}

.price-card.burgundy-theme .price-included-item::before {
  color: #FFFFFF;
}

.price-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.price-card.burgundy-theme .price-footer {
  border-top-color: rgba(255, 255, 255, 0.15);
}

.price-amount {
  display: flex;
  flex-direction: column;
}

.price-label {
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.7;
}

.price-val {
  font-family: var(--font-wide);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--color-burgundy);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1.8rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  text-decoration: none;
  border-radius: var(--radius-pill);
  transition: all 0.3s var(--ease-cinematic);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background-color: var(--color-burgundy);
  color: #FFFFFF;
}

.btn-primary:hover {
  background-color: var(--color-burgundy-deep);
  transform: translateY(-2px);
}

.btn-outline {
  border-color: currentColor;
  color: inherit;
  background-color: transparent;
}

.btn-outline:hover {
  background-color: var(--color-burgundy);
  border-color: var(--color-burgundy);
  color: #FFFFFF;
}

/* Certificate Order Button */
.btn-cert-order {
  background: #FFFFFF;
  color: var(--color-burgundy);
  font-weight: 700;
  padding: 1rem 2.8rem;
  display: inline-block;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border: 2px solid #FFFFFF;
  transition: all 0.3s var(--ease-cinematic);
}

.btn-cert-order:hover {
  background: var(--color-burgundy-deep);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.9);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
}

/* Footer */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 3.5rem 0 2rem;
  margin-top: 5rem;
  background-color: var(--color-bg-card);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-instagram-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--color-text-main);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  transition: all 0.25s var(--ease-cinematic);
}

.footer-instagram-link:hover {
  background-color: var(--color-burgundy);
  color: #FFFFFF;
  border-color: var(--color-burgundy);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(139, 32, 30, 0.2);
}

.footer-instagram-link svg {
  flex-shrink: 0;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.footer-copy {
  letter-spacing: 0.01em;
}

.footer-craft {
  letter-spacing: 0.01em;
}

@media (max-width: 640px) {
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }
}

