/* =========================================================
   Coming Soon — generic under-construction page
   Inspired by the classic full-screen countdown layout:
   fixed logo + socials, rotating headline, bottom countdown
   bar, 60-dot seconds line and a thin navigation strip.
   ========================================================= */

:root {
  /* ضعي صورة خلفية هنا: --bg-image: url("assets/img/your-photo.jpg"); */
  --bg-image: radial-gradient(125% 95% at 50% 0%, #2B2825 0%, #171614 46%, #080807 100%);

  --fg: #FFFFFF;
  --dim: rgba(255, 255, 255, 0.62);
  --faint: rgba(255, 255, 255, 0.38);
  --line: rgba(255, 255, 255, 0.12);

  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Open Sans", system-ui, -apple-system, sans-serif;

  --bottom-h: 238px;
  --ease: cubic-bezier(0.22, 0.8, 0.28, 1);
}

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

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

body {
  margin: 0;
  min-height: 100svh;
  background: #080807;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }
svg { display: block; }

::selection { background: rgba(255, 255, 255, 0.85); color: #0B0B0B; }

:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: 4px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ================= Background ================= */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background-color: #0B0B0B;
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.bg__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 55% at 14% 6%, rgba(206, 178, 140, 0.10), transparent 62%),
    radial-gradient(62% 52% at 88% 92%, rgba(120, 142, 165, 0.09), transparent 66%),
    radial-gradient(90% 70% at 50% 38%, rgba(0, 0, 0, 0.10) 0%, rgba(0, 0, 0, 0.55) 68%, rgba(0, 0, 0, 0.88) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0.30) 40%, rgba(0, 0, 0, 0.72) 100%);
}

.bg__glow {
  position: absolute;
  top: 6%;
  left: 50%;
  width: 78vw;
  height: 78vw;
  max-width: 1100px;
  max-height: 1100px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.13), transparent 64%);
  filter: blur(40px);
  animation: glow 16s ease-in-out infinite alternate;
}

.bg__lines {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image: repeating-linear-gradient(
    -22deg,
    rgba(255, 255, 255, 0.025) 0px,
    rgba(255, 255, 255, 0.025) 1px,
    transparent 1px,
    transparent 90px
  );
}

.bg__grain {
  position: absolute;
  inset: 0;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  mix-blend-mode: overlay;
  pointer-events: none;
}

@keyframes glow {
  from { opacity: 0.6; transform: translateX(-50%) scale(1); }
  to   { opacity: 1;   transform: translateX(-50%) scale(1.12); }
}

/* ================= Loader ================= */
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: #000;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.is-hidden { opacity: 0; visibility: hidden; }
.loader[hidden] { display: none; }

.loader__ring {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-top-color: rgba(255, 255, 255, 0.9);
  animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ================= Logo ================= */
.logo {
  position: fixed;
  top: 30px;
  left: 30px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--fg);
}

.logo__mark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
}

.logo__text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ================= Socials ================= */
.socials {
  position: fixed;
  top: 30px;
  right: 30px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
}

.socials a {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  color: var(--fg);
  transition: background 0.3s linear, color 0.3s linear, border-color 0.3s linear;
}

.socials svg { width: 17px; height: 17px; }

.socials a:hover {
  background: #fff;
  border-color: #fff;
  color: #000;
}

/* ================= Stage / headline ================= */
.stage {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 24px calc(var(--bottom-h) * 0.55 + 20px);
  text-align: center;
}

.headline {
  position: relative;
  width: min(100%, 1060px);
  height: clamp(150px, 24vh, 210px);
  margin: 0;
  perspective: 600px;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.75rem, 6.1vw, 3.75rem);
  line-height: 1.45;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
}

