/* ============================================================
   LA MER — THOUGHT ONE
   Foundation CSS — Pure layout, no animation library
   ============================================================ */

/* ── Custom Properties ── */
:root {
  --bg-nuit:    #000000;
  --bg-encre:   #000000;
  --bg-loader:  #000000;

  --text-light: #f0ece4;
  --text-dark:  #1a1a1a;
  --text-muted: rgba(240, 236, 228, 0.5);

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'DM Sans', Helvetica, sans-serif;

  --section-pad: clamp(80px, 15vh, 160px);
}

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

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  background-color: var(--bg-nuit);
}

body.intro-active {
  overflow: hidden;
}

a, a:focus, a:active, a:focus-visible,
button, button:focus, button:active, button:focus-visible {
  outline: none;
  -moz-outline: none;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}

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

video {
  display: block;
}

figure {
  margin: 0;
  padding: 0;
}

p {
  margin: 0;
}

h1, h2, h3 {
  margin: 0;
}

/* ── Page Transition Overlay ── */
#page-transition {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9999;
  clip-path: circle(0% at 50% 50%);
  pointer-events: none;
  will-change: clip-path;
}

/* ── Custom Cursor ── */
.custom-cursor {
  position: fixed;
  top: -100px;
  left: -100px;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  scale: 1.5;
}

.custom-cursor svg {
  transform: scaleY(-1);
}

@media (hover: none) {
  .custom-cursor {
    display: none;
  }
}

@media (hover: hover) {
  * {
    cursor: none;
  }
}

/* ── Intro Overlay ── */
.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--bg-loader);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
}

.intro-overlay.intro-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.intro-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  padding: 2rem 1.5rem;
  max-width: 720px;
  width: 100%;
  text-align: center;
  opacity: 0;
  filter: blur(12px);
  position: relative;
  z-index: 2;
}

.intro-eyebrow {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
}

.intro-title {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(3rem, 8vw, 7rem);
  color: var(--text-light);
  line-height: 1;
  letter-spacing: 0.02em;
}

.intro-subtitle {
  font-family: var(--font-sans);
  font-style: italic;
  font-weight: 300;
  font-size: 1rem;
  color: var(--text-muted);
}

.intro-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  width: 100%;
}

.intro-choice {
  background: none;
  border: none;
  padding: 0;
  cursor: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.intro-choice,
.intro-choice:focus,
.intro-choice:active,
.intro-choice:focus-visible {
  outline: none;
  border: none;
}

.intro-choice-img-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.intro-choice-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.intro-choice:hover .intro-choice-img-wrap img {
  transform: scale(1.04);
}

.bw-preview {
  filter: grayscale(1) contrast(1.05);
}

.intro-choice-label {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.intro-line {
  width: 60px;
  height: 1px;
  background: rgba(240, 236, 228, 0.2);
}

/* ── BW Mode ── */
body.bw-mode img,
body.bw-mode video {
  filter: grayscale(1) contrast(1.05);
}

body.bw-mode .intro-overlay img {
  filter: none;
}

/* ── Acts — color-scheme + light-dark() ── */
.act {
  background-color: light-dark(#ffffff, #000000);
  color: light-dark(#000000, #ffffff);
}

[data-act="1"] { color-scheme: light; }
[data-act="2"] { color-scheme: dark; }
[data-act="3"] { color-scheme: light; }
[data-act="4"] { color-scheme: dark; }


/* ── Paired section: image + text, side by side ── */
.section-pair {
  width: 100%;
  min-height: auto;
  position: relative;
  z-index: 2;
  color: light-dark(#000000, #ffffff);
  padding-left: 4vw;
  padding-right: 4vw;
}

.section-pair .row {
  min-height: auto;
}

.section-pair + .section-pair {
  margin-top: 10vh;
}

.section-pair + .section-video,
.section-video + .section-pair {
  margin-top: 10vh;
}

.section-pair__media {
  position: relative;
  padding: 3vh 2vw;
}

.section-pair__media figure {
  margin: 0;
  overflow: hidden;
  border-radius: 2px;
}

.section-pair__media img {
  width: 100%;
  height: auto;
  max-height: 85vh;
  object-fit: cover;
  display: block;
}

@media (max-width: 767.98px) {
  .section-pair .row {
    min-height: auto;
  }

  .section-pair__media {
    min-height: auto;
  }
}

.section-pair__text {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6vh 5vw;
  background-color: transparent;
}

.section-pair__text blockquote {
  font-family: 'Petit Formal Script', serif;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.02em;
  max-width: 28ch;
}

/* ── Section Video ── */
.section-video {
  width: 100%;
  height: 100vh;
  overflow: hidden;
  position: relative;
  z-index: 2;
  background-color: transparent;
}

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

/* Circle reveal initial state — hero stays unclipped */
.section-video:not(.hero-video) video {
  clip-path: circle(0% at 50% 50%);
}

/* BS5 grid wrappers inside full-bleed video sections must fill parent height */
.section-video .container-fluid,
.section-video .row,
.section-video .col-12 {
  height: 100%;
}

/* ── Hero sticky ── */
.section-video.hero-video {
  position: sticky;
  top: 0;
  z-index: 1;
}

.hero-overlay-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  z-index: 2;
  white-space: nowrap;
}

.hero-overlay-title {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(3rem, 10vw, 8rem);
  color: var(--text-light);
  letter-spacing: 0.05em;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.4);
  opacity: 0;
  margin: 0;
}

.hero-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.4rem, 5vw, 4rem);
  color: var(--text-light);
  letter-spacing: 0.08em;
  text-shadow: 0 1px 20px rgba(0, 0, 0, 0.35);
  opacity: 0;
  margin: 0.75rem 0 0;
}

/* Video with text overlay (Act III) */
.video-with-text .video-text-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  text-align: center;
  color: var(--text-light);
  pointer-events: none;
  z-index: 1;
}

