/* Devin Sparkles Design — Editorial, refined (inspired by Jeremiah Brent) */

@font-face {
  font-family: "Beyond Infinity";
  src: url("fonts/beyond_infinity-webfont.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Warm paper tone; pairs with .sketch-bg texture */
  --bg: #f1ede6;
  --bg-warm: #ebe4db;
  --ink: #1a1a1a;
  --ink-muted: #5c5c5c;
  --ink-soft: #8a8a8a;
  --pink: var(--ink);
  --pink-soft: #3d3d3d;
  --border: rgba(26, 26, 26, 0.12);
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  /* Flowing script — local woff2; generic cursive if unavailable */
  --section-label-ff: "Beyond Infinity", cursive;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(1rem, 1.5vw, 1.0625rem);
  line-height: 1.65;
  color: var(--ink-muted);
  background: var(--bg);
  overflow-x: hidden;
}

/* Subtle full-page texture (warm paper/linen — no photo) */
.sketch-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-color: var(--bg);
  /* Soft ambient depth + very fine film grain (SVG) + hairline mesh */
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='0.05'/%3E%3C/svg%3E"),
    linear-gradient(168deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0) 45%),
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.007) 0px,
      rgba(0, 0, 0, 0.007) 1px,
      transparent 1px,
      transparent 2px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.006) 0px,
      rgba(0, 0, 0, 0.006) 1px,
      transparent 1px,
      transparent 2px
    );
  background-size: 120px 120px, 100% 100%, 100% 2px, 2px 100%;
  pointer-events: none;
}

.sketch-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.12) 0%,
    transparent 35%,
    rgba(0, 0, 0, 0.02) 100%
  );
  pointer-events: none;
}

/* Header — centered nav with logo between links (editorial, Van Renen–style) */
.site-header {
  /* 0 = page top, 1 = past shrink range; drives centered logo + optional bar logo size */
  --header-scroll: 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.5rem 1.25rem;
  min-height: calc(4.5rem + (1 - var(--header-scroll)) * 1.1rem);
  background: transparent;
}

.logo {
  text-decoration: none;
  line-height: 0;
  flex-shrink: 0;
}

.logo__img {
  display: block;
  width: min(200px, 40vw);
  max-height: 72px;
  height: auto;
  object-fit: contain;
}

/* Center logo: large at top, shrinks with scroll (see --header-scroll, set in script.js) */
.logo--inline .logo__img {
  width: min(calc(360px - 160px * var(--header-scroll)), 52vw);
  max-height: min(calc(124px - 52px * var(--header-scroll)), 28vh);
}

/* Desktop: bar logo hidden; center logo in nav row */
.logo--bar {
  display: none;
}

/* Shared link styling (default: readable on light pages / below the fold) */
.nav__start a,
.nav__end a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.3s, text-shadow 0.3s;
}

.nav__start a:hover,
.nav__end a:hover {
  color: var(--pink);
}

/* Home: white header type over any section (stays on scroll) */
body.page-home .site-header .nav__start a,
body.page-home .site-header .nav__end a {
  color: #fff;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.5),
    0 2px 8px rgba(0, 0, 0, 0.35),
    0 4px 24px rgba(0, 0, 0, 0.2);
}

body.page-home .site-header .nav__start a:hover,
body.page-home .site-header .nav__end a:hover {
  color: rgba(255, 255, 255, 0.92);
}

.header-nav {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 380px) 1fr;
  align-items: center;
  width: 100%;
  max-width: 1000px;
  gap: 0.75rem 1.25rem;
}

.nav__start,
.nav__end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 0.5rem;
}

.nav__start {
  justify-content: flex-end;
  justify-self: end;
  margin-right: 0.5rem;
  gap: 1.5rem 2.25rem;
}

.nav__end {
  justify-content: flex-start;
  justify-self: start;
  margin-left: 0.5rem;
  gap: 1.5rem 2.25rem;
}