.headline__line {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.headline__line.is-active {
  opacity: 1;
  visibility: visible;
}

.headline__line.is-leaving {
  opacity: 0;
  visibility: visible;
  transition: opacity 0.45s ease;
}

.w {
  display: inline-block;
  opacity: 0;
  transform: translateY(16px) scale(0.92);
  will-change: transform, opacity;
}

.headline__line.is-active .w {
  animation: word-in 0.8s var(--ease) forwards;
}

.headline__line.is-active .w:nth-child(1) { animation-delay: 0.02s; }
.headline__line.is-active .w:nth-child(2) { animation-delay: 0.09s; }
.headline__line.is-active .w:nth-child(3) { animation-delay: 0.16s; }
.headline__line.is-active .w:nth-child(4) { animation-delay: 0.23s; }
.headline__line.is-active .w:nth-child(5) { animation-delay: 0.30s; }
.headline__line.is-active .w:nth-child(6) { animation-delay: 0.37s; }
.headline__line.is-active .w:nth-child(7) { animation-delay: 0.44s; }
.headline__line.is-active .w:nth-child(8) { animation-delay: 0.51s; }

@keyframes word-in {
  from { opacity: 0; transform: translateY(16px) scale(0.92); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.bold { color: #fff; font-weight: 700; }

.note {
  max-width: 34ch;
  margin-top: 26px;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--dim);
}

/* ================= Bottom stack ================= */
.bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
}

/* ---------- Countdown ---------- */
.dash {
  padding: 22px 0 30px;
  background: rgba(0, 0, 0, 0.26);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.dash__inner {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.unit {
  position: relative;
  min-width: 118px;
  padding: 0 20px;
  text-align: center;
}

.unit + .unit::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 26px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.34), transparent);
}

.unit__digits {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.digit {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.3rem, 6.2vw, 4.05rem);
  line-height: 1;
  min-width: 0.56em;
  text-align: center;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.unit__label {
  display: block;
  margin-top: 10px;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 0.875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.66);
}

/* ---------- Seconds line ---------- */
.dots {
  display: flex;
  align-items: center;
  height: 22px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.05);
}

.dots span {
  position: relative;
  flex: 1 1 0;
  height: 100%;
}

.dots span::before,
.dots span::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.34);
}

.dots span::after {
  background: #fff;
  opacity: 0;
  transform: scale(1);
  transition: transform 1s cubic-bezier(0.05, 0.51, 0.445, 0.96), opacity 1s cubic-bezier(0.05, 0.51, 0.445, 0.96);
}

.dots span.is-now::before {
  background: #fff;
  transform: scale(2.2);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.75);
  transition: transform 0.4s var(--ease), background 0.4s var(--ease);
}

.dots span.is-now::after {
  opacity: 0.16;
  transform: scale(5.5);
}

/* ---------- Navigation ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  min-height: 58px;
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.72);
  border-top: 1px solid var(--line);
}

.nav a {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  padding: 7px 18px;
  border: 1px solid transparent;
  transition: color 0.3s linear, border-color 0.3s linear;
}

.nav a:hover,
.nav a.is-active {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.26);
}

/* ================= Responsive ================= */
@media (max-width: 900px) {
  .headline { font-size: clamp(1.6rem, 5.4vw, 2.6rem); height: 190px; }
}

@media (max-width: 720px) {
  :root { --bottom-h: 214px; }

  .logo { top: 20px; left: 18px; gap: 9px; }
  .logo__mark { width: 27px; height: 27px; }
  .logo__text { font-size: 0.82rem; letter-spacing: 0.24em; }

  .socials { top: 20px; right: 18px; gap: 6px; }
  .socials a { width: 32px; height: 32px; }
  .socials svg { width: 15px; height: 15px; }

  .stage { padding: 96px 18px calc(var(--bottom-h) * 0.55 + 12px); }

  .headline { font-size: clamp(1.4rem, 6.6vw, 2.1rem); height: 160px; line-height: 1.4; }

  .dash { padding: 16px 0 22px; }
  .unit { min-width: 0; flex: 1 1 0; padding: 0 6px; }
  .unit + .unit::before { top: 4px; bottom: 22px; }
  .digit { font-size: clamp(1.9rem, 8vw, 2.5rem); }
  .unit__label { font-size: 0.685rem; letter-spacing: 0.14em; margin-top: 8px; }

  .nav {
    min-height: 52px;
    flex-wrap: nowrap;
    justify-content: center;
    padding: 6px 8px;
  }
  .nav a { font-size: 0.78rem; letter-spacing: 0.05em; padding: 6px 10px; white-space: nowrap; }
}

@media (max-width: 380px) {
  .nav a { font-size: 0.72rem; padding: 5px 7px; }
  .logo__text { font-size: 0.72rem; letter-spacing: 0.18em; }
}

/* Landscape phones / short laptops */
@media (max-height: 500px) and (orientation: landscape) {
  :root { --bottom-h: 158px; }
  .stage { padding-top: 64px; padding-bottom: calc(var(--bottom-h) * 0.55 + 10px); }
  .headline { height: 100px; font-size: clamp(1.3rem, 3.4vw, 2rem); }
  .dash { padding: 10px 0 14px; }
  .digit { font-size: clamp(1.6rem, 3.6vw, 2.2rem); }
  .unit__label { margin-top: 4px; }
  .dots { height: 14px; }
  .nav { min-height: 44px; }
  .nav a { font-size: 0.76rem; padding: 4px 10px; }
}

/* ================= Motion preferences ================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .bg__glow { animation: none; }
  .headline__line .w { opacity: 1; transform: none; }
  .headline__line { transition: none; }
}
