/* =========================================================
   FADA — Luxury Jewelry NFC Experience
   Brand Colors: White/Silver bg · Black text · Silver accents
   ========================================================= */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,700;1,400;1,500&family=Jost:wght@300;400;500;600&family=Amiri:ital,wght@0,400;0,700;1,400&family=Tajawal:wght@300;400;500;700&display=swap');

/* ---- CSS Custom Properties ---- */
:root {
  --black:      #0a0a0a;
  --off-black:  #111111;
  --silver:     #c0c0c0;
  --silver-2:   #9e9e9e;
  --silver-3:   #e8e8e8;
  --white:      #ffffff;
  --ivory:      #f9f7f4;
  --cream:      #f2efe9;
  --glass:      rgba(255,255,255,0.06);
  --glass-b:    rgba(255,255,255,0.12);

  --serif:     'Playfair Display', Georgia, serif;
  --sans:      'Jost', system-ui, sans-serif;
  --serif-ar:  'Amiri', 'Playfair Display', serif;
  --sans-ar:   'Tajawal', 'Jost', system-ui, sans-serif;

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

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

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

body {
  font-family: var(--sans);
  background: var(--black);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font: inherit; }
a { color: inherit; text-decoration: none; }

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

/* ---- Cursor glow ---- */
.cursor-glow {
  position: fixed; width: 320px; height: 320px;
  border-radius: 50%; pointer-events: none; z-index: 0;
  background: radial-gradient(circle, rgba(192,192,192,0.07) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: opacity 0.4s;
}

/* ---- Preloader ---- */
.preloader {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--black);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px;
  transition: opacity 0.8s var(--ease-out), visibility 0.8s;
}
.preloader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.preloader-logo {
  width: 160px; height: 160px; max-width: 80vw; object-fit: contain;
  animation: logoBreath 2s ease-in-out infinite;
}
@keyframes logoBreath {
  0%, 100% { opacity: 0.6; transform: scale(0.97); }
  50%       { opacity: 1;   transform: scale(1); }
}

.preloader-line {
  width: 120px; height: 1px; background: rgba(192,192,192,0.2); border-radius: 1px; overflow: hidden;
}
.preloader-line i {
  display: block; width: 40%; height: 100%;
  background: var(--silver);
  animation: lineSlide 1.6s ease-in-out infinite;
}
@keyframes lineSlide {
  0%   { transform: translateX(-100%); }
  50%  { transform: translateX(150%); }
  100% { transform: translateX(400%); }
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative; width: 100%; height: 100svh; min-height: 600px;
  display: flex; align-items: flex-end; justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.08);
  transition: transform 12s ease-out;
  will-change: transform;
}
.hero-bg.loaded { transform: scale(1); }

.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.82) 0%,
    rgba(0,0,0,0.35) 45%,
    rgba(0,0,0,0.18) 100%
  );
}

.hero-content {
  position: relative; z-index: 2;
  width: 100%; padding: 0 24px 64px;
  text-align: center;
}

.hero-logo {
  width: 140px; height: 140px; max-width: 70vw; object-fit: contain;
  margin: 0 auto 28px;
  opacity: 0; transform: translateY(12px);
  animation: fadeUp 1s var(--ease-out) 0.6s forwards;
  filter: brightness(1.2);
}

.hero-eyebrow {
  font-family: var(--sans);
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--silver); margin-bottom: 16px;
  opacity: 0; animation: fadeUp 1s var(--ease-out) 0.8s forwards;
}

.hero-names {
  font-family: var(--serif);
  font-size: clamp(48px, 10vw, 96px);
  font-weight: 400; line-height: 1;
  color: var(--white);
  opacity: 0; animation: fadeUp 1s var(--ease-out) 1s forwards;
}
.hero-names em { font-style: italic; color: var(--silver-3); margin: 0 12px; font-size: 0.7em; }

.hero-tagline {
  font-family: var(--sans); font-size: 13px; font-weight: 300;
  color: rgba(255,255,255,0.6); letter-spacing: 0.1em;
  margin-top: 20px;
  opacity: 0; animation: fadeUp 1s var(--ease-out) 1.2s forwards;
}

