/* ============================================================
   CognoRise InfoTech — Website Styles
   Brand palette from colors.txt
   ============================================================ */

:root {
  --red: #ff3b39;
  --red-2: #fe3b39;
  --indigo: #363283;
  --navy: #213959;
  --gray-100: #f5f6f9;
  --gray-200: #e1e1e5;
  --gray-400: #abb5c1;
  --ink: #1a2233;
  --white: #ffffff;

  --brand-gradient: linear-gradient(120deg, #ff3b39 0%, #363283 100%);
  --brand-gradient-soft: linear-gradient(135deg, rgba(255,59,57,.12), rgba(54,50,131,.12));
  --hero-gradient: radial-gradient(1200px 600px at 80% -10%, rgba(255,59,57,.18), transparent 60%),
                   radial-gradient(1000px 500px at 0% 20%, rgba(54,50,131,.20), transparent 55%),
                   linear-gradient(180deg, #0f1830 0%, #16224a 100%);

  --shadow-sm: 0 4px 16px rgba(33,57,89,.08);
  --shadow-md: 0 12px 32px rgba(33,57,89,.12);
  --shadow-lg: 0 24px 60px rgba(33,57,89,.18);
  --shadow-glow: 0 20px 50px rgba(255,59,57,.28);

  --radius: 18px;
  --radius-lg: 28px;
  --maxw: 1200px;

  --font-body: 'Poppins', system-ui, -apple-system, sans-serif;
  --font-head: 'Sora', 'Poppins', sans-serif;

  /* Semantic surfaces (light theme defaults) */
  --page-bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f2f3fa;
  --surface-3: #fbfbfe;
  --border: #edeef5;
  --text: #213959;
  --text-soft: #43526b;
  --text-muted: #abb5c1;
  --header-bg: rgba(255,255,255,.92);
}

/* ---------- Dark theme ---------- */
[data-theme="dark"] {
  --page-bg: #0d1424;
  --surface: #151d33;
  --surface-2: #111a2e;
  --surface-3: #131c31;
  --border: #26314c;
  --text: #eef1f8;
  --text-soft: #c2cbdd;
  --text-muted: #8592ab;
  --gray-200: #2a3450;
  --header-bg: rgba(13,20,36,.9);
  --brand-gradient-soft: linear-gradient(135deg, rgba(255,59,57,.16), rgba(90,86,190,.18));
  --shadow-sm: 0 4px 16px rgba(0,0,0,.35);
  --shadow-md: 0 12px 32px rgba(0,0,0,.45);
  --shadow-lg: 0 24px 60px rgba(0,0,0,.55);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--page-bg);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  width: 100%;
  transition: background .3s ease, color .3s ease;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }
.section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--indigo);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-head);
  font-weight: 700; font-size: .92rem;
  padding: 9px 24px; border-radius: 999px;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
  white-space: nowrap;
}
.btn-lg { padding: 11px 30px; font-size: .96rem; }
.btn-sm { padding: 7px 18px; font-size: .82rem; }
.btn-primary { background: var(--brand-gradient); background-clip: border-box; color: #fff; border: 0; box-shadow: var(--shadow-glow); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 26px 60px rgba(255,59,57,.42); }
.btn-ghost { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.35); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255,255,255,.16); transform: translateY(-3px); }
.btn-light { background: #fff; color: var(--indigo); border: 0; box-shadow: var(--shadow-md); }
.btn-light:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-outline-light:hover { background: rgba(255,255,255,.14); transform: translateY(-3px); }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 4px; width: 0%;
  background: var(--brand-gradient); z-index: 2000; transition: width .1s linear;
}

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  transition: background .3s ease, box-shadow .3s ease, padding .3s ease;
  padding: 16px 0;
}
.site-header.scrolled {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  padding: 10px 0;
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand-logo { height: 46px; width: auto; transition: height .3s ease; filter: drop-shadow(0 2px 6px rgba(0,0,0,.1)); }
.site-header.scrolled .brand-logo { height: 40px; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav-list { display: flex; align-items: center; gap: 6px; }
.nav-list > li { display: flex; align-items: center; }
.nav-link {
  line-height: 1.4;
  font-family: var(--font-head); font-weight: 600; font-size: .92rem;
  color: #fff; padding: 8px 14px; border-radius: 999px; position: relative;
  transition: color .25s ease, background .25s ease;
}
.site-header.scrolled .nav-link { color: var(--navy); }
.nav-link::after {
  content: ''; position: absolute; left: 50%; bottom: 4px; width: 0; height: 2px;
  background: var(--red); transform: translateX(-50%); transition: width .25s ease; border-radius: 2px;
}
.nav-link:hover::after, .nav-link.active::after { width: 22px; }
.nav-link:hover { color: var(--red); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0;
  cursor: pointer; padding: 8px; z-index: 1300; position: relative;
}
.nav-toggle span { width: 26px; height: 3px; background: #fff; border-radius: 3px; transition: .3s; }
.site-header.scrolled .nav-toggle span { background: var(--navy); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Dropdown nav ---------- */
.nav-dropdown { position: relative; }
.nav-drop-btn {
  display: inline-flex; align-items: center; gap: 5px; cursor: pointer;
  background: none; border: 0; white-space: nowrap;
  /* match the <a> nav-links exactly so buttons don't sit lower in
     Edge/Chrome (buttons otherwise inherit their own font/line-height/
     vertical-align and baseline, which differs from anchors) */
  font-family: inherit; font-size: inherit; font-weight: inherit;
  line-height: inherit; color: inherit; vertical-align: middle;
}
.drop-arrow { font-size: .65rem; transition: transform .25s ease; display: inline-block; }
.nav-dropdown.open .drop-arrow { transform: rotate(180deg); }

/* desktop dropdown panel */
.dropdown-menu {
  display: none; position: absolute; top: calc(100% + 10px); left: 50%;
  transform: translateX(-50%);
  background: #fff; border: 1px solid #edeef5; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 8px; min-width: 200px;
  z-index: 1100; list-style: none;
  animation: ddIn .18s ease;
}
.nav-dropdown.open .dropdown-menu { display: block; }
@keyframes ddIn { from { opacity: 0; transform: translateX(-50%) translateY(-6px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

.dropdown-item {
  display: block; padding: 10px 14px; border-radius: 10px;
  font-family: var(--font-head); font-weight: 600; font-size: .88rem;
  color: var(--navy); transition: background .2s ease, color .2s ease;
  white-space: nowrap;
}
.dropdown-item:hover { background: var(--brand-gradient-soft); color: var(--red); }
.dropdown-item-active { color: var(--red) !important; background: var(--brand-gradient-soft); }
.dropdown-item-soon { opacity: .55; cursor: default; pointer-events: none; }
.coming-soon {
  display: inline-block; margin-left: 6px; font-size: .68rem; font-weight: 700;
  padding: 2px 7px; border-radius: 999px; background: rgba(54,50,131,.12); color: var(--indigo);
  vertical-align: middle;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  padding: 130px 0 0; color: #fff; overflow: hidden;
  background: var(--hero-gradient);
}
.hero-bg { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.grid-overlay {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(70% 60% at 50% 40%, #000 40%, transparent 100%);
}
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; }
.orb-1 { width: 420px; height: 420px; background: var(--red); top: -80px; right: -60px; animation: float1 14s ease-in-out infinite; }
.orb-2 { width: 380px; height: 380px; background: var(--indigo); bottom: -100px; left: -80px; animation: float2 16s ease-in-out infinite; }
.orb-3 { width: 260px; height: 260px; background: #4b6bd8; top: 40%; left: 45%; opacity: .35; animation: float1 12s ease-in-out infinite reverse; }

.hero-inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center;
  flex: 1;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  padding: 8px 16px; border-radius: 999px; font-size: .82rem; font-weight: 600;
  backdrop-filter: blur(6px); margin-bottom: 22px;
}
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: #2fd47a; box-shadow: 0 0 0 0 rgba(47,212,122,.6); animation: pulse 2s infinite; }
.hero-title {
  font-family: var(--font-head); font-weight: 800; line-height: 1.08;
  font-size: clamp(2.2rem, 5.2vw, 3.9rem); margin-bottom: 20px; letter-spacing: -.5px;
}
.gradient-text {
  background: linear-gradient(100deg, #ff6b5c, #ff3b39 40%, #9aa8ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { font-size: clamp(1rem, 1.4vw, 1.15rem); color: rgba(255,255,255,.82); max-width: 560px; margin-bottom: 18px; }
.hero-tagline {
  font-family: var(--font-head); font-weight: 700; letter-spacing: 3px; text-transform: uppercase;
  font-size: .95rem; color: #fff; margin-bottom: 28px;
}
.hero-tagline span { color: var(--red); margin: 0 6px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 44px; }
.hero-stats { display: grid; grid-template-columns: repeat(4, auto); gap: clamp(20px, 4vw, 46px); }
.stat { display: flex; flex-direction: column; }
.stat-num { font-family: var(--font-head); font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1; white-space: nowrap; }
.stat-label { font-size: .82rem; color: rgba(255,255,255,.7); margin-top: 6px; }

/* Hero visual — orbiting domain icons (Option 8) */
.hero-visual { position: relative; display: flex; justify-content: center; }
.floating { animation: floatCard 6s ease-in-out infinite; }

.orbit-scene {
  position: relative; width: min(100%, 420px); aspect-ratio: 1 / 1;
  display: grid; place-items: center;
  --inner-r: 118px;   /* inner ring radius */
  --outer-r: 185px;   /* outer ring radius */
}
.orbit-halo {
  position: absolute; inset: 12%; border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(255,59,57,.28), rgba(54,50,131,.18) 55%, transparent 72%);
  filter: blur(18px);
}

/* central hub */
.orbit-hub {
  position: absolute; z-index: 3; width: 118px; height: 118px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.4); backdrop-filter: blur(8px);
  box-shadow: 0 20px 50px rgba(0,0,0,.25); animation: floatCard 7s ease-in-out infinite;
}
.orbit-hub::after {
  content: ''; position: absolute; inset: 10px; border-radius: 50%;
  background: #fff; box-shadow: var(--shadow-md);
}
.orbit-seal { position: relative; z-index: 1; width: 74px; height: 74px; }

/* rings */
.orbit-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px dashed rgba(255,255,255,.18);
}
.orbit-ring-inner { inset: 24%; animation: agSpin 26s linear infinite; }
.orbit-ring-outer { inset: 4%; animation: agSpin 40s linear infinite reverse; }

/* icons placed around each ring */
.orbit-icon {
  position: absolute; top: 50%; left: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px;
}
.orbit-ring-inner .orbit-icon { transform: rotate(var(--a)) translate(var(--inner-r)) rotate(calc(-1 * var(--a))); }
.orbit-ring-outer .orbit-icon { transform: rotate(var(--a)) translate(var(--outer-r)) rotate(calc(-1 * var(--a))); }
/* inner box holds the icon and counter-spins so it stays upright while the ring rotates */
.orbit-icon img {
  width: 56px; height: 56px; padding: 13px; border-radius: 16px; object-fit: contain;
  background: rgba(255,255,255,.96); box-shadow: var(--shadow-md); border: 1px solid rgba(255,255,255,.6);
}
.orbit-ring-inner .orbit-icon img { animation: agSpin 26s linear infinite reverse; }
.orbit-ring-outer .orbit-icon img { animation: agSpin 40s linear infinite; }
.badge-float {
  position: absolute; background: #fff; color: var(--navy); font-weight: 700; font-size: .82rem;
  padding: 10px 16px; border-radius: 14px; box-shadow: var(--shadow-md); font-family: var(--font-head);
}
.badge-1 { top: 6%; left: -6%; animation: floatCard 5s ease-in-out infinite; }
.badge-2 { bottom: 18%; right: -8%; animation: floatCard 6.5s ease-in-out infinite; }
.badge-3 { bottom: -4%; left: 8%; animation: floatCard 5.8s ease-in-out infinite reverse; }

/* Marquee */
.marquee { position: relative; z-index: 2; margin-top: 40px; overflow: hidden; border-top: 1px solid rgba(255,255,255,.12); border-bottom: 1px solid rgba(255,255,255,.12); padding: 16px 0; background: rgba(0,0,0,.15); }
.marquee-track { display: flex; gap: 26px; white-space: nowrap; width: max-content; animation: marquee 32s linear infinite; }
.marquee-track span { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; color: rgba(255,255,255,.85); }
.marquee-track span:nth-child(even) { color: var(--red); }

/* ---------- Section headings ---------- */
.section-head { text-align: center; max-width: 720px; margin: 0 auto 54px; }
.section-tag {
  display: inline-block; font-family: var(--font-head); font-weight: 700; font-size: .78rem;
  letter-spacing: 2px; text-transform: uppercase; color: var(--red);
  background: rgba(255,59,57,.1); padding: 6px 16px; border-radius: 999px; margin-bottom: 16px;
}
.section-tag.light { color: #fff; background: rgba(255,255,255,.18); }
.section-title { font-family: var(--font-head); font-weight: 800; font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1.15; letter-spacing: -.5px; }
.section-lead { color: var(--gray-400); margin-top: 16px; font-size: 1.05rem; }
.section-title .gradient-text { background: var(--brand-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.about-media { position: relative; display: flex; justify-content: center; }

/* ----- About graphic (pure CSS/SVG) ----- */
.about-graphic {
  position: relative; width: 100%; max-width: 440px; aspect-ratio: 1 / 1;
  display: grid; place-items: center;
}
.ag-glow {
  position: absolute; inset: 8%; border-radius: 50%;
  background: var(--brand-gradient-soft); filter: blur(34px);
}
.ag-ring {
  position: absolute; border-radius: 50%; border: 2px dashed rgba(54,50,131,.18);
}
.ag-ring-1 { inset: 2%; animation: agSpin 40s linear infinite; }
.ag-ring-2 { inset: 16%; border-color: rgba(255,59,57,.16); animation: agSpin 30s linear infinite reverse; }

.ag-panel {
  position: relative; z-index: 2; width: 78%; background: #fff;
  border: 1px solid #edeef5; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 22px; animation: floatCard 6s ease-in-out infinite;
}
.ag-illustration { width: 100%; height: auto; display: block; }
.ag-spin { animation: agSpin 8s linear infinite; }

.ag-chip {
  position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 7px;
  background: #fff; color: var(--navy); font-family: var(--font-head); font-weight: 700;
  font-size: .8rem; padding: 9px 14px; border-radius: 12px; box-shadow: var(--shadow-md);
  border: 1px solid #edeef5;
}
.ag-chip .dot { width: 9px; height: 9px; border-radius: 50%; }
.dot-red { background: var(--red); }
.dot-indigo { background: var(--indigo); }
.ag-chip-1 { top: 8%; left: -4%; animation: floatCard 5s ease-in-out infinite; }
.ag-chip-2 { top: 40%; right: -6%; animation: floatCard 6.4s ease-in-out infinite; }
.ag-chip-3 { bottom: 16%; left: -2%; animation: floatCard 5.6s ease-in-out infinite reverse; }

.ag-stats {
  position: absolute; z-index: 3; bottom: 2%; right: 2%;
  display: grid; grid-template-columns: repeat(3, auto); gap: 18px;
  background: #fff; border: 1px solid #edeef5; border-radius: 16px;
  padding: 14px 20px; box-shadow: var(--shadow-md);
}
.ag-stats div { display: flex; flex-direction: column; text-align: center; }
.ag-stats strong { font-family: var(--font-head); font-size: 1.25rem; color: var(--indigo); line-height: 1; }
.ag-stats span { font-size: .68rem; color: var(--gray-400); margin-top: 4px; }
.about-content .section-title { text-align: left; }
.about-content p { color: #4a5a72; margin-top: 16px; }
.about-points { display: grid; gap: 12px; margin: 26px 0; }
.about-points li { display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--navy); }
.tick { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--brand-gradient); color: #fff; font-size: .8rem; flex-shrink: 0; }

/* ---------- Domains ---------- */
.domains { background: linear-gradient(180deg, #fbfbfe 0%, #f2f3fa 100%); }
.domain-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.domain-card {
  position: relative; display: flex; flex-direction: column; color: var(--navy);
  background: #fff; border-radius: var(--radius); padding: 28px 24px;
  box-shadow: var(--shadow-sm); border: 1px solid #edeef5; overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.domain-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--brand-gradient); transform: scaleX(0); transform-origin: left; transition: transform .35s ease;
}
.domain-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: transparent; }
.domain-card:hover::before { transform: scaleX(1); }
.domain-ico {
  width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center;
  font-size: 1.7rem; margin-bottom: 18px; background: var(--brand-gradient-soft);
  transition: transform .3s ease;
}
.domain-ico img { width: 34px; height: 34px; object-fit: contain; }
.domain-card:hover .domain-ico { transform: scale(1.08) rotate(-4deg); }
.domain-card h3 { font-family: var(--font-head); font-size: 1.15rem; margin-bottom: 8px; }
.domain-card p { font-size: .9rem; color: var(--gray-400); flex: 1; }
.domain-tag {
  display: block; margin-top: 20px;
  font-size: .74rem; font-weight: 700;
  color: var(--indigo); background: rgba(54,50,131,.08);
  padding: 7px 14px; border-radius: 999px;
  text-align: center; align-self: flex-end;
}
.domains-cta { text-align: center; margin-top: 48px; }

/* ---------- Process / Journey ---------- */
.journey { max-width: 1000px; margin: 0 auto; }
.journey-track { position: relative; padding: 10px 0 6px; }

/* progress line behind the nodes */
.journey-line {
  position: absolute; top: 42px; left: 5%; right: 5%; height: 5px;
  background: var(--gray-200); border-radius: 999px; z-index: 0; overflow: hidden;
}
.journey-line-fill {
  position: absolute; inset: 0; width: 0%; border-radius: 999px;
  background: var(--brand-gradient); transition: width .5s cubic-bezier(.4,0,.2,1);
}

.journey-nodes { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 4px; }
.journey-node {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: none; border: 0; cursor: pointer; padding: 0; font-family: inherit;
}
.journey-dot {
  width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; background-clip: border-box; border: 3px solid var(--gray-200); font-size: 1.7rem;
  box-shadow: var(--shadow-sm); position: relative;
  transition: transform .3s ease, border-color .3s ease, background .3s ease, box-shadow .3s ease;
}
.journey-dot img { width: 34px; height: 34px; object-fit: contain; transition: filter .3s ease; }
.journey-step-no {
  position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--navy); color: #fff; font-size: .72rem; font-weight: 700; display: grid; place-items: center;
  font-family: var(--font-head); border: 2px solid #fff;
}
.journey-label { font-family: var(--font-head); font-weight: 600; font-size: .82rem; color: var(--gray-400); text-align: center; transition: color .3s ease; }

/* states */
.journey-node:hover .journey-dot { transform: translateY(-4px); border-color: var(--indigo); }
.journey-node.done .journey-dot { border-color: var(--red); }
.journey-node.done .journey-step-no { background: var(--red); }
.journey-node.active .journey-dot {
  background: var(--brand-gradient); background-clip: border-box;
  border-color: var(--indigo); transform: translateY(-4px) scale(1.06);
  box-shadow: var(--shadow-glow);
}
.journey-node.active .journey-dot img { filter: brightness(0) invert(1); }
.journey-node.active .journey-step-no { background: var(--indigo); }
.journey-node.active .journey-label { color: var(--navy); }

/* detail card */
.journey-detail {
  position: relative; margin-top: 44px; background: #fff; border: 1px solid #edeef5;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 34px 36px;
  display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center;
  animation: jdIn .4s ease;
}
.journey-detail::before {
  content: ''; position: absolute; top: -11px; left: var(--arrow, 50%); transform: translateX(-50%) rotate(45deg);
  width: 20px; height: 20px; background: #fff; border-left: 1px solid #edeef5; border-top: 1px solid #edeef5;
  transition: left .4s ease;
}
.jd-icon {
  width: 88px; height: 88px; border-radius: 20px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--brand-gradient); box-shadow: var(--shadow-glow); font-size: 2.4rem;
}
.jd-icon img { width: 46px; height: 46px; object-fit: contain; filter: brightness(0) invert(1); }
.jd-body .jd-step { font-family: var(--font-head); font-weight: 700; font-size: .78rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--red); }
.jd-body h3 { font-family: var(--font-head); font-size: 1.5rem; margin: 4px 0 8px; }
.jd-body p { color: #4a5a72; font-size: 1rem; }
@keyframes jdIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Why ---------- */
.why { background: linear-gradient(180deg, #f2f3fa 0%, #fbfbfe 100%); }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.why-card {
  background: #fff; border-radius: var(--radius); padding: 32px 26px; border: 1px solid #edeef5;
  box-shadow: var(--shadow-sm); transition: transform .3s ease, box-shadow .3s ease;
}
.why-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.why-icon {
  width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; font-size: 1.7rem;
  margin-bottom: 18px; background: var(--brand-gradient); box-shadow: var(--shadow-glow);
}
.why-icon img { width: 32px; height: 32px; object-fit: contain; }
.why-card h3 { font-family: var(--font-head); font-size: 1.18rem; margin-bottom: 8px; }
.why-card p { color: var(--gray-400); font-size: .95rem; }

/* ---------- Testimonials (carousel) ---------- */
.testi-carousel { display: flex; align-items: center; gap: 14px; }
.testi-viewport { flex: 1; overflow: hidden; }
.testi-track {
  --per-view: 3; --gap: 22px;
  display: flex; gap: var(--gap);
  transition: transform .5s cubic-bezier(.4,0,.2,1);
}
.testi-track .testi-card {
  flex: 0 0 calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view));
  margin: 6px 0; /* room for hover lift */
}
.testi-nav {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  border: 1px solid #e1e1e5; background: #fff; color: var(--indigo);
  font-size: 1.6rem; line-height: 1; display: grid; place-items: center;
  box-shadow: var(--shadow-sm); transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
}
.testi-nav:hover { background: var(--brand-gradient); color: #fff; border-color: transparent; transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.testi-nav:disabled { opacity: .4; cursor: default; transform: none; box-shadow: none; background: #fff; color: var(--gray-400); }
.testi-dots { display: flex; justify-content: center; gap: 9px; margin-top: 28px; }
.testi-dots button {
  width: 9px; height: 9px; border-radius: 999px; border: 0; padding: 0; cursor: pointer;
  background: var(--gray-200); transition: width .3s ease, background .3s ease;
}
.testi-dots button.active { width: 26px; background: var(--brand-gradient); }
.testi-card {
  background: #fff; border-radius: var(--radius); padding: 30px 26px; border: 1px solid #edeef5;
  box-shadow: var(--shadow-sm); position: relative; transition: transform .3s ease, box-shadow .3s ease;
}
.testi-card::before { content: '“'; position: absolute; top: 4px; right: 22px; font-family: Georgia, serif; font-size: 4.5rem; color: rgba(255,59,57,.12); line-height: 1; }
.testi-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.rating { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.stars { position: relative; display: inline-block; font-size: 1.05rem; letter-spacing: 2px; line-height: 1; white-space: nowrap; }
.stars-empty { color: #e1e1e5; }
.stars-fill {
  position: absolute; top: 0; left: 0; color: #ffb400; overflow: hidden; white-space: nowrap;
  display: inline-block;
}
.rating-num { font-family: var(--font-head); font-weight: 700; font-size: .9rem; color: var(--navy); }
.testi-card blockquote { font-size: .98rem; color: #43526b; margin-bottom: 22px; }
.testi-card figcaption { display: flex; align-items: center; gap: 12px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; color: #fff; background: var(--brand-gradient); }
.testi-card figcaption strong { display: block; font-size: .95rem; }
.testi-card figcaption small { color: var(--gray-400); font-size: .82rem; }

/* ---------- CTA ---------- */
.cta-box {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  background: var(--hero-gradient); color: #fff; padding: clamp(44px, 6vw, 72px);
  text-align: center; box-shadow: var(--shadow-lg);
}
.cta-bg { position: absolute; inset: 0; z-index: 0; }
.cta-bg .orb-1 { width: 300px; height: 300px; top: -80px; right: -40px; }
.cta-bg .orb-2 { width: 280px; height: 280px; bottom: -100px; left: -40px; }
.cta-content { position: relative; z-index: 2; max-width: 640px; margin: 0 auto; }
.cta-content .section-title { margin: 6px 0 14px; }
.cta-content p { color: rgba(255,255,255,.82); margin-bottom: 30px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { background: #0f1830; color: rgba(255,255,255,.75); padding-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 48px; }
.footer-logo { height: 42px; background: #fff; padding: 8px 12px; border-radius: 10px; margin-bottom: 18px; }
.footer-brand p { font-size: .92rem; max-width: 300px; margin-bottom: 20px; }
.socials { display: flex; gap: 12px; align-items: center; }
.socials a { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.08); transition: transform .25s ease, background .25s ease; }
.socials a:hover { transform: translateY(-4px); background: rgba(255,255,255,.16); }
.socials img { width: 22px; height: 22px; }
.mail-icon { font-size: 1.3rem; color: #fff; }
.footer-col h4 { font-family: var(--font-head); color: #fff; font-size: 1.05rem; margin-bottom: 18px; }
.footer-col ul { display: grid; gap: 12px; }
.footer-col a { font-size: .92rem; transition: color .2s ease, padding-left .2s ease; }
.footer-col ul a:hover { color: var(--red); padding-left: 4px; }
.contact-list { margin-bottom: 20px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 22px 0; }
.footer-bottom .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-bottom p { font-size: .85rem; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-legal a { font-size: .85rem; transition: color .2s ease; }
.footer-legal a:hover { color: var(--red); }
.heart { color: var(--red); }

/* ---------- Floating apply (mobile) ---------- */
.fab {
  position: fixed; right: 16px; z-index: 900; display: none;
  bottom: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  background: var(--brand-gradient); color: #fff; font-family: var(--font-head); font-weight: 700;
  padding: 13px 22px; border-radius: 999px; box-shadow: var(--shadow-glow);
  will-change: transform; transform: translateZ(0); backface-visibility: hidden;
}
.fab:active { transform: translateZ(0) scale(.96); }

/* ---------- Reveal animations ---------- */
[data-reveal] { opacity: 0; transform: translateY(34px); transition: opacity .7s ease, transform .7s ease; }
[data-reveal].in { opacity: 1; transform: none; }

/* ---------- Keyframes ---------- */
@keyframes float1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(30px, 40px); } }
@keyframes float2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-40px, -30px); } }
@keyframes floatCard { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes fillBar { from { width: 0; } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(47,212,122,.6); } 70% { box-shadow: 0 0 0 10px rgba(47,212,122,0); } 100% { box-shadow: 0 0 0 0 rgba(47,212,122,0); } }
@keyframes agSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 992px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; text-align: center; padding-top: 20px; }
  .hero-content { display: flex; flex-direction: column; align-items: center; }
  .hero-actions { justify-content: center; }
  .hero-stats { grid-template-columns: repeat(4, auto); justify-content: center; }
  .hero-visual { order: -1; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-content .section-title, .about-content { text-align: center; }
  .about-points { justify-items: center; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .testi-track { --per-view: 2; }
  .journey-label { font-size: .74rem; }
  .journey-dot { width: 58px; height: 58px; }
  .journey-line { top: 38px; }
}

@media (max-width: 768px) {
  /* When menu is open, drop backdrop-filter on the header so it doesn't
     trap the fixed-position nav in a new containing block. */
  body.menu-open .site-header,
  body.menu-open .site-header.scrolled { backdrop-filter: none; }

  /* Keep header a constant height on mobile so it doesn't shift on scroll */
  .site-header,
  .site-header.scrolled { padding: 12px 0; }
  .brand-logo,
  .site-header.scrolled .brand-logo { height: 38px; }

  .nav {
    position: fixed; top: 0; right: 0; bottom: 0; left: auto;
    height: 100vh; height: 100dvh; width: min(72%, 270px);
    background: #0f1830; flex-direction: column; justify-content: center; gap: 26px;
    transform: translateX(100%); transition: transform .35s ease; box-shadow: -10px 0 40px rgba(0,0,0,.3);
    padding: 36px 28px; z-index: 1200; overflow-y: auto;
  }
  .nav.open { transform: translateX(0); }
  .nav-list { flex-direction: column; gap: 8px; width: 100%; }
  .nav-list li, .nav-list > li { display: block; width: 100%; text-align: center; }
  .nav-link { color: #fff !important; display: block; font-size: 1.05rem; }
  .nav-cta { width: 100%; text-align: center; }
  .nav-toggle { display: flex; }
  .site-header.scrolled .nav-toggle span,
  .nav-toggle span { background: #fff; }
  .site-header.scrolled .nav-toggle span { background: var(--navy); }
  body.menu-open { overflow: hidden; }

  /* mobile dropdown → accordion */
  .nav-dropdown { width: 100%; }
  .nav-drop-btn { width: 100%; justify-content: space-between; }
  .dropdown-menu {
    display: none; position: static; transform: none; box-shadow: none;
    background: rgba(255,255,255,.06); border: 0; border-radius: 10px;
    padding: 4px 0 4px 12px; margin-top: 4px; min-width: 0; animation: none;
  }
  .nav-dropdown.open .dropdown-menu { display: block; }
  .dropdown-item { color: rgba(255,255,255,.85); font-size: .88rem; padding: 9px 12px; }
  .dropdown-item:hover { background: rgba(255,255,255,.1); color: #fff; }
  .coming-soon { background: rgba(255,255,255,.15); color: rgba(255,255,255,.7); }
  .testi-track { --per-view: 1; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 26px 40px; }
  .footer-bottom .container { flex-direction: column; text-align: center; justify-content: center; }
  .footer-legal { justify-content: center; }
  .fab { display: inline-flex; }
}

@media (max-width: 560px) {
  .why-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .btn-lg { padding: 10px 26px; }
  .badge-float { display: none; }
  .hero { padding-top: 110px; }
  .cta-box { padding: 40px 22px; }

  /* Orbit scene fits small screens */
  .orbit-scene { width: min(84vw, 320px); --inner-r: 90px; --outer-r: 138px; }
  .orbit-hub { width: 94px; height: 94px; }
  .orbit-seal { width: 58px; height: 58px; }
  .orbit-icon { width: 46px; height: 46px; margin: -23px 0 0 -23px; }
  .orbit-icon img { width: 46px; height: 46px; padding: 10px; }

  /* Journey: scrollable track on mobile */
  .journey-track { overflow-x: auto; overflow-y: hidden; padding-bottom: 14px; -webkit-overflow-scrolling: touch; }
  .journey-line { left: 40px; right: 40px; }
  .journey-nodes { min-width: 560px; }
  .journey-dot { width: 54px; height: 54px; font-size: 1.4rem; }
  .journey-dot img { width: 28px; height: 28px; }
  .journey-detail { grid-template-columns: 1fr; text-align: center; padding: 26px 22px; }
  .jd-icon { margin: 0 auto; width: 74px; height: 74px; }
  .journey-detail::before { display: none; }
  .about-graphic { max-width: 340px; }
  .ag-chip { font-size: .72rem; padding: 7px 11px; }
  .ag-chip-1 { left: 0; }
  .ag-chip-3 { left: 0; }
  .ag-stats { gap: 12px; padding: 10px 14px; }
  .ag-stats strong { font-size: 1.05rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ============================================================
   Content pages (Terms, Privacy, Partner)
   ============================================================ */
.page-hero {
  position: relative; overflow: hidden; color: #fff;
  background: var(--hero-gradient);
  padding: 150px 0 60px;
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero .orb { position: absolute; z-index: 0; }
.page-hero .orb-1 { width: 320px; height: 320px; top: -80px; right: -40px; }
.page-hero .orb-2 { width: 280px; height: 280px; bottom: -120px; left: -60px; }
.page-hero h1 { font-family: var(--font-head); font-weight: 800; font-size: clamp(1.9rem, 4.5vw, 3rem); letter-spacing: -.5px; }
.page-hero p { color: rgba(255,255,255,.82); margin-top: 12px; max-width: 640px; }
.page-hero .breadcrumb { font-size: .82rem; color: rgba(255,255,255,.7); margin-bottom: 14px; }
.page-hero .breadcrumb a { color: rgba(255,255,255,.9); }
.page-hero .breadcrumb a:hover { color: var(--red); }

.page-body { padding: clamp(48px, 7vw, 84px) 0; background: #fff; }
.page-wrap { max-width: 820px; margin: 0 auto; }
.page-wrap .updated { color: var(--gray-400); font-size: .88rem; margin-bottom: 34px; }
.page-wrap h2 {
  font-family: var(--font-head); font-size: 1.35rem; color: var(--navy);
  margin: 36px 0 12px; padding-left: 14px; border-left: 4px solid var(--red);
}
.page-wrap h2:first-of-type { margin-top: 0; }
.page-wrap h3 { font-family: var(--font-head); font-size: 1.05rem; color: var(--navy); margin: 22px 0 8px; }
.page-wrap p { color: #43526b; margin-bottom: 14px; }
.page-wrap ul { margin: 0 0 16px; padding-left: 4px; display: grid; gap: 10px; }
.page-wrap ul li { position: relative; padding-left: 28px; color: #43526b; }
.page-wrap ul li::before {
  content: '✓'; position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--brand-gradient-soft); color: var(--red); font-size: .7rem; font-weight: 700;
  display: grid; place-items: center;
}
.page-wrap a.inline-link { color: var(--red); font-weight: 600; }
.page-wrap a.inline-link:hover { color: var(--indigo); }
.page-note {
  background: linear-gradient(135deg, rgba(255,59,57,.06), rgba(54,50,131,.06));
  border: 1px solid #edeef5; border-radius: var(--radius); padding: 20px 24px; margin: 26px 0;
}
.page-note p { margin: 0; }

/* Partner page specifics */
.partner-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 8px 0 10px; }
.partner-card {
  background: #fff; border: 1px solid #edeef5; border-radius: var(--radius); padding: 28px 24px;
  box-shadow: var(--shadow-sm); transition: transform .3s ease, box-shadow .3s ease;
}
.partner-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.partner-card .p-ico {
  width: 66px; height: 66px; border-radius: 18px; display: grid; place-items: center; font-size: 1.6rem;
  margin-bottom: 18px; background: var(--brand-gradient); box-shadow: var(--shadow-glow);
}
.partner-card .p-ico img { width: 36px; height: 36px; object-fit: contain; display: block; }
.partner-card h3 { font-family: var(--font-head); font-size: 1.12rem; margin-bottom: 8px; color: var(--navy); }
.partner-card p { font-size: .92rem; color: var(--gray-400); }
.partner-cta { text-align: center; margin-top: 40px; }

@media (max-width: 768px) {
  .partner-grid { grid-template-columns: 1fr; }
  .page-hero { padding: 120px 0 48px; }
}

/* ============================================================
   Theme toggle button
   ============================================================ */
.theme-toggle {
  flex-shrink: 0; position: relative; cursor: pointer;
  width: 62px; height: 32px; border-radius: 999px; padding: 0; margin-left: 8px;
  border: 1px solid rgba(255,255,255,.4);
  background: rgba(0,0,0,.22);
  display: flex; align-items: center; justify-content: space-between;
  transition: background .25s ease, border-color .25s ease;
}
.site-header.scrolled .theme-toggle { border-color: #c9cede; background: #d7dbe8; }
.site-header.scrolled .tt-knob { box-shadow: 0 2px 6px rgba(33,57,89,.3); }
[data-theme="dark"] .theme-toggle { background: rgba(0,0,0,.35); border-color: rgba(255,255,255,.22); }
[data-theme="dark"] .site-header.scrolled .theme-toggle { background: #0d1424; border-color: var(--border); }

/* the two hint icons sit on each side of the track */
.tt-ico {
  width: 30px; height: 100%; display: grid; place-items: center;
  font-size: .9rem; line-height: 1; z-index: 1; pointer-events: none;
  transition: opacity .25s ease;
}
.tt-sun { color: #ffcf4d; }
.tt-moon { color: #cdd6ff; }
/* the knob covers the active side and carries its own icon,
   so hide the hint underneath it and show only the opposite hint dimmed */
.tt-sun { opacity: 0; }            /* covered by knob (sun) in light mode */
.tt-moon { opacity: .5; }          /* far-side hint in light mode */
[data-theme="dark"] .tt-sun { opacity: .5; }  /* far-side hint in dark mode */
[data-theme="dark"] .tt-moon { opacity: 0; }  /* covered by knob (moon) in dark mode */

/* sliding knob carries the ACTIVE icon */
.tt-knob {
  position: absolute; top: 50%; left: 3px; transform: translateY(-50%);
  width: 26px; height: 26px; border-radius: 50%; z-index: 2;
  background: #fff; display: grid; place-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.35); transition: left .3s cubic-bezier(.4,0,.2,1);
}
.tt-knob::before {
  content: '\2600'; /* sun in light mode */
  font-size: .95rem; line-height: 1; color: #f5a623;
}
[data-theme="dark"] .tt-knob { left: calc(100% - 29px); background: #1b2540; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
[data-theme="dark"] .tt-knob::before { content: '\263E'; color: #cdd6ff; } /* moon */
.theme-toggle:hover { border-color: var(--red); }
.theme-toggle:hover .tt-knob { box-shadow: 0 2px 12px rgba(255,59,57,.5); }

/* ============================================================
   Dark theme surface overrides
   ============================================================ */
[data-theme="dark"] .site-header.scrolled { background: var(--header-bg); }
[data-theme="dark"] .site-header.scrolled .nav-link { color: var(--text); }
[data-theme="dark"] .site-header.scrolled .brand-logo,
[data-theme="dark"] .footer-logo { background: #fff; padding: 6px 10px; border-radius: 8px; }

/* Sections with light backgrounds */
[data-theme="dark"] .domains { background: linear-gradient(180deg, var(--surface-3), var(--surface-2)); }
[data-theme="dark"] .why { background: linear-gradient(180deg, var(--surface-2), var(--surface-3)); }
[data-theme="dark"] .page-body { background: var(--page-bg); }

/* Cards / surfaces */
[data-theme="dark"] .domain-card,
[data-theme="dark"] .why-card,
[data-theme="dark"] .testi-card,
[data-theme="dark"] .step,
[data-theme="dark"] .journey-detail,
[data-theme="dark"] .partner-card,
[data-theme="dark"] .journey-dot,
[data-theme="dark"] .testi-nav {
  background: var(--surface); border-color: var(--border); color: var(--text);
}
[data-theme="dark"] .domain-card { color: var(--text); }
[data-theme="dark"] .domain-card h3,
[data-theme="dark"] .why-card h3,
[data-theme="dark"] .step h3,
[data-theme="dark"] .jd-body h3,
[data-theme="dark"] .partner-card h3,
[data-theme="dark"] .testi-card figcaption strong,
[data-theme="dark"] .rating-num,
[data-theme="dark"] .page-wrap h2,
[data-theme="dark"] .page-wrap h3 { color: var(--text); }

[data-theme="dark"] .domain-card p,
[data-theme="dark"] .why-card p,
[data-theme="dark"] .step p,
[data-theme="dark"] .partner-card p,
[data-theme="dark"] .jd-body p,
[data-theme="dark"] .about-content p,
[data-theme="dark"] .testi-card blockquote,
[data-theme="dark"] .page-wrap p,
[data-theme="dark"] .page-wrap ul li { color: var(--text-soft); }

[data-theme="dark"] .section-title { color: var(--text); }
[data-theme="dark"] .about-points li { color: var(--text); }
[data-theme="dark"] .journey-label { color: var(--text-muted); }
[data-theme="dark"] .journey-node.active .journey-label { color: var(--text); }
[data-theme="dark"] .stars-empty { color: #33405d; }
[data-theme="dark"] .journey-line { background: #26314c; }

/* dashed borders in cards */
[data-theme="dark"] .program-facts li { border-color: var(--border); }
[data-theme="dark"] .journey-detail::before { background: var(--surface); border-color: var(--border); }

/* Domain card top accent already gradient — keep */
[data-theme="dark"] .page-note { border-color: var(--border); }

/* ============================================================
   Dark theme — icon visibility fixes
   ============================================================ */
/* Domain card icons + unselected journey step icons render dark; invert to white in dark mode */
[data-theme="dark"] .domain-ico img,
[data-theme="dark"] .journey-dot img {
  filter: brightness(0) invert(1);
}
/* Active journey step already sits on the gradient and inverts via existing rule — keep it white too */
[data-theme="dark"] .journey-node.active .journey-dot img { filter: brightness(0) invert(1); }
/* Why-card icons sit on the gradient tile (already white) — leave untouched */

/* Domain icon tile background in dark so the white icon has contrast */
[data-theme="dark"] .domain-ico { background: rgba(255,255,255,.06); }
[data-theme="dark"] .journey-dot { background: var(--surface); }

/* Domain tag ("Apply →") readable in dark mode */
[data-theme="dark"] .domain-tag { color: #b9c0ff; background: rgba(120,124,255,.16); }

/* ============================================================
   Error pages (404, 500, 403, generic)
   ============================================================ */
.error-page {
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  color: #fff; background: var(--hero-gradient); position: relative; overflow: hidden;
}
.error-page .orb { position: absolute; z-index: 0; }
.error-page .orb-1 { width: 380px; height: 380px; top: -100px; right: -60px; }
.error-page .orb-2 { width: 320px; height: 320px; bottom: -120px; left: -80px; }
.error-top { position: relative; z-index: 2; padding: 26px 0; }
.error-top .brand-logo { height: 42px; background: #fff; padding: 6px 12px; border-radius: 10px; }
.error-main {
  position: relative; z-index: 2; flex: 1;
  display: grid; place-items: center; text-align: center; padding: 30px 0 60px;
}
.error-inner { max-width: 560px; }
.error-ico {
  width: 150px; height: 150px; margin: 0 auto 8px; display: grid; place-items: center;
  animation: floatCard 6s ease-in-out infinite;
}
.error-ico img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 16px 30px rgba(0,0,0,.35)); }
.error-code {
  font-family: var(--font-head); font-weight: 800; line-height: 1;
  font-size: clamp(3.4rem, 12vw, 6rem); letter-spacing: -2px;
  background: linear-gradient(100deg, #ff6b5c, #ff3b39 40%, #9aa8ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.error-inner h1 { font-family: var(--font-head); font-weight: 800; font-size: clamp(1.4rem, 3.5vw, 2rem); margin: 6px 0 12px; }
.error-inner p { color: rgba(255,255,255,.8); font-size: 1.02rem; margin-bottom: 30px; }
.error-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.error-links { margin-top: 34px; font-size: .9rem; color: rgba(255,255,255,.6); }
.error-links a { color: rgba(255,255,255,.85); margin: 0 10px; white-space: nowrap; }
.error-links a:hover { color: var(--red); }

@media (max-width: 560px) {
  .error-ico { width: 116px; height: 116px; }
}

/* ============================================================
   Certificate verification page
   ============================================================ */
.verify-wrap { max-width: 640px; margin: 0 auto; }
.verify-form {
  display: flex; gap: 12px; margin: 0 auto 8px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 8px; box-shadow: var(--shadow-md);
}
.verify-form input {
  flex: 1; min-width: 200px; border: 0; background: transparent; color: var(--text);
  font-family: var(--font-body); font-size: 1rem; padding: 10px 18px; outline: none;
}
.verify-form input::placeholder { color: var(--text-muted); }
.verify-form .btn { flex-shrink: 0; }
.verify-hint { text-align: center; color: var(--text-muted); font-size: .86rem; margin-top: 14px; }

.verify-result {
  margin-top: 30px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-md);
  text-align: center; animation: jdIn .35s ease;
}
.verify-result h3 { font-family: var(--font-head); font-size: 1.2rem; color: var(--text); margin: 14px 0 6px; }
.verify-result p { color: var(--text-soft); font-size: .96rem; margin-bottom: 16px; }
.verify-result.valid { border-color: rgba(47,212,122,.5); }
.verify-result.invalid { border-color: rgba(255,59,57,.4); }

.vr-icon { width: 56px; height: 56px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 1.6rem; font-weight: 800; color: #fff; }
.vr-icon-ok { background: #2fd47a; }
.vr-icon-bad { background: var(--red); }
.vr-badge {
  display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 800;
  color: #178a54; font-size: 1.15rem; letter-spacing: .5px;
}
.vr-badge .vr-icon { width: 34px; height: 34px; font-size: 1rem; }

.vr-details { text-align: left; margin-top: 22px; border-top: 1px solid var(--border); }
.vr-row { display: flex; justify-content: space-between; gap: 16px; padding: 13px 4px; border-bottom: 1px dashed var(--border); }
.vr-row:last-child { border-bottom: 0; }
.vr-row span { color: var(--text-muted); font-size: .9rem; }
.vr-row strong { color: var(--text); font-family: var(--font-head); font-size: .95rem; text-align: right; }

.vr-loading { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--text-soft); font-weight: 600; }
.vr-spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--red);
  animation: agSpin .8s linear infinite;
}

@media (max-width: 560px) {
  .verify-form { border-radius: var(--radius); }
  .verify-form input { min-width: 0; width: 100%; }
  .verify-form .btn { width: 100%; }
  .vr-row { flex-direction: column; gap: 2px; }
  .vr-row strong { text-align: left; }
}

/* ============================================================
   Admin console (admin.html)
   ============================================================ */
.admin-body { background: var(--surface-2); min-height: 100vh; }
/* ensure the hidden attribute always wins over display:grid/flex on these views */
.admin-login[hidden], .admin-app[hidden], .admin-view[hidden] { display: none !important; }

/* shared form message */
.form-msg { font-size: .88rem; margin-top: 10px; min-height: 1em; color: var(--text-soft); }
.form-msg.error { color: var(--red); }
.form-msg.success { color: #178a54; }

/* ---- Login ---- */
.admin-login { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: var(--hero-gradient); }
.admin-login-card {
  width: 100%; max-width: 400px; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px 34px;
  box-shadow: var(--shadow-lg); text-align: center;
}
.admin-login-logo { height: 44px; margin: 0 auto 20px; }
.admin-login-card h1 { font-family: var(--font-head); font-size: 1.5rem; color: var(--text); }
.admin-login-sub { color: var(--text-muted); font-size: .9rem; margin-bottom: 24px; }
.admin-login-card form { text-align: left; }
.admin-login-card label { display: block; font-size: .82rem; font-weight: 600; color: var(--text-soft); margin: 14px 0 6px; }
.admin-login-card input {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface-2); color: var(--text); font-family: var(--font-body); font-size: .95rem; outline: none;
}
.admin-login-card input:focus { border-color: var(--indigo); }
.admin-login-card .btn { width: 100%; margin-top: 22px; }

/* password field with eye toggle */
.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 46px !important; width: 100%; }
.pass-toggle {
  position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
  background: none; border: 0; cursor: pointer; font-size: 1.05rem; line-height: 1;
  padding: 6px 8px; border-radius: 8px; opacity: .6; transition: opacity .2s ease, background .2s ease;
}
.pass-toggle:hover { opacity: 1; background: var(--surface-2); }
.pass-toggle.on { opacity: 1; }
.admin-back { display: inline-block; margin-top: 20px; font-size: .86rem; color: var(--text-muted); }
.admin-back:hover { color: var(--red); }

/* ---- App header ---- */
.admin-header { background: #0f1830; color: #fff; position: sticky; top: 0; z-index: 100; }
.admin-header-inner { max-width: 1200px; margin: 0 auto; padding: 14px 22px; display: flex; align-items: center; gap: 16px; }
.admin-logo { height: 34px; background: #fff; padding: 5px 9px; border-radius: 8px; display: block; }
.admin-title { font-family: var(--font-head); font-weight: 700; font-size: 1rem; }
.admin-header-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.admin-user { font-size: .86rem; color: rgba(255,255,255,.7); }

/* header nav (Add Certificates / Certificates) — tab style with underline */
.admin-nav { display: flex; gap: 4px; margin-left: 12px; align-self: stretch; }
.admin-nav-btn {
  position: relative; font-family: var(--font-head); font-weight: 600; font-size: .9rem; cursor: pointer;
  color: rgba(255,255,255,.6); background: transparent; border: 0;
  padding: 10px 18px; transition: color .2s ease;
}
.admin-nav-btn::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0;
  background: var(--brand-gradient); transform: scaleX(0); transform-origin: center; transition: transform .28s ease;
}
.admin-nav-btn:hover { color: rgba(255,255,255,.9); }
.admin-nav-btn.active { color: #fff; }
.admin-nav-btn.active::after { transform: scaleX(1); }
@media (max-width: 720px) {
  .admin-header-inner { flex-wrap: wrap; gap: 10px 12px; padding: 12px 16px; }
  .admin-nav { order: 3; width: 100%; margin-left: 0; justify-content: center; }
  .admin-nav-btn { flex: 1; padding: 8px 10px; font-size: .82rem; text-align: center; }
  .admin-header-right { margin-left: auto; }
  .admin-user { display: none; }        /* hide email on small screens to save space */
  .admin-title { display: none; }
  .admin-main { padding: 20px 16px 48px; }
}
.btn-ghost-dark { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.25); }
.btn-ghost-dark:hover { background: rgba(255,255,255,.2); transform: translateY(-2px); }
.admin-body .btn-ghost-dark { color: var(--text); border-color: var(--border); background: var(--surface-2); }
.admin-header .btn-ghost-dark { color: #fff; background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); }

/* ---- Main + cards ---- */
.admin-main { max-width: 1200px; margin: 0 auto; padding: 28px 22px 60px; }
.admin-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 22px; }
.admin-view > .admin-card + .admin-card { margin-top: 22px; }
.admin-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm);
}
.admin-card h2 { font-family: var(--font-head); font-size: 1.15rem; color: var(--text); margin-bottom: 6px; }
.admin-card-sub { color: var(--text-muted); font-size: .88rem; margin-bottom: 16px; }

.admin-form { margin-top: 14px; }
.fld { margin-bottom: 14px; display: flex; flex-direction: column; }
.fld label { font-size: .8rem; font-weight: 600; color: var(--text-soft); margin-bottom: 6px; }
.fld input, .fld select {
  width: 100%; min-width: 0; max-width: 100%;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface-2); color: var(--text); font-family: var(--font-body); font-size: .92rem; outline: none;
}
.fld input:focus, .fld select:focus { border-color: var(--indigo); }
.fld-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fld-row .fld { min-width: 0; }

.csv-drop { margin: 14px 0; }
.csv-drop input[type="file"] {
  width: 100%; padding: 16px; border: 2px dashed var(--border); border-radius: 12px;
  background: var(--surface-2); color: var(--text-soft); font-size: .9rem; cursor: pointer;
}
.csv-note { font-size: .8rem; color: var(--text-muted); margin-top: 12px; line-height: 1.6; }
.csv-note code { background: var(--surface-2); border: 1px solid var(--border); padding: 1px 6px; border-radius: 5px; font-size: .82rem; }
#downloadTemplate { margin-bottom: 4px; }

/* ---- List + filters ---- */
.admin-list-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.count-label { color: var(--text-muted); font-size: .88rem; }
.admin-filters {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
  padding: 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 18px;
}
.admin-filters .fld { margin-bottom: 0; min-width: 130px; }
.admin-filters .fld-grow { flex: 1; min-width: 160px; }
.filter-actions { display: flex; gap: 8px; }

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th, .admin-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.admin-table th { font-family: var(--font-head); font-size: .78rem; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); }
.admin-table td { color: var(--text-soft); }
.admin-table .mono { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; color: var(--text); font-weight: 600; }
.admin-table .empty { text-align: center; color: var(--text-muted); padding: 30px; }
.load-more-wrap { text-align: center; margin-top: 20px; }

/* Status = flat, non-interactive label with a leading dot */
.st-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .78rem; font-weight: 600; font-family: var(--font-body); color: var(--text-soft);
  padding: 0; background: none; cursor: default;
}
.st-badge::before { content: ''; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.st-valid::before { background: #2fd47a; }
.st-revoked::before { background: var(--red); }

/* Action = clearly a solid button with an icon */
.admin-table .btn-revoke, .admin-table .btn-activate {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-head); font-weight: 700;
  border-radius: 8px; border: 0; box-shadow: var(--shadow-sm); padding: 7px 14px;
}
.btn-revoke { background: var(--red); color: #fff; }
.btn-revoke:hover { filter: brightness(.92); transform: translateY(-1px); }
.btn-activate { background: #2fd47a; color: #06301c; }
.btn-activate:hover { filter: brightness(.95); transform: translateY(-1px); }

@media (max-width: 860px) {
  .admin-cards { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .admin-filters .fld { min-width: 100%; }
  .filter-actions { width: 100%; }
  .filter-actions .btn { flex: 1; }
}

/* Batch detail */
.batch-meta { font-size: .92rem; color: var(--text-soft); margin: 6px 0 16px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.batch-detail-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* ── Reminder section (inside batch detail) ── */
.reminder-section { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--border); }
.reminder-heading { font-family: var(--font-head); font-size: 1.1rem; color: var(--text); margin-bottom: 4px; }
.reminder-slots { display: grid; gap: 14px; margin-top: 16px; }
.reminder-slot {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 14px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 18px;
}
.reminder-slot.sent { border-color: rgba(47,212,122,.4); background: rgba(47,212,122,.05); }
.reminder-label { font-family: var(--font-head); font-weight: 700; font-size: .9rem; color: var(--text); white-space: nowrap; }
.reminder-slot .fld { margin: 0; }
.reminder-slot .fld input { padding: 8px 10px; font-size: .88rem; }
.reminder-slot .reminder-status { font-size: .82rem; white-space: nowrap; color: var(--text-muted); }
.reminder-slot.sent .reminder-status { color: #178a54; font-weight: 600; }
.reminder-actions { display: flex; gap: 8px; }
@media (max-width: 720px) {
  .reminder-slot { grid-template-columns: 1fr 1fr; row-gap: 10px; }
  .reminder-label { grid-column: 1 / -1; }
  .reminder-actions { grid-column: 1 / -1; }
}

/* ── Inner tabs (Offer Letters sub-tabs + Batch detail Roster/Reminders) ── */
.inner-tabs {
  display: flex; gap: 2px; border-bottom: 2px solid var(--border); margin-bottom: 20px;
}
.inner-tab-btn {
  font-family: var(--font-head); font-weight: 600; font-size: .88rem; cursor: pointer;
  color: var(--text-muted); background: transparent; border: 0; padding: 10px 18px;
  position: relative; transition: color .2s ease;
}
.inner-tab-btn::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: -2px; height: 2px;
  border-radius: 2px 2px 0 0; background: var(--brand-gradient);
  transform: scaleX(0); transform-origin: center; transition: transform .25s ease;
}
.inner-tab-btn:hover { color: var(--text); }
.inner-tab-btn.active { color: var(--text); }
.inner-tab-btn.active::after { transform: scaleX(1); }
.inner-tab-pane[hidden] { display: none !important; }

/* ============================================================
   Apply Now popup
   ============================================================ */
.apply-popup {
  position: fixed; inset: 0; z-index: 2000;
  display: grid; place-items: center;
  background: rgba(13,20,36,.65); backdrop-filter: blur(4px);
  animation: popupFadeIn .3s ease;
}
.apply-popup[hidden] { display: none !important; }
@keyframes popupFadeIn { from { opacity: 0; } to { opacity: 1; } }

.apply-popup-card {
  position: relative; width: min(92%, 740px);
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 44px 38px 34px; box-shadow: var(--shadow-lg);
  text-align: center; border: 1px solid var(--border);
  animation: popupSlideUp .35s cubic-bezier(.4,0,.2,1);
}
@keyframes popupSlideUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }

.apply-popup-close {
  position: absolute; top: 14px; right: 14px;
  background: none; border: 0; cursor: pointer;
  font-size: 1.1rem; color: var(--text-muted); line-height: 1;
  padding: 6px 8px; border-radius: 8px; transition: color .2s ease, background .2s ease;
}
.apply-popup-close:hover { color: var(--red); background: rgba(255,59,57,.08); }

.apply-popup-ico {
  width: 72px; height: 72px; border-radius: 20px; margin: 0 auto 18px;
  display: grid; place-items: center;
  background: var(--brand-gradient); box-shadow: var(--shadow-glow);
}
.apply-popup-ico img { width: 38px; height: 38px; object-fit: contain; }
.apply-popup-card h3 {
  font-family: var(--font-head); font-size: 1.5rem; font-weight: 800;
  color: var(--text); margin-bottom: 10px;
}
.apply-popup-card p { color: var(--text-soft); font-size: .98rem; margin-bottom: 24px; line-height: 1.6; }
.apply-popup-card .btn { width: 50%; justify-content: center; }
.apply-popup-actions { display: flex; flex-direction: column; align-items: center; gap: 0; }
.apply-popup-dismiss {
  margin-top: 14px; background: none; border: 0; cursor: pointer;
  font-size: .88rem; color: var(--text-muted); font-family: var(--font-body);
  transition: color .2s ease;
}
.apply-popup-dismiss:hover { color: var(--text); }

/* ============================================================
   Multi-select filter (checkbox popover) — admin
   ============================================================ */
.multiselect { position: relative; }
.multiselect-toggle {
  width: 100%; min-width: 0; text-align: left; cursor: pointer;
  padding: 10px 32px 10px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface-2); color: var(--text); font-family: var(--font-body); font-size: .92rem;
  position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.multiselect-toggle:focus { outline: none; border-color: var(--indigo); }
.multiselect-toggle::after {
  content: '▾'; position: absolute; right: 11px; top: 50%; transform: translateY(-50%);
  font-size: .7rem; color: var(--text-muted); pointer-events: none;
}
.multiselect.open .multiselect-toggle::after { transform: translateY(-50%) rotate(180deg); }

.multiselect-panel {
  display: none; position: absolute; z-index: 60; top: calc(100% + 4px); left: 0;
  min-width: 100%; max-width: 320px; max-height: 260px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-md); padding: 6px;
}
.multiselect.open .multiselect-panel { display: block; }
.multiselect-opt {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 8px;
  cursor: pointer; font-size: .88rem; color: var(--text); white-space: nowrap;
}
.multiselect-opt:hover { background: var(--surface-2); }
.multiselect-opt input { width: 15px; height: 15px; margin: 0; flex-shrink: 0; cursor: pointer; }
.multiselect-actions {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 6px 8px 2px; border-bottom: 1px solid var(--border); margin-bottom: 4px;
}
.multiselect-actions button {
  background: none; border: 0; cursor: pointer; font-size: .78rem; font-weight: 600;
  color: var(--indigo); font-family: var(--font-head); padding: 2px 4px;
}
.multiselect-actions button:hover { color: var(--red); }
.multiselect-empty { padding: 10px; color: var(--text-muted); font-size: .85rem; text-align: center; }

/* ============================================================
   Hackathon page
   ============================================================ */
.hackathon-hero .eyebrow { margin-bottom: 16px; }
.hackathon-hero-actions {
  display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px;
}

.hackathon-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 48px; align-items: start;
}

.hackathon-poster {
  margin: 0; position: sticky; top: 96px;
}
.hackathon-poster a {
  display: block; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
  transition: transform .3s ease, box-shadow .3s ease;
}
.hackathon-poster a:hover { transform: translateY(-4px); box-shadow: var(--shadow-glow); }
.hackathon-poster img { display: block; width: 100%; height: auto; }
.hackathon-poster figcaption {
  margin-top: 12px; text-align: center; font-size: .86rem; color: var(--text-muted);
}

.hackathon-info h2 { font-family: var(--font-head); font-size: 1.7rem; margin-bottom: 14px; color: var(--text); }
.hackathon-info > p { color: var(--text-soft); line-height: 1.7; margin-bottom: 26px; }

.hackathon-facts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px; margin-bottom: 30px;
}
.hk-fact {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 18px; border-radius: var(--radius);
  background: var(--surface-2, rgba(54,50,131,.05));
  border: 1px solid var(--border);
}
.hk-fact-label {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .08em;
  font-weight: 700; color: var(--text-muted);
}
.hk-fact-value { font-size: 1.02rem; font-weight: 700; color: var(--text); font-family: var(--font-head); }

.hackathon-apply { width: 100%; justify-content: center; }
.hackathon-apply-note { margin-top: 12px; font-size: .86rem; color: var(--text-muted); text-align: center; }

.why-emoji { font-size: 2rem; line-height: 1; margin-bottom: 14px; }

@media (max-width: 860px) {
  .hackathon-layout { grid-template-columns: 1fr; gap: 32px; }
  .hackathon-poster { position: static; max-width: 520px; margin: 0 auto; }
}
@media (max-width: 480px) {
  .hackathon-facts { grid-template-columns: 1fr; }
}

/* ============================================================
   Hackathon poster popup (admin-controlled, home page)
   ============================================================ */
.poster-popup {
  position: fixed; inset: 0; z-index: 2100;
  display: grid; place-items: center; padding: 20px;
  background: rgba(13,20,36,.72); backdrop-filter: blur(5px);
  animation: popupFadeIn .3s ease;
}
.poster-popup[hidden] { display: none !important; }

.poster-popup-card {
  position: relative; width: min(94%, 440px);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); background: var(--surface);
  animation: popupSlideUp .35s cubic-bezier(.4,0,.2,1);
}
.poster-popup-card a.poster-link { display: block; line-height: 0; }
.poster-popup-card img { display: block; width: 100%; height: auto; }

.poster-popup-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(13,20,36,.6); color: #fff; border: 0; cursor: pointer;
  font-size: 1.1rem; line-height: 1; display: grid; place-items: center;
  transition: background .2s ease, transform .2s ease;
}
.poster-popup-close:hover { background: var(--red); transform: rotate(90deg); }

.poster-popup-actions {
  display: flex; gap: 10px; padding: 16px; background: var(--surface);
}
.poster-popup-actions .btn { flex: 1; justify-content: center; }

@media (max-width: 480px) {
  .poster-popup-card { width: 100%; }
  .poster-popup-actions { flex-direction: column; }
}

/* ============================================================
   Admin — settings toggle (Hackathon view)
   ============================================================ */
.setting-row {
  display: flex; align-items: flex-start; gap: 18px;
  padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-2, rgba(54,50,131,.04)); margin: 18px 0 6px;
}
.setting-row-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.setting-row-text strong { font-size: 1rem; color: var(--text); }
.setting-row-text span { font-size: .86rem; color: var(--text-muted); line-height: 1.5; }
/* keep the switch pinned to the top-right, next to the heading */
.setting-row .switch { margin-top: 2px; }

/* iOS-style switch */
.switch { position: relative; display: inline-block; width: 52px; height: 30px; flex: 0 0 auto; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute; inset: 0; border-radius: 999px;
  background: var(--abb5c1, #abb5c1); transition: background .25s ease;
}
.switch-slider::before {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 24px; height: 24px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .25s ease;
}
.switch input:checked + .switch-slider { background: var(--red, #ff3b39); }
.switch input:checked + .switch-slider::before { transform: translateX(22px); }
.switch input:focus-visible + .switch-slider { outline: 2px solid var(--indigo, #363283); outline-offset: 2px; }
.switch input:disabled + .switch-slider { opacity: .6; cursor: not-allowed; }

.setting-preview { margin-top: 22px; }
.setting-preview-label {
  display: block; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em;
  font-weight: 700; color: var(--text-muted); margin-bottom: 10px;
}
.setting-preview img {
  display: block; width: 100%; max-width: 320px; height: auto;
  border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.setting-preview .admin-card-sub { margin-top: 10px; }

@media (max-width: 560px) {
  .setting-row { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* Hackathon nav/footer links: hidden until JS confirms the event is live
   (admin "Hackathon live" switch). The [hidden] attribute is the source of
   truth; this rule just makes sure flex/inline-list display rules don't
   override it. */
.hk-nav-item[hidden] { display: none !important; }

/* Admin — roster Drive link row (batch detail) */
.roster-link-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 12px 0 2px; padding: 12px 14px;
  background: var(--surface-2, rgba(54,50,131,.05));
  border: 1px solid var(--border); border-radius: var(--radius);
}
.roster-link-row[hidden] { display: none !important; }
.roster-link-label { font-weight: 700; color: var(--text); font-size: .9rem; flex: 0 0 auto; }
.roster-link-url {
  flex: 1 1 240px; min-width: 0; color: var(--indigo, #363283);
  font-size: .86rem; word-break: break-all; text-decoration: none;
}
.roster-link-url:hover { text-decoration: underline; }
