/* ============================================================
   OBJECTIF CINÉ — Main Stylesheet
   Foundation: Tokens, Reset, Typography, Layout, Animations
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,200;0,9..144,300;0,9..144,400;1,9..144,200;1,9..144,300;1,9..144,400&family=Manrope:wght@300;400;500;600&family=JetBrains+Mono:wght@300;400&display=swap');

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  --color-primary:   #0E0E0E;
  --color-accent:    #C8A45C;
  --color-bg:        #FAFAF7;
  --color-surface:   #F2F1EC;
  --color-border:    #E5E3DC;
  --color-text:      #1A1A1A;
  --color-muted:     #6B6B6B;
  --color-white:     #FFFFFF;

  --font-heading:    'Fraunces', Georgia, serif;
  --font-body:       'Manrope', system-ui, sans-serif;
  --font-mono:       'JetBrains Mono', 'Courier New', monospace;

  --radius:          4px;
  --container:       1320px;
  --gap:             32px;
  --section-v:       140px;

  --ease-out:        cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:     cubic-bezier(0.45, 0, 0.55, 1);
}

/* ── Modern CSS Reset ─────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* ── Custom Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-muted); }

/* ── Selection ────────────────────────────────────────────── */
::selection {
  background: var(--color-accent);
  color: var(--color-primary);
}

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 300;
  line-height: 1.08;
  color: var(--color-primary);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(3rem, 6vw, 6rem); }
h2 { font-size: clamp(2rem, 3.5vw, 3.2rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); }
h4 { font-size: clamp(1.1rem, 1.8vw, 1.35rem); }

h1 em, h2 em, h3 em {
  font-style: italic;
  font-weight: 200;
}

.section-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 24px;
}

.section-intro {
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--color-muted);
  max-width: 640px;
}

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

strong { font-weight: 600; }

/* ── Layout ───────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding-left: 80px;
  padding-right: 80px;
}

.section {
  padding-top: var(--section-v);
  padding-bottom: var(--section-v);
}

.section--surface {
  background-color: var(--color-surface);
}

.section--dark {
  background-color: var(--color-primary);
  color: var(--color-bg);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--color-bg);
}

.section--dark .section-label {
  color: rgba(255,255,255,0.35);
}

.section-header {
  margin-bottom: 72px;
}

.section-header--centered {
  text-align: center;
}

.section-header--centered .section-intro {
  margin-left: auto;
  margin-right: auto;
}

/* ── Grid System ──────────────────────────────────────────── */
.grid {
  display: grid;
  gap: var(--gap);
}

.grid-2  { grid-template-columns: repeat(2, 1fr); }
.grid-3  { grid-template-columns: repeat(3, 1fr); }
.grid-4  { grid-template-columns: repeat(4, 1fr); }
.grid-12 { grid-template-columns: repeat(12, 1fr); }

.col-span-5  { grid-column: span 5; }
.col-span-6  { grid-column: span 6; }
.col-span-7  { grid-column: span 7; }
.col-span-8  { grid-column: span 8; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-sm  { gap: 12px; }
.gap-md  { gap: 24px; }
.gap-lg  { gap: 48px; }

/* ── Custom Cursor ────────────────────────────────────────── */
#cursor {
  position: fixed;
  width: 24px;
  height: 24px;
  border: 1px solid var(--color-accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%) scale(1);
  transition: transform 0.2s var(--ease-out), opacity 0.2s ease;
  display: none;
  mix-blend-mode: multiply;
}

#cursor.cursor-expand {
  transform: translate(-50%, -50%) scale(2.5);
  border-color: var(--color-primary);
}

#cursor.cursor-hidden {
  opacity: 0;
}

