/* ═══════════════════════════════════════════════════════
   xAdeeb — Styles
   Design system inherited from TechNova, recomposed for
   the xAdeeb single-page layout.
════════════════════════════════════════════════════════ */

/* ─── Design Tokens ─────────────────────────────────── */
:root {
  color-scheme: dark;
  --bg:            #050713;
  --bg-2:          #0b1024;
  --panel:         rgba(255, 255, 255, 0.08);
  --panel-strong:  rgba(255, 255, 255, 0.13);
  --text:          #eef4ff;
  --muted:         #9aa8c7;
  --line:          rgba(255, 255, 255, 0.14);
  --primary:       #7c5cff;
  --primary-2:     #00e7ff;
  --accent:        #28ffbf;
  --danger:        #ff4d87;
  --shadow:        0 24px 80px rgba(0, 0, 0, 0.35);
  --radius-xl:     34px;
  --radius-lg:     24px;
  --radius-md:     16px;
  --max-width:     1080px;
}

[data-theme="light"] {
  color-scheme: light;
  --bg:           #f7f9ff;
  --bg-2:         #edf2ff;
  --panel:        rgba(255, 255, 255, 0.78);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --text:         #10172a;
  --muted:        #5e6b86;
  --line:         rgba(20, 30, 60, 0.12);
  --shadow:       0 24px 80px rgba(64, 91, 150, 0.18);
}

/* ─── Reset & Base ───────────────────────────────────── */
*               { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system,
               BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 20%  8%, rgba(124, 92, 255, 0.30), transparent 28rem),
    radial-gradient(circle at 80%  4%, rgba(  0,231, 255, 0.18), transparent 26rem),
    linear-gradient(135deg, var(--bg), var(--bg-2));
  color: var(--text);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
body.menu-open { overflow: hidden; }

/* Subtle dot-grid overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.8), transparent 78%);
  z-index: -3;
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a      { color: inherit; text-decoration: none; }
img    { max-width: 100%; display: block; }
h1, h2, h3, p { margin-top: 0; }

/* ─── Noise overlay ─────────────────────────────────── */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  z-index: 10;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
}

/* ─── Cursor glow ────────────────────────────────────── */
.cursor-glow {
  position: fixed;
  width: 26rem;
  height: 26rem;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(0,231,255,0.16), rgba(124,92,255,0.08) 38%, transparent 70%);
  filter: blur(10px);
  transform: translate3d(-50%, -50%, 0);
  z-index: -1;
  transition: opacity 0.3s ease;
}

/* ─── Header ─────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: min(calc(100% - 32px), var(--max-width));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 14px 12px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(5, 7, 19, 0.68);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  z-index: 50;
  transition: 0.3s ease;
}
[data-theme="light"] .site-header { background: rgba(255, 255, 255, 0.7); }
.site-header.scrolled { top: 10px; padding-block: 9px; }

/* Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.brand img  { width: 34px; height: 34px; }
.brand span { font-size: 1.12rem; }

/* Nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}
.main-nav a {
  padding: 9px 12px;
  border-radius: 999px;
  transition: 0.25s ease;
}
.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--text);
  background: var(--panel);
}

/* Header actions */
.header-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn,
.hamburger {
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--panel);
}

