/* ═══════════════════════════════════════════════
   SARASARAM — Design System
   White-themed, editorial space aesthetic
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=Inter:wght@300;400;500;600&family=Noto+Serif+Tamil:wght@400;600;700&display=swap');

/* ── Variables ─────────────────────────────── */
:root {
  --white:       #FFFFFF;
  --warm-white:  #F8F9FA;
  --cream:       #F4F1EE;
  --star-white:  #F0EDE8;
  --navy:        #0A1628;
  --midnight:    #1B2A4A;
  --gold:        #C9A84C;
  --gold-dark:   #A8832A;
  --silver:      #B0C4DE;
  --gray-border: #E5E7EB;
  --gray-text:   #6B7280;

  --serif:  'Playfair Display', 'Noto Serif Tamil', Georgia, serif;
  --sans:   'Inter', system-ui, sans-serif;

  --nav-h: 72px;
  --radius: 12px;
  --shadow-card: 0 2px 12px rgba(10,22,40,0.07);
  --shadow-hover: 0 8px 32px rgba(10,22,40,0.13);
  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--sans);
  color: var(--navy);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── Typography ────────────────────────────── */
h1,h2,h3,h4 { font-family: var(--serif); line-height: 1.2; }
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 4vw, 2.75rem); font-weight: 600; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); font-weight: 500; }
p  { font-size: 1.0625rem; color: var(--midnight); }

.label {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-dark);
}

/* ── Gold Divider ──────────────────────────── */
.gold-divider {
  width: 60px; height: 2px;
  background: var(--gold);
  margin: 1.5rem auto;
  border-radius: 2px;
}
.gold-divider.left { margin-left: 0; }

/* ── Container ─────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 780px; margin: 0 auto; padding: 0 24px; }

/* ── Section ───────────────────────────────── */
section { padding: 96px 0; }
section.alt-bg { background: var(--warm-white); }
section.cream-bg { background: var(--cream); }

.section-header { text-align: center; margin-bottom: 56px; }
.section-header .label { margin-bottom: 12px; }
.section-header h2 { margin-bottom: 16px; }
.section-header p { color: var(--gray-text); max-width: 600px; margin: 0 auto; }

/* ── Navigation ────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-border);
  display: flex;
  align-items: center;
}

.nav-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold-dark);
  letter-spacing: 0.02em;
}
.nav-logo span { color: var(--navy); }

/* Company logo image in nav */
.nav-logo-img {
  height: 36px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
  object-fit: contain;
  border-radius: 4px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-item {
  position: relative;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--midnight);
  padding: 8px 14px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active { color: var(--gold-dark); background: var(--star-white); }

.nav-link svg { width: 12px; height: 12px; transition: transform var(--transition); }
.nav-item:hover .nav-link svg { transform: rotate(180deg); }

/* Dropdown */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 260px;
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  padding: 8px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity var(--transition), transform var(--transition);
}
.nav-item:hover .nav-dropdown { opacity: 1; pointer-events: all; transform: translateY(0); }

.nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--midnight);
  transition: background var(--transition), color var(--transition);
}
.nav-dropdown a:hover { background: var(--star-white); color: var(--gold-dark); }
.nav-dropdown .dd-icon { font-size: 1.1rem; }
.nav-dropdown .ext-badge {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gray-text);
  background: var(--warm-white);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}
.nav-hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: var(--transition);
}

/* Mobile drawer */
.nav-drawer {
  position: fixed;
  top: var(--nav-h); left: 0; right: 0; bottom: 0;
  background: var(--white);
  z-index: 999;
  padding: 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  /* Hidden by default — avoid display:none which causes paint flash */
  visibility: hidden;
  pointer-events: none;
}
.nav-drawer.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}
.drawer-link {
  display: block;
  padding: 14px 0;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--navy);
  border-bottom: 1px solid var(--gray-border);
}
.drawer-sub { padding-left: 20px; }
.drawer-sub a {
  display: block;
  padding: 10px 0;
  font-size: 0.9375rem;
  color: var(--midnight);
  border-bottom: 1px solid var(--star-white);
}