.logo--inline {
  display: block;
  justify-self: center;
  margin: 0 auto;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  position: fixed;
  top: 1.1rem;
  right: 1.25rem;
  z-index: 120;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  width: 24px;
  height: 1.5px;
  background: var(--ink);
  transition: background 0.3s, box-shadow 0.3s;
}

body.page-home .site-header .menu-toggle span {
  background: #fff;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.2);
}

/* Logo: visible on both hero and page body while scrolling */
body.page-home .site-header .logo__img {
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
  transition: filter 0.3s;
}

@media (max-width: 768px) {
  body.nav-drawer-open {
    overflow: hidden;
  }

  .site-header {
    justify-content: space-between;
    min-height: calc(3.5rem + (1 - var(--header-scroll)) * 0.5rem);
    padding: 0.75rem 1rem 0.75rem 0.5rem;
  }

  .logo--bar {
    display: block;
  }

  .logo--bar .logo__img {
    width: min(calc(220px - 60px * var(--header-scroll)), 48vw);
    max-height: min(calc(72px - 16px * var(--header-scroll)), 16vh);
  }

  .header-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(300px, 88vw);
    max-width: 100%;
    z-index: 110;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
    padding: 2.5rem 1.5rem 2rem;
    margin: 0 0 0 auto;
    background: var(--bg);
    border-left: 1px solid var(--border);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
    transform: translateX(100%);
    transition: transform 0.4s var(--ease-out);
  }

  .header-nav.open {
    transform: translateX(0);
  }

  /* Side drawer uses paper background — not white-on-hero rules */
  body.page-home .header-nav.open .nav__start a,
  body.page-home .header-nav.open .nav__end a {
    color: var(--ink-muted) !important;
    text-shadow: none !important;
  }

  body.page-home .header-nav.open .nav__start a:hover,
  body.page-home .header-nav.open .nav__end a:hover {
    color: var(--pink) !important;
  }

  .nav__start,
  .nav__end {
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: 200px;
    text-align: center;
    margin: 0 0 1.25rem;
  }

  .nav__end {
    margin-bottom: 0;
  }

  .nav__start a,
  .nav__end a {
    padding: 0.35rem 0;
  }

  .logo--inline {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }
}

/* Sections */
section {
  position: relative;
  z-index: 1;
  padding: clamp(5rem, 12vw, 9rem) 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--section-label-ff);
  font-size: clamp(2.25rem, 10vw, 84px);
  font-weight: 400;
  font-style: normal;
  line-height: 1.1;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--pink);
  margin: 0 0 2.5rem;
}

/* Hero — full-bleed rotating background (inspired by editorial hero slideshows) */
section.hero {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 5rem 1.25rem 0;
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  z-index: 0;
  pointer-events: none;
}

.hero-bg__layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.4s var(--ease-in-out);
  will-change: opacity;
}

.hero-bg__layer.is-active {
  opacity: 1;
}

/* Light touch only: keep photos bright; slight darkening at bottom for type */
.hero-bg__veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0) 45%,
    rgba(0, 0, 0, 0.14) 85%,
    rgba(0, 0, 0, 0.22) 100%
  );
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 52rem;
}

.hero-tagline {
  font-family: var(--section-label-ff);
  font-size: clamp(2rem, 5.5vw, 3.35rem); 
  font-style: normal;
  font-weight: 400;
  color: #fff;
  margin: 0 0 0.75rem;
  letter-spacing: 0.03em;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.35),
    0 4px 28px rgba(0, 0, 0, 0.25);
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.2s forwards;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(2.75rem, 10vw, 5.5rem);
  font-weight: 500;
  line-height: 1.08;
  color: var(--ink);
  margin: 0 0 1.25rem;
  letter-spacing: -0.02em;
  text-shadow:
    0 0 1px rgba(255, 255, 255, 0.4),
    0 2px 24px rgba(0, 0, 0, 0.18);
}

.hero-title .line {
  display: block;
  opacity: 0;
  animation: fadeUp 0.9s var(--ease-out) forwards;
}

.hero-title .line:nth-child(1) { animation-delay: 0.3s; }
.hero-title .line:nth-child(2) { animation-delay: 0.45s; }

