:root {
  --ink: #3e2723;
  --muted: #6d4c41;
  --orange: #ff6d00;
  --amber: #ff9800;
  --lemon: #ffc107;
  --surface: #fffbf7;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body.home {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: "Tajawal", "Outfit", sans-serif;
  background: #1a120f;
  overflow-x: hidden;
  position: relative;
}

html[lang="en"] body.home {
  font-family: "Outfit", "Tajawal", sans-serif;
}

.sky {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(120% 80% at 70% 10%, rgba(255, 179, 0, 0.35), transparent 55%),
    radial-gradient(90% 70% at 15% 80%, rgba(244, 81, 30, 0.28), transparent 50%),
    linear-gradient(165deg, #2a1812 0%, #4a2418 38%, #ff8a3d 78%, #ffd27a 100%);
  z-index: 0;
  animation: skyShift 14s ease-in-out infinite alternate;
}

.glow {
  position: fixed;
  inset: auto -10% -20% -10%;
  height: 55%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.18), transparent 65%);
  filter: blur(8px);
  z-index: 1;
  pointer-events: none;
  animation: glowPulse 5s ease-in-out infinite;
}

.top {
  position: relative;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px clamp(18px, 4vw, 40px);
}

.mark {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: #fff8f0;
  text-decoration: none;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.25);
}

.lang {
  border: 1px solid rgba(255, 248, 240, 0.28);
  background: rgba(255, 248, 240, 0.12);
  color: #fff8f0;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font: inherit;
  backdrop-filter: blur(8px);
}

.stage {
  position: relative;
  z-index: 4;
  min-height: calc(100vh - 140px);
  display: grid;
  align-content: center;
  gap: clamp(28px, 6vh, 56px);
  padding: 8px clamp(18px, 5vw, 56px) 24px;
}

.copy {
  max-width: 18ch;
  animation: riseIn 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.eyebrow {
  margin: 0 0 10px;
  color: rgba(255, 248, 240, 0.72);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.brand-hero {
  margin: 0;
  font-size: clamp(3.4rem, 12vw, 6.4rem);
  line-height: 0.95;
  font-weight: 800;
  color: #fffaf4;
  text-shadow: 0 10px 40px rgba(62, 39, 35, 0.35);
  letter-spacing: -0.02em;
}

.lead {
  margin: 16px 0 0;
  max-width: 22ch;
  font-size: clamp(1.05rem, 2.6vw, 1.35rem);
  line-height: 1.55;
  color: rgba(255, 248, 240, 0.88);
  font-weight: 500;
}

.scene {
  position: relative;
  height: clamp(180px, 28vh, 260px);
  border-radius: 28px 28px 0 0;
  overflow: hidden;
  isolation: isolate;
  animation: riseIn 1100ms 120ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.horizon {
  position: absolute;
  inset: 0 0 42% 0;
  background: linear-gradient(180deg, transparent, rgba(255, 214, 140, 0.35));
}

.hills {
  position: absolute;
  left: -5%;
  right: -5%;
  bottom: 38%;
  height: 42%;
  background:
    radial-gradient(60% 100% at 20% 100%, #6d3b22 0 60%, transparent 61%),
    radial-gradient(70% 120% at 70% 100%, #8a4a28 0 58%, transparent 59%),
    radial-gradient(50% 100% at 95% 100%, #5a2f1a 0 55%, transparent 56%);
  opacity: 0.85;
}

.road {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 46%;
  background: linear-gradient(180deg, #4a3a36, #2d2421);
  overflow: hidden;
}

.lane {
  position: absolute;
  left: 0;
  top: 48%;
  width: 200%;
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    #ffc107 0 42px,
    transparent 42px 78px
  );
  transform: translateX(0);
  animation: laneRun 1.8s linear infinite;
}

html[dir="rtl"] .lane {
  animation-name: laneRunRtl;
}

.car {
  position: absolute;
  bottom: 18%;
  left: 50%;
  transform: translateX(-50%);
  animation: carBob 2.4s ease-in-out infinite;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.35));
}

.signs {
  position: absolute;
  top: 18%;
  inset-inline-end: 8%;
  display: grid;
  gap: 7px;
  padding: 10px 8px;
  border-radius: 14px;
  background: rgba(30, 20, 16, 0.55);
  border: 1px solid rgba(255, 248, 240, 0.18);
  backdrop-filter: blur(4px);
}

.lamp {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #5a4038;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.lamp.red {
  animation: lightCycle 4.8s infinite;
}

.lamp.amber {
  animation: lightCycle 4.8s 1.6s infinite;
}

.lamp.green {
  animation: lightCycle 4.8s 3.2s infinite;
}

.quiet {
  position: relative;
  z-index: 5;
  padding: 18px clamp(18px, 4vw, 40px) 28px;
  display: flex;
  justify-content: center;
  gap: 10px;
  font-size: 0.78rem;
  color: rgba(255, 248, 240, 0.42);
}

.quiet a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 160ms ease, border-color 160ms ease;
}

.quiet a:hover {
  color: rgba(255, 248, 240, 0.78);
  border-bottom-color: rgba(255, 248, 240, 0.35);
}

[hidden] {
  display: none !important;
}

@keyframes skyShift {
  from {
    filter: saturate(1) brightness(1);
  }
  to {
    filter: saturate(1.12) brightness(1.06);
  }
}

@keyframes glowPulse {
  0%,
  100% {
    opacity: 0.55;
    transform: translateY(0);
  }
  50% {
    opacity: 0.9;
    transform: translateY(-8px);
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes laneRun {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-78px);
  }
}

@keyframes laneRunRtl {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(78px);
  }
}

@keyframes carBob {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-4px);
  }
}

@keyframes lightCycle {
  0%,
  28%,
  100% {
    background: #5a4038;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  }
  8%,
  22% {
    background: #ff6d00;
    box-shadow: 0 0 12px rgba(255, 109, 0, 0.85);
  }
}

@media (min-width: 900px) {
  .stage {
    grid-template-columns: 1.05fr 1fr;
    align-items: end;
    min-height: calc(100vh - 120px);
    padding-bottom: 48px;
  }

  .copy {
    max-width: 14ch;
    padding-bottom: 28px;
  }

  .scene {
    height: min(52vh, 420px);
    border-radius: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sky,
  .glow,
  .lane,
  .car,
  .lamp,
  .copy,
  .scene {
    animation: none !important;
  }
}
