/* =================================================================
   THARA PORTFOLIO — style.css
   Cinematic dark burgundy + black — lightweight & smooth
   ================================================================= */

:root {
  --bg-dark:       #080303;
  --brown-deep:    #1c0508;
  --brown-mid:     #360d12;
  --brown-light:   #50141e;
  --brown-glow:    #6b1c2a;
  --gold:          #b89478;
  --gold-light:    #d4b49e;
  --cream:         #f3e9e2;
  --white:         #fff6f0;
  --text-primary:  #f3e9e2;
  --text-muted:    rgba(243,233,226,0.45);
  --radius:        16px;
  --radius-lg:     20px;
  --max-width:     1200px;
  --ease:          cubic-bezier(0.16,1,0.3,1);
  --font-ar:       'Tajawal', sans-serif;
  --font-en:       'Inter', sans-serif;
  --font-display:  'Playfair Display', serif;
}


/* === RESET === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; scrollbar-width: thin; scrollbar-color: var(--brown-mid) var(--bg-dark); }

body {
  font-family: var(--font-ar);
  background: #060202;
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.75;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Subtle ambient glow — single layer, no blur */
.vignette {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 30%, rgba(54,13,18,0.1) 0%, transparent 70%),
              radial-gradient(ellipse 70% 50% at 50% 100%, rgba(107,28,42,0.05) 0%, transparent 60%);
}

section, header, footer { position: relative; z-index: 1; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; border: none; cursor: pointer; background: none; }
img { display: block; max-width: 100%; }


/* === SECTION TITLE === */
.section-title {
  text-align: center;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 2.8rem;
  letter-spacing: 1.2px;
  line-height: 1.4;
}

.section-title::after {
  content: '';
  display: block;
  width: 50px; height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0.6rem auto 0;
}


/* === SCROLL REVEAL === */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0s;
}
.reveal:nth-child(2)  { transition-delay: 0.05s; }
.reveal:nth-child(3)  { transition-delay: 0.10s; }
.reveal:nth-child(4)  { transition-delay: 0.15s; }
.reveal:nth-child(5)  { transition-delay: 0.20s; }
.reveal:nth-child(6)  { transition-delay: 0.25s; }
.reveal:nth-child(7)  { transition-delay: 0.30s; }
.reveal:nth-child(8)  { transition-delay: 0.35s; }
.reveal:nth-child(9)  { transition-delay: 0.40s; }
.reveal:nth-child(10) { transition-delay: 0.45s; }


/* === TOP HEADER === */
.top-header {
  position: relative; z-index: 10;
  text-align: center;
  padding: 1.8rem 1.5rem 1.4rem;
  background: linear-gradient(180deg, rgba(6,2,2,0.95) 0%, transparent 100%);
}

.top-header h1 {
  font-size: clamp(1.2rem, 3.5vw, 1.8rem);
  font-weight: 500;
  color: var(--gold-light);
  letter-spacing: 0.6px;
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.9;
}

.header-divider {
  width: min(300px, 55%);
  height: 1px;
  margin: 1rem auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.5;
}


/* === HERO === */
.hero {
  position: relative;
  width: 100%; height: 100vh;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 2vh;
  overflow: hidden;
}

.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; z-index: 0;
}

.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,3,3,0.8) 0%, rgba(20,5,8,0.35) 45%, rgba(8,3,3,0.85) 100%);
  z-index: 1;
}

.hero-content {
  position: relative; z-index: 2;
  text-align: center; padding: 2rem;
  max-width: 780px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--white);
  letter-spacing: 2px;
  margin-bottom: 1.4rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
  direction: ltr;
}

.hero-title-line {
  display: block;
  font-size: clamp(1.8rem, 5.5vw, 3rem);
  opacity: 0; transform: translateY(20px);
  animation: fadeUp 0.9s var(--ease) 0.3s forwards;
}

.hero-title-line-en {
  display: block;
  font-family: var(--font-en);
  font-size: clamp(1rem, 2.8vw, 1.5rem);
  font-weight: 300;
  letter-spacing: 6px;
  color: var(--gold-light);
  margin-top: 0.5rem;
  opacity: 0; transform: translateY(20px);
  animation: fadeUp 0.9s var(--ease) 0.5s forwards;
  direction: ltr;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.4vw, 1.3rem);
  font-weight: 400;
  color: var(--cream);
  max-width: 600px;
  margin: 0 auto;
  line-height: 2.1;
  opacity: 0; transform: translateY(16px);
  animation: fadeUp 0.9s var(--ease) 0.7s forwards;
}

