/* ================================================================
   style.css — NSS Unit, MCET Pollachi
   Structure:
     1.  CSS Custom Properties (Design Tokens)
     2.  Reset & Box-sizing
     3.  Base Typography
     4.  Layout Utilities
     5.  Skip Link (Accessibility)
     6.  Header / Navbar
     7.  Hero Section
     8.  Why Join Section
     9.  Footer
   ================================================================ */


/* ================================================================
   1. CSS CUSTOM PROPERTIES — Design Tokens
   ================================================================ */
:root {
  /* Colour palette — deep navy (#042C53) with red (#E24B4A) accent */
  --navy-900: #042C53;   /* primary deep navy */
  --navy-700: #061D33;   /* secondary dark surfaces */
  --navy-500: #0A3966;   /* interactive accent, links */
  --navy-300: #64748B;   /* muted text */
  --red-500:  #E24B4A;   /* red accent */
  --red-600:  #C53030;   /* red hover */
  --white:    #FFFFFF;   /* primary light surface */
  --off-white:#F8FAFC;   /* section background */
  --border:   #E2E8F0;   /* hairline borders */

  /* Spacing scale */
  --sp-1:  0.25rem;   /*  4px */
  --sp-2:  0.5rem;    /*  8px */
  --sp-3:  0.75rem;   /* 12px */
  --sp-4:  1rem;      /* 16px */
  --sp-5:  1.25rem;   /* 20px */
  --sp-6:  1.5rem;    /* 24px */
  --sp-8:  2rem;      /* 32px */
  --sp-10: 2.5rem;    /* 40px */
  --sp-12: 3rem;      /* 48px - mobile section rhythm */
  --sp-16: 4rem;      /* 64px */
  --sp-20: 5rem;      /* 80px - desktop section rhythm */
  --sp-24: 6rem;      /* 96px */

  /* Consistent 20px horizontal page padding */
  --container-max: 1140px;
  --container-px: 20px;
  --container-px-desktop: 24px;

  /* Radius */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(4, 44, 83, 0.08), 0 1px 2px rgba(4, 44, 83, 0.06);
  --shadow-md:  0 4px 12px rgba(4, 44, 83, 0.10), 0 2px 4px rgba(4, 44, 83, 0.08);
  --shadow-lg:  0 10px 32px rgba(4, 44, 83, 0.16), 0 4px 8px rgba(4, 44, 83, 0.10);
  --shadow-header: 0 2px 16px rgba(4, 44, 83, 0.12);

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   200ms ease;
  --transition-smooth: 300ms ease;

  /* Header height: 64px on mobile */
  --header-h: 64px;
}


/* ================================================================
   2. RESET & BOX-SIZING
   ================================================================ */
*,
*::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: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 400;
  color: var(--navy-900);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  min-width: 320px;
}

/* iOS Safari auto-zoom prevention: all form inputs must have minimum 16px font-size */
input, select, textarea, button {
  font-size: 16px !important;
}

img, svg {
  display: block;
  max-width: 100%;
}

ul {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

address {
  font-style: normal;
}

/* Respect user motion preferences — disables all animations */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* ================================================================
   3. BASE TYPOGRAPHY
   ================================================================ */

/* Headings — Poppins */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  line-height: 1.2;
  font-weight: 700;
}

/* Fluid type scale using clamp() — works from 320px upward */
h1 { font-size: clamp(2.2rem, 5.5vw + 1rem, 4rem); }
h2 { font-size: clamp(1.7rem, 3vw + 0.8rem, 2.6rem); }
h3 { font-size: clamp(1.1rem, 1.5vw + 0.5rem, 1.3rem); }

p {
  max-width: 65ch;
  line-height: 1.7;
}

strong {
  font-weight: 500;
}


/* ================================================================
   4. LAYOUT UTILITIES
   ================================================================ */

/* Centred container with consistent 20px mobile padding */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-px);
}

@media (min-width: 768px) {
  .container {
    padding-inline: var(--container-px-desktop);
  }
}

/* Shared button base */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.9375rem;
  line-height: 1;
  padding: 0.7em 1.6em;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color var(--transition-base),
    border-color var(--transition-base),
    color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-fast);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--red-500);
  color: var(--white);
  border-color: var(--red-500);
}

.btn-primary:hover {
  background: var(--red-600);
  border-color: var(--red-600);
}


/* ================================================================
   5. SKIP LINK (Accessibility)
   ================================================================ */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--sp-4);
  z-index: 9999;
  background: var(--navy-900);
  color: var(--white);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.875rem;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--sp-4);
  outline: 3px solid var(--white);
  outline-offset: 2px;
}


/* ================================================================
   6. HEADER / NAVBAR (Mobile-first: Sticky, 64px, Slide-in Drawer)
   ================================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(4, 44, 83, 0.05);
  transition: background-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(4, 44, 83, 0.08);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Brand logo and title: logo fixed height 40px, w-auto, object-contain. 8px gap */
.header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  min-width: 0;
  flex: 1 1 auto;
}

