/* =========================================================================
   Convsty — Follow Us  ·  "Departures" social hub
   Committed dark editorial visual world. All colors painted explicitly.
   ========================================================================= */

:root {
  /* ground + surfaces (navy-biased neutrals, chosen not defaulted) */
  --ink:        #0A0E1A;
  --ink-2:      #0E1424;
  --surface:    #111a2e;
  --surface-2:  #16203a;
  --hairline:   rgba(255, 237, 230, 0.10);
  --hairline-2: rgba(255, 237, 230, 0.18);

  /* brand */
  --red:        #DD183B;
  --red-2:      #CC1939;
  --red-soft:   rgba(221, 24, 59, 0.16);
  --peach:      #FFEDE6;
  --peach-2:    #FFD1BF;

  /* text */
  --fg:         #F4EFEA;
  --fg-dim:     #AAB2C6;
  --fg-mute:    #6E7791;

  /* type */
  --body:    "Tajawal", "IBM Plex Sans Arabic", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --mono:    "Space Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --arabic:  "Tajawal", "IBM Plex Sans Arabic", sans-serif;

  --maxw: 1080px;
  --radius: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; direction: rtl; }

/* latin runs (handles, numbers, domains) inside the RTL page */
.ltr { direction: ltr; unicode-bidi: isolate; }

body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;               /* full fixed page — no scroll anywhere */
  background:
    radial-gradient(1200px 720px at 50% -8%, rgba(221,24,59,0.22), transparent 60%),
    radial-gradient(900px 600px at 88% 8%, rgba(255,209,191,0.07), transparent 55%),
    linear-gradient(180deg, #0B1122 0%, var(--ink) 42%, #070A13 100%);
  background-attachment: fixed;
  color: var(--fg);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ambient layers ------------------------------------------------------- */
#sky {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.page {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

/* accessibility -------------------------------------------------------- */
.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 60;
  background: var(--red);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  transition: top .2s var(--ease);
}
.skip:focus { top: 16px; }

a { color: inherit; }
:focus-visible {
  outline: 2px solid var(--peach-2);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ============================ TOP BAR ================================= */
.topbar {
  position: relative;
  z-index: 10;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px clamp(16px, 4vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img {
  height: 30px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,0.5));
}
.top-nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 22px);
}
.top-nav a { text-decoration: none; }
.nav-link {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--fg-dim);
  position: relative;
  padding: 6px 2px;
  transition: color .25s var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 1.5px; width: 0;
  background: var(--red);
  transition: width .3s var(--ease);
}
.nav-link:hover { color: var(--fg); }
.nav-link:hover::after { width: 100%; }

.btn-call {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--hairline-2);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--fg);
  background: rgba(255,255,255,0.02);
  backdrop-filter: blur(6px);
  transition: border-color .25s var(--ease), background .25s var(--ease), transform .25s var(--ease);
}
.btn-call svg { width: 15px; height: 15px; }
.btn-call:hover {
  border-color: var(--red);
  background: var(--red-soft);
  transform: translateY(-1px);
}

/* ============================== HERO ================================= */
.stage {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(16px, 3vw, 34px) clamp(16px, 4vw, 40px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(20px, 4vh, 44px);
}

.hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(14px, 2.4vh, 22px);
}

.eyebrow {
  font-family: var(--arabic);
  font-weight: 500;
  font-size: clamp(0.9rem, 2.4vw, 1.05rem);
  letter-spacing: 0;
  color: var(--peach-2);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.eyebrow .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--red); box-shadow: 0 0 12px 2px var(--red); }
.eyebrow .sep { opacity: 0.4; }

.crest-wrap {
  position: relative;
  display: inline-flex;
  padding: 8px 4px;
}
.crest-wrap::before {
  content: "";
  position: absolute;
  inset: -40px -60px;
  background: radial-gradient(closest-side, rgba(221,24,59,0.30), transparent 72%);
  filter: blur(6px);
  z-index: -1;
  animation: pulseGlow 5.5s ease-in-out infinite;
}
.crest {
  height: clamp(66px, 15vw, 132px);
  width: auto;
  max-width: 100%;
  display: block;
  filter: drop-shadow(0 10px 34px rgba(0,0,0,0.6));
}

