/* ═══════════════════════════════════════════════════════════
   ELENA NEYLI — STYLE SYSTEM
   Dark cinematic aesthetic. Vulnerability, not vanity.
   ═══════════════════════════════════════════════════════════ */

/* ── GLOBAL RESETS & BASE ─────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

::selection {
  background: rgba(212, 85, 58, 0.35);
  color: #f5f0e8;
}

html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── GRAIN / TEXTURE OVERLAYS ─────────────────────────── */
.hero-grain,
.section-grain {
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-repeat: repeat;
  pointer-events: none;
  z-index: 1;
}

/* ── NAVIGATION ───────────────────────────────────────── */
#main-nav {
  background: transparent;
  backdrop-filter: blur(0px);
}

#main-nav.scrolled {
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(16px) saturate(1.8);
  border-bottom: 1px solid rgba(42, 42, 50, 0.3);
}

.lang-btn {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 6px 10px;
  border-radius: 4px;
  color: #8a8a9a;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Inter', sans-serif;
}

.lang-btn:hover {
  color: #e8e4dc;
  border-color: rgba(138, 138, 154, 0.3);
}

.lang-btn.active-lang {
  color: #d4553a;
  border-color: rgba(212, 85, 58, 0.4);
  background: rgba(212, 85, 58, 0.08);
}

/* ── HERO SECTION ─────────────────────────────────────── */

/*
  Strategy: The video is 9:16 portrait. We want to show it at its
  natural ratio, centered on the dark background, with the hero text
  overlaid over the whole section. Dark pillar bars fill the sides.
*/
.hero-section {
  position: relative;
  width: 100%;
  min-height: 100vh;
}

/* The video wrapper sits in normal flow and defines the section height */
.hero-video-wrapper {
  position: relative;
  width: 100%;
  /* 9:16 = 177.78% padding-top creates the natural portrait ratio */
  padding-top: min(177.78%, 100vh);
  overflow: hidden;
  background: #0a0a0c;
}

/* The actual <video> element: fill the wrapper box */
.hero-video-el {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  /* Show at natural 9:16 ratio: height=100% of wrapper, width=auto */
  height: 100%;
  width: auto;
  max-width: none;
  display: block;
  object-fit: contain;
  object-position: center top;
}

/* Bottom gradient on the video area */
.hero-video-grad-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to top, #0a0a0c 10%, rgba(10,10,12,0.7) 60%, transparent 100%);
  z-index: 2;
  pointer-events: none;
}

/* Left gradient (content side) */
.hero-video-grad-left {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 40%;
  background: linear-gradient(to right, rgba(10,10,12,0.75) 0%, transparent 100%);
  z-index: 2;
  pointer-events: none;
}

/* Dark pillar bars that fill the letterbox sides */
.hero-pillar {
  position: absolute;
  top: 0;
  bottom: 0;
  width: calc((100% - (100vh * 9 / 16)) / 2);
  background: #0a0a0c;
  z-index: 3;
  pointer-events: none;
}

/* Only show pillars when viewport is wider than 9:16 natural width */
@media (max-aspect-ratio: 9/16) {
  .hero-pillar { display: none; }
}

.hero-pillar-left  { left: 0; }
.hero-pillar-right { right: 0; }

/* Content overlay: absolute, covers the whole section, text at bottom-left */
.hero-content-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}

/* Parallax target (JS will animate this) */
.hero-content {
  padding-bottom: 5rem;
  padding-top: 80px; /* clear nav */
}

.hero-fade-up {
  animation: heroFadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  padding: 16px 36px;
  background: #d4553a;
  color: #f5f0e8;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.hero-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s;
}

.hero-cta:hover {
  background: #b8432c;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(212, 85, 58, 0.3);
}

.hero-cta:hover::before {
  opacity: 1;
}

/* Scroll indicator */
.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, #d4553a, transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* ── HYBRID WARRIOR GRID ──────────────────────────────── */
.hybrid-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 6px;
}

@media (min-width: 768px) {
  .hybrid-grid {
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    grid-template-rows: 280px 280px;
    gap: 8px;
  }

  .hybrid-card-large {
    grid-row: 1 / 3;
  }

  .hybrid-card-tall {
    grid-row: 1 / 3;
  }
}

@media (min-width: 1024px) {
  .hybrid-grid {
    grid-template-rows: 320px 320px;
  }
}

.hybrid-card {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
  min-height: 200px;
}