.header-logo-img {
  height: 40px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.header-org-name {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* Hamburger button: 44x44px minimum tap target on right */
.nav-hamburger {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  color: var(--navy-900);
  flex-shrink: 0;
  transition: background-color var(--transition-fast);
}

.nav-hamburger:hover {
  background: var(--off-white);
}

.nav-hamburger:focus-visible {
  outline: 2px solid var(--navy-500);
  outline-offset: 2px;
}

.hamburger-bar {
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Backdrop scrim */
.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 44, 83, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.nav-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* Mobile Slide-in Drawer */
.site-nav {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 85vw);
  height: 100vh;
  height: 100dvh;
  background: var(--white);
  z-index: 1002;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -8px 0 32px rgba(4, 44, 83, 0.25);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.site-nav.is-open {
  transform: translateX(0);
}

.nav-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.drawer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.drawer-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--navy-900);
}

.nav-drawer-close {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--navy-900);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.nav-drawer-close:hover {
  background: var(--red-500);
  color: var(--white);
  border-color: var(--red-500);
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
}

.nav-links li {
  width: 100%;
}

/* Links stacked: 56px tall each on mobile */
.nav-link {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 1.25rem;
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy-900);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  background-color: var(--off-white);
  color: var(--red-500);
}

/* Pinned "Join Now" CTA at the bottom of the drawer */
.nav-drawer-footer {
  margin-top: auto;
  padding: 1.25rem;
  flex-shrink: 0;
  border-top: 1px solid var(--border);
}

.btn-drawer-cta {
  display: flex;
  width: 100%;
  height: 48px;
  align-items: center;
  justify-content: center;
  background: var(--red-500);
  color: var(--white);
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(226, 75, 74, 0.35);
  transition: background-color 0.2s, transform 0.15s;
}

.btn-drawer-cta:hover {
  background: var(--red-600);
  transform: translateY(-1px);
}

/* ----------------------------------------------------------------
   Desktop Navigation Overrides (min-width: 768px / md:)
   ---------------------------------------------------------------- */
@media (min-width: 768px) {
  .nav-hamburger,
  .nav-backdrop,
  .nav-drawer-header {
    display: none !important;
  }

  .site-nav {
    position: static;
    transform: none;
    width: auto;
    height: auto;
    background: transparent;
    box-shadow: none;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    overflow: visible;
    padding: 0;
  }

  .nav-links {
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
  }

  .nav-links li {
    width: auto;
  }

  .nav-link {
    height: auto;
    padding: 0.5rem 0;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--navy-700);
    border-bottom: none;
    position: relative;
  }

  .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--red-500);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
    border-radius: var(--radius-full);
  }

  .nav-link:hover {
    color: var(--red-500);
    background: transparent;
  }

  .nav-link:hover::after,
  .nav-link:focus-visible::after {
    transform: scaleX(1);
  }

  .nav-drawer-footer {
    margin-top: 0;
    padding: 0;
    border-top: none;
  }

  .btn-drawer-cta {
    width: auto;
    height: auto;
    padding: 0.55em 1.35em;
    font-size: 0.875rem;
    background: var(--navy-900);
  }

  .btn-drawer-cta:hover {
    background: var(--red-500);
  }
}


/* ================================================================
   7. HERO SECTION
   ================================================================ */
.hero {
  position: relative;
  background-color: var(--navy-900);
  /* Real campus photo as background */
  background-image:
    /* Dark overlay so text stays legible */
    linear-gradient(to right, rgba(10, 31, 68, 0.82) 0%, rgba(10, 31, 68, 0.55) 60%, rgba(10, 31, 68, 0.30) 100%),
    /* Subtle radial depth on left */
    radial-gradient(ellipse 60% 80% at 0% 50%, rgba(27, 75, 143, 0.5) 0%, transparent 70%),
    url('mcet-campus.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  overflow: hidden;
  /* Generous mobile padding (top accounts for sticky header) */
  padding-top: calc(var(--header-h) + var(--sp-10));
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
}

/* Dot-grid pattern — pure CSS, very low opacity */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* Ensure content sits above the pseudo-element */
.hero .container {
  position: relative;
  z-index: 1;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: var(--sp-10);
  align-items: center;
  padding-bottom: var(--sp-10);
}

@media (min-width: 768px) {
  .hero {
    min-height: 92vh;
    padding-top: calc(var(--header-h) + var(--sp-16));
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
  }

  .hero-inner {
    flex: 1 0 auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-10);
    padding-bottom: var(--sp-8);
  }
}

/* ---- Hero content column ---- */
.hero-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-6);
}

@media (min-width: 768px) {
  .hero-content {
    align-items: flex-start;
    text-align: left;
    max-width: 580px;
  }
}

/* Eyebrow badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: rgba(27, 75, 143, 0.45);
  border: 1px solid rgba(92, 124, 176, 0.4);
  color: var(--white);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-full);
  backdrop-filter: blur(6px);
}

.badge-dot {
  color: #4EB8FF; /* blue-tinted glow dot — still within the permitted palette range as it's a tiny indicator */
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

@media (prefers-reduced-motion: reduce) {
  .badge-dot { animation: none; }
}