.title {
  font-family: var(--display);
  font-weight: 600;
  font-optical-sizing: auto;
  font-size: clamp(3.4rem, 13vw, 8.2rem);
  line-height: 0.9;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFE9E1 62%, #FFC9B8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 1px 0 rgba(255,255,255,0.04);
}
.title em {
  font-style: italic;
  font-weight: 500;
  background: linear-gradient(180deg, #FF5772 0%, var(--red) 55%, var(--red-2) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.05rem, 2.6vw, 1.35rem);
  color: #C9CFDD;
  margin: 0;
  max-width: 34ch;
  text-wrap: balance;
}

.cta-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 2px;
}
.cta-row .btn { justify-content: center; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: transform .25s var(--ease), box-shadow .3s var(--ease), background .25s var(--ease), border-color .25s var(--ease);
}
.btn svg { width: 17px; height: 17px; }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #FF3355 0%, var(--red) 48%, var(--red-2) 100%);
  box-shadow: 0 10px 30px -8px rgba(221,24,59,0.7), inset 0 1px 0 rgba(255,255,255,0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -8px rgba(221,24,59,0.85), inset 0 1px 0 rgba(255,255,255,0.3); }
.btn-line {
  color: var(--fg);
  border: 1px solid var(--hairline-2);
  background: rgba(255,255,255,0.02);
  font-family: var(--arabic);
}
.btn-line:hover { transform: translateY(-2px); border-color: var(--peach-2); background: rgba(255,255,255,0.05); }

/* ============================ SOCIAL GRID =========================== */
.socials { margin-top: 0; }

.socials-head {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: clamp(16px, 2.4vh, 28px);
}
.socials-head .rule { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--hairline-2), transparent); }
.socials-head h1 {
  font-family: var(--arabic);
  font-weight: 800;
  font-size: clamp(1.9rem, 6vw, 2.9rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--fg);
  margin: 0;
  white-space: nowrap;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFE9E1 70%, #FFC9B8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.card {
  --brand: var(--red);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 20px 16px;
  min-height: 128px;
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.012)),
    var(--surface);
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .4s var(--ease);
}
/* wash of the platform brand color, revealed on hover */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(120% 90% at 50% 0%, var(--brand), transparent 70%);
  opacity: 0;
  transition: opacity .4s var(--ease);
}
/* diagonal sheen sweep */
.card::after {
  content: "";
  position: absolute;
  top: -60%; left: -30%;
  width: 60%; height: 220%;
  z-index: 1;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.14), transparent);
  transform: translateX(-120%) rotate(8deg);
  transition: transform .7s var(--ease);
  pointer-events: none;
}
.card:hover, .card:focus-visible {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--brand) 70%, transparent);
  box-shadow: 0 22px 48px -18px rgba(0,0,0,0.75), 0 0 0 1px color-mix(in srgb, var(--brand) 30%, transparent);
}
.card:hover::before, .card:focus-visible::before { opacity: 0.16; }
.card:hover::after { transform: translateX(320%) rotate(8deg); }

.card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--hairline);
  color: var(--fg);
  transition: background .35s var(--ease), color .35s var(--ease), transform .35s var(--ease), border-color .35s var(--ease);
}
.card-icon svg { width: 22px; height: 22px; }
.card:hover .card-icon {
  background: var(--brand);
  border-color: transparent;
  color: #fff;
  transform: scale(1.06) rotate(-4deg);
}
/* platforms whose brand mark reads better dark-on-light keep white bg + brand ink */
.card[data-ink="light"]:hover .card-icon { color: #0A0E1A; background: #fff; }

.card-name {
  font-family: var(--arabic);
  font-weight: 800;
  font-size: 1.14rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--fg);
}
.card-handle {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--fg-mute);
  letter-spacing: 0.02em;
  transition: color .35s var(--ease);
}
.card:hover .card-handle { color: var(--peach-2); }

.card-go {
  position: absolute;
  top: 16px; left: 16px; right: auto;
  color: var(--fg-mute);
  opacity: 0;
  transform: translate(4px, 4px);
  transition: opacity .35s var(--ease), transform .35s var(--ease), color .35s var(--ease);
}
.card-go svg { width: 16px; height: 16px; transform: scaleX(-1); }
.card:hover .card-go { opacity: 1; transform: translate(0,0); color: var(--fg); }

