:root {
  --lime: #b7f514;
  --ink: #0b0d08;
  --soft: rgba(11, 13, 8, 0.64);
  --rule: rgba(11, 13, 8, 0.18);
  --gutter: clamp(20px, 4vw, 56px);
  --font: 'General Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --drive: cubic-bezier(0.22, 0.9, 0.24, 1);
}

[dir='rtl'] {
  --font: 'IBM Plex Sans Arabic', 'General Sans', system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--lime);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a,
button {
  color: inherit;
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

/* The Wigo mark, drawn as two rounded strokes */
.mark {
  display: block;
  fill: none;
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

.mark .w {
  stroke-width: 85;
}

.mark .smile {
  stroke-width: 45;
}

/* Header */
.bar {
  display: flex;
  justify-content: flex-end;
  padding: 28px var(--gutter);
}

.lang {
  position: relative;
  z-index: 10;
}

.icon {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lang-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 10px 0 12px;
  border: 1px solid rgba(11, 13, 8, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.32);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.lang-button:hover,
.lang[data-open] .lang-button {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(11, 13, 8, 0.28);
}

.chevron {
  width: 15px;
  height: 15px;
  transition: transform 0.25s var(--ease);
}

.lang[data-open] .chevron {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-end: 0;
  min-width: 100%;
  margin: 0;
  padding: 4px;
  list-style: none;
  border: 1px solid rgba(11, 13, 8, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 28px -14px rgba(11, 13, 8, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.16s, transform 0.22s var(--ease), visibility 0s 0.16s;
}

.lang[data-open] .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

.lang-menu button {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: none;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  text-align: start;
  cursor: pointer;
}

.lang-menu button:hover {
  background: rgba(11, 13, 8, 0.07);
}

.lang-menu [aria-checked='true'],
.lang-menu [aria-checked='true']:hover {
  background: var(--ink);
  color: var(--lime);
}

.lang-menu button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}

.lang [lang='ar'] {
  font-family: 'IBM Plex Sans Arabic', sans-serif;
}

.lang [lang='en'] {
  font-family: 'General Sans', sans-serif;
}

/* Stage */
.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  align-items: end;
  gap: clamp(24px, 4vw, 72px);
  padding: 0 var(--gutter) clamp(28px, 5vh, 64px);
  overflow-x: clip;
}

.kicker {
  margin: 0 0 clamp(12px, 2vh, 22px);
  font-size: 15px;
  font-weight: 500;
  color: var(--soft);
  animation: fade 1s 0.4s var(--ease) both;
}

h1 {
  margin: 0;
  font-size: clamp(76px, 12.5vw, 192px);
  font-weight: 600;
  line-height: 0.86;
  letter-spacing: -0.055em;
}

[dir='rtl'] h1 {
  font-size: clamp(72px, 11.5vw, 172px);
  line-height: 1.15;
  letter-spacing: 0;
}

.line {
  display: block;
  padding-bottom: 0.28em;
  margin-bottom: -0.22em;
  overflow: visible clip;
}

.line > span {
  display: block;
  animation: rise 1.1s var(--ease) both;
}

.line:nth-child(1) > span {
  animation-delay: 0.15s;
}

.line:nth-child(2) > span {
  animation-delay: 0.27s;
}

.lede {
  max-width: 30ch;
  margin: clamp(20px, 3vh, 32px) 0 0;
  font-size: clamp(18px, 1.5vw, 22px);
  font-weight: 500;
  line-height: 1.45;
  animation: fade 1s 0.6s var(--ease) both;
}

[dir='rtl'] .lede {
  font-weight: 400;
  line-height: 1.7;
}

/* Showcase: the mark writes itself, then the car pulls in */
.showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(20px, 4vh, 48px);
  min-width: 0;
}

.drawn {
  width: min(50%, 36vh);
  aspect-ratio: 424 / 348;
}

.drawn path {
  stroke-dasharray: 1 2;
  stroke-dashoffset: 1;
  animation: write 1.3s 0.25s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

.drawn .smile {
  animation-duration: 0.7s;
  animation-delay: 1.35s;
}

.road {
  position: relative;
  width: 100%;
}

.road::after {
  content: '';
  position: absolute;
  inset-inline: -4% -100vw;
  bottom: 6.3%;
  height: 1px;
  background: var(--rule);
}



.car {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  animation: drive 2.6s 1.1s var(--drive) both;
}

[dir='rtl'] .car {
  scale: -1 1;
}

.chassis {
  transform-box: view-box;
  transform-origin: 778px 250px;
  animation: pitch 2.6s 1.1s ease-in-out both;
}

.streaks {
  animation: streaks 2.6s 1.1s ease-out both;
}

.crease {
  fill: none;
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 2;
}

.crease.soft {
  stroke: rgba(255, 255, 255, 0.08);
}

.lightbar {
  fill: none;
  stroke: var(--lime);
  stroke-width: 5;
  stroke-linecap: round;
  animation: lights 0.9s 3.4s ease-out both;
}

.lightbar.rear {
  stroke-width: 4;
}

.caliper {
  fill: none;
  stroke: var(--lime);
  stroke-width: 11;
  stroke-linecap: round;
}

.rim {
  transform-box: fill-box;
  transform-origin: center;
  animation: spin 2.6s 1.1s var(--drive) both;
}

.blades {
  fill: #2c3224;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 1.5;
}

/* Services */
.services {
  padding: 0 var(--gutter) calc(24px + env(safe-area-inset-bottom));
  animation: fade 1s 0.8s var(--ease) both;
}

.services dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 clamp(16px, 2.5vw, 40px);
  margin: 0;
}

.services dl > div {
  padding: 20px 0 26px;
  border-top: 1px solid var(--rule);
}

dt {
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 600;
}

dd {
  margin: 0;
  max-width: 28ch;
  font-size: 15px;
  line-height: 1.5;
  color: var(--soft);
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 32px;
  font-style: normal;
}

.contact a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  text-underline-offset: 3px;
}

.contact a:hover {
  text-decoration: underline;
}

.contact .icon {
  flex: none;
  width: 16px;
  height: 16px;
}

.legal {
  margin: 0;
  font-size: 13px;
  color: var(--soft);
}

/* Motion */
@keyframes write {
  0% {
    opacity: 0;
  }
  1% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    stroke-dashoffset: 0;
  }
}