/* ── Sticky Header ────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.4s ease, border-color 0.4s ease, padding 0.3s ease;
}

.site-header[data-scrolled="true"] {
  background: var(--color-bg);
  border-bottom-color: var(--color-border);
  padding: 14px 0;
}

.site-header[data-dark="true"]:not([data-scrolled="true"]) .nav-logo,
.site-header[data-dark="true"]:not([data-scrolled="true"]) .nav-link,
.site-header[data-dark="true"]:not([data-scrolled="true"]) .btn-nav {
  color: var(--color-bg);
  border-color: rgba(255,255,255,0.3);
}

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

.nav-logo {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary);
  white-space: nowrap;
  transition: color 0.3s ease;
  flex-shrink: 0;
}

.nav-logo span {
  color: var(--color-accent);
}

.nav-center {
  display: flex;
  align-items: center;
  gap: 40px;
  flex: 1;
  justify-content: center;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  position: relative;
  transition: color 0.3s ease;
  padding-bottom: 2px;
}

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

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

.nav-right {
  flex-shrink: 0;
}

/* Mobile nav */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--color-primary);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-mobile {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.nav-mobile.is-open {
  display: flex;
}

.nav-mobile .nav-link {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 300;
  letter-spacing: -0.02em;
  text-transform: none;
}

.nav-mobile-close {
  position: absolute;
  top: 24px;
  right: 24px;
  font-size: 1.5rem;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--color-primary);
}

/* ── Scroll Animations ────────────────────────────────────── */
.anim-fade {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.anim-fade.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.anim-fade-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.anim-fade-left.is-visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger delays for grid children */
.stagger > *:nth-child(1) { transition-delay: 0s; }
.stagger > *:nth-child(2) { transition-delay: 0.1s; }
.stagger > *:nth-child(3) { transition-delay: 0.2s; }
.stagger > *:nth-child(4) { transition-delay: 0.3s; }
.stagger > *:nth-child(5) { transition-delay: 0.4s; }
.stagger > *:nth-child(6) { transition-delay: 0.5s; }

/* ── Hero Section ─────────────────────────────────────────── */
.hero {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 7fr 5fr;
  align-items: center;
  overflow: hidden;
  position: relative;
  padding-top: 80px;
}

.hero-content {
  padding: 80px 0 80px 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-eyebrow::before {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--color-accent);
  display: block;
}

.hero-title {
  font-size: clamp(3.5rem, 6.5vw, 7rem);
  font-weight: 300;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 32px;
  color: var(--color-primary);
}

.hero-title em {
  font-style: italic;
  font-weight: 200;
  color: var(--color-accent);
}

.hero-subtitle {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--color-muted);
  max-width: 520px;
  margin-bottom: 48px;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 80px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.hero-scroll-line {
  width: 1px;
  height: 48px;
  background: var(--color-border);
  position: relative;
  overflow: hidden;
}

.hero-scroll-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: var(--color-accent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0% { transform: translateY(-100%); }
  100% { transform: translateY(200%); }
}

.hero-image {
  height: 100dvh;
  position: relative;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.9) contrast(1.1);
  transition: transform 8s ease;
}

.hero-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--color-bg) 0%, transparent 30%);
  pointer-events: none;
}

.hero-image-counter {
  position: absolute;
  bottom: 40px;
  right: 32px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.5);
  writing-mode: vertical-lr;
  z-index: 1;
}

/* ── Page Heroes (non-index) ──────────────────────────────── */
.page-hero {
  padding: 180px 0 100px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}

.page-hero--dark {
  background: var(--color-primary);
  padding: 180px 0 120px;
}

.page-hero--image {
  position: relative;
  background-color: var(--color-primary);
  background-size: cover;
  background-position: center;
}

.page-hero--image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(14,14,14,0.72) 0%, rgba(14,14,14,0.55) 100%);
  pointer-events: none;
}

.page-hero--image .container {
  position: relative;
  z-index: 1;
}

.page-hero--image .breadcrumb,
.page-hero--image .breadcrumb a,
.page-hero--image .section-label {
  color: rgba(255,255,255,0.5);
}

.page-hero--image h1 {
  color: var(--color-bg);
}

