@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@400;500;700&family=Fraunces:opsz,ital,wght@9..144,0..1,300..900&family=Tajawal:wght@400;500;700&display=swap');

:root {
  --void: #0a0a0f;
  --surface: #13131a;
  --surface-2: #1e1e2a;
  --border: #2a2a3a;
  --swedish-red: #ff2d4e;
  --candy-yellow: #ffe034;
  --ice-blue: #00d4ff;
  --foam-pink: #ff6b9d;
  --licorice: #6b3fa0;
  --mint: #00e5a0;
  --text-primary: #f0f0f5;
  --text-muted: #8888aa;
  --max-width: 1320px;
  --reading-width: 680px;
  --section-space: clamp(60px, 10vw, 140px);
  --radius: 16px;
  --radius-lg: 24px;
  --glow: 0 18px 40px rgba(255, 45, 78, 0.2);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'DM Sans', sans-serif;
  background: var(--void);
  color: var(--text-primary);
  line-height: 1.7;
}
body.lang-ar { font-family: 'Tajawal', sans-serif; direction: rtl; }
body.lang-ar .fraunces, body.lang-ar h1, body.lang-ar h2 { font-family: 'Tajawal', sans-serif; font-style: normal; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; border-radius: 12px; }

.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--swedish-red);
  z-index: 200;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(180%);
  background: rgba(10, 10, 15, 0.85);
  border-bottom: 1px solid var(--border);
}
.site-header.scrolled { box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35); }
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 22px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}
.logo {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.08em;
  font-size: 1.6rem;
}
.logo .accent { color: var(--candy-yellow); }
.logo .muted { color: var(--text-muted); }
.top-nav {
  display: flex;
  gap: 18px;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.top-nav a:hover, .top-nav a.active { color: var(--text-primary); }
.header-controls { justify-self: end; display: flex; gap: 12px; align-items: center; }
.lang-switch { display: flex; gap: 6px; background: var(--surface); padding: 4px; border-radius: 999px; border: 1px solid var(--border); }
.lang-btn { border: 0; background: transparent; color: var(--text-muted); border-radius: 999px; padding: 6px 10px; font-size: 0.75rem; cursor: pointer; }
.lang-btn.active { background: var(--surface-2); color: var(--text-primary); }
.menu-btn { display: none; background: none; border: 1px solid var(--border); color: var(--text-primary); padding: 8px 10px; border-radius: 8px; }

.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.98);
  transform: translateX(100%);
  transition: transform .4s cubic-bezier(.22,.61,.36,1);
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 24px;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu nav { display: grid; gap: 16px; text-align: center; }
.mobile-menu a { font-family: 'Bebas Neue', sans-serif; font-size: clamp(2rem, 8vw, 4rem); letter-spacing: 0.04em; color: var(--text-primary); }
.mobile-menu a:hover { color: var(--candy-yellow); }
.mobile-close {
  position: absolute;
  top: 18px; right: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.mobile-lang-switch { display: none; }
@media (max-width: 1024px) {
  .mobile-lang-switch {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 28px;
  }
  .mobile-lang-switch .lang-btn {
    padding: 8px 14px;
    font-size: .85rem;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 999px;
    cursor: pointer;
  }
  .mobile-lang-switch .lang-btn.active { background: var(--swedish-red); color: #fff; border-color: var(--swedish-red); }
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 22px; }
.section { padding: var(--section-space) 0; position: relative; }
.full-bleed { width: 100%; }

.hero {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 45, 78, 0.1), transparent 45%),
    radial-gradient(circle at 80% 30%, rgba(107, 63, 160, 0.16), transparent 45%),
    var(--void);
}
.hero::after {
  content: '';
  position: absolute;
  inset: -10%;
  background: radial-gradient(circle at 50% 55%, rgba(0, 212, 255, 0.08), transparent 55%);
  animation: hue-rotate 18s linear infinite;
  pointer-events: none;
}
.candy-particles span {
  position: absolute;
  font-size: clamp(1rem, 3vw, 2rem);
  opacity: .35;
  animation: float-up linear infinite;
}
.hero-content {
  position: relative;
  z-index: 2;
  padding-top: 18vh;
  max-width: 900px;
}
.overline {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.25em;
  color: var(--text-muted);
  font-size: clamp(.9rem, 2vw, 1.3rem);
}
h1, .h1 {
  font-family: 'Fraunces', serif;
  font-optical-sizing: auto;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.05;
  margin: .2em 0;
}
/* Hero gets a bigger h1 — but still controlled */
.hero h1 {
  font-style: italic;
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  line-height: .97;
}
.hero p { max-width: 66ch; color: #c4c4dd; font-size: clamp(1rem, 1.5vw, 1.2rem); }
.scroll-indicator { margin-top: 35px; color: var(--text-muted); animation: bob 1.5s ease-in-out infinite; display: inline-block; }

.ticker {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: var(--swedish-red);
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.08em;
  font-size: clamp(1.1rem, 2.2vw, 1.8rem);
  padding: 12px 0;
}
.ticker-track { display: inline-flex; gap: 22px; min-width: 200%; animation: marquee 22s linear infinite; }

.asym-grid { display: grid; grid-template-columns: 1.35fr .9fr; gap: 26px; align-items: start; }
.feature-card, .stat-card, .type-card, .brand-card, .editorial-card, .bento-card, .faq-item, .article-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.feature-card { padding: 34px; border-top: 3px solid var(--swedish-red); position: relative; overflow: hidden; }
.feature-card::before { content: attr(data-num); position: absolute; right: 18px; top: -22px; font-family: 'Bebas Neue'; font-size: 9rem; opacity: .04; }
h2, .h2 {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 .5em;
  font-style: italic;
}
.feature-card p { color: #cacae2; }
.cta-link {
  color: var(--candy-yellow);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.cta-link:hover { color: var(--ice-blue); }

.stats-stack { display: grid; gap: 16px; }
.stat-card { padding: 22px; }
.stat-num { font-family: 'Bebas Neue', sans-serif; font-size: clamp(2.3rem, 6vw, 5rem); line-height: .9; color: var(--swedish-red); }
.stat-label { color: var(--text-muted); }

.diagonal { background: var(--surface); clip-path: polygon(0 4%,100% 0,100% 96%,0 100%); padding: calc(var(--section-space) + 30px) 0; }
.display-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.4rem, 5vw, 5rem);
  letter-spacing: .04em;
  margin: 0 0 26px;
}
.display-title::after { content: ''; display: block; width: 180px; height: 2px; background: linear-gradient(90deg, var(--swedish-red), transparent); margin-top: 10px; }
.type-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.type-card { padding: 24px; min-height: 220px; position: relative; overflow: hidden; transition: transform .3s ease, box-shadow .3s ease; }
.type-card::after {
  content: '';
  position: absolute;
  inset: -40% -20% auto auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: var(--card-glow, rgba(255,45,78,.2));
  filter: blur(14px);
  opacity: .7;
  transition: opacity .3s ease;
}
.type-card:hover { transform: translateY(-8px); box-shadow: var(--glow); }
.type-card:hover::after { opacity: 1; }
.type-card .emoji { font-size: 2rem; margin-bottom: 12px; display: inline-block; }
.type-card h3 { font-family: 'Bebas Neue', sans-serif; font-size: clamp(1.5rem, 3.5vw, 2.2rem); margin: 0; }
.type-card p { color: var(--text-muted); margin: .3rem 0 .8rem; }
.hidden-link { opacity: 0; transform: translateY(6px); transition: all .3s ease; color: var(--mint); font-weight: 700; }
.type-card:hover .hidden-link { opacity: 1; transform: translateY(0); }

.scroller { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
.brand-card { flex: 0 0 280px; min-height: 380px; padding: 24px; scroll-snap-align: start; position: relative; overflow: hidden; }
.brand-card::before { content: ''; position: absolute; inset: auto -30% -30% auto; width: 200px; height: 200px; border-radius: 50%; background: var(--brand-color, var(--swedish-red)); filter: blur(40px); opacity: .22; }
.brand-card h3 { font-family: 'Bebas Neue'; font-size: clamp(2.2rem, 4vw, 3.4rem); margin: 0; }
.brand-card p { color: var(--text-muted); margin: 6px 0; }

.mag-grid { display: grid; grid-template-columns: 1.4fr .9fr; gap: 16px; }
.mag-col { display: grid; gap: 16px; }
.editorial-card { position: relative; min-height: 220px; overflow: hidden; padding: 24px; }
.editorial-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,15,.9), rgba(10,10,15,.2));
}
.editorial-card > * { position: relative; z-index: 1; }
.kicker { font-family: 'Bebas Neue'; color: var(--candy-yellow); letter-spacing: .12em; font-size: .95rem; }
.read-badge { display: inline-block; padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--text-muted); font-size: .82rem; }

