/* DangClub · دەنگ کڵەب — site-mode pages: "coming soon" (/_soon/) and "maintenance" (/_maintenance/).
   Served by the Pages Function when the admin switches the site mode. Brand style "F-brand" (teaser v2):
   coral field, rounded teal / amber tiles, white sound-wave ribbon, red app-icon tile, Noto Kufi, white pills.
   Standalone (site.css is not loaded). No inline styles or scripts: the CSP is 'self' only.
   Motion is transform / opacity only and switches off under prefers-reduced-motion.
   Bump ?v= in the six pages when this file changes (README › Caching). */

@font-face {
  font-family: "Noto Kufi Arabic";
  font-weight: 700;
  src: url("/assets/fonts/NotoKufiArabic-Bold.woff2") format("woff2"), url("/assets/fonts/NotoKufiArabic-Bold.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Noto Kufi Arabic";
  font-weight: 800;
  src: url("/assets/fonts/NotoKufiArabic-ExtraBold.woff2") format("woff2"), url("/assets/fonts/NotoKufiArabic-ExtraBold.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: light;
  --coral: #E0302F;
  --coral-hi: #F74040;
  --coral-deep: #C42726;
  --coral-ink: #B92222;
  --teal: #279999;
  --teal-dark: #1E7A7A;
  --amber: #F7B540;
  --ink: #1C1A1F;
  --gutter: 16px;
  --font: "Noto Kufi Arabic", system-ui, sans-serif;
  --latin: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --round: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
/* Noto Kufi Arabic has no Latin glyphs: English uses a rounded system face. */
html[lang="en"] { --font: var(--round); }
@media (min-width: 600px) { :root { --gutter: 28px; } }
@media (min-width: 1000px) { :root { --gutter: 44px; } }

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  background: #D92D2C;
  overflow-x: clip;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: minmax(0, 1fr);
  position: relative;
  overflow-x: clip;
  color: #FFFFFF;
  font-family: var(--font);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  /* the F-brand field: horizontal coral band, warm top light, deep bottom, soft centre glow */
  background-color: var(--coral);
  background-image:
    radial-gradient(ellipse 70% 55% at 50% 40%, rgba(255, 122, 98, .26), rgba(255, 122, 98, 0) 70%),
    linear-gradient(180deg, rgba(255, 106, 85, .42) 0%, rgba(255, 106, 85, 0) 40%, rgba(122, 14, 16, 0) 68%, rgba(122, 14, 16, .38) 100%),
    linear-gradient(90deg, #DD2E2D 0%, #E5352F 50%, #DD2E2D 100%);
}
html[lang="en"] body { line-height: 1.55; }
img, svg { display: block; max-width: 100%; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid #FFFFFF; outline-offset: 3px; border-radius: 10px; }
[dir="ltr"], .latin { font-family: var(--latin); }
.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;
}

/* ---------- Background tiles (decorative, fixed, clipped: never a horizontal scroll) ---------- */
.scene { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.tile {
  position: absolute; display: block; border-radius: 26%;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .18), 0 30px 60px -24px rgba(80, 6, 8, .45);
  transform: rotate(var(--r));
  will-change: transform;
  animation: drift 18s ease-in-out infinite alternate;
}
.tile.teal { background: linear-gradient(150deg, #2EA8A8 0%, var(--teal) 45%, var(--teal-dark) 100%); }
.tile.amber { background: linear-gradient(150deg, #FFC75E 0%, var(--amber) 50%, #EEA22C 100%); }
.tile.deep { background: linear-gradient(150deg, #D02B2A 0%, var(--coral-deep) 55%, #A91D1D 100%); box-shadow: 0 30px 60px -24px rgba(80, 6, 8, .35); }
/* t1 teal top-start · t2 amber top-end · t3 amber bottom-end · t4 deep coral bottom-start · t5 small amber */
.t1 { --r: -11deg; width: 210px; height: 210px; top: -74px; inset-inline-start: -84px; }
.t2 { --r: 12deg; width: 120px; height: 120px; top: 92px; inset-inline-end: -58px; animation-duration: 15s; animation-delay: -6s; }
.t3 { --r: 10deg; width: 170px; height: 170px; bottom: 96px; inset-inline-end: -128px; animation-duration: 21s; animation-delay: -3s; }
.t4 { --r: 8deg; width: 250px; height: 250px; bottom: -170px; inset-inline-start: -70px; animation-duration: 24s; animation-delay: -9s; }
.t5 { --r: -9deg; width: 64px; height: 64px; bottom: 23%; inset-inline-start: -26px; animation-duration: 13s; animation-delay: -4s; }
@media (min-width: 700px) {
  .t1 { width: 340px; height: 340px; top: -120px; inset-inline-start: -110px; }
  .t2 { width: 170px; height: 170px; top: 18%; inset-inline-end: -64px; }
  .t3 { width: 330px; height: 330px; bottom: -110px; inset-inline-end: -90px; }
  .t4 { width: 400px; height: 400px; bottom: -250px; inset-inline-start: 9%; }
  .t5 { width: 96px; height: 96px; bottom: 30%; inset-inline-start: -30px; }
}
@media (min-width: 1200px) {
  .t1 { width: 420px; height: 420px; top: -150px; inset-inline-start: -120px; }
  .t2 { width: 200px; height: 200px; top: 22%; inset-inline-end: -60px; }
  .t3 { width: 400px; height: 400px; bottom: -130px; inset-inline-end: -100px; }
  .t4 { width: 480px; height: 480px; bottom: -310px; inset-inline-start: 14%; }
  .t5 { width: 120px; height: 120px; bottom: 34%; inset-inline-start: 4%; }
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) rotate(var(--r)); }
  to { transform: translate3d(10px, -16px, 0) rotate(calc(var(--r) + 4deg)); }
}

/* ---------- Header ---------- */
.top {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 16px var(--gutter);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: #FFFFFF; text-decoration: none; flex: none; }
.brand .mk {
  width: 34px; height: 34px; flex: none; border-radius: 10px;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .55), 0 8px 18px rgba(90, 8, 8, .3);
}
.wordmark { font-family: "Noto Kufi Arabic", sans-serif; font-weight: 800; white-space: nowrap; }
.wordmark:lang(en) { font-family: var(--round); letter-spacing: -.01em; }
.brand { gap: 8px; }
.brand .wordmark { font-size: 19px; line-height: 1.3; }
.brand .wordmark:lang(en) { font-size: 19px; }
/* very narrow phones: the language pill needs the room, the header keeps the app mark only */
@media (max-width: 349px) { .brand .wordmark { display: none; } }
@media (max-width: 379px) { .top { padding-inline: 12px; } }

.langs {
  display: flex; gap: 2px; margin: 0; padding: 4px; list-style: none;
  border-radius: 999px;
  background: rgba(110, 10, 14, .26);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.langs a {
  min-height: 38px; min-width: 40px; padding: 0 9px; display: flex; align-items: center; justify-content: center;
  border-radius: 999px; font-family: "Noto Kufi Arabic", sans-serif; font-weight: 700; font-size: 14px; line-height: 1;
  color: #FFFFFF; text-decoration: none;
  transition: background-color .2s ease;
}
.langs a[lang="en"] { font-family: var(--latin); font-weight: 600; }
.langs a:hover { background: rgba(255, 255, 255, .14); }
.langs a[aria-current="page"] { background: #FFFFFF; color: var(--coral-ink); }
/* phones: "English" is shown as "EN" so the header fits on one row */
.langs .short { display: none; }
@media (max-width: 419px) {
  .langs .full { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .langs .short { display: inline; }
}
@media (max-width: 339px) { .langs a { padding: 0 8px; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 4px 0 28px;
  overflow-x: clip;
}
/* the sound-wave ribbon runs edge to edge; the app icon sits on it */
.stage { position: relative; width: 100%; height: clamp(140px, 26svh, 240px); display: grid; place-items: center; }
/* soft light behind the icon */
.stage::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 320px; height: 320px; margin: -160px 0 0 -160px;
  border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 170, 150, .34), rgba(255, 170, 150, 0));
}
.ribbon {
  position: absolute; inset-inline: 0; top: 50%; height: 168px; margin-top: -84px;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 14%, #000 86%, transparent 100%);
}
.ribbon i {
  flex: none; display: block; width: 6px; border-radius: 6px; background: #FFFFFF;
  opacity: .24; transform-origin: 50% 50%;
  will-change: transform;
  animation: eq 2.6s ease-in-out infinite alternate;
}
/* bar heights (share of the ribbon) and a little opacity depth */
.ribbon .h0 { height: 8%; opacity: .18; }
.ribbon .h1 { height: 14%; opacity: .2; }
.ribbon .h2 { height: 22%; }
.ribbon .h3 { height: 31%; }
.ribbon .h4 { height: 40%; }
.ribbon .h5 { height: 50%; opacity: .27; }
.ribbon .h6 { height: 60%; opacity: .28; }
.ribbon .h7 { height: 70%; opacity: .3; }
.ribbon .h8 { height: 82%; opacity: .32; }
.ribbon .h9 { height: 94%; opacity: .34; }
/* staggered phases: a travelling, organic wave */
.ribbon i:nth-child(9n+1) { animation-delay: -.2s; }
.ribbon i:nth-child(9n+2) { animation-delay: -1.5s; animation-duration: 2.9s; }
.ribbon i:nth-child(9n+3) { animation-delay: -.7s; }
.ribbon i:nth-child(9n+4) { animation-delay: -2.1s; animation-duration: 2.3s; }
.ribbon i:nth-child(9n+5) { animation-delay: -1.1s; }
.ribbon i:nth-child(9n+6) { animation-delay: -2.5s; animation-duration: 3.1s; }
.ribbon i:nth-child(9n+7) { animation-delay: -.4s; animation-duration: 2.4s; }
.ribbon i:nth-child(9n+8) { animation-delay: -1.8s; }
.ribbon i:nth-child(9n+9) { animation-delay: -.9s; animation-duration: 2.8s; }
@keyframes eq {
  from { transform: scaleY(.45); }
  to { transform: scaleY(1); }
}

.mark { position: relative; width: 104px; height: 104px; display: grid; place-items: center; }
.mark .app {
  position: relative; z-index: 1; width: 100%; height: 100%; border-radius: 22.5%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .5), 0 18px 40px rgba(90, 8, 8, .42), 0 4px 10px rgba(90, 8, 8, .22);
  transform: rotate(-2deg);
  animation: bob 6s ease-in-out infinite alternate;
}
.mark::before, .mark::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .5);
  opacity: 0; will-change: transform, opacity;
  animation: ring 3.6s cubic-bezier(.2, .6, .3, 1) infinite;
}
.mark::after { animation-delay: 1.8s; }
@keyframes ring {
  0% { transform: scale(.9); opacity: 0; }
  12% { opacity: .9; }
  100% { transform: scale(2.1); opacity: 0; }
}
@keyframes bob {
  from { transform: translate3d(0, 3px, 0) rotate(-3deg); }
  to { transform: translate3d(0, -4px, 0) rotate(-1deg); }
}

/* ---------- Glass card ---------- */
.card {
  position: relative;
  width: calc(100% - 2 * var(--gutter)); max-width: 760px;
  margin-top: 6px;
  padding: 26px 18px 28px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .13) 0%, rgba(255, 255, 255, .03) 60%),
    rgba(120, 12, 16, .2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .38),
    inset 0 0 0 1px rgba(255, 255, 255, .18),
    0 40px 80px -30px rgba(70, 4, 8, .55);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
}
/* a faint specular sheen along the top edge */
.card::before {
  content: ""; position: absolute; inset-inline: 12%; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .85), transparent);
}

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 16px 8px; border-radius: 999px;
  background: #FFFFFF; color: var(--coral-ink);
  font-weight: 800; font-size: 15px; line-height: 1.4; white-space: nowrap;
  box-shadow: 0 10px 24px rgba(70, 6, 8, .25);
}
.chip svg { width: 18px; height: 18px; flex: none; color: var(--coral); }
html[lang="en"] .chip { font-weight: 700; letter-spacing: .01em; }