/* H1 — text-3xl on mobile scaling to text-5xl on desktop, text-balance */
.hero-heading {
  color: var(--navy-900);
  font-family: 'Poppins', sans-serif;
  font-size: 1.875rem; /* text-3xl */
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-wrap: balance;
  display: inline-block;
  background: rgba(255, 255, 255, 0.95);
  padding: 0.3em 0.6em;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

@media (min-width: 1024px) {
  .hero-heading {
    font-size: 3rem; /* text-5xl */
  }
}

/* Tagline: stacked phrases on mobile under 640px, bullet separators from sm: up */
.hero-taglines {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #FFFFFF;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.hero-tagline-bullet {
  display: none;
}

@media (min-width: 640px) {
  .hero-taglines {
    flex-direction: row;
    gap: 0.6rem;
    justify-content: center;
  }

  .hero-tagline-bullet {
    display: inline-block;
    color: var(--red-500);
  }
}

/* Supporting copy */
.hero-body {
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(0.9375rem, 1.2vw + 0.5rem, 1.05rem);
  line-height: 1.65;
  max-width: 52ch;
}

.hero-body strong {
  color: var(--white);
  font-weight: 600;
}

/* CTA buttons: full width stacked on mobile, side-by-side from sm: up */
.hero-actions {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .hero-actions {
    flex-direction: row;
    width: auto;
    justify-content: center;
  }
}

@media (min-width: 768px) {
  .hero-actions {
    justify-content: flex-start;
  }
}

/* Primary hero button — pill shaped, pure white bg, bold navy text */
.btn-primary-hero {
  width: 100%;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  color: var(--navy-900);
  border: 2px solid #FFFFFF;
  border-radius: 9999px;
  font-family: 'Poppins', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.01em;
}

@media (min-width: 640px) {
  .btn-primary-hero {
    width: auto;
    padding: 0 2.25rem;
  }
}

.btn-primary-hero:hover {
  background: #F8FAFC;
  color: var(--red-500);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-primary-hero:focus-visible {
  outline: 3px solid #FFFFFF;
  outline-offset: 3px;
}

/* Secondary hero button — pill shaped, transparent bg, white border, white text */
.btn-secondary-hero {
  width: 100%;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #FFFFFF;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
  border-radius: 9999px;
  font-family: 'Poppins', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.01em;
}

@media (min-width: 640px) {
  .btn-secondary-hero {
    width: auto;
    padding: 0 2.25rem;
  }
}

.btn-secondary-hero:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: #FFFFFF;
  transform: translateY(-2px);
}

.btn-secondary-hero:focus-visible {
  outline: 3px solid #FFFFFF;
  outline-offset: 3px;
}

/* Stats row: open layout with vertical divider lines (not in card boxes) */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  width: 100%;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

@media (min-width: 768px) {
  .hero-stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
  }
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 0.5rem 1rem;
}

/* Mobile 2x2 grid dividers */
@media (max-width: 767px) {
  .stat-item:nth-child(odd) {
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    padding-left: 0;
  }
  .stat-item:nth-child(even) {
    padding-left: 1rem;
    padding-right: 0;
  }
  .stat-item:nth-child(3),
  .stat-item:nth-child(4) {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }
}

/* Desktop 4-column inline stats with vertical dividers */
@media (min-width: 768px) {
  .stat-item {
    padding: 0.25rem 1.5rem;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
  }
  .stat-item:first-child {
    padding-left: 0;
  }
  .stat-item:last-child {
    border-right: none;
  }
}

.stat-number {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  color: #FFFFFF; /* bold crisp white numbers matching reference */
  line-height: 1.05;
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
}

@media (min-width: 768px) {
  .stat-number {
    font-size: 2.35rem;
  }
}

.stat-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #93C5FD; /* soft slate-blue matching reference image */
  letter-spacing: 0.01em;
  line-height: 1.25;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .stat-label {
    font-size: 0.95rem;
  }
}

.stat-divider {
  display: none;
}

/* ---- Hero visual / decorative column ---- */
.hero-visual {
  display: none; /* hidden on mobile */
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: clamp(280px, 30vw, 380px);
  }
}

.visual-composition {
  position: relative;
  width: 280px;
  height: 280px;
}

@media (min-width: 1024px) {
  .visual-composition {
    width: 360px;
    height: 360px;
  }
}

/* Mobile Hero Logo Badge */
.hero-logo-mobile {
  display: flex;
  justify-content: center;
  margin-bottom: var(--sp-2);
}

@media (min-width: 768px) {
  .hero-logo-mobile {
    display: none;
  }
}

.hero-logo-mobile-img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 0 2px rgba(255, 255, 255, 0.25);
  animation: rotate-nss-logo 60s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .hero-logo-mobile-img { animation: none; }
}

/* Central emblem badge — centred inside the composition */
.hero-logo-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 210px;
  height: 210px;
  border-radius: 50%;
  padding: 0;
  overflow: hidden;
  background: var(--white);
  border: 4px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(27, 75, 143, 0.6);
  z-index: 2;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

@media (min-width: 1024px) {
  .hero-logo-wrapper {
    width: 260px;
    height: 260px;
  }
}

.hero-logo-wrapper:hover {
  transform: translate(-50%, -52%) scale(1.03);
  box-shadow:
    0 16px 44px rgba(0, 0, 0, 0.5),
    0 0 50px rgba(78, 184, 255, 0.5);
}

.hero-logo-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  animation: rotate-nss-logo 20s linear infinite;
  transform-origin: center center;
}

/* Continuous 360-degree rotation animation */
@keyframes rotate-nss-logo {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Ambient Glow Backdrop */
.visual-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(78, 184, 255, 0.3) 0%, rgba(27, 75, 143, 0.2) 50%, transparent 70%);
  pointer-events: none;
  animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
  50%       { transform: translate(-50%, -50%) scale(1.12); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .visual-glow { animation: none; }
}

/* Floating info cards */
.visual-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-md);
  color: var(--white);
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  animation: float 4s ease-in-out infinite;
}

.visual-card--tl {
  top: 10%;
  left: -10%;
  animation-delay: 0s;
}

.visual-card--tr {
  top: 12%;
  right: -8%;
  animation-delay: 1.3s;
}