/* ── Buttons ────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  letter-spacing: 0.02em;
}
.btn-primary {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn-primary:hover { background: var(--midnight); border-color: var(--midnight); transform: translateY(-2px); box-shadow: var(--shadow-hover); }

.btn-gold {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}
.btn-gold:hover { background: var(--gold-dark); border-color: var(--gold-dark); color: var(--white); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(201,168,76,0.3); }

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline:hover { background: var(--navy); color: var(--white); transform: translateY(-2px); }

/* ── Cards ─────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.card-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--star-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 20px;
}

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

/* ── Hero ───────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--white) 60%, var(--star-white) 100%);
  z-index: 0;
}
.hero-canvas { position: absolute; inset: 0; z-index: 1; opacity: 0.6; pointer-events: none; }
.hero-content { position: relative; z-index: 2; }

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--star-white);
  border: 1px solid var(--gray-border);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--gold-dark);
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-title {
  font-family: var(--serif);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}
.hero-title .gold { color: var(--gold-dark); }

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--midnight);
  font-style: italic;
  margin-bottom: 40px;
  max-width: 560px;
}

.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }

/* ── Page Hero (sub-pages) ─────────────────── */
.page-hero {
  padding: calc(var(--nav-h) + 64px) 0 64px;
  background: var(--cream);
  border-bottom: 1px solid var(--gray-border);
  text-align: center;
}
.page-hero .label { margin-bottom: 12px; }
.page-hero h1 { margin-bottom: 16px; }
.page-hero p { max-width: 640px; margin: 0 auto; color: var(--midnight); font-size: 1.125rem; }

/* ── Acronym Block ─────────────────────────── */
.acronym-block { display: flex; flex-direction: column; gap: 8px; }
.acronym-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 14px 20px;
  background: var(--star-white);
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
  transition: background var(--transition);
}
.acronym-row:hover { background: var(--cream); }
.acronym-letter {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gold-dark);
  min-width: 32px;
}
.acronym-word { font-size: 1rem; color: var(--midnight); }

/* ── Focus List ────────────────────────────── */
.focus-list { display: flex; flex-direction: column; gap: 16px; }
.focus-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  transition: box-shadow var(--transition);
}
.focus-item:hover { box-shadow: var(--shadow-card); }
.focus-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--gold);
  margin-top: 6px;
  flex-shrink: 0;
}

/* ── Tag ───────────────────────────────────── */
.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.tag-gold { background: #FFF8E6; color: var(--gold-dark); border: 1px solid #F0D98F; }
.tag-navy { background: #EBF0F8; color: var(--navy); border: 1px solid #C5D3E8; }
.tag-silver { background: #EDF2F7; color: #4A6080; border: 1px solid var(--silver); }

/* ── Status Badge ──────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 24px;
  font-size: 0.875rem;
  font-weight: 600;
}
.status-coming { background: #FFF8E6; color: var(--gold-dark); border: 1px solid #F0D98F; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); animation: pulse-dot 2s infinite; }
@keyframes pulse-dot {
  0%,100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.7; }
}

/* ── Vision/Mission Two-col ────────────────── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.mission-block { padding: 36px; background: var(--white); border: 1px solid var(--gray-border); border-radius: var(--radius); }
.mission-block .label { margin-bottom: 12px; }
.mission-block h3 { margin-bottom: 16px; }

/* ── Resource Card ─────────────────────────── */
.resource-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.resource-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.resource-card-top {
  padding: 28px;
  flex: 1;
}
.resource-card-footer {
  padding: 16px 28px;
  border-top: 1px solid var(--gray-border);
  background: var(--warm-white);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Contact ───────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--gray-border);
}
.contact-icon {
  font-size: 1.4rem;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--star-white);
  border-radius: 10px;
  flex-shrink: 0;
}
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.875rem; font-weight: 500; color: var(--midnight); }
.form-group input, .form-group textarea {
  padding: 12px 16px;
  border: 1px solid var(--gray-border);
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: var(--navy);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: vertical;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}
.form-group textarea { min-height: 130px; }

/* ── Footer ────────────────────────────────── */
#footer {
  background: var(--cream);
  border-top: 2px solid var(--gold);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-logo { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; color: var(--gold-dark); margin-bottom: 12px; }
.footer-tagline { font-size: 0.9rem; color: var(--gray-text); font-style: italic; }
.footer-heading { font-family: var(--serif); font-size: 0.875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--navy); margin-bottom: 16px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 0.9rem; color: var(--gray-text); transition: color var(--transition); }
.footer-links a:hover { color: var(--gold-dark); }
.footer-bottom {
  border-top: 1px solid var(--gray-border);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--gray-text);
}

/* ── Constellation decorative ──────────────── */
.constellation-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 auto 48px;
  max-width: 400px;
  justify-content: center;
}
.constellation-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); opacity: 0.5; }
.constellation-line { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }

