/* mekahufn.com coming-soon page. Static, self-hosted, no scripts (strict CSP on the server). */

@font-face {
  font-family: "Tajawal";
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/tajawal-arabic-500-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: "Tajawal";
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/tajawal-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: "Tajawal";
  font-weight: 800;
  font-display: swap;
  src: url("/assets/fonts/tajawal-arabic-800-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: "Tajawal";
  font-weight: 800;
  font-display: swap;
  src: url("/assets/fonts/tajawal-latin-800-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F;
}
/* Ruqʿa, the hand Egyptians write shop and car signs in: only for what is handwritten on the sign. */
@font-face {
  font-family: "Aref Ruqaa";
  font-weight: 700;
  font-display: block;
  src: url("/assets/fonts/aref-ruqaa-arabic-700.woff2") format("woff2");
}

:root {
  --night: #071a2b;
  --street: #0a2236;
  --navy: #123b5d;
  --ink: #002541;
  --amber: #fe6b00;
  --mist: #c9dcf0;
  --mist-2: #a9c2da;
  --paper: #f6f5ef;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

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

html {
  background: var(--night);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-block-size: 100svh;
  font-family: "Tajawal", system-ui, sans-serif;
  font-weight: 500;
  color: #fff;
  /* night sky lit a little from above, the wet road under the car */
  background: linear-gradient(to bottom, #0f3150 0%, var(--night) 34% 58%, var(--street) 74%, var(--night) 100%);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--mist); color: var(--ink); }

main {
  display: grid;
  justify-items: center;
  min-block-size: 100svh;
  padding-block-end: max(2.5rem, env(safe-area-inset-bottom));
  overflow-x: clip;
}

/* The car: one object, roof just inside the top edge, never taller than ~60% of the screen. */
.car {
  display: block;
  inline-size: min(100%, calc(58svh * 390 / 560), 34rem);
  block-size: auto;
}

.badge {
  font: 800 12px "Tajawal", sans-serif;
  letter-spacing: 4.5px;
  fill: var(--mist);
  opacity: 0.8;
}
.plate-band { font: 800 8px "Tajawal", sans-serif; fill: #fff; }
.plate { font: 800 25px "Tajawal", sans-serif; fill: #06131f; word-spacing: 6px; }
.hand { font-family: "Aref Ruqaa", "Tajawal", serif; font-weight: 700; fill: #0b1e30; }
.hand-big { font-size: 64px; }
.hand-line { font-size: 19px; }
.strike { mix-blend-mode: multiply; opacity: 0.9; }
.sign-url { font: 800 21px "Tajawal", sans-serif; fill: var(--navy); letter-spacing: 0.5px; }

/* Copy sits on the street below the bumper, a page section of its own. */
.copy {
  inline-size: 100%;
  max-inline-size: 36rem;
  padding-inline: 1.5rem;
  margin-block-start: 0.5rem;
}

h1 {
  margin: 0;
  font-weight: 800;
  font-size: clamp(1.75rem, 1.2rem + 2.6vw, 2.75rem);
  line-height: 1.28;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.copy p {
  margin: 0.9rem 0 0;
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.7;
  color: var(--mist);
  text-wrap: pretty;
  max-inline-size: 34em;
}

.copy .quiet {
  margin-block-start: 0.35rem;
  color: var(--mist-2);
}

.copy .en {
  margin-block-start: 2rem;
  padding-block-start: 1.1rem;
  border-block-start: 1px solid rgba(201, 220, 240, 0.18);
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--mist-2);
  text-align: start;
}

@media (min-width: 48rem) {
  .car { inline-size: min(100%, calc(70svh * 390 / 560), 40rem); }
  .copy { text-align: center; }
  .copy p { margin-inline: auto; }
  .copy .en { text-align: center; }
}

/* The one authored moment: a passing car's headlights sweep the rear glass once,
   and the sign settles on its tape. Everything is visible before and after. */
.sign {
  transform-box: view-box;
  transform-origin: 195px 100px;
  transform: rotate(-2.4deg);
}
.sweep { transform: translateX(560px); }

@media (prefers-reduced-motion: no-preference) {
  .sign { animation: settle 1.6s var(--ease-out) 0.2s both; }
  .sweep { animation: sweep 2.2s cubic-bezier(0.45, 0, 0.2, 1) 0.5s both; }
  .strike {
    stroke-dasharray: 190;
    stroke-dashoffset: 0;
    animation: strike 0.7s var(--ease-out) 1.2s both;
  }
}

@keyframes settle {
  0% { transform: rotate(-6deg); }
  55% { transform: rotate(-1.2deg); }
  100% { transform: rotate(-2.4deg); }
}
@keyframes sweep {
  from { transform: translateX(0); }
  to { transform: translateX(560px); }
}
@keyframes strike {
  from { stroke-dashoffset: 190; }
  to { stroke-dashoffset: 0; }
}