.hero-scroll {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  opacity: 0; animation: fadeIn 1s ease 2s forwards;
  color: rgba(255,255,255,0.4); font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase;
}
.hero-scroll span {
  display: block; width: 1px; height: 40px;
  background: linear-gradient(to bottom, transparent, rgba(192,192,192,0.5));
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse { 0%,100%{opacity:0.3;transform:scaleY(0.5)} 50%{opacity:1;transform:scaleY(1)} }

/* ============================================================
   SHARED SECTION CHROME
   ============================================================ */
.section {
  position: relative; padding: 100px 0;
  overflow: hidden;
}
.section-dark  { background: var(--black); color: var(--white); }
.section-light { background: var(--ivory); color: var(--black); }
.section-cream { background: var(--cream); color: var(--black); }

.container {
  width: 100%; max-width: 900px;
  margin: 0 auto; padding: 0 24px;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--silver); margin-bottom: 16px;
  display: block;
}
.eyebrow.dark { color: var(--silver-2); }

.section-title {
  font-family: var(--serif);
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 400; line-height: 1.15;
  margin-bottom: 24px;
}

/* Divider line */
.divider {
  width: 40px; height: 1px;
  background: var(--silver);
  margin: 0 auto 40px;
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }
.reveal-delay-3 { transition-delay: 0.36s; }

/* ============================================================
   GALLERY SECTION
   ============================================================ */
.gallery-section {
  background: var(--off-black); padding: 100px 0;
}
.gallery-section .section-heading {
  text-align: center; margin-bottom: 56px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0 24px;
  max-width: 900px; margin: 0 auto;
}

.gallery-item {
  position: relative; overflow: hidden;
  aspect-ratio: 3/4;
  cursor: pointer; border-radius: 2px;
  background: var(--off-black);
}
.gallery-item.wide { grid-column: span 2; aspect-ratio: 16/10; }
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s var(--ease-out), filter 0.4s;
  filter: brightness(0.92);
}
.gallery-item::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.4s;
}
.gallery-item:hover img { transform: scale(1.06); filter: brightness(1); }
.gallery-item:hover::after { background: rgba(0,0,0,0.1); }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,0.96);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
}
.lightbox.open { opacity: 1; visibility: visible; }

#lightboxImage {
  max-width: 88vw; max-height: 86vh;
  object-fit: contain; border-radius: 2px;
  box-shadow: 0 0 80px rgba(0,0,0,0.6);
}

#lightboxClose {
  position: absolute; top: 20px; right: 24px;
  color: rgba(255,255,255,0.7); font-size: 32px;
  transition: color 0.2s;
}
#lightboxClose:hover { color: var(--white); }

.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  color: rgba(255,255,255,0.5); font-size: 48px; line-height: 1;
  padding: 16px;
  transition: color 0.2s, transform 0.2s;
}
.lightbox-nav:hover { color: var(--white); }
.lightbox-nav.prev { left: 12px; }
.lightbox-nav.next { right: 12px; }

/* ============================================================
   LETTER SECTION
   ============================================================ */
.letter-section {
  background: var(--ivory); padding: 100px 24px;
}

.letter-card {
  max-width: 660px; margin: 0 auto;
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 2px;
  padding: 56px 52px;
  box-shadow: 0 8px 60px rgba(0,0,0,0.07);
  position: relative;
}
.letter-card::before {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 40px; height: 2px;
  background: var(--silver);
}

.letter-logo {
  width: 90px; height: 90px; max-width: 50vw; object-fit: contain;
  margin: 0 auto 28px;
  opacity: 0.85;
}

.letter-title {
  font-family: var(--serif); font-style: italic;
  font-size: 26px; font-weight: 400;
  color: var(--black); text-align: center;
  margin-bottom: 32px;
}

.letter-body {
  font-family: var(--serif); font-style: italic;
  font-size: 17px; line-height: 1.85;
  color: #222;
  white-space: pre-line;
}

.letter-seal {
  display: block; text-align: center;
  margin-top: 40px;
  font-family: var(--sans); font-size: 10px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--silver-2);
}

/* ============================================================
   COUNT-UP SECTION
   ============================================================ */
