/* ==========================================================================
   BlackBear Group — Parent Hub Styles
   blackbear.qa — The Godfather Identity
   ========================================================================== */

/* ─── Google Fonts ─── */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800;900&family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ─── CSS Variables ─── */
:root {
  /* Colors — Godfather Palette */
  --color-bg:           #060606;
  --color-bg-alt:       #0e0e0e;
  --color-bg-card:      #111111;
  --color-bg-glass:     rgba(255,255,255,0.03);
  --color-white:        #ffffff;
  --color-text:         rgba(255,255,255,0.85);
  --color-text-muted:   rgba(255,255,255,0.45);
  --color-text-dim:     rgba(255,255,255,0.25);
  --color-gold:         #d4af37;
  --color-gold-light:   #f0d060;
  --color-silver:       #c0c0c0;
  --color-border:       rgba(255,255,255,0.06);
  --color-border-hover: rgba(255,255,255,0.12);

  /* Brand Colors */
  --brand-blue:  #00D4FF;
  --brand-gold:  #d4af37;
  --brand-black: #ffffff; /* white on dark bg */

  /* Typography */
  --font-ar: 'Cairo', sans-serif;
  --font-en: 'Inter', sans-serif;

  /* Spacing */
  --space-xs:  0.5rem;
  --space-sm:  0.75rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --space-5xl: 8rem;

  /* Radius */
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-xl:   28px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 0.4s;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  font-size: 16px;
}

body {
  font-family: var(--font-ar);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  direction: rtl;
  min-height: 100vh;
}

body.en {
  font-family: var(--font-en);
  direction: ltr;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }

/* ─── Skip Link (Accessibility) ─── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-gold);
  color: var(--color-bg);
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.9rem;
  z-index: 999;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 12px;
}

/* ─── Focus Styles (Accessibility) ─── */
:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

.nav__link:focus-visible,
.nav__lang:focus-visible,
.hero__cta:focus-visible,
.brand-card__link:focus-visible,
.footer__social-link:focus-visible,
.footer__email:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

::selection {
  background: var(--color-gold);
  color: var(--color-bg);
}

/* ─── Navigation ─── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-md) 0;
  transition: all var(--duration) var(--ease-out);
}

.nav.scrolled {
  background: rgba(6,6,6,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
}

.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav__logo svg {
  width: 36px;
  height: 36px;
}

.nav__logo-text {
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-white);
  letter-spacing: -0.02em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.nav__link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: color var(--duration) var(--ease-out);
  cursor: pointer;
}

.nav__link:hover,
.nav__link.active {
  color: var(--color-white);
}

.nav__lang {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  background: transparent;
  cursor: pointer;
  transition: all var(--duration) var(--ease-out);
  font-family: var(--font-en);
}

.nav__lang:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
}

/* Mobile menu */
.nav__hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-white);
  margin: 5px 0;
  transition: all 0.3s;
}

/* ─── Hero Section ─── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: var(--space-4xl) var(--space-xl);
}

.hero__bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 0;
}

.hero__bg svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  opacity: 0.03;
}

.hero__bg::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(212,175,55,0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(255,255,255,0.02) 0%, transparent 50%);
}

/* Animated grid */
.hero__bg::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at 50% 50%, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 30%, transparent 70%);
}

.hero__content {
  position: relative;
  z-index: 10;
  max-width: 800px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2xl);
  background: var(--color-bg-glass);
}

.hero__badge .dot {
  width: 6px;
  height: 6px;
  background: var(--color-gold);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  color: var(--color-white);
  line-height: 1.2;
  margin-bottom: var(--space-lg);
  letter-spacing: -0.02em;
}

.hero__title .gold {
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto var(--space-2xl);
  line-height: 1.8;
  font-weight: 500;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 14px 36px;
  background: transparent;
  border: 1px solid var(--color-gold);
  color: var(--color-gold);
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--duration) var(--ease-out);
  font-family: var(--font-ar);
}

body.en .hero__cta {
  font-family: var(--font-en);
}

.hero__cta:hover {
  background: var(--color-gold);
  color: var(--color-bg);
  box-shadow: 0 0 40px rgba(212,175,55,0.2);
}