/* Theme toggle */
.theme-switch {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.theme-orbit {
  position: relative;
  width: 25px;
  height: 25px;
  transition: transform 0.55s cubic-bezier(.2,.8,.2,1);
}
.theme-sun, .theme-moon {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
}
.theme-sun  { background: linear-gradient(135deg, #ffe66d, #ff8c42); box-shadow: 0 0 20px rgba(255,230,109,0.65); }
.theme-moon { transform: translate(18px, -18px); background: #dce7ff; box-shadow: inset -7px -5px 0 #8ca0c9; }
[data-theme="light"] .theme-orbit { transform: rotate(180deg); }

/* Hamburger */
.hamburger {
  display: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  place-items: center;
  padding: 0;
}
.hamburger span {
  width: 20px;
  height: 2px;
  background: currentColor;
  grid-column: 1;
  grid-row: 1;
  transition: 0.25s ease;
}
.hamburger span:nth-child(1) { transform: translateY(-7px); }
.hamburger span:nth-child(3) { transform: translateY(7px); }
.hamburger.active span:nth-child(1) { transform: rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg); }

/* ─── Sections ───────────────────────────────────────── */
.section {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  padding: 110px 0;
}

/* ─── Hero ───────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 130px;
  padding-bottom: 80px;
}

.hero-grid-bg {
  position: absolute;
  inset: 90px -10% 0;
  z-index: -2;
  background: radial-gradient(circle, rgba(124,92,255,0.25), transparent 34rem);
  filter: blur(18px);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(4px);
  opacity: 0.6;
  animation: drift 9s ease-in-out infinite alternate;
  z-index: -1;
}
.orb-one   { width:  90px; height:  90px; left: 8%;  top: 30%; background: rgba(40,255,191,0.25); }
.orb-two   { width: 150px; height: 150px; right: 6%; bottom: 18%; background: rgba(124,92,255,0.22); animation-delay: -3s; }
.orb-three { width:  60px; height:  60px; right: 20%; top: 22%; background: rgba(0,231,255,0.20); animation-delay: -5s; }

@keyframes drift {
  from { transform: translate3d(0,0,0) scale(1); }
  to   { transform: translate3d(40px,-30px,0) scale(1.12); }
}

.hero-inner { max-width: 780px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--primary-2);
  background: var(--panel);
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 28px;
}
.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(40,255,191,0.75);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  70%  { box-shadow: 0 0 0 12px rgba(40,255,191,0); }
  100% { box-shadow: 0 0 0  0   rgba(40,255,191,0); }
}

/* Hero title — massive "xAdeeb" wordmark */
h1 {
  margin: 0 0 0;
  font-size: clamp(5rem, 18vw, 13rem);
  line-height: 0.88;
  letter-spacing: -0.07em;
  background: linear-gradient(135deg, #fff 0%, var(--primary-2) 45%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  margin: 16px 0 22px;
  font-size: clamp(1rem, 2.5vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--muted);
}

.hero-text {
  max-width: 520px;
  margin: 0 auto 32px;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
}

/* ─── Buttons ────────────────────────────────────────── */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
  font-weight: 700;
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
}
.btn:hover::before  { transform: translateX(120%); }
.btn:hover          { transform: translateY(-2px); border-color: rgba(255,255,255,0.38); }
.primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); box-shadow: 0 16px 40px rgba(0,231,255,0.18); }
.ghost   { background: var(--panel); }
.btn-icon { width: 16px; height: 16px; flex-shrink: 0; }

/* ─── Section heading ────────────────────────────────── */
.section-heading {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  background: var(--panel);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 18px;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  margin-bottom: 16px;
}
h3 { letter-spacing: -0.03em; }

.section-heading p { color: var(--muted); line-height: 1.75; }

/* ─── Explore / Foundations ──────────────────────────── */
.explore { padding-top: 40px; }

.foundations-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

/* Foundation Card */
.foundation-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, var(--panel-strong), rgba(255,255,255,0.04));
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transform-style: preserve-3d;
  transition: transform 0.2s ease, border-color 0.3s ease;
}
.foundation-card:hover { border-color: rgba(0,231,255,0.35); }

/* Affiliation badge — pinned to top-right corner */
.card-affiliation {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 2;
}
.affiliation-tag {
  display: inline-flex;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  background: rgba(255,255,255,0.05);
  letter-spacing: 0.02em;
}

/* Card body */
.card-body { position: relative; z-index: 2; }

/* Card icon */
.card-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 24px;
}
.card-icon svg { width: 100%; height: 100%; }

/* Category label */
.card-category {
  display: inline-flex;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.techlab-icon  ~ .card-category,
.foundation-card:first-child .card-category {
  background: rgba(124,92,255,0.12);
  color: var(--primary);
}
/* Use attribute selector trick — simpler to just style by order */
.foundation-card:nth-child(1) .card-category {
  background: rgba(124,92,255,0.12);
  color: #a08aff;
}
.foundation-card:nth-child(2) .card-category {
  background: rgba(40,255,191,0.10);
  color: var(--accent);
}

.foundation-card h3 {
  font-size: 2rem;
  margin-bottom: 14px;
}
.foundation-card p {
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 28px;
}
.foundation-card strong { color: var(--text); }

/* Card links */
.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
}
.card-btn { font-size: 0.92rem; min-height: 44px; padding: 0 18px; }

/* Per-card glow orb */
.card-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 1;
}
.techlab-glow  { background: rgba(124,92,255,0.20); right: -80px; bottom: -80px; }
.techlabx-glow { background: rgba( 40,255,191,0.16); left: -80px; bottom: -80px; }

/* Spinning border highlight on hover */
.foundation-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: conic-gradient(from 180deg, transparent, rgba(0,231,255,0.28), transparent, rgba(124,92,255,0.28), transparent);
  animation: spin 8s linear infinite;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.foundation-card::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--radius-xl) - 2px);
  background: rgba(8, 12, 30, 0.86);
  z-index: 0;
}
[data-theme="light"] .foundation-card::after { background: rgba(245,248,255,0.92); }
.foundation-card:hover::before { opacity: 1; }