h1 {
  margin: 18px 0 0;
  font-family: var(--font); font-weight: 800;
  font-size: clamp(25px, 7.7vw, 30px); line-height: 1.5;
  text-shadow: 0 4px 24px rgba(90, 6, 8, .2);
}
h1 > span { display: block; text-wrap: balance; }
html[lang="en"] h1 { font-size: clamp(32px, 9.2vw, 36px); line-height: 1.12; letter-spacing: -.025em; }
html[lang="en"] h1 > span + span { margin-top: .08em; }
h1 .soft { color: rgba(255, 255, 255, .94); }

.lead {
  margin-top: 12px; max-width: 34ch;
  font-size: 16px; line-height: 1.85; color: #FFF6F4;
  text-wrap: balance;
}
html[lang="en"] .lead { font-size: 17px; line-height: 1.5; font-family: var(--latin); font-weight: 500; margin-top: 14px; }

/* Admin note, filled by the Pages Function. Hidden while empty. */
.msg {
  margin-top: 20px; max-width: 52ch;
  text-wrap: pretty;
  display: flex; align-items: flex-start; gap: 10px; text-align: start;
  padding: 12px 16px; border-radius: 18px;
  background: #FFFFFF; color: var(--ink);
  font-size: 15px; line-height: 1.75; font-weight: 700;
  box-shadow: 0 12px 28px rgba(70, 6, 8, .22);
}
html[lang="en"] .msg { font-family: var(--latin); font-weight: 500; line-height: 1.5; }
.msg::before {
  content: ""; flex: none; width: 20px; height: 20px; margin-top: .2em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E0302F' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M12 11v5.5M12 7.6v.2'/%3E%3C/svg%3E") center / contain no-repeat;
}
.msg:empty { display: none; }