.hero-sub {
  font-size: clamp(0.8rem, 1.2vw, 0.9rem);
  color: #fff;
  margin: 0 0 0.5rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.45),
    0 4px 20px rgba(0, 0, 0, 0.28);
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.6s forwards;
}

.hero-theaters {
  font-size: clamp(0.7rem, 1.1vw, 0.8rem);
  color: #fff;
  margin: 0 0 2.5rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.45),
    0 4px 20px rgba(0, 0, 0, 0.28);
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.75s forwards;
}

.cta-primary {
  display: inline-block;
  padding: 1rem 2rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--ink);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.3s, color 0.3s, opacity 0.3s;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 0.9s forwards;
}

.cta-primary:hover {
  background: var(--ink-muted);
  color: var(--bg);
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 1.2s forwards;
}

.scroll-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9), transparent);
  opacity: 0.7;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* About */
.about {
  padding-top: 5rem;
  padding-inline: clamp(1.25rem, 5vw, 2.75rem);
  background: var(--bg-warm);
}

.about > .section-label {
  text-align: center;
  width: 100%;
  display: block;
}

.about-layout {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(2rem, 4vw, 3.5rem);
  flex-wrap: wrap;
  max-width: 72rem;
  margin-inline: auto;
}

.about-photo {
  flex: 0 1 auto;
  /* Cap width on ultrawide: half the viewport grows without bound at 50vw */
  width: min(100%, clamp(280px, 34vw, 440px));
  max-width: 440px;
}

.about-photo img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.about-inner {
  flex: 1 1 20rem;
  min-width: min(100%, 18rem);
  max-width: 42rem;
}

.about-inner p {
  margin: 0 0 1.35rem;
  color: var(--ink-muted);
  text-align: center;
}

.about-intro {
  font-size: 1.1rem;
  color: var(--ink);
}

.about-close {
  font-style: italic;
  color: var(--ink);
}

.about-close em {
  font-style: italic;
  color: var(--pink);
}

.about-cta {
  margin-top: 1.5rem !important;
  color: var(--ink);
}

@media (max-width: 640px) {
  .about-layout {
    flex-direction: column;
    gap: 2rem;
  }

  .about-photo {
    width: min(100%, 320px);
    max-width: 100%;
    margin: 0 auto;
  }

  .about-inner {
    max-width: 100%;
    min-width: 0;
  }

  .about-inner p {    
    font-size: 1.0625rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
  }

  .about-intro {
    font-size: 1.125rem;
    line-height: 1.75;
  }
}

/* Testimonials */
.testimonials {
  padding: 6rem 0;
  overflow: hidden;
}

.testimonials .section-label {
  text-align: center;
  width: 100%;
  margin-bottom: 2.5rem;
}

.testimonials-track {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 2rem;
  animation: scroll-testimonials 40s linear infinite;
  width: max-content;
}

.testimonials-track:hover {
  animation-play-state: paused;
}

.testimonial {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
  width: min(420px, 88vw);
  padding: 1.5rem 1.75rem;
  margin: 0;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(26, 26, 26, 0.06);
}

.testimonial-headshot {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.testimonial-content {
  min-width: 0;
}

.testimonial cite {
  display: block;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--pink);
  margin-bottom: 0.5rem;
}

.testimonial p {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--ink);
  margin: 0;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .testimonial {
    display: block;
    width: min(380px, 92vw);
    padding: 1.25rem;
  }

  .testimonial-headshot {
    float: left;
    margin-right: 1rem;
    margin-bottom: 0.5rem;
  }

  .testimonial-content {
    overflow: hidden;
  }
}

@keyframes scroll-testimonials {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Media / press */
.media {
  padding: 5rem 1.5rem 5.5rem;
  max-width: 72rem;
  margin: 0 auto;
}

.media .section-label {
  text-align: center;
  width: 100%;
  margin-bottom: 0.75rem;
}

.media-intro {
  text-align: center;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink-muted);
  max-width: 36rem;
  margin: 0 auto 2.25rem;
  line-height: 1.55;
}