.countup-section {
  background: var(--black); padding: 100px 24px;
  text-align: center;
}
.countup-section .eyebrow { margin-bottom: 12px; }
.countup-section .section-title { color: var(--white); margin-bottom: 56px; }

.countup-grid {
  display: flex; align-items: flex-start; justify-content: center;
  gap: 0;
  flex-wrap: nowrap;
}

.countup-unit {
  display: flex; flex-direction: column; align-items: center;
  padding: 0 28px;
  border-right: 1px solid rgba(192,192,192,0.1);
}
.countup-unit:last-child { border-right: none; }

.countup-num {
  font-family: var(--serif);
  font-size: clamp(40px, 8vw, 72px);
  font-weight: 400; line-height: 1;
  color: var(--white);
  letter-spacing: -0.02em;
  min-width: 2ch; display: block;
}

.countup-label {
  font-family: var(--sans); font-size: 9px; font-weight: 500;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--silver-2); margin-top: 12px;
}

.countup-since {
  margin-top: 52px;
  font-family: var(--sans); font-size: 12px;
  color: rgba(255,255,255,0.35); letter-spacing: 0.12em;
}

/* ============================================================
   LOCATION SECTION
   ============================================================ */
.location-section {
  background: var(--cream); padding: 100px 0;
}

.location-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.location-photo-wrap {
  position: relative; border-radius: 2px; overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: 0 16px 60px rgba(0,0,0,0.14);
}
.location-photo-wrap img {
  width: 100%; height: 100%; object-fit: cover;
}

.location-copy { padding: 0 12px; }
.location-copy .eyebrow { color: var(--silver-2); margin-bottom: 16px; }
.location-copy .section-title { color: var(--black); margin-bottom: 12px; }
.location-place {
  font-family: var(--sans); font-size: 14px;
  color: rgba(0,0,0,0.5); margin-bottom: 40px;
  letter-spacing: 0.04em;
}

/* ============================================================
   BRAND MANIFESTO SECTION
   ============================================================ */
.manifesto-section {
  background: var(--off-black);
  padding: 110px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  text-align: center;
}

.manifesto-card {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 48px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid rgba(192, 192, 192, 0.12);
  border-radius: 2px;
  position: relative;
  box-shadow: 0 12px 60px rgba(0, 0, 0, 0.4);
}

.manifesto-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--silver), transparent);
}

.manifesto-logo {
  width: 80px;
  height: 80px;
  max-width: 40vw;
  object-fit: contain;
  margin: 0 auto 20px;
  opacity: 0.9;
  filter: brightness(1.2);
}

.manifesto-section .eyebrow {
  color: var(--silver);
  margin-bottom: 12px;
}

.manifesto-section .divider {
  background: rgba(192, 192, 192, 0.25);
  margin: 0 auto 44px;
}

.manifesto-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.manifesto-lead {
  font-family: var(--serif);
  font-size: clamp(20px, 3.8vw, 27px);
  font-style: italic;
  font-weight: 400;
  line-height: 1.5;
  color: var(--white);
  letter-spacing: -0.01em;
}

.manifesto-text {
  font-family: var(--serif);
  font-size: clamp(15px, 2.4vw, 18px);
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 400;
}

.manifesto-tagline {
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid rgba(192, 192, 192, 0.15);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--silver);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-size: 11px; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase;
  padding: 14px 32px; border-radius: 1px;
  transition: background 0.3s, color 0.3s, transform 0.2s, box-shadow 0.3s;
  position: relative; overflow: hidden;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-silver {
  background: var(--white); color: var(--black);
  border: 1px solid rgba(0,0,0,0.12);
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}
.btn-silver:hover { background: var(--silver-3); box-shadow: 0 6px 28px rgba(0,0,0,0.1); }

.btn-dark {
  background: var(--black); color: var(--white);
  border: 1px solid rgba(255,255,255,0.1);
}
.btn-dark:hover { background: #1a1a1a; box-shadow: 0 6px 24px rgba(0,0,0,0.35); }

.btn svg {
  width: 14px; height: 14px; stroke: currentColor;
  fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--black); padding: 56px 24px;
  text-align: center; border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-logo {
  width: 100px; height: 100px; max-width: 60vw; object-fit: contain;
  margin: 0 auto 20px; opacity: 0.9;
  filter: brightness(1.1);
}

.footer-brand {
  font-family: var(--sans); font-size: 10px;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--silver-2); margin-bottom: 8px;
}