/* ---------- Footer ---------- */
.foot {
  position: relative; z-index: 2;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 18px;
  padding: 10px var(--gutter) 18px;
  font-size: 14px; line-height: 1.6;
}
.foot ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 6px; margin: 0; padding: 0; list-style: none; }
.foot a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 10px; border-radius: 999px;
  color: #FFFFFF; text-decoration: none;
  transition: background-color .2s ease;
}
.foot a:hover { background: rgba(255, 255, 255, .14); text-decoration: underline; text-underline-offset: 4px; }
.foot .copy { color: #FFF1EE; }
html[lang="en"] .foot { font-family: var(--latin); font-weight: 500; font-size: 14px; }

/* ---------- Larger screens ---------- */
@media (min-width: 600px) {
  .stage { height: 230px; }
  .ribbon { gap: 9px; height: 200px; margin-top: -100px; }
  .ribbon i { width: 7px; }
  .mark { width: 124px; height: 124px; }
  .card { padding: 34px 40px 38px; border-radius: 36px; }
  .chip { font-size: 16px; padding: 8px 18px 9px; }
  h1 { font-size: 42px; margin-top: 22px; }
  html[lang="en"] h1 { font-size: 52px; }
  .lead { font-size: 18px; margin-top: 14px; }
  html[lang="en"] .lead { font-size: 19px; }
  .brand .mk { width: 42px; height: 42px; border-radius: 12px; }
  .brand .wordmark { font-size: 21px; }
  .langs a { font-size: 15px; padding: 0 14px; }
  .foot { padding-bottom: 22px; }
}
@media (min-width: 1000px) {
  .top { padding-top: 26px; }
  .stage { height: clamp(210px, 28svh, 270px); }
  .stage::before { width: 460px; height: 460px; margin: -230px 0 0 -230px; }
  .ribbon { gap: 11px; height: 240px; margin-top: -120px; }
  .ribbon i { width: 8px; }
  .mark { width: 140px; height: 140px; }
  .card { max-width: 820px; padding: 40px 56px 46px; border-radius: 40px; margin-top: 10px; }
  h1 { font-size: 54px; line-height: 1.45; }
  html[lang="en"] h1 { font-size: 66px; }
  .lead { font-size: 19px; max-width: 46ch; }
  html[lang="en"] .lead { font-size: 20px; }
}
@media (max-width: 374px) { .mark { width: 88px; height: 88px; } }
/* with an admin note the stage gives up some height, so the footer stays in view */
.hero:has(.msg:not(:empty)) .stage { height: clamp(130px, 20svh, 210px); }
/* short landscape phones: keep everything above the fold */
@media (max-height: 520px) and (orientation: landscape) {
  .stage { height: 130px; }
  .ribbon { height: 110px; margin-top: -55px; }
  .mark { width: 80px; height: 80px; }
  h1 { font-size: 28px; }
}

/* ---------- Maintenance: same world, calmer ---------- */
.calm h1 { font-size: clamp(21px, 6.5vw, 30px); }
@media (min-width: 600px) { .calm h1 { font-size: 38px; } }
@media (min-width: 1000px) { .calm h1 { font-size: 48px; } }
html[lang="en"] .calm h1 { font-size: clamp(28px, 8.4vw, 33px); }
@media (min-width: 600px) { html[lang="en"] .calm h1 { font-size: 46px; } }
@media (min-width: 1000px) { html[lang="en"] .calm h1 { font-size: 48px; } }
.calm .ribbon i { animation-duration: 4.8s; opacity: .17; }
.calm .ribbon i:nth-child(odd) { animation-duration: 5.6s; }
.calm .ribbon .h7, .calm .ribbon .h8, .calm .ribbon .h9 { opacity: .22; }
.calm .tile { animation-duration: 28s; }
.calm .mark::before { animation: breathe 5.5s ease-in-out infinite; }
.calm .mark::after { display: none; }
.calm .mark .app { animation-duration: 9s; }
@keyframes breathe {
  0%, 100% { transform: scale(1.32); opacity: .2; }
  50% { transform: scale(1.5); opacity: .5; }
}
.calm .chip .dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--amber); flex: none;
  box-shadow: 0 0 0 3px rgba(247, 181, 64, .28);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .45; } }

/* ---------- Motion off ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .mark::before { opacity: .35; transform: scale(1.4); }
  .mark::after { opacity: .15; transform: scale(1.8); }
  .calm .mark::before { opacity: .3; transform: scale(1.4); }
}

@media print {
  .scene, .ribbon, .langs { display: none; }
  body { background: #FFFFFF; color: #000000; }
}