/* =============================== FOOTER ============================= */
.foot {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin: clamp(40px, 8vw, 80px) auto 0;   /* margin-top gap; auto pins nothing */
  margin-top: auto;                         /* push footer to the bottom of the page */
  padding: 22px clamp(16px, 4vw, 40px) 26px;
  border-top: 1px solid var(--hairline);
  text-align: center;
}
.foot-line {
  margin: 0;
  font-family: var(--arabic);
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--fg-dim);
  letter-spacing: 0;
}
/* boarding-pass perforated tear strip — the one subject-specific detail */
.ticket {
  position: relative;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.008)), var(--ink-2);
  padding: 22px clamp(20px, 4vw, 34px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  overflow: hidden;
}
.ticket::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  opacity: 0.6;
}
.ticket-code {
  font-family: var(--arabic);
  font-weight: 500;
  font-size: 0.86rem;
  line-height: 1.7;
  letter-spacing: 0;
  color: var(--fg-dim);
}
.ticket-code b { color: var(--peach-2); font-weight: 500; font-family: var(--mono); font-size: 0.78rem; }
.foot-copy { text-align: left; }
.foot-copy .c1 { font-weight: 700; color: var(--fg); font-size: 0.9rem; }
.foot-copy .c2 { font-size: 0.78rem; color: var(--fg-mute); }
.foot-copy a { color: var(--peach-2); text-decoration: none; }
.foot-copy a:hover { text-decoration: underline; }

/* scroll-to-top */
.totop {
  position: fixed;
  right: 22px; bottom: 22px;
  z-index: 40;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--hairline-2);
  background: rgba(17,26,46,0.7);
  backdrop-filter: blur(8px);
  color: var(--fg);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.totop svg { width: 18px; height: 18px; }
.totop.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.totop:hover { border-color: var(--red); background: var(--red-soft); }

/* ============================ ANIMATIONS ============================ */
@keyframes pulseGlow {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.06); }
}
@keyframes riseIn {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* thumbnail-safe: opacity stays 1, only the position eases in */
@keyframes riseUp {
  from { transform: translateY(20px) scale(0.985); }
  to   { transform: translateY(0) scale(1); }
}

/* Entrance. Base markup is fully visible; JS adds .js-anim to opt in.
   Everything slides up with opacity kept at 1, so nothing is ever a blank
   rectangle in a thumbnail or a slow frame — the content is always readable. */
.js-anim .reveal { animation: riseUp .7s var(--ease) both; animation-delay: var(--d, 0s); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-anim .reveal { opacity: 1; animation: none; }
  .crest-wrap::before { animation: none; }
  .card::after { display: none; }
  * { transition-duration: 0.001ms !important; }
}

/* ============================ RESPONSIVE ============================ */
@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* Phones: tighten the whole flow and shrink the link boxes so all eight
   platforms sit in view together with little to no scrolling. */
@media (max-width: 560px) {
  .topbar { padding-top: 12px; padding-bottom: 4px; }
  .nav-link.hide-sm { display: none; }
  .stage { padding-top: 10px; padding-bottom: 18px; }
  .hero { gap: 12px; padding-block: 8px; }
  .crest { height: 74px; }
  .crest-wrap::before { inset: -28px -46px; }
  .eyebrow { font-size: 0.95rem; }
  .cta-row { flex-direction: column; gap: 10px; margin-top: 2px; }
  .cta-row .btn { width: min(320px, 100%); }
  .btn { padding: 11px 20px; font-size: 0.9rem; }
  .socials { margin-top: 20px; }
  .socials-head { margin-bottom: 16px; gap: 12px; }
  .socials-head h1 { font-size: 1.7rem; }

  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card { min-height: 92px; padding: 12px 8px; gap: 9px; border-radius: 14px; }
  .card-icon { width: 46px; height: 46px; border-radius: 12px; }
  .card-icon svg { width: 24px; height: 24px; }
  .card-name { font-size: 0.98rem; }

  .foot { padding-top: 18px; padding-bottom: 20px; }
}
@media (max-width: 380px) {
  .crest { height: 66px; }
  .grid { gap: 9px; }
  .card { min-height: 84px; }
  .card-icon { width: 42px; height: 42px; }
  .card-name { font-size: 0.92rem; }
}
