/* Reset & base */
* { box-sizing: border-box; }
:root {
  --bg: #0e1320;
  --ink: #0b1020;
  --muted: #5f6c86;
  --accent: #3b82f6;
  --glass: rgba(255,255,255,0.08);
  --ring: rgba(59,130,246,0.25);
}
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: #0c1426;
  background: linear-gradient(180deg, #f7f9fc, #eef2f7 60%, #e7ecf5);
  overflow-x: hidden;
}

.wrapper {
  width: min(1100px, 92vw);
  margin: 0 auto;
}


.bg-ornament {
  position: fixed; inset: -10vmax;
  /* Multi-source background with graceful fallbacks */
  background:
    radial-gradient(60vmax 60vmax at 20% 0%, rgba(59,130,246,.10), transparent 60%),
    radial-gradient(50vmax 50vmax at 80% 10%, rgba(16,185,129,.10), transparent 60%),
    /* AVIF first */
    image-set(
      url('assets/bg.avif') type('image/avif') 1x
    );
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  z-index: -1;
  filter: blur(8px) saturate(112%) contrast(108%);
}
/* If you also add assets/bg.webp or assets/bg.jpg, you can expand:
   image-set(
     url('assets/bg.avif') type('image/avif') 1x,
     url('assets/bg.webp') type('image/webp') 1x,
     url('assets/bg.jpg') type('image/jpeg') 1x
   );
*/


header {
  text-align: center;
  padding: clamp(24px, 7vw, 64px) 0 8px;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4.4vw, 50px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.subtitle {
  display: grid;
  place-items: center;
  gap: 6px;
}

.name {
  font-weight: 800;
  font-size: clamp(18px, 2.1vw, 24px);
  background: linear-gradient(90deg, #0b1020, #22305a 40%, #0b1020 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 1px 0 rgba(255,255,255,0.35);
}

.tags { font-size: 13.5px;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(18px, 5vw, 42px);
  margin-top: clamp(10px, 3vw, 20px);
}

.card {
  display: grid;
  justify-items: center;
  gap: 12px;
}

.flag-wrap {
  position: relative;
  width: min(380px, 31vw);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(18,32,68,.15), inset 0 1px 0 rgba(255,255,255,.35);
  isolation: isolate;
}

.flag-img, .flag-img {
  width: 58%;
  height: 58%;
  border-radius: 20px;
  box-shadow: inset 0 8px 24px rgba(0,0,0,.08), 0 16px 40px rgba(0,0,0,.08);
}

.flag-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.35), rgba(255,255,255,0) 30%),
    linear-gradient(0deg, rgba(255,255,255,0.05), rgba(255,255,255,0.05)),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.14) 0 10%, rgba(255,255,255,0.06) 10% 20%);
  /* ↓ make squares lighter so background is visible */
  opacity: 0.18;
  mix-blend-mode: screen;
  pointer-events: none;
}

/* Frosted glass frame */
.glass {
  background: radial-gradient(120% 120% at 50% 20%, rgba(255,255,255,.6), rgba(255,255,255,.35)),
              linear-gradient(180deg, rgba(255,255,255,.65), rgba(255,255,255,.35));
  border: 1px solid rgba(255,255,255,.6);
  backdrop-filter: blur(8px) saturate(120%);
}

.cta a {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid rgba(59,130,246,.35);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 8px 20px rgba(59,130,246,.15);
  transition: transform .08s ease, box-shadow .2s ease, background-color .2s ease;
  color: #1b3a8a;
  background: rgba(230,240,255,.65);
}

.cta a:hover { transform: translateY(-1px); box-shadow: 0 10px 25px rgba(59,130,246,.25); }
.cta a:active { transform: translateY(0); }

.copy {
  text-align: center;
  margin: 20px auto 64px;
  color: #0f172a;
  line-height: 1.6;
}
.copy hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34,48,81,.35), transparent);
  margin: 18px auto;
  width: min(800px, 92%);
}
.copy .en { color: #2c3a60; }
.copy .ar { color: #2c3a60; font-size: 15px; }
.footer-note { margin-top: 8px; font-size: 13px; color: #4a5b86; }

/* Responsive */
@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; }
  .flag-wrap { width: min(520px, 88vw); }
}


/* ----- Optional custom background image (put your file in /assets/bg.jpg and uncomment) -----
.bg-ornament {
  background:
    radial-gradient(60vmax 60vmax at 20% 0%, rgba(59,130,246,.10), transparent 60%),
    radial-gradient(50vmax 50vmax at 80% 10%, rgba(16,185,129,.10), transparent 60%),
    url('assets/bg.jpg') no-repeat center top/cover;
}
*/

/* Text contrast helper */
.scrim {
  position: relative;
}
.scrim::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: 0 auto;
  width: min(1100px, 92vw);
  border-radius: 20px;
  background: radial-gradient(80% 80% at 50% 0%, rgba(255,255,255,0.75), rgba(255,255,255,0.45) 60%, rgba(255,255,255,0.25) 100%);
  filter: blur(1.5px);
  z-index: -1;
}
header.scrim::before { height: 140px; }
.copy.scrim::before { height: 340px; }
.copy { color: #17233f; }
h1 { color: #0a0f1f; }
.name { text-shadow: none; color: #0c1326; }

.panel {
  padding: clamp(14px, 2.5vw, 24px);
  margin-top: 24px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(15,23,42,0.08);
  border-radius: 18px;
  backdrop-filter: blur(6px) saturate(120%);
  box-shadow: 0 10px 30px rgba(2,8,23,0.08);
}
.panel hr { opacity: .7; }
.panel .en, .panel .ar { color: #162239; }


/* English version CTA styled like others */
.panel .cta-en { margin-top: 10px; text-align: center; }
.panel .cta-en a { font-size: 14px; }

.btn-version {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .68rem 1.15rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  background: #eef3ff;
  color: #2b3a63;
  border: 1px solid rgba(43,58,99,.18);
  box-shadow: 0 6px 18px rgba(43,58,99,.10);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-version:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(43,58,99,.16);
}

.btn-fr {
  background: #DDEAFB;
  color: #0055A4;
}
.btn-fr:hover {
  background: #c3dbf7;
}

.btn-ar {
  background: #DEF2E8;
  color: #006C3C;
}
.btn-ar:hover {
  background: #c5e7d5;
}

.btn-en {
  background: #DEE4F2;
  color: #012169;
}
.btn-en:hover {
  background: #cdd7eb;
}

.flag-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #e5e7eb;
  margin-right: 6px;
  box-shadow: 0 0 6px rgba(0,0,0,.12);
  object-fit: cover;
  background: #fff;
}

/* Grille à 2 colonnes pour les drapeaux */
.grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: clamp(18px, 3vw, 32px);
  align-items: start;
  justify-items: center;
  margin: 18px auto 6px;
}

/* Responsive : repasse en colonne sur petit écran */
@media (max-width: 640px) {
  .grid-two { grid-template-columns: 1fr; }
}