.hero__scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--color-text-dim);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 2px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-8px); }
}

.hero__scroll-hint .line {
  width: 1px;
  height: 30px;
  background: linear-gradient(to bottom, var(--color-text-dim), transparent);
}

/* ─── Section Base ─── */
.section {
  padding: var(--space-5xl) var(--space-xl);
  position: relative;
}

.section__inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-4xl);
}

.section__label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-gold);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}

.section__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  color: var(--color-white);
  line-height: 1.3;
  margin-bottom: var(--space-md);
}

.section__desc {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.section__divider {
  width: 50px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
  margin: 0 auto var(--space-xl);
  border: none;
}

/* ─── Story Timeline ─── */
.story {
  background: var(--color-bg-alt);
}

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-4xl);
}

.timeline::before {
  content: '';
  position: absolute;
  right: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom,
    transparent,
    var(--color-border-hover) 10%,
    var(--color-border-hover) 90%,
    transparent
  );
  transform: translateX(50%);
}

body.en .timeline::before {
  right: auto;
  left: 50%;
  transform: translateX(-50%);
}

.timeline__item {
  display: flex;
  align-items: center;
  gap: var(--space-3xl);
  position: relative;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s var(--ease-out);
}

.timeline__item.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline__item:nth-child(odd) {
  flex-direction: row-reverse;
  text-align: left;
}

body.en .timeline__item:nth-child(odd) {
  text-align: right;
}

.timeline__item:nth-child(even) {
  text-align: right;
}

body.en .timeline__item:nth-child(even) {
  text-align: left;
}

.timeline__content {
  flex: 1;
  padding: var(--space-xl);
}

.timeline__chapter {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.timeline__heading {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-white);
  margin-bottom: var(--space-md);
}

.timeline__text {
  font-size: 1.05rem;
  color: var(--color-text-muted);
  line-height: 1.9;
}

.timeline__dot {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  position: relative;
  z-index: 5;
  border: 2px solid;
  background: var(--color-bg-alt);
}

.timeline__spacer {
  flex: 1;
}

/* Timeline colors */
.timeline__item--black .timeline__chapter { color: var(--color-silver); }
.timeline__item--black .timeline__dot { border-color: rgba(255,255,255,0.2); }

.timeline__item--blue .timeline__chapter { color: var(--brand-blue); }
.timeline__item--blue .timeline__dot { border-color: var(--brand-blue); }

.timeline__item--gold .timeline__chapter { color: var(--brand-gold); }
.timeline__item--gold .timeline__dot { border-color: var(--brand-gold); }

.timeline__item--mystery .timeline__chapter { color: #8b5cf6; }
.timeline__item--mystery .timeline__dot { border-color: #8b5cf6; }

/* ─── Brands Section ─── */
.brands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
}

.brand-card {
  position: relative;
  border-radius: var(--radius-xl);
  padding: var(--space-3xl) var(--space-xl);
  text-align: center;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s var(--ease-out);
}

.brand-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.brand-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  opacity: 0;
  transition: opacity var(--duration) var(--ease-out);
}

.brand-card:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.brand-card:hover::before {
  opacity: 1;
}

.brand-card--blue::before { background: var(--brand-blue); }
.brand-card--gold::before { background: var(--brand-gold); }
.brand-card--mystery::before { background: #8b5cf6; }

.brand-card__icon {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-xl);
  position: relative;
}

.brand-card__icon svg {
  width: 60px;
  height: 60px;
}

.brand-card--blue .brand-card__icon {
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.15);
}

.brand-card--gold .brand-card__icon {
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.15);
}

.brand-card--mystery .brand-card__icon {
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.15);
}

.brand-card__name {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--color-white);
  margin-bottom: var(--space-xs);
}

.brand-card__tagline {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: var(--space-lg);
}

.brand-card--blue .brand-card__tagline { color: var(--brand-blue); }
.brand-card--gold .brand-card__tagline { color: var(--brand-gold); }
.brand-card--mystery .brand-card__tagline { color: #8b5cf6; }

.brand-card__desc {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: var(--space-xl);
}

.brand-card__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 700;
  transition: all var(--duration) var(--ease-out);
  border: 1px solid;
}