@keyframes fadeUp {
  to { opacity: 0.9; transform: translateY(0); }
}


/* =================================================================
   PARTNERS — Uniform grid, actual logo images, rounded, hover glow
   ================================================================= */
.clients {
  padding: 5rem 1.5rem;
  max-width: 980px;
  margin: 0 auto;
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  justify-items: center;
  align-items: stretch;
}

.client-card {
  padding: 1.4rem 0.8rem 1.1rem;
  text-align: center;
  width: 100%;
  border-radius: 16px;
  background: rgba(15,7,8,0.45);
  border: 1px solid rgba(107,28,42,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.client-card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 32px rgba(0,0,0,0.25), 0 0 20px rgba(107,28,42,0.08);
  border-color: rgba(184,148,120,0.12);
}

/* Logo container — exact same size for all, rounded corners on image */
.client-logo {
  width: 88px; height: 88px;
  margin: 0 auto 0.7rem;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20,8,10,0.6);
  border: 1px solid rgba(107,28,42,0.08);
  flex-shrink: 0;
  transition: box-shadow 0.3s ease;
}

.client-card:hover .client-logo {
  box-shadow: 0 4px 16px rgba(107,28,42,0.1);
}

.client-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 12px;
  border-radius: 14px;
  transition: filter 0.3s ease, transform 0.3s ease;
}

.client-card:hover .client-logo img {
  filter: brightness(1.12);
  transform: scale(1.04);
}

.client-logo.logo-fallback {
  background: linear-gradient(135deg, var(--brown-mid), var(--brown-light));
}
.client-logo.logo-fallback::after {
  content: '';
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(243,233,226,0.1);
  border: 2px solid rgba(243,233,226,0.15);
}

.client-card h3 {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 0.25rem;
  letter-spacing: 0.3px;
  line-height: 1.5;
}

.client-card p {
  font-family: var(--font-en);
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.3px;
}


/* =================================================================
   PORTFOLIO — Netflix cinematic carousel, image-only, center focus
   ================================================================= */
.portfolio {
  padding: 5rem 0;
  overflow: hidden;
}

.portfolio .section-title { padding: 0 1.5rem; }

.carousel-container {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 3rem;
}

.carousel-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding: 1.5rem 1rem;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }

/* Card — image only, no text */
.carousel-card {
  flex: 0 0 240px;
  height: 340px;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  scroll-snap-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.carousel-card:hover {
  transform: scale(1.06);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  z-index: 2;
}

/* Center-focus: JS adds this class to the center card */
.carousel-card.is-center {
  transform: scale(1.08);
  box-shadow: 0 12px 40px rgba(0,0,0,0.35), 0 0 20px rgba(107,28,42,0.08);
  z-index: 1;
}

.carousel-card.is-center:hover {
  transform: scale(1.12);
}

.carousel-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.carousel-card:hover img {
  transform: scale(1.05);
}

/* Very subtle dark gradient — bottom only */
.carousel-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(8,3,3,0.5) 0%, transparent 40%);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.carousel-card:hover .carousel-card-overlay {
  opacity: 0.8;
}

/* No text inside cards — titles/numbers hidden */
.carousel-card-title,
.carousel-card-number { display: none; }

/* Thin border on hover */
.carousel-card::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  pointer-events: none;
  transition: border-color 0.3s ease;
}
.carousel-card:hover::after {
  border-color: rgba(184,148,120,0.15);
}

/* Nav buttons */
.carousel-btn {
  position: absolute; top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(184,148,120,0.15);
  background: rgba(15,7,8,0.65);
  color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s ease, border-color 0.3s ease;
  opacity: 0.8;
}
.carousel-btn:hover {
  background: rgba(80,20,30,0.5);
  border-color: rgba(184,148,120,0.3);
  opacity: 1;
}
.carousel-btn svg { width: 18px; height: 18px; }
.carousel-btn-prev { left: 0.5rem; }
.carousel-btn-next { right: 0.5rem; }


/* =================================================================
   LIGHTBOX
   ================================================================= */
.lightbox-backdrop {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4,2,2,0.88);
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lightbox-backdrop.active { opacity: 1; visibility: visible; }

.lightbox {
  position: relative;
  max-width: 680px; width: 90%;
  transform: scale(0.94) translateY(12px);
  transition: transform 0.3s var(--ease);
}
.lightbox-backdrop.active .lightbox { transform: scale(1) translateY(0); }