/* Ensure card content sits above the ::after pseudo */
.card-body        { position: relative; z-index: 2; }
.card-affiliation { position: absolute; z-index: 2; }
.card-glow        { position: absolute; z-index: 1; }

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

/* ─── Footer ─────────────────────────────────────────── */
.site-footer {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto 28px;
  padding: 32px 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: auto auto;
  align-items: start;
  gap: 24px 40px;
}

.footer-brand { grid-column: 1; }
.footer-center { grid-column: 2; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.footer-socials { grid-column: 3; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.footer-bottom {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  text-align: center;
}

.brand-note {
  max-width: 320px;
  margin: 14px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
}
.brand-note strong { color: var(--text); }
.brand-note em { color: var(--primary-2); font-style: normal; }

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}
.footer-links a {
  padding: 6px 14px;
  border-radius: 999px;
  transition: 0.2s ease;
  font-size: 0.92rem;
}
.footer-links a:hover { color: var(--text); background: var(--panel); }

.socials-label { margin: 0 0 4px; font-size: 0.8rem; color: var(--muted); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }

.social-links { display: flex; gap: 10px; }
.social-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel);
  display: grid;
  place-items: center;
  transition: 0.25s ease;
  color: var(--muted);
}
.social-btn svg { width: 18px; height: 18px; }
.social-btn:hover {
  color: var(--text);
  border-color: rgba(0,231,255,0.45);
  background: var(--panel-strong);
  transform: translateY(-2px);
}

.footer-bottom p { margin: 0; color: var(--muted); font-size: 0.85rem; }

/* ─── Reveal animations ──────────────────────────────── */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.14s; }
.delay-2 { transition-delay: 0.26s; }

/* ─── Toast ──────────────────────────────────────────── */
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: 360px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(7, 10, 25, 0.88);
  color: var(--text);
  box-shadow: var(--shadow);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: 0.25s ease;
  z-index: 100;
  font-size: 0.92rem;
}
[data-theme="light"] .toast { background: rgba(255,255,255,0.9); }
.toast.show { transform: translateY(0); opacity: 1; }

/* ─── Reduced motion ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
  .cursor-glow { display: none; }
}

/* ─── Touch / Coarse pointer optimization ────────────── */
@media (hover: none) or (pointer: coarse) {
  .cursor-glow { display: none !important; }
  .btn:hover { transform: none; }
  .foundation-card:hover { border-color: var(--line); }
  .foundation-card:hover::before { opacity: 0; }
  .social-btn:hover { transform: none; }
}