.video-text-overlay blockquote,
.video-with-text blockquote {
  font-family: 'Petit Formal Script', serif;
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: 0.01em;
  color: var(--bg-encre);
  text-shadow: 0 1px 12px rgba(255, 255, 255, 0.3);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .video-with-text .video-text-overlay {
    width: 80%;
  }
}

@media (max-width: 576px) {
  .intro-choices {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .video-with-text .video-text-overlay {
    width: 88%;
  }
}

/* ── Image reveal overlay (color block wipe) ── */
.image-reveal-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-color: light-dark(#ffffff, #000000);
  will-change: transform;
}

/* ── GSAP animation hints ── */
.intro-eyebrow,
.intro-title,
.intro-subtitle,
.intro-choice,
.intro-line {
  will-change: transform, opacity;
}

/* ── Standalone text — centered contemplative moment ── */
.section-text-solo {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10vh 10vw;
  background-color: transparent;
  color: light-dark(#000000, #ffffff);
}

.section-text-solo blockquote {
  font-family: 'Petit Formal Script', serif;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 400;
  font-style: normal;
  line-height: 1.75;
  letter-spacing: 0.01em;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

/* ── Portrait photo variant — narrower image column, taller natural ratio ── */
.section-pair--portrait .section-pair__media {
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-pair--portrait .section-pair__media figure {
  height: auto;
  max-height: 90vh;
}

.section-pair--portrait .section-pair__media img {
  height: auto;
  max-height: 85vh;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}

/* ── Compact section-pair (Act II) ── */
.section-pair--compact {
  min-height: auto;
}

.section-pair--compact .row {
  min-height: auto;
}

.section-pair--compact .section-pair__media img {
  max-height: 70vh;
}

/* ── Spiral system ── */
.spiral-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.spiral-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
}

.spiral-image {
  position: absolute;
  top: 50%;
  left: 50%;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  transform-origin: center center;
  will-change: transform, opacity, filter;
}

.spiral-image--outer {
  width: 160px;
  height: 110px;
}

.spiral-image--inner {
  width: 120px;
  height: 85px;
}

.spiral-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: radial-gradient(circle, rgba(240, 236, 228, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Hero "back to intro" button — lives inside the hero, scrolls away with it ── */
.hero-intro-back {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  z-index: 3;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  cursor: none;
  mix-blend-mode: difference;
  transition: color 0.3s ease;
}

.hero-intro-back:hover,
.hero-intro-back:focus-visible {
  color: rgba(255, 255, 255, 0.9);
}

/* ── Back to top button — separate, appears after scrolling past the hero ── */
.btn-back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 40;
  font-family: var(--font-sans);
  font-size: 16px;
  color: #fff;
  background: none;
  border: none;
  cursor: none;
  mix-blend-mode: difference;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  padding: 0.4em 0.6em;
  line-height: 1;
}

.btn-back-to-top:hover,
.btn-back-to-top:focus-visible {
  opacity: 0.9 !important;
}

/* ── Lightbox ── */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9990;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
}

.lightbox-image {
  position: fixed;
  object-fit: contain;
  will-change: top, left, width, height;
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  z-index: 1;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-sans);
  font-size: 1.75rem;
  line-height: 1;
  padding: 0.5rem;
  cursor: none;
  transition: color 0.3s ease;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  color: #fff;
}

.section-pair__media img {
  cursor: none;
}

/* Footer */
.site-footer {
  padding: 16vh 4vw 10vh;
  text-align: center;
  background-color: var(--bg-nuit, #000000);
}

.footer-phrase {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  font-weight: 300;
  font-style: italic;
  line-height: 2;
  max-width: 40ch;
  margin: 0 auto 6vh;
  color: rgba(255, 255, 255, 0.75);
}

.footer-separator {
  width: 40px;
  height: 1px;
  background: rgba(255, 255, 255, 0.2);
  margin: 0 auto;
}

.footer-credit {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 6vh;
}