.visual-card--br {
  bottom: 8%;
  right: -5%;
  animation-delay: 0.7s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

@media (prefers-reduced-motion: reduce) {
  .visual-card { animation: none; }
}


/* ================================================================
   7B. HERO BOTTOM: STRAIGHT INFINITE LOOPING NSS ACTIVITIES TICKER
   ================================================================ */
.hero-ticker-bar {
  position: relative;
  z-index: 2;
  width: 100%;
  margin-top: auto;
  display: flex;
  align-items: stretch;
  background: #F1F5F9; /* modern light grey */
  border-top: 1px solid rgba(10, 31, 68, 0.15);
  border-bottom: 1px solid rgba(10, 31, 68, 0.10);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

/* Left badge / topic identifier */
.ticker-label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.4rem;
  background: #E2E8F0; /* slightly defined light grey badge */
  border-right: 2px solid #CBD5E1;
  color: var(--navy-900);
  font-family: 'Poppins', sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  z-index: 3;
  box-shadow: 4px 0 14px rgba(10, 31, 68, 0.06);
}

.ticker-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--navy-500);
  box-shadow: 0 0 8px rgba(27, 75, 143, 0.6);
  animation: pulse-dot 1.8s ease-in-out infinite;
  flex-shrink: 0;
}

.ticker-label-short {
  display: none;
}

/* Container for the scrolling track with gradient edge masks */
.ticker-wrapper {
  flex: 1 1 auto;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  mask-image: linear-gradient(to right, transparent, black 24px, black calc(100% - 32px), transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 24px, black calc(100% - 32px), transparent);
}

/* Track running the infinite CSS marquee */
.ticker-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: ticker-loop 55s linear infinite;
  will-change: transform;
}

.hero-ticker-bar:hover .ticker-track {
  animation-play-state: paused;
}

@keyframes ticker-loop {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.ticker-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Individual activity item in the loop — navy blue text on white bg */
.ticker-item {
  color: var(--navy-900);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.015em;
  padding: 0.85rem 0.5rem;
  white-space: nowrap;
  transition: color var(--transition-fast), transform var(--transition-fast);
  cursor: default;
  display: inline-block;
}

.ticker-item:hover {
  color: var(--navy-500);
  transform: translateY(-1px);
}

/* Glowing golden star separator between activities */
.ticker-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 1.25rem;
  color: #F59E0B; /* vibrant warm golden amber */
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.75));
  flex-shrink: 0;
  animation: star-shimmer 2.8s ease-in-out infinite alternate;
}

.ticker-star svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  display: block;
}

@keyframes star-shimmer {
  0% {
    transform: scale(0.9) rotate(0deg);
    opacity: 0.85;
    filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.6));
  }
  100% {
    transform: scale(1.22) rotate(18deg);
    opacity: 1;
    filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.95));
  }
}

/* Responsive adjustments */
@media (max-width: 680px) {
  .ticker-label {
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    gap: 0.4rem;
  }
  .ticker-item {
    font-size: 0.8125rem;
    padding: 0.75rem 0.35rem;
  }
  .ticker-star {
    margin: 0 0.85rem;
  }
  .ticker-star svg {
    width: 12px;
    height: 12px;
  }
}

@media (max-width: 440px) {
  .ticker-label-full {
    display: none;
  }
  .ticker-label-short {
    display: inline;
  }
  .ticker-label {
    padding: 0.7rem 0.8rem;
    font-size: 0.72rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track {
    animation-duration: 130s;
  }
  .ticker-star {
    animation: none;
  }
}


/* ================================================================
   8. WHY JOIN SECTION
   ================================================================ */
.why-join {
  background: var(--off-white);
  padding-block: var(--sp-20);
}

/* Section header — centred */
.section-header {
  text-align: center;
  margin-bottom: var(--sp-12);
}

.section-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--navy-500);
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
}

.section-heading {
  color: var(--navy-900);
  margin-bottom: var(--sp-3);
}

.section-sub {
  color: rgba(10, 31, 68, 0.6);
  font-size: 1.0625rem;
  margin-inline: auto;
}

/* Cards responsive grid */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
}

@media (min-width: 600px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Individual card */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-8) var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow var(--transition-base),
    border-color var(--transition-base),
    transform var(--transition-base);
}

/* Hover — only on pointer devices */
@media (hover: hover) and (pointer: fine) {
  .card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--navy-500);
  }
}

/* 48px navy-tinted rounded square icon holder */
.card-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(27, 75, 143, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy-500);
  flex-shrink: 0;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy-900);
  line-height: 1.3;
}

.card-body {
  font-size: 0.9375rem;
  color: rgba(10, 31, 68, 0.65);
  line-height: 1.7;
  max-width: 100%;
  flex: 1;
}

/* Scroll-reveal states (JS applies / removes .is-revealed) */
.js-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease;
}

.js-reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Cards stagger via CSS custom property set by JS */
.card.js-reveal {
  transition-delay: var(--stagger-delay, 0ms);
}


/* ================================================================
   8B. COMMITTEE / LEADERSHIP SECTION
   ================================================================ */
.committee-section {
  background: var(--white);
  padding-block: var(--sp-12);
}

@media (min-width: 1024px) {
  .committee-section {
    padding-block: var(--sp-20);
  }
}

/* 1 column under 480px, 2 columns from sm: (640px), 4 from lg: (1024px) */
.committee-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
}

@media (min-width: 480px) {
  .committee-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (min-width: 1024px) {
  .committee-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
  }
}

.committee-card {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.committee-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(4, 44, 83, 0.15);
}