.lightbox-close {
  position: absolute; top: -38px; left: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(184,148,120,0.15);
  background: rgba(15,7,8,0.6);
  color: var(--cream); font-size: 1.2rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s ease;
}
.lightbox-close:hover { background: rgba(80,20,30,0.5); }

.lightbox-body {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(15,7,8,0.5);
  border: 1px solid rgba(107,28,42,0.1);
  box-shadow: 0 16px 60px rgba(0,0,0,0.5);
}

.lightbox-img {
  display: block; width: 100%;
  max-height: 70vh;
  object-fit: contain;
  background: rgba(8,3,3,0.6);
}

.lightbox-info { padding: 1rem 1.4rem; text-align: center; }
.lightbox-label { color: var(--gold-light); font-size: 1.1rem; font-weight: 700; margin-bottom: 0.2rem; letter-spacing: 0.3px; }
.lightbox-sub { font-family: var(--font-en); color: var(--text-muted); font-size: 0.78rem; letter-spacing: 0.8px; }

.lightbox-gallery-wrapper { position: relative; display: flex; align-items: center; }

.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 2; width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(184,148,120,0.15);
  background: rgba(15,7,8,0.6);
  color: var(--cream); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.3s ease;
  opacity: 0.8;
}
.lightbox-nav:hover { background: rgba(80,20,30,0.5); opacity: 1; }
.lightbox-nav svg { width: 16px; height: 16px; }
.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }

.lightbox-counter {
  display: block; margin-top: 0.3rem;
  font-family: var(--font-en); font-size: 0.72rem; font-weight: 500;
  color: var(--text-muted); letter-spacing: 1.2px;
}


/* =================================================================
   CONTACT
   ================================================================= */
.contact {
  padding: 5rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.contact-icons {
  display: flex; align-items: flex-start; justify-content: center;
  gap: 1.6rem; flex-wrap: wrap;
}
.contact-row + .contact-row { margin-top: 1rem; }

.contact-icon-wrapper {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
}

.contact-icon {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  width: 58px; height: 58px;
  border-radius: 14px;
  color: var(--cream);
  background: rgba(20,8,10,0.45);
  border: 1px solid rgba(107,28,42,0.12);
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.contact-icon:hover {
  background: rgba(60,16,24,0.45);
  box-shadow: 0 6px 20px rgba(0,0,0,0.18);
  transform: translateY(-2px);
}

.contact-icon:active {
  transform: translateY(0);
  transition-duration: 0.1s;
}

.contact-icon svg {
  width: 22px; height: 22px;
  flex-shrink: 0; position: relative; z-index: 1;
  opacity: 0.75;
  transition: opacity 0.3s ease;
}
.contact-icon:hover svg { opacity: 1; }

.contact-label {
  font-family: var(--font-en);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.4px;
  white-space: nowrap;
  transition: color 0.3s ease;
}
.contact-icon-wrapper:hover .contact-label { color: var(--gold); }


/* =================================================================
   POLICY MODAL
   ================================================================= */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
  background: rgba(5,2,2,0.8);
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-backdrop.active { opacity: 1; visibility: visible; }

.modal {
  position: relative; width: 100%; max-width: 540px; max-height: 85vh;
  display: flex; flex-direction: column;
  border-radius: 24px; overflow: hidden;
  background: linear-gradient(170deg, rgba(25,8,12,0.95) 0%, rgba(12,5,6,0.98) 100%);
  border: 1px solid rgba(107,28,42,0.12);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.3s var(--ease);
}
.modal-backdrop.active .modal { transform: scale(1) translateY(0); }

.modal-glow-edge {
  position: absolute; top: 0; left: 12%; right: 12%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184,148,120,0.15), transparent);
  z-index: 2;
}

.modal-header { display: flex; align-items: center; gap: 1rem; padding: 1.6rem 1.8rem 1.2rem; }
.modal-logo:empty { display: none; }
.modal-logo { width: 38px; height: 38px; flex-shrink: 0; }
.modal-logo svg { width: 100%; height: 100%; }
.modal-header h3 { flex: 1; font-size: 1.1rem; font-weight: 700; color: var(--gold-light); letter-spacing: 0.6px; line-height: 1.5; }

.modal-divider {
  height: 1px; margin: 0 1.8rem;
  background: linear-gradient(90deg, transparent, rgba(107,28,42,0.12), transparent);
}