.media-list {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

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

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

.media-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.35rem 1.5rem;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(26, 26, 26, 0.055);
}

.media-card__source {
  font-family: var(--sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pink);
  margin-bottom: 0.5rem;
}

.media-card__title {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.65rem;
  line-height: 1.35;
}

.media-card__summary {
  font-family: var(--sans);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-muted);
  margin: 0 0 1rem;
  flex: 1;
}

.media-card__link {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gold-dark, #8a6a2a);
  text-decoration: none;
  align-self: flex-start;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

.media-card__link:hover {
  color: var(--pink);
}

/* Portfolio */
.portfolio {
  padding: 3rem 2rem 6rem 2.5rem;
  background: var(--bg);
}

.portfolio .section-label {
  text-align: center;
  width: 100%;
}

.portfolio-compare-hint {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 1.5rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.filter {
  padding: 0.5rem 1rem;
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: transparent;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}

.filter:hover,
.filter.active {
  color: var(--pink);
  border-color: var(--pink);
  background: transparent;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: opacity 0.3s var(--ease-out);
}

.portfolio-item--comparison {
  cursor: default;
  overflow: visible;
}

.portfolio-item.hidden {
  display: none;
}

.portfolio-image {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-warm);
}

.portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out);
}

.portfolio-item:hover .portfolio-image img {
  transform: scale(1.04);
}

.portfolio-caption {
  padding: 1.25rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.portfolio-caption span {
  font-size: 0.9rem;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.portfolio-caption em {
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 400;
  color: var(--pink);
  letter-spacing: 0.02em;
}

/* Contact */
.contact {
  text-align: center;
  padding: 6rem 2rem;
  background: var(--bg-warm);
}

.contact-tagline {
  font-family: var(--section-label-ff);
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-style: normal;
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 2rem;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}

.contact-link {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pink);
  text-decoration: none;
  transition: color 0.25s, opacity 0.25s;
}

.contact-link:hover {
  color: var(--pink-soft);
}

.contact-link--instagram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  line-height: 0;
  vertical-align: middle;
}

.contact-link__ig-icon {
  width: 2.25rem;
  height: 2.25rem;
  display: block;
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  padding: 2rem 2rem 2.5rem;
  text-align: center;
  border-top: 1px solid var(--border);
}

.site-footer p {
  margin: 0;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(26, 26, 26, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--bg);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s, opacity 0.2s;
}

.lightbox-close:hover {
  opacity: 0.8;
}

.lightbox-content {
  max-width: 900px;
  width: 100%;
}

.lightbox-content img {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
}

.lightbox-caption {
  margin: 1rem 0 0;
  color: rgba(250, 249, 247, 0.85);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

/* Scroll-triggered fade-in */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Comparison slider (before & after, embedded in portfolio grid) */
.comparison-slider {
  margin: 0;
}

.comparison-slider__inner {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: 6px;
  background: var(--bg-warm);
  user-select: none;
  touch-action: none;
}

.comparison-slider__before,
.comparison-slider__after {
  position: absolute;
  inset: 0;
}

.comparison-slider__before img,
.comparison-slider__after img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.comparison-slider__after {
  /* Show left --reveal% as "after"; rest shows "before" underneath */
  clip-path: inset(0 calc(100% - var(--reveal, 10) * 1%) 0 0);
}

.comparison-slider__after img {
  position: absolute;
  inset: 0;
}

.comparison-slider__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--reveal, 10) * 1%);
  width: 4px;
  margin-left: -2px;
  cursor: ew-resize;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.comparison-slider__handle-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
  border-radius: 1px;
}

.comparison-slider__handle-grip {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid rgba(0, 0, 0, 0.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
  z-index: 1;
}

.comparison-slider__handle:focus {
  outline: none;
}

.comparison-slider__handle:focus-visible .comparison-slider__handle-grip {
  box-shadow: 0 0 0 3px var(--pink);
}

.comparison-slider__caption {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}

.comparison-slider__hint {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.comparison-slider__inner.hint-hidden .comparison-slider__hint {
  opacity: 0;
  visibility: hidden;
}