/* ── ISS Embed ─────────────────────────────── */
.iss-frame-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--gray-border);
  box-shadow: var(--shadow-card);
}
.iss-frame-wrap iframe { display: block; width: 100%; }

/* ── Solar System Embed ────────────────────── */
.solar-embed-wrap {
  position: relative;
  width: 100%;
  height: calc(100vh - var(--nav-h));
  border-radius: 0;
  overflow: hidden;
}
.solar-embed-wrap iframe {
  width: 100%; height: 100%;
  border: none;
  display: block;
}

/* ── Blockquote ────────────────────────────── */
blockquote {
  border-left: 3px solid var(--gold);
  padding: 20px 24px;
  background: var(--star-white);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--midnight);
  font-size: 1.0625rem;
  margin: 24px 0;
}

/* ── Who Can Join list ─────────────────────── */
.join-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.join-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--warm-white);
  border-radius: 8px;
  font-size: 0.9375rem;
}
.join-item::before { content: '✦'; color: var(--gold); font-size: 0.75rem; }

/* ── Tagline banner ────────────────────────── */
.tagline-banner {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 32px 40px;
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 40px 0;
}
.tagline-banner .quote-mark { font-family: var(--serif); font-size: 4rem; color: var(--gold); line-height: 1; margin-top: -16px; flex-shrink: 0; }
.tagline-banner p { font-style: italic; font-size: 1.0625rem; color: var(--silver); }

/* ── Meta info ─────────────────────────────── */
.meta-row { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 32px; }
.meta-item { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; color: var(--gray-text); }

/* ── Coming soon ───────────────────────────── */
.coming-soon-hero {
  text-align: center;
  padding: 80px 24px;
}
.coming-soon-icon { font-size: 5rem; margin-bottom: 24px; }

/* ── 3D Solar System Banner (in AGAYAM page) ── */
.solar3d-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 28px;
  margin-top: 32px;
  background: linear-gradient(135deg, var(--navy) 0%, #1B3A6B 100%);
  border-radius: var(--radius);
  border: 1px solid rgba(201,168,76,0.3);
  box-shadow: 0 4px 24px rgba(10,22,40,0.15);
  flex-wrap: wrap;
}
.solar3d-icon {
  font-size: 2.5rem;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201,168,76,0.15);
  border-radius: 50%;
  border: 1px solid rgba(201,168,76,0.3);
  flex-shrink: 0;
}
.solar3d-info {
  flex: 1;
  min-width: 200px;
}
.solar3d-info h3 { color: var(--white); font-size: 1.2rem; }
.solar3d-info p { color: var(--silver) !important; }

/* ── DB Table Placeholder ──────────────────── */
.db-table-wrap {
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.db-table { width: 100%; border-collapse: collapse; }
.db-table th {
  background: var(--cream);
  padding: 14px 18px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: left;
  color: var(--midnight);
  border-bottom: 1px solid var(--gray-border);
}
.db-table td {
  padding: 14px 18px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--gray-border);
  color: var(--midnight);
}
.db-table tr:last-child td { border-bottom: none; }
.db-table tr:hover td { background: var(--warm-white); }
.db-search {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--gray-border);
  border-radius: 8px;
  margin-bottom: 20px;
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: var(--navy);
  background: var(--white);
}
.db-search:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,0.15); }

/* ── Animations ────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { opacity: 0; animation: fadeUp 0.7s ease forwards; }
.fade-up.d1 { animation-delay: 0.1s; }
.fade-up.d2 { animation-delay: 0.25s; }
.fade-up.d3 { animation-delay: 0.4s; }

/* ── Active nav state ──────────────────────── */
.nav-link[aria-current="page"] { color: var(--gold-dark); }

/* ── Responsive ────────────────────────────── */
@media (max-width: 960px) {
  .card-grid-3 { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; gap: 24px; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  section { padding: 64px 0; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .card-grid-3 { grid-template-columns: 1fr; }
  .card-grid-2 { grid-template-columns: 1fr; }
  .join-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .hero-ctas { flex-direction: column; align-items: flex-start; }
  .tagline-banner { flex-direction: column; text-align: center; }
  .meta-row { flex-direction: column; gap: 12px; }
}

@media (max-width: 480px) {
  .container, .container-sm { padding: 0 16px; }
  .btn { width: 100%; justify-content: center; }
  .hero-ctas .btn { width: auto; }
}