.hybrid-card-img {
  width: 100%;
  height: 100%;
  /* contain keeps the full image visible — no face cropping */
  object-fit: contain;
  object-position: center top;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.6s;
  filter: grayscale(30%) brightness(0.7);
  background: #0a0a0c;
}

.hybrid-card:hover .hybrid-card-img {
  transform: scale(1.06);
  filter: grayscale(0%) brightness(0.85);
}

.hybrid-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 12, 0.9) 0%, rgba(10, 10, 12, 0.2) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  transition: background 0.5s;
}

.hybrid-card:hover .hybrid-card-overlay {
  background: linear-gradient(to top, rgba(10, 10, 12, 0.95) 0%, rgba(10, 10, 12, 0.3) 60%, transparent 100%);
}

.hybrid-card-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: #d4553a;
  margin-bottom: 6px;
}

.hybrid-card-quote {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 14px;
  line-height: 1.5;
  color: #e8e4dc;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.hybrid-card:hover .hybrid-card-quote {
  opacity: 1;
  transform: translateY(0);
}

@media (min-width: 768px) {
  .hybrid-card-quote {
    font-size: 15px;
  }
}

/* ── TOOLKIT CARDS ────────────────────────────────────── */
.toolkit-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 640px) {
  .toolkit-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .toolkit-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
}

.toolkit-card {
  background: #141418;
  border: 1px solid rgba(42, 42, 50, 0.5);
  border-radius: 6px;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.toolkit-card:hover {
  border-color: rgba(212, 85, 58, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(212, 85, 58, 0.1);
}

.toolkit-card-img-wrap {
  position: relative;
  width: 100%;
  padding-top: 75%;
  overflow: hidden;
}

.toolkit-card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* contain so Elena's face is never cut off */
  object-fit: contain;
  object-position: center top;
  filter: grayscale(20%) brightness(0.75);
  transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  background: #0e0e12;
}

.toolkit-card:hover .toolkit-card-img {
  filter: grayscale(0%) brightness(0.9);
  transform: scale(1.05);
}

.toolkit-card-number {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 48px;
  font-weight: 900;
  color: rgba(212, 85, 58, 0.15);
  line-height: 1;
  font-family: 'Inter', sans-serif;
  pointer-events: none;
  transition: color 0.4s;
}

.toolkit-card:hover .toolkit-card-number {
  color: rgba(212, 85, 58, 0.3);
}

.toolkit-card-body {
  padding: 20px;
}

/* ── TELEGRAM SECTION ─────────────────────────────────── */
.telegram-feature {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(30, 30, 36, 0.6);
  border: 1px solid rgba(42, 42, 50, 0.5);
  border-radius: 100px;
  backdrop-filter: blur(8px);
}

.telegram-cta {
  display: inline-flex;
  align-items: center;
  padding: 18px 40px;
  background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.telegram-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s;
}

.telegram-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(42, 171, 238, 0.35);
}

.telegram-cta:hover::before {
  opacity: 1;
}

/* CTA buttons row (Telegram + WhatsApp side-by-side) */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

/* ── WHATSAPP CTA ──────────────────────────────────────── */
.whatsapp-cta {
  display: inline-flex;
  align-items: center;
  padding: 18px 40px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.whatsapp-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s;
}

.whatsapp-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.35);
}

.whatsapp-cta:hover::before {
  opacity: 1;
}

/* ── REVEAL ON SCROLL ANIMATION ───────────────────────── */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ── RTL SUPPORT (ARABIC) ─────────────────────────────── */
html[dir="rtl"] .hero-cta svg:last-child,
html[dir="rtl"] .telegram-cta svg:last-child {
  transform: rotate(180deg);
}

html[dir="rtl"] .hero-cta:hover svg:last-child,
html[dir="rtl"] .telegram-cta:hover svg:last-child {
  transform: rotate(180deg) translateX(4px);
}

/* ── RESPONSIVE POLISH ────────────────────────────────── */
@media (max-width: 639px) {
  .hybrid-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .hybrid-card {
    min-height: 240px;
  }

  .hybrid-card-quote {
    opacity: 1;
    transform: translateY(0);
  }

  .toolkit-card-number {
    font-size: 36px;
  }
}

/* ── CUSTOM SCROLLBAR ─────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #0a0a0c;
}

::-webkit-scrollbar-thumb {
  background: #2a2a32;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #d4553a;
}

/* ── LANGUAGE SWITCH TRANSITION ───────────────────────── */
[data-i18n] {
  transition: opacity 0.3s ease;
}

[data-i18n].switching {
  opacity: 0;
}