.footer-tagline {
  font-family: var(--serif); font-style: italic;
  font-size: 13px; color: rgba(255,255,255,0.28);
}

/* ============================================================
   MUSIC PLAYER (Sticky)
   ============================================================ */
.music-btn {
  position: fixed; bottom: 24px; right: 24px; z-index: 1000;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--white); color: var(--black);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
  transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
}
.music-btn:hover { transform: scale(1.1); box-shadow: 0 8px 32px rgba(0,0,0,0.28); }
.music-btn.playing { background: var(--black); color: var(--white); }
.music-btn svg {
  width: 18px; height: 18px; stroke: currentColor;
  fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.music-btn .icon-play, .music-btn.playing .icon-pause { display: block; }
.music-btn .icon-pause, .music-btn.playing .icon-play { display: none; }

/* YouTube shell */
.yt-shell {
  position: fixed; bottom: -200px; left: -200px;
  width: 1px; height: 1px; opacity: 0; pointer-events: none;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp  { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:none; } }
@keyframes fadeIn  { from { opacity:0; } to { opacity:1; } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 720px) {
  .section { padding: 72px 0; }

  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 16px; }
  .gallery-item.wide { grid-column: span 2; }

  .letter-card { padding: 36px 24px; }

  .countup-unit { padding: 0 16px; }

  .location-inner { grid-template-columns: 1fr; gap: 40px; }
  .location-photo-wrap { aspect-ratio: 16/9; }

  .manifesto-card { padding: 44px 24px; }
  .manifesto-section { padding: 80px 0; }

  .music-btn { bottom: 16px; right: 16px; width: 44px; height: 44px; }
}

@media (max-width: 420px) {
  .countup-grid { gap: 0; }
  .countup-unit { padding: 0 10px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item.wide { grid-column: span 1; }
}

/* ============================================================
   LANGUAGE TOGGLE BUTTON
   ============================================================ */
.lang-toggle {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1001;
  padding: 8px 18px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  background: rgba(10, 10, 10, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s var(--ease-out);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.lang-toggle:hover {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 255, 255, 0.25);
}

html[dir="rtl"] .lang-toggle {
  right: auto;
  left: 24px;
}

@media (max-width: 720px) {
  .lang-toggle {
    top: 16px;
    right: 16px;
    padding: 6px 14px;
    font-size: 10px;
  }
  html[dir="rtl"] .lang-toggle {
    right: auto;
    left: 16px;
  }
}

/* ============================================================
   RTL / ARABIC STYLING OVERRIDES
   ============================================================ */
html[dir="rtl"] {
  font-family: var(--sans-ar);
}

html[dir="rtl"] .hero-names,
html[dir="rtl"] .section-title,
html[dir="rtl"] .letter-title,
html[dir="rtl"] .letter-body,
html[dir="rtl"] .manifesto-lead,
html[dir="rtl"] .manifesto-text,
html[dir="rtl"] .countup-num,
html[dir="rtl"] .footer-tagline {
  font-family: var(--serif-ar);
}

html[dir="rtl"] .hero-eyebrow,
html[dir="rtl"] .hero-tagline,
html[dir="rtl"] .eyebrow,
html[dir="rtl"] .countup-label,
html[dir="rtl"] .countup-since,
html[dir="rtl"] .location-place,
html[dir="rtl"] .manifesto-tagline,
html[dir="rtl"] .footer-brand,
html[dir="rtl"] .letter-seal,
html[dir="rtl"] .btn {
  font-family: var(--sans-ar);
}

html[dir="rtl"] .letter-body {
  text-align: right;
  direction: rtl;
  white-space: pre-line;
}

html[dir="rtl"] .letter-seal {
  text-align: right;
}

html[dir="rtl"] .location-place svg {
  margin-right: 0;
  margin-left: 6px;
}

html[dir="rtl"] .hero-names em {
  font-style: normal;
  margin: 0 10px;
}