/* Photos are circles, fixed 96px: w-24 h-24 rounded-full object-cover */
.committee-photo-wrap {
  width: 96px;
  height: 96px;
  margin: 0 auto 1rem;
  flex-shrink: 0;
}

.committee-photo {
  width: 96px;
  height: 96px;
  border-radius: 9999px;
  object-fit: cover;
  object-position: center 15%;
  display: block;
  border: 3px solid var(--white);
  box-shadow: 0 4px 12px rgba(4, 44, 83, 0.12);
}

/* Name and designation centred below, name bolder, designation smaller and muted */
.committee-name {
  font-family: 'Poppins', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-bottom: 0.35rem;
  line-height: 1.3;
}

/* Reserve two lines of height for designation so cards in row stay aligned */
.committee-role {
  font-size: 0.8125rem;
  color: var(--navy-300);
  line-height: 1.4;
  min-height: 2.8em;
  margin: 0;
}


/* ================================================================
   9. FOOTER (Mobile-first: Vertical Stack in Exact Order)
   ================================================================ */
.site-footer {
  background: var(--navy-900);
  color: var(--white);
  padding-top: var(--sp-12);
  padding-bottom: calc(var(--sp-6) + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 1024px) {
  .site-footer {
    padding-top: var(--sp-20);
  }
}

/* Stacked vertically on mobile in exact order: Brand, Socials, Links, Contact */
.footer-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
}

@media (min-width: 768px) {
  .footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: var(--sp-8);
  }
}

/* Column 1: Brand */
.footer-col--brand {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.footer-brand-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-emblem-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.footer-brand-name {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--white);
}

.footer-brand-desc {
  font-size: 0.875rem;
  color: #94A3B8;
  line-height: 1.6;
  max-width: 100%;
}

.footer-motto {
  font-size: 0.875rem;
  color: var(--red-500);
  font-weight: 600;
}

/* Column titles */
.footer-col-title {
  font-family: 'Poppins', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--white);
  margin-bottom: var(--sp-3);
}

/* Column 2: Social icons row (44x44px tap targets) */
.footer-socials {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.social-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-decoration: none;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.social-btn:hover {
  background: var(--red-500);
  border-color: var(--red-500);
  color: var(--white);
  transform: translateY(-2px);
}

.social-btn:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 2px;
}

/* Column 3: Quick links */
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.footer-link {
  display: inline-block;
  padding: 0.35rem 0;
  font-size: 0.9375rem;
  color: #CBD5E1;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--white);
  text-decoration: underline;
}

/* Column 4: Contact details */
.footer-address {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-style: normal;
}

.footer-contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.footer-contact-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94A3B8;
}

.footer-contact-value {
  font-size: 0.875rem;
  color: #CBD5E1;
  line-height: 1.5;
}

/* Divider */
.footer-divider {
  border: none;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin-top: 2rem;
  margin-bottom: 0;
}

/* Column 5: Bottom Copyright */
.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-2);
  padding-block: var(--sp-6);
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-copy {
  font-size: 0.8125rem;
  color: #94A3B8;
  line-height: 1.5;
  margin: 0;
}

.footer-credit {
  font-size: 0.8125rem;
  color: #64748B;
  margin: 0;
}

.footer-credit a {
  color: #94A3B8;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease, text-decoration 0.2s ease;
}

.footer-credit a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}


/* ================================================================
   10. REGISTRATION PAGE — join.html specific styles
       Appended below the shared styles. Does NOT redefine colour
       variables, fonts, or any shared component styles.
   ================================================================ */

/* ----------------------------------------------------------------
   10a. Page-level background
   ---------------------------------------------------------------- */
.page-join {
  background: var(--off-white);
}

/* ----------------------------------------------------------------
   10b. Page Banner — navy strip with H1 + breadcrumb
   ---------------------------------------------------------------- */
.page-banner {
  background: var(--navy-900);
  background-image:
    radial-gradient(ellipse 70% 80% at 80% 50%, var(--navy-700) 0%, transparent 70%);
  padding-top: calc(var(--header-h) + var(--sp-10));
  padding-bottom: var(--sp-10);
}

.page-banner-inner {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

/* Breadcrumb */
.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  list-style: none;
}

.breadcrumb-item {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--navy-300);
}

.breadcrumb-item--current {
  color: rgba(255, 255, 255, 0.65);
}

.breadcrumb-link {
  color: var(--navy-300);
  text-decoration: none;
  transition: color var(--transition-base);
}

.breadcrumb-link:hover {
  color: var(--white);
}

.breadcrumb-link:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
  border-radius: 2px;
}

.breadcrumb-sep {
  color: var(--navy-300);
  display: flex;
  align-items: center;
}

/* Page banner heading */
.page-banner-heading {
  color: var(--white);
  letter-spacing: -0.02em;
}

.page-banner-sub {
  color: rgba(255, 255, 255, 0.65);
  font-size: clamp(0.9rem, 1vw + 0.5rem, 1.05rem);
  max-width: 55ch;
}

/* ----------------------------------------------------------------
   10c. Form section wrapper
   ---------------------------------------------------------------- */
.form-section {
  padding-block: var(--sp-12);
}

.form-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-6);
}

/* ----------------------------------------------------------------
   10d. Form-level error banner (network / server errors)
   ---------------------------------------------------------------- */