.bento-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1.3fr 1fr 1fr;
  grid-template-areas:
    'hero m1 m2'
    'hero s1 s2';
}
.bento-card { padding: 20px; min-height: 170px; }
.bento-card.hero { grid-area: hero; min-height: 360px; }
.bento-card.m1 { grid-area: m1; }
.bento-card.m2 { grid-area: m2; }
.bento-card.s1 { grid-area: s1; }
.bento-card.s2 { grid-area: s2; }

.faq-list { display: grid; gap: 10px; max-width: 900px; }
.faq-item button {
  width: 100%;
  border: 0;
  background: none;
  color: var(--text-primary);
  text-align: left;
  padding: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  cursor: pointer;
}
.faq-item .icon { transition: transform .25s ease; color: var(--candy-yellow); }
.faq-item .answer { max-height: 0; overflow: hidden; padding: 0 18px; color: #c6c6dc; transition: max-height .35s ease, padding .35s ease; }
.faq-item.open .answer { max-height: 240px; padding-bottom: 16px; }
.faq-item.open .icon { transform: rotate(45deg); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.term-tag {
  position: relative;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  font-size: var(--size, 0.95rem);
}
.term-tag:hover { color: var(--candy-yellow); border-color: var(--candy-yellow); }
.term-tag .tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) scale(.96);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #dbdbed;
  min-width: 220px;
  padding: 10px;
  opacity: 0;
  pointer-events: none;
  transition: all .2s ease;
}
.term-tag:hover .tooltip { opacity: 1; transform: translateX(-50%) scale(1); }