.brand-card--blue .brand-card__link {
  color: var(--brand-blue);
  border-color: rgba(0, 212, 255, 0.3);
}

.brand-card--blue .brand-card__link:hover {
  background: var(--brand-blue);
  color: var(--color-bg);
  box-shadow: 0 0 30px rgba(0, 212, 255, 0.15);
}

.brand-card--gold .brand-card__link {
  color: var(--brand-gold);
  border-color: rgba(212, 175, 55, 0.3);
}

.brand-card--gold .brand-card__link:hover {
  background: var(--brand-gold);
  color: var(--color-bg);
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.15);
}

.brand-card--mystery .brand-card__link {
  color: #8b5cf6;
  border-color: rgba(139, 92, 246, 0.3);
  cursor: default;
}

.brand-card__badge {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 1px;
}

body.en .brand-card__badge {
  left: auto;
  right: var(--space-md);
}

.brand-card--gold .brand-card__badge {
  background: linear-gradient(135deg, var(--brand-gold), var(--color-gold-light));
  color: var(--color-bg);
}

.brand-card--mystery .brand-card__badge {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

/* ─── Values Section ─── */
.values {
  background: var(--color-bg-alt);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.value-item {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  transition: all var(--duration) var(--ease-out);
  background: var(--color-bg-glass);
}

.value-item:hover {
  border-color: var(--color-border-hover);
  background: rgba(255,255,255,0.04);
}

.value-item__icon {
  font-size: 2rem;
  margin-bottom: var(--space-md);
}

.value-item__title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-white);
  margin-bottom: var(--space-xs);
}

.value-item__desc {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ─── Footer ─── */
.footer {
  padding: var(--space-4xl) var(--space-xl) var(--space-2xl);
  border-top: 1px solid var(--color-border);
}

.footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.footer__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.footer__logo svg {
  width: 32px;
  height: 32px;
  opacity: 0.6;
}

.footer__logo-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text-muted);
}

.footer__contact {
  margin-bottom: var(--space-2xl);
}

.footer__email {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-gold);
  transition: opacity 0.3s;
}

.footer__email:hover {
  opacity: 0.7;
}

.footer__socials {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  transition: all var(--duration) var(--ease-out);
  font-size: 1.1rem;
}

.footer__social-link:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
}

.footer__copyright {
  font-size: 0.8rem;
  color: var(--color-text-dim);
  font-weight: 500;
}

.footer__brands {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
  flex-wrap: wrap;
}

.footer__brand-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-dim);
  transition: color 0.3s;
}

.footer__brand-link:hover {
  color: var(--color-text);
}

/* ─── Animations ─── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s var(--ease-out);
}

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

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .timeline::before {
    right: 24px;
    transform: none;
  }

  body.en .timeline::before {
    right: auto;
    left: 24px;
    transform: none;
  }

  .timeline__item,
  .timeline__item:nth-child(odd) {
    flex-direction: row;
    text-align: right;
    gap: var(--space-lg);
  }

  body.en .timeline__item,
  body.en .timeline__item:nth-child(odd) {
    flex-direction: row-reverse;
    text-align: left;
  }

  .timeline__spacer {
    display: none;
  }

  .timeline__dot {
    width: 40px;
    height: 40px;
    font-size: 16px;
    flex-shrink: 0;
  }

  .timeline__content {
    padding: var(--space-md);
  }

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

@media (max-width: 640px) {
  .nav__links {
    display: none;
  }

  .nav__hamburger {
    display: block;
  }

  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(6,6,6,0.98);
    backdrop-filter: blur(30px);
    justify-content: center;
    align-items: center;
    gap: var(--space-2xl);
    z-index: 200;
  }

  .nav__links.open .nav__link {
    font-size: 1.3rem;
  }

  .brands-grid {
    grid-template-columns: 1fr;
  }

  .values-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }

  .hero__title {
    font-size: 2.2rem;
  }

  .section {
    padding: var(--space-3xl) var(--space-md);
  }
}

/* ─── Prefers Reduced Motion (Accessibility) ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .fade-in,
  .timeline__item,
  .brand-card {
    opacity: 1;
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }
}