.form-error-banner {
  width: 100%;
  max-width: 720px;
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  background: rgba(27, 75, 143, 0.08);
  border: 1.5px solid var(--navy-500);
  border-radius: var(--radius-md);
  padding: var(--sp-4) var(--sp-5);
  color: var(--navy-900);
  font-size: 0.9rem;
  font-weight: 500;
}

.form-error-banner[hidden] {
  display: none;
}

.form-error-banner svg {
  color: var(--navy-500);
  flex-shrink: 0;
  margin-top: 2px;
}

.form-error-banner span {
  flex: 1;
  max-width: 100%;
}

.form-error-dismiss {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--navy-500);
  padding: var(--sp-1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: color var(--transition-base), background var(--transition-base);
}

.form-error-dismiss:hover {
  background: rgba(27, 75, 143, 0.12);
}

.form-error-dismiss:focus-visible {
  outline: 2px solid var(--navy-500);
  outline-offset: 2px;
}

/* ----------------------------------------------------------------
   10e. Form card
   ---------------------------------------------------------------- */
.form-card {
  width: 100%;
  max-width: 720px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: var(--sp-8) var(--sp-6);
  box-shadow: var(--shadow-md);
}

@media (min-width: 600px) {
  .form-card {
    padding: var(--sp-10) var(--sp-12);
  }
}

/* ----------------------------------------------------------------
   10f. Form layout
   ---------------------------------------------------------------- */
.reg-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
}

/* ----------------------------------------------------------------
   10g. Field groups
   ---------------------------------------------------------------- */
.field-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

/* Label */
.field-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--navy-900);
  display: block;
}

/* Required asterisk */
.field-required {
  color: var(--navy-500);
  margin-left: 2px;
}

/* Helper text beneath label */
.field-helper {
  font-size: 0.8125rem;
  color: rgba(10, 31, 68, 0.55);
  max-width: 100%;
  line-height: 1.5;
  margin-top: calc(-1 * var(--sp-1));
}

.field-helper em {
  font-style: italic;
}

/* Base input / select / textarea styles
   — 16px font prevents iOS Safari auto-zoom
   — min 44px height meets touch target requirement */
.field-input {
  width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;          /* exactly 16px — prevents iOS zoom */
  font-weight: 400;
  color: var(--navy-900);
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.875rem;
  min-height: 44px;
  transition:
    border-color var(--transition-base),
    box-shadow var(--transition-base);
  appearance: none;
  -webkit-appearance: none;
}

.field-input::placeholder {
  color: rgba(10, 31, 68, 0.35);
}

.field-input:focus {
  outline: none;
  border-color: var(--navy-500);
  box-shadow: 0 0 0 3px rgba(27, 75, 143, 0.15);
}

/* Invalid state — bold navy border + glow */
.field-input--invalid {
  border-color: var(--navy-500) !important;
  border-width: 2px !important;
  box-shadow: 0 0 0 3px rgba(27, 75, 143, 0.12);
}

/* ----------------------------------------------------------------
   10h. Phone input with "+91" prefix
   ---------------------------------------------------------------- */
.phone-input-wrap {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.phone-input-wrap:focus-within {
  border-color: var(--navy-500);
  box-shadow: 0 0 0 3px rgba(27, 75, 143, 0.15);
}

.phone-input-wrap--invalid {
  border-color: var(--navy-500) !important;
  border-width: 2px !important;
  box-shadow: 0 0 0 3px rgba(27, 75, 143, 0.12);
}

.phone-prefix {
  display: flex;
  align-items: center;
  padding: 0 var(--sp-3);
  background: var(--off-white);
  border-right: 1.5px solid var(--border);
  color: rgba(10, 31, 68, 0.55);
  font-size: 1rem;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  user-select: none;
}

/* The actual phone input — remove border since wrapper handles it */
.field-input--phone {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  flex: 1;
}

.field-input--phone:focus {
  outline: none;
  box-shadow: none;
  border: none;
}

/* ----------------------------------------------------------------
   10i. Select / dropdown wrapper
   ---------------------------------------------------------------- */
.select-wrap {
  position: relative;
}

.field-select {
  padding-right: 2.5rem; /* space for chevron */
  cursor: pointer;
}

/* Custom chevron icon overlay */
.select-chevron {
  position: absolute;
  right: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--navy-500);
  pointer-events: none;
}

/* ----------------------------------------------------------------
   10j. Textarea
   ---------------------------------------------------------------- */
.field-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.65;
}

/* Textarea footer: error on left, counter on right */
.textarea-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
  min-height: 1.4em; /* reserve space so layout never jumps */
}

/* ----------------------------------------------------------------
   10k. Inline error messages
   ---------------------------------------------------------------- */
.field-error {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--navy-500);
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 1.4em;   /* always reserve height to prevent layout shift */
  line-height: 1.4;
}

/* ----------------------------------------------------------------
   10l. Character counter
   ---------------------------------------------------------------- */
.char-counter {
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(10, 31, 68, 0.4);
  white-space: nowrap;
  flex-shrink: 0;
  text-align: right;
  min-width: 4.5ch;
}

/* Warning state: past 450/500 chars */
.char-counter--warn {
  color: var(--navy-500);
  font-weight: 700;
}

/* ----------------------------------------------------------------
   10m. Consent checkbox — custom styled
   ---------------------------------------------------------------- */
.field-group--checkbox {
  gap: var(--sp-3);
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  cursor: pointer;
}

/* Visually hidden native checkbox — still focusable */
.checkbox-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Custom checkbox box */
.checkbox-box {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border: 2px solid var(--border);
  border-radius: 4px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition:
    background-color var(--transition-base),
    border-color var(--transition-base);
  margin-top: 2px; /* align with first line of text */
}