@keyframes drive {
  0% {
    transform: translateX(-115vw);
  }
  78% {
    transform: translateX(1.5%);
  }
  100% {
    transform: translateX(0);
  }
}

[dir='rtl'] .car {
  animation-name: drive-rtl;
}

@keyframes drive-rtl {
  0% {
    transform: translateX(115vw);
  }
  78% {
    transform: translateX(-1.5%);
  }
  100% {
    transform: translateX(0);
  }
}

/* Nose lifts as it pulls away, dips as it brakes, then settles */
@keyframes pitch {
  0% {
    transform: rotate(0);
  }
  15% {
    transform: rotate(-0.8deg);
  }
  60% {
    transform: rotate(0);
  }
  80% {
    transform: rotate(1.1deg);
  }
  92% {
    transform: rotate(-0.3deg);
  }
  100% {
    transform: rotate(0);
  }
}

@keyframes streaks {
  0%,
  45% {
    opacity: 1;
  }
  80%,
  100% {
    opacity: 0;
  }
}

@keyframes lights {
  0% {
    opacity: 0.15;
  }
  30% {
    opacity: 1;
  }
  45% {
    opacity: 0.35;
  }
  100% {
    opacity: 1;
  }
}

@keyframes spin {
  from {
    transform: rotate(-1440deg);
  }
}

@keyframes rise {
  from {
    transform: translateY(105%);
  }
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .drawn path {
    stroke-dasharray: none;
  }
}

/* Tablet and phone */
@media (max-width: 900px) {
  .stage {
    grid-template-columns: 1fr;
    align-content: end;
    gap: clamp(28px, 5vh, 48px);
    padding-top: 8px;
  }

  .showcase {
    order: -1;
  }

  .drawn {
    width: min(46vw, 26vh);
  }
}

@media (max-width: 560px) {
  .bar {
    padding-block: 20px;
  }

  .services dl {
    grid-template-columns: 1fr;
  }

  .services dl > div {
    padding: 16px 0 18px;
  }

  .foot,
  .contact {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact a {
    align-items: flex-start;
    line-height: 1.5;
  }

  .contact .icon {
    margin-top: 2px;
  }
}
