/* ==========================================================================
   NORA GHARYÉNI PORTFOLIO — LOCKED DESIGN TOKENS & MOTION ENGINE
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap');

:root {
  /* Surfaces (Alternating Dark / Warm Sand Rhythm) */
  --bg-dark: #0B0B0C;
  --surface-dark: #161618;
  --bg-sand: #EDE6DA;
  --surface-sand: #E2D8C7;

  /* Brand Accents */
  --accent-crimson: #8C1D18;
  --accent-terracotta: #B53028;
  --accent-gold: #C8A165;

  /* Typography Colors */
  --text-light: #F4F1EA;
  --text-muted-light: #A39E96;
  --text-dark: #141312;
  --text-muted-dark: #544F48;

  /* Hairlines & Borders */
  --border-dark: rgba(244, 241, 234, 0.12);
  --border-sand: rgba(20, 19, 18, 0.14);
  --border-gold-subtle: rgba(200, 161, 101, 0.28);

  /* Typography Families */
  --font-display: 'Cinzel', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing & Layout */
  --container-max: 1280px;
  --gutter-desktop: 48px;
  --gutter-mobile: 20px;
  --section-py-desktop: 120px;
  --section-py-mobile: 72px;

  /* Sharp Editorial Geometry (NO bubbly rounded cards) */
  --radius-none: 0px;
  --radius-sharp: 2px;

  /* Locked Amazigh Pattern Opacity (Subtle) */
  --pattern-opacity: 0.14;

  /* Locked Lightened Hero Left-Side Scrim */
  --hero-scrim: linear-gradient(
    90deg,
    rgba(11, 11, 12, 0.52) 0%,
    rgba(11, 11, 12, 0.28) 42%,
    rgba(11, 11, 12, 0.08) 100%
  );
  --hero-text-shadow: 0 2px 18px rgba(0, 0, 0, 0.65);

  /* Locked Slow Photo Reveal Timing */
  --reveal-duration: 1.6s;
  --reveal-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --hover-zoom-duration: 0.85s;
}

/* ==========================================================================
   SLOW SCROLL-TRIGGERED PHOTO REVEAL ENGINE (1.6s Clip-Path + De-Zoom)
   Toggle `.is-revealed` via IntersectionObserver (threshold: 0.15, once: true)
   ========================================================================== */

.photo-reveal {
  position: relative;
  overflow: hidden;
  clip-path: inset(0 0 100% 0);
  transition: clip-path var(--reveal-duration) var(--reveal-ease);
  will-change: clip-path;
}

.photo-reveal img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.12);
  transition:
    transform var(--reveal-duration) var(--reveal-ease),
    opacity calc(var(--reveal-duration) * 0.75) ease-out;
  will-change: transform, opacity;
}

.photo-reveal.is-revealed {
  clip-path: inset(0 0 0% 0);
}

.photo-reveal.is-revealed img {
  opacity: 1;
  transform: scale(1);
}

/* Optional hover zoom AFTER reveal */
.photo-reveal.is-revealed:hover img {
  transform: scale(1.05);
  transition: transform var(--hover-zoom-duration) var(--reveal-ease);
}

/* Subtle Text Fade-Up */
.fade-up {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 1.1s var(--reveal-ease),
    transform 1.1s var(--reveal-ease);
}

.fade-up.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced Motion Accessibility */
@media (prefers-reduced-motion: reduce) {
  .photo-reveal,
  .photo-reveal img,
  .fade-up {
    clip-path: none !important;
    transform: none !important;
    transition: opacity 0.3s ease !important;
  }
}