/* Checked state */
.checkbox-input:checked + .checkbox-box {
  background: var(--navy-500);
  border-color: var(--navy-500);
}

/* Focus ring on the box (triggered by adjacent :focus) */
.checkbox-input:focus-visible + .checkbox-box {
  outline: 3px solid var(--navy-500);
  outline-offset: 2px;
}

.checkbox-text {
  font-size: 0.9rem;
  color: rgba(10, 31, 68, 0.75);
  line-height: 1.55;
  max-width: 100%;
}

/* Invalid consent — highlight the box border */
.checkbox-input.field-input--invalid + .checkbox-box {
  border-color: var(--navy-500);
  border-width: 2px;
  box-shadow: 0 0 0 3px rgba(27, 75, 143, 0.12);
}

/* ----------------------------------------------------------------
   10n. Gender radio group — custom styled, mirrors checkbox design
   ---------------------------------------------------------------- */
.field-group--radio {
  gap: var(--sp-2);
}

/* Remove default fieldset chrome */
.radio-fieldset {
  border: none;
  padding: 0;
  margin: 0;
  min-width: 0;
}

.radio-legend {
  /* behaves like a normal label */
  display: block;
  margin-bottom: var(--sp-3);
}

/* Horizontal flex row for the three options */
.radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-6);
}

.radio-label {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  cursor: pointer;
  user-select: none;
}

/* Visually-hidden native radio — still keyboard-focusable */
.radio-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Custom radio dot (circle, matches checkbox-box sizing) */
.radio-dot {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background-color var(--transition-base),
    border-color var(--transition-base);
  position: relative;
}

/* Inner filled dot — hidden by default, shown when checked */
.radio-dot::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--white);
  opacity: 0;
  transition: opacity var(--transition-base);
}

/* Checked state */
.radio-input:checked + .radio-dot {
  background: var(--navy-500);
  border-color: var(--navy-500);
}

.radio-input:checked + .radio-dot::after {
  opacity: 1;
}

/* Focus ring on the dot */
.radio-input:focus-visible + .radio-dot {
  outline: 3px solid var(--navy-500);
  outline-offset: 2px;
}

/* Invalid state — matches checkbox-input invalid style */
.radio-input.field-input--invalid + .radio-dot {
  border-color: var(--navy-500);
  border-width: 2px;
  box-shadow: 0 0 0 3px rgba(27, 75, 143, 0.12);
}

.radio-text {
  font-size: 0.9rem;
  color: rgba(10, 31, 68, 0.75);
  line-height: 1.55;
}



/* ----------------------------------------------------------------
   10n. Submit button
   ---------------------------------------------------------------- */
.btn-submit {
  width: 100%;
  background: var(--navy-500);
  color: var(--white);
  border-color: var(--navy-500);
  font-size: 1rem;
  font-weight: 500;
  padding: 0.85em 2em;
  min-height: 52px;
  margin-top: var(--sp-2);
  position: relative;
  overflow: hidden;
  justify-content: center;
  gap: var(--sp-3);
}

.btn-submit:hover:not(:disabled) {
  background: var(--navy-700);
  border-color: var(--navy-700);
  box-shadow: var(--shadow-md);
}

.btn-submit:focus-visible {
  outline: 3px solid var(--navy-500);
  outline-offset: 3px;
}

.btn-submit:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

/* CSS-only spinner — shown when .btn-submit--loading is applied */
.btn-submit-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin-submit 0.7s linear infinite;
  flex-shrink: 0;
}

.btn-submit--loading .btn-submit-spinner {
  display: block;
}

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

@media (prefers-reduced-motion: reduce) {
  .btn-submit-spinner { animation: none; border-top-color: var(--white); opacity: 0.7; }
}

/* ----------------------------------------------------------------
   10o. "Back to Home" secondary button on success card
   ---------------------------------------------------------------- */
.btn-back-home {
  background: transparent;
  color: var(--navy-500);
  border-color: var(--navy-500);
  font-size: 0.9375rem;
  padding: 0.65em 1.8em;
}

.btn-back-home:hover {
  background: rgba(27, 75, 143, 0.07);
}

.btn-back-home:focus-visible {
  outline: 3px solid var(--navy-500);
  outline-offset: 3px;
}

/* ----------------------------------------------------------------
   10p. Success card
   ---------------------------------------------------------------- */
.success-card {
  width: 100%;
  max-width: 720px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: var(--sp-12) var(--sp-6);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-5);
}

.success-card[hidden] {
  display: none;
}

/* The success-card needs a tabIndex to be focusable — added by JS via focus() */
.success-card:focus {
  outline: none;
}

/* Navy circular tick icon */
.success-icon {
  color: var(--navy-500);
  animation: pop-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes pop-in {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .success-icon { animation: none; }
}

.success-heading {
  font-size: clamp(1.3rem, 2.5vw + 0.5rem, 1.9rem);
  color: var(--navy-900);
}

.success-body {
  color: rgba(10, 31, 68, 0.65);
  font-size: 1rem;
  max-width: 45ch;
  margin-inline: auto;
}

/* ----------------------------------------------------------------
   10q. WhatsApp group join button (success card)
   ---------------------------------------------------------------- */
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: #25D366;
  color: var(--white);
  border: none;
  border-radius: var(--radius-full);
  padding: 0.7em 1.6em;
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color var(--transition-base),
    box-shadow var(--transition-base),
    transform var(--transition-base);
}