.modal-close {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: var(--text-muted);
  background: rgba(28,5,8,0.3);
  border: 1px solid rgba(107,28,42,0.08);
  border-radius: 50%; cursor: pointer;
  transition: color 0.3s ease, background 0.3s ease, transform 0.3s ease;
  line-height: 1;
}
.modal-close:hover { color: var(--cream); background: rgba(50,12,18,0.4); transform: rotate(90deg); }

.modal-body { padding: 1.4rem 1.8rem 2rem; overflow-y: auto; flex: 1; }
.modal-body::-webkit-scrollbar { width: 3px; }
.modal-body::-webkit-scrollbar-track { background: transparent; }
.modal-body::-webkit-scrollbar-thumb { background: rgba(107,28,42,0.2); border-radius: 2px; }

.policy-section { margin-bottom: 1.4rem; }
.policy-section:last-child { margin-bottom: 0; }
.policy-section h4 {
  font-size: 0.95rem; font-weight: 700; color: var(--gold);
  margin-bottom: 0.5rem; padding-bottom: 0.4rem;
  letter-spacing: 0.3px; line-height: 1.5;
  border-bottom: 1px solid rgba(107,28,42,0.06);
}
.policy-section ul { list-style: none; padding: 0; }
.policy-section li {
  position: relative; padding-right: 1rem; margin-bottom: 0.35rem;
  font-size: 0.85rem; color: var(--cream); line-height: 1.8; opacity: 0.8;
}
.policy-section li::before {
  content: ''; position: absolute; right: 0; top: 0.7rem;
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--brown-light); opacity: 0.6;
}

@keyframes btnRipple { to { transform: scale(1); opacity: 0; } }
body.modal-open { overflow: hidden; }


/* === FOOTER === */
.footer {
  text-align: center; padding: 2.6rem 1rem;
  color: var(--text-muted); font-size: 0.84rem; letter-spacing: 0.5px;
  line-height: 1.8;
  border-top: 1px solid rgba(107,28,42,0.08);
  background: rgba(12,5,6,0.5);
}
.footer p + p { margin-top: 0.35rem; font-size: 0.74rem; font-weight: 400; opacity: 0.6; }


/* === SCROLLBAR === */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--brown-mid); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--brown-light); }


/* =================================================================
   RESPONSIVE — Tablet
   ================================================================= */
@media (max-width: 768px) {
  .clients { padding: 4rem 1rem; }
  .clients-grid { gap: 1.1rem; }

  .portfolio { padding: 4rem 0; }
  .portfolio .section-title { padding: 0 1rem; }
  .carousel-container { padding: 0 2.4rem; }
  .carousel-card { flex: 0 0 200px; height: 280px; }

  .contact { padding: 4rem 1rem; }
  .contact-icons { gap: 1.2rem; }

  .client-card { padding: 1.1rem 0.6rem 0.9rem; }
  .client-logo { width: 68px; height: 68px; border-radius: 14px; }
  .client-logo img { padding: 9px; }

  .modal { max-height: 90vh; }
  .modal-header { padding: 1.2rem 1.4rem 1rem; }
  .modal-divider { margin: 0 1.4rem; }
  .modal-body { padding: 1rem 1.4rem 1.4rem; }
}


/* =================================================================
   RESPONSIVE — Small mobile
   ================================================================= */
@media (max-width: 480px) {
  .top-header h1 { font-size: 0.88rem; }

  .clients-grid { gap: 0.7rem; }
  .client-card { padding: 0.8rem 0.4rem 0.6rem; border-radius: 12px; }
  .client-card h3 { font-size: 0.65rem; }
  .client-card p { font-size: 0.52rem; }
  .client-logo { width: 52px; height: 52px; border-radius: 12px; }
  .client-logo img { padding: 6px; }

  .carousel-container { padding: 0 1.8rem; }
  .carousel-card { flex: 0 0 170px; height: 240px; }
  .carousel-btn { width: 34px; height: 34px; }
  .carousel-btn svg { width: 14px; height: 14px; }

  .contact-icon { width: 50px; height: 50px; border-radius: 12px; }
  .contact-icon svg { width: 20px; height: 20px; }
  .contact-icons { gap: 0.9rem; }
  .contact-label { font-size: 0.56rem; }

  .lightbox { max-width: 95%; }
  .lightbox-close { top: -34px; }
  .section-title { margin-bottom: 1.8rem; }

  .modal-backdrop { padding: 0.8rem; }
  .modal { border-radius: 18px; }
  .modal-header h3 { font-size: 0.95rem; }
}