/* ─── Mobile navigation backdrop ─────────────────────── */
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 5, 14, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 48;
}
[data-theme="light"] .nav-backdrop {
  background: rgba(16, 23, 42, 0.4);
}
.nav-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* ─── Tablet breakpoint (max-width: 900px) ───────────── */
@media (max-width: 900px) {
  .site-header {
    top: 14px;
    width: min(calc(100% - 28px), var(--max-width));
    padding: 10px 14px;
  }
  .site-header.scrolled {
    top: 8px;
    padding: 8px 12px;
  }

  .hamburger { display: grid; }

  .main-nav {
    position: fixed;
    inset: 72px 14px auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(8, 12, 28, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    transform: translateY(-10px) scale(0.98);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
    z-index: 49;
  }
  [data-theme="light"] .main-nav {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 20px 48px rgba(30, 45, 90, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
  }
  .main-nav.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
  }
  .main-nav a {
    padding: 14px 18px;
    font-size: 1.02rem;
    font-weight: 600;
    border-radius: 12px;
    color: var(--muted);
    transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease;
  }
  .main-nav a:hover,
  .main-nav a:focus-visible {
    color: var(--text);
    background: var(--panel);
  }
  .main-nav a:active {
    transform: scale(0.98);
  }
  .main-nav a[aria-current="page"] {
    color: var(--text);
    background: var(--panel-strong);
    font-weight: 700;
  }

  .foundations-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .site-footer {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    text-align: center;
    padding: 32px 24px;
    gap: 28px;
  }
  .footer-brand { grid-column: 1; }
  .footer-brand .brand { justify-content: center; }
  .footer-center { grid-column: 1; }
  .footer-socials { grid-column: 1; align-items: center; }
  .footer-bottom { grid-column: 1; padding-top: 18px; }
  .brand-note { max-width: 480px; margin: 12px auto 0; }
  .footer-links {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }
  .footer-links a {
    padding: 8px 16px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* ─── Mobile breakpoint (max-width: 560px) ───────────── */
@media (max-width: 560px) {
  .section {
    width: min(calc(100% - 24px), var(--max-width));
    padding: 60px 0;
  }
  .section-heading {
    margin-bottom: 36px;
  }
  h2 {
    font-size: clamp(1.75rem, 6vw, 2.3rem);
    letter-spacing: -0.04em;
    margin-bottom: 12px;
  }
  .section-heading p {
    font-size: 0.95rem;
    line-height: 1.65;
  }
  .kicker {
    font-size: 0.78rem;
    padding: 6px 12px;
    margin-bottom: 14px;
  }

  /* Hero */
  .hero {
    min-height: 100svh;
    min-height: 100dvh;
    padding-top: 110px;
    padding-bottom: 50px;
  }
  h1 {
    font-size: clamp(3.2rem, 16vw, 5.5rem);
    letter-spacing: -0.05em;
    line-height: 0.92;
    overflow-wrap: break-word;
  }
  .hero-subtitle {
    margin: 12px 0 16px;
    font-size: clamp(1rem, 3.8vw, 1.3rem);
  }
  .hero-text {
    font-size: 0.96rem;
    line-height: 1.65;
    margin-bottom: 24px;
    max-width: 92%;
  }
  .hero-actions {
    width: 100%;
  }
  .hero-actions .btn {
    width: 100%;
    max-width: 280px;
  }

  /* Orbs */
  .orb {
    filter: blur(6px);
    opacity: 0.35;
  }
  .orb-one   { width: 64px; height: 64px; left: 4%; top: 18%; }
  .orb-two   { width: 90px; height: 90px; right: 4%; bottom: 10%; }
  .orb-three { width: 40px; height: 40px; right: 10%; top: 15%; }

  /* Cards */
  .foundation-card {
    padding: 24px 20px;
    border-radius: var(--radius-lg);
  }
  .card-icon {
    width: 52px;
    height: 52px;
    margin-bottom: 18px;
  }
  .card-category {
    font-size: 0.72rem;
    padding: 4px 10px;
    margin-bottom: 12px;
  }
  .foundation-card h3 {
    font-size: clamp(1.45rem, 5vw, 1.75rem);
    margin-bottom: 10px;
  }
  .foundation-card p {
    font-size: 0.94rem;
    line-height: 1.65;
    margin-bottom: 22px;
  }
  .card-links {
    flex-direction: column;
    gap: 10px;
  }
  .card-btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
  }
  .card-affiliation {
    top: 20px;
    right: 20px;
  }

  /* Footer */
  .site-footer {
    padding: 28px 18px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    gap: 22px;
  }
  .social-btn {
    width: 44px;
    height: 44px;
  }
  .social-btn svg {
    width: 20px;
    height: 20px;
  }
  .social-links {
    gap: 12px;
  }

  /* Toast */
  .toast {
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: none;
    text-align: center;
    border-radius: 14px;
    padding: 12px 16px;
  }
}

/* ─── Compact mobile screens (max-width: 420px) ───────── */
@media (max-width: 420px) {
  .section {
    width: min(calc(100% - 20px), var(--max-width));
    padding: 48px 0;
  }

  .site-header {
    top: 10px;
    width: min(calc(100% - 20px), var(--max-width));
    padding: 8px 10px 8px 14px;
    gap: 8px;
  }
  .brand img {
    width: 30px;
    height: 30px;
  }
  .brand span {
    font-size: 1.05rem;
  }
  .theme-switch,
  .hamburger {
    width: 42px;
    height: 42px;
  }
  .main-nav {
    inset: 64px 10px auto;
    padding: 10px;
    border-radius: 16px;
  }
  .main-nav a {
    padding: 12px 14px;
    font-size: 0.98rem;
  }

  h1 {
    font-size: clamp(2.6rem, 15vw, 3.8rem);
  }

  .foundation-card {
    padding: 20px 16px;
    border-radius: 20px;
  }
  .card-affiliation {
    position: static;
    margin-bottom: 14px;
    align-self: flex-start;
  }
  .affiliation-tag {
    font-size: 0.74rem;
    padding: 4px 10px;
  }
  .card-icon {
    width: 46px;
    height: 46px;
    margin-bottom: 14px;
  }
  .foundation-card h3 {
    font-size: 1.45rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 4px;
  }
  .footer-links a {
    width: 100%;
    justify-content: center;
    padding: 8px 12px;
  }
}