.btn-whatsapp:hover {
  background: #1DA851;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
  transform: translateY(-1px);
}

.btn-whatsapp:focus-visible {
  outline: 3px solid #25D366;
  outline-offset: 3px;
}

.btn-whatsapp[hidden] {
  display: none;
}

.btn-whatsapp svg {
  flex-shrink: 0;
}

/* ================================================================
   11. SITE PRELOADER / SPLASH SCREEN
   ================================================================ */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background-color: var(--off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s ease;
}

.preloader.preloader--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-4);
  animation: preloader-fadein 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.preloader-logo-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--white);
  padding: 0;
  overflow: hidden;
  border: 3px solid var(--border);
  box-shadow:
    0 12px 32px rgba(10, 31, 68, 0.12),
    0 4px 12px rgba(10, 31, 68, 0.08);
}

.preloader-logo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  animation: rotate-nss-logo 15s linear infinite;
}

.preloader-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-1);
}

.preloader-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.1em;
  color: var(--navy-900);
  text-transform: uppercase;
}

.preloader-sub {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.05em;
  color: var(--navy-500);
}

@keyframes preloader-fadein {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ================================================================
   12. GALLERY SECTION & LIGHTBOX (Mobile-first: Square Tiles, Pills, Safe Notch)
   ================================================================ */

.gallery-section {
  background: var(--white);
  padding-block: var(--sp-12);
  border-bottom: 1px solid var(--border);
}

@media (min-width: 1024px) {
  .gallery-section {
    padding-block: var(--sp-20);
  }
}

/* Filter pills: single scrolling row on mobile with scrollbar-none and 24px end padding */
.gallery-filters-wrap {
  width: 100%;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.gallery-filters {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  white-space: nowrap;
  gap: 8px;
  padding-bottom: 6px;
  padding-right: 24px;
}

.gallery-filters::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.15rem;
  border-radius: 9999px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: var(--off-white);
  color: var(--navy-900);
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.filter-pill.active,
.filter-pill:hover {
  background: var(--navy-900);
  border-color: var(--navy-900);
  color: var(--white);
}

@media (min-width: 768px) {
  .gallery-filters {
    justify-content: center;
    padding-right: 0;
  }
}

/* Gallery Grid: 2 columns on mobile, 3 at md, 4 at lg. Gap 12px mobile, 16px desktop */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
}

@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Gallery Card: Fixed square tiles */
.gallery-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: var(--navy-900);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  width: 100%;
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(4, 44, 83, 0.25);
}

/* Every tile is a fixed square: aspect-square with object-cover */
.gallery-img-wrap {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--navy-900);
  cursor: pointer;
  display: block;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-card:hover .gallery-img,
.gallery-img-wrap:focus .gallery-img {
  transform: scale(1.08);
}

/* Overlay on Hover / Focus */
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(4, 44, 83, 0.85) 0%, rgba(4, 44, 83, 0.3) 60%, transparent 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  color: var(--white);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.gallery-card:hover .gallery-overlay,
.gallery-img-wrap:focus .gallery-overlay {
  opacity: 1;
}

.gallery-zoom-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.gallery-card:hover .gallery-zoom-icon {
  transform: scale(1.1);
}

.gallery-overlay-text {
  font-family: 'Poppins', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* Gallery Load More Button */
.gallery-card.gallery-card--hidden {
  display: none !important;
}

.gallery-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--sp-4);
  margin-top: var(--sp-8);
}

.btn-gallery-load-more,
.btn-gallery-show-less {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 28px;
  border-radius: 9999px;
  border: 1.5px solid var(--navy-900);
  background: var(--white);
  color: var(--navy-900);
  font-family: 'Poppins', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(4, 44, 83, 0.08);
  transition: all 0.25s ease;
}

.btn-gallery-load-more:hover,
.btn-gallery-show-less:hover {
  background: var(--navy-900);
  color: var(--white);
  border-color: var(--navy-900);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(4, 44, 83, 0.18);
}

.btn-gallery-load-more:active,
.btn-gallery-show-less:active {
  transform: translateY(0);
}

.btn-gallery-load-more:focus-visible,
.btn-gallery-show-less:focus-visible {
  outline: 2px solid var(--navy-500);
  outline-offset: 3px;
}

.btn-gallery-load-more .btn-icon,
.btn-gallery-show-less .btn-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: currentColor;
  transition: transform 0.25s ease;
}

.btn-gallery-load-more[hidden],
.btn-gallery-show-less[hidden] {
  display: none !important;
}

.load-more-count {
  font-weight: 500;
  opacity: 0.88;
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: var(--sp-4);
}

.lightbox-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 44, 83, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.lightbox-content {
  position: relative;
  z-index: 2;
  max-width: 92vw;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  animation: lightbox-pop 0.25s ease;
}

@keyframes lightbox-pop {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Close button: at least 44x44px, positioned clear of the notch using env(safe-area-inset-top) */
.lightbox-close {
  position: fixed;
  top: max(16px, env(safe-area-inset-top, 16px));
  right: max(16px, env(safe-area-inset-right, 16px));
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  background: rgba(255, 255, 255, 0.22);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2010;
  transition: background 0.2s, transform 0.2s;
}

.lightbox-close:hover {
  background: var(--red-500);
  border-color: var(--red-500);
  transform: scale(1.08);
}

.lightbox-img-frame {
  max-width: 92vw;
  max-height: 72vh;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 92vw;
  max-height: 72vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.lightbox-caption {
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  max-width: 600px;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