.tag {
  background: rgba(255, 45, 78, .15);
  border: 1px solid rgba(255, 45, 78, .4);
  color: var(--swedish-red);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.tag.blue { color: var(--ice-blue); border-color: rgba(0,212,255,.4); background: rgba(0,212,255,.12); }
.tag.yellow { color: var(--candy-yellow); border-color: rgba(255,224,52,.4); background: rgba(255,224,52,.12); }
.tag.pink { color: var(--foam-pink); border-color: rgba(255,107,157,.4); background: rgba(255,107,157,.12); }
.tag.green { color: var(--mint); border-color: rgba(0,229,160,.4); background: rgba(0,229,160,.12); }
.tag.purple { color: #b88bff; border-color: rgba(184,139,255,.4); background: rgba(184,139,255,.12); }

.btn-magnetic {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--swedish-red);
  color: #fff;
  border: 0;
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .16s ease;
}

.article-hero {
  min-height: 60vh;
  display: flex;
  align-items: end;
  padding: clamp(60px, 10vw, 120px) 0 40px;
  background: linear-gradient(150deg, rgba(255,45,78,.12), transparent 45%), var(--void);
}
.breadcrumbs { color: var(--text-muted); font-size: .88rem; margin-bottom: 10px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 14px; color: var(--text-muted); align-items: center; margin-top: 18px; }
.hero-rule { margin-top: 18px; height: 1px; width: 180px; background: linear-gradient(90deg, var(--swedish-red), transparent); }

.article-layout { display: grid; grid-template-columns: 240px minmax(0, var(--reading-width)); gap: 36px; align-items: start; }
.toc {
  position: sticky;
  top: 90px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 16px;
}
.toc a { display: block; padding: 8px 0; color: var(--text-muted); font-size: .92rem; }
.toc a.active, .toc a:hover { color: var(--swedish-red); }
.article-body { font-size: 18px; line-height: 1.8; }
.article-body h2 {
  margin-top: 2.1em;
  padding-left: 14px;
  border-left: 2px solid var(--candy-yellow);
}
.article-body h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); margin-top: 1.4em; }
.article-body p, .article-body li { color: #d2d2e8; }
.article-body ul { padding-left: 20px; }
.pull-quote {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  text-align: center;
  margin: 1.8em 0;
  color: #ececf8;
}
.pull-quote::before { content: '“'; color: var(--swedish-red); font-size: 1.3em; margin-right: 6px; }
.callout {
  border-left: 3px solid var(--ice-blue);
  background: var(--surface-2);
  padding: 14px 16px;
  border-radius: 12px;
  margin: 1.2em 0;
}
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.article-card { padding: 18px; }

.footer {
  margin-top: 60px;
  border-top: 1px solid var(--border);
  padding: 40px 0;
  color: var(--text-muted);
}
.footer-grid { max-width: var(--max-width); margin: 0 auto; padding: 0 22px; display: grid; grid-template-columns: 1fr auto; gap: 20px; }

.reveal { opacity: 0; transform: translateY(18px); transition: all .5s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 400;
  mix-blend-mode: difference;
}
.cursor-dot { width: 12px; height: 12px; background: #fff; border-radius: 50%; }
.cursor-ring {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,.65);
  border-radius: 50%;
  transform: translate(-14px, -14px) scale(.5);
  opacity: .8;
  transition: transform .2s ease, opacity .2s ease;
}
.cursor-ring.active { transform: translate(-14px, -14px) scale(1); opacity: 1; }

@media (max-width: 1024px) {
  .header-inner { grid-template-columns: 1fr auto; }
  .top-nav, .header-controls .lang-switch { display: none; }
  .menu-btn { display: inline-block; }
  .asym-grid, .mag-grid, .article-layout { grid-template-columns: 1fr; }
  .toc { display: none; }
  .type-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: 'hero hero' 'm1 m2' 's1 s2';
  }
}