.page-hero--image .section-intro {
  color: rgba(255,255,255,0.65);
}

/* ── Dividers ─────────────────────────────────────────────── */
.divider {
  width: 100%;
  height: 1px;
  background: var(--color-border);
  margin: 0;
}

.divider--accent {
  background: var(--color-accent);
  width: 48px;
  margin-bottom: 32px;
}

/* ── Utility ──────────────────────────────────────────────── */
.text-muted   { color: var(--color-muted); }
.text-accent  { color: var(--color-accent); }
.text-center  { text-align: center; }
.mt-sm  { margin-top: 12px; }
.mt-md  { margin-top: 24px; }
.mt-lg  { margin-top: 48px; }
.mb-sm  { margin-bottom: 12px; }
.mb-md  { margin-bottom: 24px; }
.mb-lg  { margin-bottom: 48px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
  background: var(--color-primary);
  color: rgba(255,255,255,0.55);
  padding: 80px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-logo {
  font-family: var(--font-heading);
  font-weight: 300;
  font-size: 1.3rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-bg);
  margin-bottom: 16px;
  display: block;
}

.footer-logo span {
  color: var(--color-accent);
}

.footer-tagline {
  font-size: 0.85rem;
  line-height: 1.7;
  margin-bottom: 28px;
}

.footer-socials {
  display: flex;
  gap: 16px;
}

.footer-social-link {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.5);
  transition: border-color 0.3s ease, color 0.3s ease;
  font-size: 1rem;
}

.footer-social-link:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.footer-col-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 20px;
  display: block;
}

.footer-link {
  display: block;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  padding: 5px 0;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--color-accent);
}

.footer-contact-item {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.85rem;
}

.footer-contact-item i {
  font-size: 1rem;
  margin-top: 1px;
  flex-shrink: 0;
  color: var(--color-accent);
}

.footer-bottom {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.footer-legal-links {
  display: flex;
  gap: 24px;
}

.footer-legal-links a {
  color: rgba(255,255,255,0.3);
  transition: color 0.3s ease;
}

.footer-legal-links a:hover {
  color: var(--color-accent);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1200px) {
  .container {
    padding-left: 48px;
    padding-right: 48px;
  }

  :root { --section-v: 100px; }

  .hero-content { padding: 80px 0 80px 48px; }
  .hero-scroll { left: 48px; }

  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
    gap: 40px;
  }
}

@media (max-width: 992px) {
  .container {
    padding-left: 32px;
    padding-right: 32px;
  }

  :root { --section-v: 80px; }

  /* At tablet, 12-col grids become single column */
  .grid-12 { grid-template-columns: 1fr; }
  .grid-12 > * { grid-column: 1 / -1 !important; }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 80px;
  }

  .hero-content {
    padding: 80px 32px 60px;
  }

  .hero-image {
    height: 50vw;
    min-height: 300px;
  }

  .hero-scroll { display: none; }

  .nav-center { display: none; }
  .nav-right .btn { display: none; }
  .nav-toggle { display: flex; }

  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .container {
    padding-left: 24px;
    padding-right: 24px;
  }

  :root { --section-v: 64px; }

  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }

  /* Collapse all 12-col grid children to full width (overrides inline grid-column) */
  .grid-12 { grid-template-columns: 1fr; }
  .grid-12 > * { grid-column: 1 / -1 !important; }

  .hero-title { font-size: clamp(2.5rem, 10vw, 4rem); }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .footer-legal-links { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 576px) {
  .grid-4 { grid-template-columns: 1fr; }
  .hero-title { font-size: 2.5rem; }
  .hero-subtitle { font-size: 0.95rem; }
  .hero-actions { flex-direction: column; }
  .hero-content { padding: 60px 24px 48px; }
}

/* ── Print ────────────────────────────────────────────────── */
@media print {
  .site-header, .site-footer, #cursor { display: none; }
  .anim-fade { opacity: 1; transform: none; }
}
