/* Druk/Nimbus (official) are commercially licensed: Bebas Neue and Manrope are the
   free substitutes already used by the storefront (OFL licences in fonts/). */
@font-face {
  font-family: "Bebas Neue Local";
  src: url("fonts/bebas-neue-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Manrope Local";
  src: url("fonts/manrope-latin-variable.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
/* Subset limited to the Arabic strings of waiting.js: regenerate it when they change. */
@font-face {
  font-family: "Noto Kufi Arabic Local";
  src: url("fonts/noto-kufi-arabic-subset.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0600-06FF, U+200C-200F, U+FB50-FEFF;
}

:root {
  color-scheme: dark;
  --black: #000000;
  --white: #ffffff;
  --muted: #bcbcbc;
  /* Logo red measured on body-attack.com (docs/03). */
  --red: #e40520;
  --display: "Bebas Neue Local", "Arial Narrow", Impact, sans-serif;
  --body: "Manrope Local", Arial, Helvetica, sans-serif;
  --film-lift: -9%;
  font-family: var(--body);
  background: var(--black);
  color: var(--white);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--black); }
html[lang="ar"] { font-family: "Noto Kufi Arabic Local", var(--body); }
[hidden] { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.waiting {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 100svh;
  min-height: 100dvh;
  padding: max(28px, env(safe-area-inset-top)) max(40px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(40px, env(safe-area-inset-left));
}

.film {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  transform: scale(1);
  transform-origin: center;
  transition: filter 260ms ease, transform 260ms ease;
}
/* On the still poster, lift the centred lockup so the text below never covers it.
   Only the move into this state is animated (end of the film); leaving it at start-up
   is instant, so the poster never slides while the film takes over. */
.waiting[data-playing="false"] .film {
  translate: 0 var(--film-lift);
  transition: filter 260ms ease, transform 260ms ease, translate 420ms ease;
}
.film picture, .film img, .film video { position: absolute; width: 100%; height: 100%; inset: 0; }
.film img { object-fit: cover; }
.film video { object-fit: cover; opacity: 0; }
.waiting[data-playing="true"] .film video { opacity: 1; }
.focus-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  background-color: rgba(0, 0, 0, 0.34);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
  background-size: 150px 150px;
  mix-blend-mode: normal;
  transition: opacity 220ms ease;
}
.waiting[data-notify-open="true"] .film {
  filter: blur(11px) brightness(0.48) saturate(0.72);
  transform: scale(1.035);
}
.waiting[data-notify-open="true"] .focus-backdrop { opacity: 0.5; }

.masthead { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-inline-end: 58px; }
.masthead h1 { display: flex; align-items: center; gap: 12px; margin: 0; line-height: 1; }
.brand-logo { display: block; width: auto; height: 15px; }
.signature {
  padding-inline-start: 12px;
  border-inline-start: 2px solid var(--red);
  color: var(--white);
  font-family: var(--display);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 0.8;
}

.language-picker {
  position: absolute;
  inset-block-start: max(24px, env(safe-area-inset-top));
  inset-inline-end: max(40px, env(safe-area-inset-right));
  z-index: 2;
}
.language-picker select {
  min-width: 46px;
  padding: 5px 18px 5px 6px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(0, 0, 0, 0.18);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  color-scheme: dark;
}
.language-picker select:hover { color: var(--white); border-bottom-color: rgba(255, 255, 255, 0.62); }
.language-picker select:focus-visible,
.contact-mail:focus-visible,
.notify-trigger:focus-visible,
.notify-submit:focus-visible,
.privacy-link:focus-visible,
.notify-form input:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

.message { text-align: center; margin: auto auto 0; width: min(100%, 680px); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1.2;
  text-transform: uppercase;
}
.eyebrow::before, .eyebrow::after { content: ""; width: 24px; height: 2px; background: var(--red); }
.announcement {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: clamp(38px, 4vw, 60px);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 0.92;
  text-transform: uppercase;
  text-wrap: balance;
}
.description { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0 auto; max-width: 560px; text-wrap: pretty; }
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: 13px; }
html[lang="ar"] .announcement {
  font-family: "Noto Kufi Arabic Local", var(--body);
  font-size: clamp(30px, 3.4vw, 46px);
  font-weight: 800;
  line-height: 1.35;
}

.business-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 18px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  text-align: center;
}
.contact-label {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.5;
  text-transform: uppercase;
}
html[lang="ar"] .contact-label { letter-spacing: 0; font-size: 12px; }
.contact-mail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}
.contact-mail span { padding-bottom: 2px; border-bottom: 2px solid var(--red); transition: color 160ms ease; }
.contact-mail:hover span { color: #ff3347; }
.mail-icon { width: 18px; height: 18px; fill: none; stroke: var(--red); stroke-width: 1.8; stroke-linejoin: round; }
.launch-notify { margin-top: 18px; }
.notify-trigger {
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--red);
  border-radius: 0;
  color: var(--white);
  background: var(--red);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease;
}
.notify-trigger:hover { border-color: #ff2a3d; background: #ff1a33; }
.notify-form {
  width: min(100%, 580px);
  margin: 16px auto 0;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.78);
  box-shadow: 0 22px 64px rgba(0, 0, 0, 0.34);
  text-align: start;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.waiting[data-notify-open="true"] .announcement,
.waiting[data-notify-open="true"] .description {
  opacity: 0.28;
}
.waiting[data-notify-open="true"] .notify-trigger {
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(228, 5, 32, 0.72);
  background: rgba(228, 5, 32, 0.72);
}
.contact-field { display: grid; gap: 7px; color: rgba(255, 255, 255, 0.78); font-size: 12px; }
.contact-field input {
  min-width: 0;
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 0;
  color: var(--white);
  background: rgba(0, 0, 0, 0.42);
  font: inherit;
  font-size: 14px;
}
.contact-field input::placeholder { color: rgba(255, 255, 255, 0.48); }
.privacy-link {
  display: inline-block;
  margin-top: 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  line-height: 1.5;
  text-decoration: none;
}
.privacy-link:hover { color: var(--white); border-bottom-color: var(--white); }
.notify-submit {
  width: 100%;
  min-height: 42px;
  margin-top: 14px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 0;
  color: var(--black);
  background: var(--white);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.notify-submit:hover { background: #dedede; }
.consent { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.consent input { flex: 0 0 auto; width: 15px; height: 15px; margin: 1px 0 0; accent-color: var(--red); }
.preview-note, .notify-status { margin: 9px 0 0; color: rgba(255, 255, 255, 0.58); font-size: 10px; line-height: 1.4; }
.notify-status { color: var(--white); }
.controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; margin-top: 18px; }
.media-control {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(0, 0, 0, 0.16);
  font: inherit;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: color 160ms ease, background-color 160ms ease, opacity 160ms ease;
}
.media-control:hover { color: var(--white); background: rgba(0, 0, 0, 0.42); }
.media-control:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; }
.secondary { color: rgba(255, 255, 255, 0.58); }
.control-icon { width: 18px; height: 18px; fill: currentColor; }
.icon-replay { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-sound-on, .icon-sound-off { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#play .control-icon { display: none; }
#play[data-icon="play"] .icon-play,
#play[data-icon="pause"] .icon-pause,
#play[data-icon="replay"] .icon-replay { display: block; }
#sound .control-icon { display: none; }
#sound[data-icon="sound-on"] .icon-sound-on,
#sound[data-icon="sound-off"] .icon-sound-off { display: block; }
.playback-status { min-height: 16px; margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.no-script { font-size: 12px; color: var(--muted); }

.masthead,
.eyebrow,
.announcement,
.description,
.launch-notify,
.business-contact {
  transition: opacity 180ms ease;
}

/* The business contact stays reachable during the film, only toned down. */
.waiting[data-playing="true"] .business-contact { opacity: 0.6; border-top-color: transparent; }
.waiting[data-playing="true"] .business-contact:hover,
.waiting[data-playing="true"] .business-contact:focus-within { opacity: 1; }

.waiting[data-playing="true"] .masthead,
.waiting[data-playing="true"] .eyebrow,
.waiting[data-playing="true"] .announcement,
.waiting[data-playing="true"] .description,
.waiting[data-playing="true"] .launch-notify {
  visibility: hidden;
  opacity: 0;
}

.waiting[data-playing="true"] .controls {
  margin-top: 0;
  justify-content: flex-end;
  opacity: 0.66;
}

.waiting[data-playing="true"] .message {
  width: 100%;
  max-width: none;
  margin: auto 0 0;
}

.waiting[data-playing="true"] .media-control {
  background: rgba(0, 0, 0, 0.12);
}

.waiting[data-playing="true"] .controls:hover,
.waiting[data-playing="true"] .controls:focus-within {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .film,
  .focus-backdrop,
  .masthead,
  .eyebrow,
  .announcement,
  .description,
  .launch-notify,
  .business-contact {
    transition: none;
  }
}

@media (max-aspect-ratio: 1/1) {
  .waiting {
    padding: max(22px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  }
  .brand-logo { height: 12px; }
  .masthead h1 { gap: 9px; }
  .signature { padding-inline-start: 9px; font-size: 18px; }
  .masthead { padding-inline-end: 50px; }
  .language-picker { inset-block-start: max(18px, env(safe-area-inset-top)); inset-inline-end: max(20px, env(safe-area-inset-right)); }
  .description { font-size: 14px; max-width: 340px; }
  .announcement { font-size: clamp(40px, 12vw, 52px); }
  html[lang="ar"] .announcement { font-size: clamp(26px, 8vw, 34px); }
  .controls { margin-top: 12px; }
  .business-contact { flex-direction: column; gap: 4px; margin-top: 10px; padding-top: 12px; }
  .contact-label { max-width: 300px; }
}

/* Phones narrower than the 9:16 film: show the whole lockup instead of cropping
   "BODY ATTACK | MAROC". The film edges are black, so the bands are invisible. */
@media (max-aspect-ratio: 9/16) {
  :root { --film-lift: -7%; }
  .film img, .film video { object-fit: contain; }
}

/* Short phones (iPhone SE class): compact copy so it stays below the lockup. */
@media (max-aspect-ratio: 1/1) and (max-height: 640px) {
  :root { --film-lift: -17%; }
  .eyebrow { display: none; }
  .announcement { font-size: 34px; margin-bottom: 8px; }
  html[lang="ar"] .announcement { font-size: 24px; }
  .description { font-size: 12.5px; line-height: 1.45; }
  .controls { margin-top: 4px; }
  .business-contact { margin-top: 4px; padding-top: 6px; }
  .contact-label { font-size: 10px; }
  .contact-mail { min-height: 36px; font-size: 14px; }
}

@media (max-height: 550px) and (min-aspect-ratio: 1/1) {
  :root { --film-lift: -24%; }
  .waiting { padding-top: 14px; padding-bottom: 10px; }
  .eyebrow { display: none; }
  .announcement { font-size: 30px; margin-bottom: 4px; }
  html[lang="ar"] .announcement { font-size: 24px; }
  .description { font-size: 12px; line-height: 1.4; }
  .controls { margin-top: 8px; }
  .business-contact { margin-top: 4px; padding-top: 0; border-top: 0; gap: 4px 14px; }
  .contact-mail { min-height: 36px; font-size: 14px; }
}