/* ── Mobile: ≤ 720px ──────────────────────────────────────────── */
@media (max-width: 720px) {
  /* Layout */
  .container { padding: 0 16px; }
  .section { padding: clamp(40px, 10vw, 70px) 0; }
  .diagonal { clip-path: polygon(0 2%, 100% 0, 100% 98%, 0 100%); }

  /* Header */
  .header-inner { padding: 12px 16px; }
  .logo { font-size: 1.3rem; }
  .menu-btn { padding: 7px 10px; font-size: .85rem; }

  /* Hero */
  .hero-content { padding-top: 14vh; }
  .hero h1 { font-size: clamp(2.2rem, 10vw, 3.6rem); line-height: 1.05; }
  .hero p { font-size: 0.97rem; }
  .scroll-indicator { margin-top: 22px; }
  .candy-particles span { font-size: clamp(.8rem, 2.5vw, 1.3rem); }

  /* Ticker */
  .ticker { font-size: clamp(.9rem, 4vw, 1.3rem); }

  /* Feature block */
  .feature-card { padding: 22px 18px; }
  .feature-card::before { font-size: 6rem; }
  h2, .h2 { font-size: clamp(1.5rem, 5vw, 2.1rem); }
  .stat-num { font-size: clamp(2rem, 10vw, 3.5rem); }

  /* Type grid */
  .type-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .type-card { min-height: 160px; padding: 16px; }
  .type-card h3 { font-size: clamp(1.2rem, 4vw, 1.6rem); }
  .type-card p { font-size: .85rem; }

  /* Brand scroller — full-width cards on small screens */
  .scroller { gap: 12px; }
  .brand-card { flex: 0 0 240px; min-height: 320px; padding: 18px; }
  .brand-card h3 { font-size: clamp(1.8rem, 7vw, 2.6rem); }

  /* Magazine grid */
  .mag-grid { grid-template-columns: 1fr; }
  .editorial-card { min-height: 200px; }

  /* Bento */
  .type-grid, .related-grid, .bento-grid { grid-template-columns: 1fr; grid-template-areas: none; }
  .bento-card, .bento-card.hero, .bento-card.m1, .bento-card.m2, .bento-card.s1, .bento-card.s2 { grid-area: auto; }
  .bento-card.hero { min-height: 220px; }
  .bento-card { min-height: 140px; padding: 16px; }

  /* Display title */
  .display-title { font-size: clamp(1.9rem, 8vw, 3rem); }

  /* FAQ */
  .faq-item button { font-size: .95rem; padding: 14px; }
  .faq-item .answer { font-size: .93rem; }

  /* Tag cloud */
  .tag-cloud { gap: 8px; }
  .term-tag { font-size: 0.82rem !important; padding: 6px 12px; }
  .term-tag .tooltip { min-width: 170px; font-size: .82rem; }

  /* Article pages */
  .article-hero { min-height: 48vh; padding: clamp(40px, 8vw, 80px) 0 28px; }
  .article-body { font-size: 16px; }
  .article-body h2 { font-size: clamp(1.4rem, 5vw, 2rem); }
  .pull-quote { font-size: clamp(1.2rem, 4vw, 1.6rem); }
  .related-grid { grid-template-columns: 1fr; gap: 12px; }
  .meta-row { gap: 10px; font-size: .85rem; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 12px; text-align: center; }

  /* Hide custom cursor on touch */
  .cursor-dot, .cursor-ring { display: none; }

  /* Mobile nav overlay tweaks */
  .mobile-menu a { font-size: clamp(2rem, 10vw, 3.5rem); }

  /* Language switch visible in mobile menu */
  .mobile-lang-switch { display: flex; gap: 8px; justify-content: center; margin-top: 24px; }
}

/* ── Very small screens: ≤ 400px ─────────────────────────────── */
@media (max-width: 400px) {
  .type-grid { grid-template-columns: 1fr; }
  .brand-card { flex: 0 0 200px; min-height: 280px; }
  h1, .h1 { font-size: clamp(1.8rem, 8vw, 2.8rem); }
}
