/* ============================================
   Paddock Crew — Base Styles & Header
   ============================================ */

:root {
  --color-black: #050505;
  --color-black-soft: #0d0d0d;
  --color-red: #b60b09;
  --color-red-bright: #e8241f;
  --color-white: #f5f5f5;
  --color-grey: #9a9a9a;
  --color-grey-light: #c7c7c7;

  --font-display: 'Rajdhani', 'Segoe UI', Tahoma, sans-serif;
  --font-body: 'Inter', 'Segoe UI', Tahoma, sans-serif;
  --font-arabic: 'Cairo', 'Segoe UI', Tahoma, sans-serif;

  --header-height: 84px;
  --header-height-mobile: 64px;

  --transition-fast: 0.2s ease;
  --transition-medium: 0.35s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Site stays LTR structurally even in Arabic, per project decision */
  direction: ltr;
}

body {
  background: var(--color-black);
  color: var(--color-white);
  font-family: var(--font-body);
  line-height: 1.5;
  overflow-x: hidden;
}

body[data-lang="ar"] {
  font-family: var(--font-arabic);
}

/* Long-form paragraphs read more naturally right-aligned in Arabic,
   even while the page shell itself remains LTR (see project notes) */
body[data-lang="ar"] .text-block-ar-right {
  text-align: right;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

:focus-visible {
  outline: 2px solid var(--color-red-bright);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================
   Header
   ============================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: rgba(5, 5, 5, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background var(--transition-medium), top var(--transition-medium);
}

/* Brand */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand__logo {
  height: 54px;
  width: auto;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--color-white);
  white-space: nowrap;
}

/* Desktop nav */
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 40px;
}

.nav-desktop__links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-grey-light);
  position: relative;
  padding: 6px 2px;
  transition: color var(--transition-fast);
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--color-white);
}

.nav-link::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.16);
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--color-red-bright);
  transition: width var(--transition-fast);
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  width: 100%;
}

/* Language toggle (desktop) */
.lang-toggle {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  padding: 8px 16px;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.lang-toggle:hover,
.lang-toggle:focus-visible {
  border-color: var(--color-red-bright);
  background: rgba(230, 36, 31, 0.08);
}

/* Hamburger (mobile) */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  gap: 5px;
}

.hamburger__bar {
  width: 24px;
  height: 2px;
  background: var(--color-white);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.hamburger[aria-expanded="true"] .hamburger__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger[aria-expanded="true"] .hamburger__bar:nth-child(2) {
  opacity: 0;
}
.hamburger[aria-expanded="true"] .hamburger__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile language button (separate, always visible) */
.lang-toggle--mobile {
  display: none;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  padding: 6px 12px;
}

/* Side drawer (mobile nav) */
.nav-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 78%;
  max-width: 320px;
  background: var(--color-black-soft);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 1200;
  transform: translateX(-100%);
  transition: transform var(--transition-medium);
  display: flex;
  flex-direction: column;
  padding: 28px 28px;
}

.nav-drawer.is-open {
  transform: translateX(0);
}

.nav-drawer__close {
  align-self: flex-end;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  color: var(--color-white);
  margin-bottom: 20px;
}

.nav-drawer__links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-drawer__links .nav-link {
  font-size: 1.1rem;
  padding: 14px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--color-grey-light);
}

.nav-drawer__links .nav-link:hover,
.nav-drawer__links .nav-link:focus-visible {
  color: var(--color-white);
}

.nav-drawer__links .nav-link::after,
.nav-drawer__links .nav-link::before {
  display: none;
}

/* Overlay behind drawer */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-medium);
}

.nav-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Prevent body scroll when drawer open */
body.drawer-open {
  overflow: hidden;
}

/* ============================================
   Responsive breakpoints
   ============================================ */

@media (max-width: 900px) {
  .site-header {
    height: var(--header-height-mobile);
    padding: 0 20px;
  }

  .brand__logo {
    height: 42px;
  }

  .brand__name {
    font-size: 1rem;
  }

  .nav-desktop__links {
    display: none;
  }

  .lang-toggle {
    display: none;
  }

  .lang-toggle--mobile {
    display: inline-block;
  }

  .hamburger {
    display: flex;
  }

  .nav-desktop {
    gap: 12px;
  }
}

/* ============================================
   Placeholder for sections built later
   ============================================ */

.section-placeholder {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-grey);
  font-size: 1rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  padding-top: var(--header-height);
}
