/* ============================================================
   SAKS — Design System
   Sri Aurobindo Kala Sangam, Puducherry
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300;1,400&family=DM+Sans:ital,wght@0,300;0,400;1,300&display=swap');

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --bg:         #0D1812;
  --bg-2:       #111F16;
  --bg-3:       #0A120D;
  --gold:       #B4A064;
  --gold-dim:   #8C7E5A;
  --gold-faint: rgba(180,160,100,0.12);
  --text:       #F0EAD8;
  --text-dim:   #B8B0A0;
  --text-mute:  #7A7268;
  --rule:       rgba(180,160,100,0.15);

  --serif:      'Cormorant Garamond', Georgia, serif;
  --sans:       'DM Sans', system-ui, sans-serif;

  /* Type scale */
  --t-display:  clamp(60px, 9vw, 88px);
  --t-h1:       clamp(36px, 5vw, 52px);
  --t-h2:       clamp(24px, 3vw, 32px);
  --t-h3:       20px;
  --t-body-lg:  18px;
  --t-body:     16px;
  --t-small:    13px;
  --t-label:    11px;
  --t-micro:    9px;

  /* Motion */
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --dur-slow:   1.1s;
  --dur-mid:    0.6s;
  --dur-fast:   0.3s;

  /* Spacing */
  --pad-page:   2.5rem;
  --pad-section: 5rem;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-weight: 300;
  font-size: var(--t-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Utility ─────────────────────────────────────────────── */
.u-sans {
  font-family: var(--sans);
  font-weight: 300;
}
.u-label {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
}
.u-label--dim {
  color: var(--gold-dim);
}
.u-rule {
  border: none;
  border-top: 0.5px solid var(--rule);
}
.u-gold { color: var(--gold); }
.u-dim  { color: var(--text-dim); }
.u-mute { color: var(--text-mute); }

/* ── Nav ─────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem var(--pad-page);
  border-bottom: 0.5px solid var(--rule);
  background: var(--nav-bg, rgba(13,24,18,0.96));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.nav__logo-img {
  display: none;
}

.nav__wordmark {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.25em;
  color: var(--gold);
  text-transform: uppercase;
}

.nav__links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav__links a {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.16em;
  color: var(--text-dim);
  text-transform: uppercase;
  transition: color var(--dur-fast) ease;
}

.nav__links a:hover,
.nav__links a[aria-current="page"] { color: var(--gold); }

/* ── Currently strip ─────────────────────────────────────── */
.currently {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.75rem var(--pad-page);
  background: rgba(180,160,100,0.04);
  border-top: 0.5px solid var(--rule);
}

.currently__label {
  font-family: var(--sans);
  font-size: var(--t-micro);
  font-weight: 400;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-transform: uppercase;
  flex-shrink: 0;
}

.currently__items {
  display: flex;
  gap: 0;
  overflow: hidden;
}

.currently__item {
  font-family: var(--sans);
  font-size: var(--t-label);
  font-weight: 300;
  color: var(--text-mute);
  padding: 0 1.5rem;
  border-right: 0.5px solid var(--rule);
  white-space: nowrap;
}

.currently__item:first-child { padding-left: 0; }
.currently__item:last-child  { border-right: none; }
.currently__item strong { color: var(--text-dim); font-weight: 300; }

/* ── Pillars bar ─────────────────────────────────────────── */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 0.5px solid var(--rule);
}

.pillar {
  padding: 1.5rem 2rem;
  border-right: 0.5px solid var(--rule);
  transition: background var(--dur-fast) ease;
  cursor: pointer;
}

.pillar:last-child { border-right: none; }
.pillar:hover { background: rgba(180,160,100,0.04); }

.pillar__num {
  font-family: var(--sans);
  font-size: var(--t-micro);
  font-weight: 300;
  letter-spacing: 0.25em;
  color: var(--gold-dim);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.pillar__name {
  font-size: 17px;
  font-weight: 300;
  color: var(--text-dim);
  transition: color var(--dur-fast) ease;
}

.pillar:hover .pillar__name { color: var(--text); }

.pillar__sub {
  font-family: var(--sans);
  font-size: var(--t-micro);
  font-weight: 300;
  letter-spacing: 0.1em;
  color: rgba(180,160,100,0.28);
  text-transform: uppercase;
  margin-top: 0.3rem;
}

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  padding: 0;
  border-top: 0.5px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.footer__logo-col {
  padding: 0;
  border-right: 0.5px solid var(--rule);
  display: flex;
  align-items: stretch;
  background: #00813A;
}

.footer__logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  width: 100%;
  padding: 1rem;
}

.footer__logo-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.footer__col {
  padding: 2.5rem 2rem;
  border-right: 0.5px solid var(--rule);
}

.footer__col:last-child { border-right: none; }

.footer__col p, .footer__col a {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 300;
  color: var(--text-mute);
  line-height: 2.1;
}

.footer__col a:hover { color: var(--gold); }

/* ── Entrance animations ──────────────────────────────────── */
@keyframes riseIn {
  from { transform: translateY(110%); }
  to   { transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes expandLine {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}

/* ── Scroll reveals ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Image placeholder (until real images are in place) */
.img-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}

.img-placeholder span {
  font-family: var(--sans);
  font-size: var(--t-micro);
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.15);
  text-transform: uppercase;
}

/* Specific image tone fills matching the actual artwork */
.img-placeholder--pancha    { background: #162B1F; }
.img-placeholder--kali      { background: #1A1428; }
.img-placeholder--sahasrara { background: #0D1A2E; }
.img-placeholder--yantra    { background: #231508; }

/* ── Reduced motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ── Green page theme tokens ─────────────────────────────
   Add these :root overrides to any page that uses the green
   colour scheme (Philosophy, Education, Programs, Apply).
   Copy the block into the page's own <style> tag.
   ──────────────────────────────────────────────────────── */

/*
:root {
  --page-bg:       #0F2B1C;   -- Programs / Apply
  --page-bg:       #0D2218;   -- Philosophy (deeper, cooler)
  --page-accent:   #4A9B72;   -- Programs
  --page-accent:   #6AB482;   -- Philosophy (lighter, cooler)
  --page-accent-2: #6AB482;
  --page-rule:     rgba(74,155,114,0.15);
  --page-text:     #F0EAD8;
  --page-dim:      rgba(240,234,216,0.62);
  --page-mute:     rgba(240,234,216,0.4);
}
*/

/* ── Footer utility bar — language + theme ─────────────── */
.footer__utility {
  grid-column: 1 / -1;
  border-top: 0.5px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem var(--pad-page);
  background: rgba(180,160,100,0.02);
}

.footer__utility-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Google Translate trigger */
#google-translate-trigger {
  font-family: var(--sans);
  font-size: var(--t-micro);
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mute);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s;
}
#google-translate-trigger:hover { color: var(--gold-dim); }

/* Google Translate widget — hide default banner styling */
.goog-te-banner-frame { display: none !important; }
body { top: 0 !important; }
.skiptranslate { display: none !important; }
#google_translate_element { display: none; }

/* Dark/Light theme toggle */
.theme-toggle {
  font-family: var(--sans);
  font-size: var(--t-micro);
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mute);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s;
}
.theme-toggle:hover { color: var(--gold-dim); }
.theme-toggle__icon { font-size: 12px; }

/* Light theme overrides */
:root[data-theme="light"] {
  --bg:         #F2EDE0;
  --bg-2:       #EAE4D5;
  --bg-3:       #E2DBCA;
  --text:       #0F1C13;
  --text-dim:   #2C3D2E;
  --text-mute:  #5C6E5E;
  --rule:       rgba(15,28,19,0.13);
  --gold:       #7A5F1A;
  --gold-dim:   #9A7A2A;
  --gold-faint: rgba(122,95,26,0.08);
  --nav-bg:     rgba(242,237,224,0.96);
}
/* Force warm white on html/body so no page shows plain white */
[data-theme="light"] html,
[data-theme="light"] body { background-color: #F2EDE0 !important; }

/* ── Google Translate widget ── */
.goog-te-gadget { font-size: 0 !important; }
.goog-te-gadget a { display: none !important; }
.goog-te-combo {
  font-family: var(--sans) !important;
  font-size: 10px !important;
  font-weight: 300 !important;
  letter-spacing: 0.14em;
  background: transparent !important;
  color: var(--text-mute) !important;
  border: 0.5px solid var(--rule) !important;
  border-radius: 0 !important;
  padding: 0.2rem 0.5rem !important;
  cursor: pointer;
  outline: none !important;
  min-width: 100px;
  text-transform: uppercase;
}
.goog-te-combo:hover { color: var(--gold-dim) !important; }
.goog-te-banner-frame { display: none !important; }
body { top: 0 !important; }
/* ============================================================
   RESPONSIVE — Mobile & Tablet
   Breakpoints: 768px (tablet), 480px (mobile)
   ============================================================ */

/* ── Shared responsive grid utilities ───────────────────── */
/* These override inline grid-template-columns via class names */

/* ── 768px — Tablet ─────────────────────────────────────── */
@media (max-width: 768px) {

  :root {
    --pad-page: 1.5rem;
    --t-display: clamp(44px, 10vw, 72px);
  }

  /* Nav — hamburger */
  .nav {
    padding: 0.75rem var(--pad-page);
    position: sticky;
    flex-wrap: wrap;
    gap: 0;
  }

  .nav__links {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0;
    border-top: 0.5px solid var(--rule);
    padding: 0.5rem 0 0.75rem;
    margin-top: 0.5rem;
  }

  .nav__links.open { display: flex; }

  .nav__links li { border-bottom: 0.5px solid var(--rule); }
  .nav__links a {
    display: block;
    padding: 0.7rem 0;
    font-size: 10px;
  }

  .nav__hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
  }

  .nav__hamburger span {
    display: block;
    width: 20px;
    height: 1px;
    background: var(--gold-dim);
    transition: transform 0.2s, opacity 0.2s;
  }

  .nav__hamburger.open span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
  .nav__hamburger.open span:nth-child(2) { opacity: 0; }
  .nav__hamburger.open span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

  /* Hero — stack on tablet */
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero__left {
    border-right: none;
    border-bottom: 0.5px solid var(--rule);
    padding: 2.5rem var(--pad-page);
    min-height: auto;
  }

  .hero__right { min-height: 380px; }

  /* Art grid — simpler 2-col on tablet */
  .art-grid { grid-template-columns: 1fr 1fr; }
  .art-cell:nth-child(1) { grid-row: 1; }

  /* Footer — 2×2 on tablet */
  .footer {
    grid-template-columns: 1fr 1fr;
  }

  .footer__logo-col {
    grid-column: 1 / -1;
    min-height: 80px;
    border-right: none;
    border-bottom: 0.5px solid var(--rule);
  }

  .footer__col:nth-child(2) { border-right: 0.5px solid var(--rule); }
  .footer__col:nth-child(3) { border-right: none; border-top: 0.5px solid var(--rule); }
  .footer__col:nth-child(4) { border-top: 0.5px solid var(--rule); }

  .footer__utility {
    grid-column: 1 / -1;
    flex-wrap: wrap;
    gap: 0.8rem;
    padding: 0.75rem var(--pad-page);
  }

  /* Currently strip — wrap */
  .currently {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem var(--pad-page);
  }

  .currently__items {
    flex-wrap: wrap;
  }

  .currently__item {
    padding: 0.2rem 0.8rem;
    white-space: normal;
    font-size: 10px;
  }

  /* Pillars — 2×2 */
  .pillars { grid-template-columns: 1fr 1fr; }
  .pillar:nth-child(2) { border-right: none; }
  .pillar:nth-child(3),
  .pillar:nth-child(4) { border-top: 0.5px solid var(--rule); }
  .pillar:nth-child(4) { border-right: none; }

  /* Generic 2-col → 1-col for page sections */
  .prog-card { min-height: 400px; }

  .why-saks {
    grid-template-columns: 1fr;
  }
  .why-saks__left {
    border-right: none;
    border-bottom: 0.5px solid var(--page-rule);
    padding: 2.5rem var(--pad-page);
  }
  .why-saks__right {
    grid-template-columns: 1fr 1fr;
    padding: 2.5rem var(--pad-page);
    gap: 2rem;
  }

  /* Apply pages */
  .apply-header { grid-template-columns: 1fr; }
  .apply-header__left { border-right: none; border-bottom: 0.5px solid var(--page-rule); }
  .apply-body { grid-template-columns: 1fr; }
  .apply-info { border-right: none; border-bottom: 0.5px solid var(--page-rule); }
  .also-links { flex-direction: column; gap: 0.8rem; }

  /* People page */
  .kt-featured { grid-template-columns: 1fr; }
  .people-grid.three-col { grid-template-columns: 1fr 1fr; }

  /* Fellowship structure — stack to 1 col */
  .fellow-structure { grid-template-columns: 1fr; }
  .fellow-structure__col { border-right: none; border-bottom: 0.5px solid var(--page-rule); }

  /* Research */
  .research-context { grid-template-columns: 1fr; }
  .research-matrika { grid-template-columns: 1fr; }

}

/* ── 480px — Mobile ──────────────────────────────────────── */
@media (max-width: 480px) {

  :root {
    --pad-page: 1.2rem;
    --t-display: clamp(36px, 11vw, 56px);
    --t-h1: clamp(28px, 7vw, 40px);
    --t-h2: clamp(20px, 5.5vw, 28px);
  }

  /* Art grid — single column on mobile */
  .art-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }
  .art-cell:nth-child(1) { min-height: 220px; }
  .art-cell:nth-child(2),
  .art-cell:nth-child(3) { min-height: 160px; }

  /* Footer — fully stacked */
  .footer { grid-template-columns: 1fr; }
  .footer__col { border-right: none; border-top: 0.5px solid var(--rule); }
  .footer__logo-col { min-height: 70px; }

  /* People grid */
  .people-grid,
  .people-grid.three-col { grid-template-columns: 1fr; }

  /* Why-saks */
  .why-saks__right { grid-template-columns: 1fr; }

  /* Programs grid on education page */
  .programs-grid { grid-template-columns: 1fr; }

  /* Fellow who-can section */
  .fellow-who { grid-template-columns: 1fr; }

  /* Philosophy hero */
  .phil-opener { grid-template-columns: 1fr; }
  .phil-opener__logo-col { display: none; }

  /* Admissions grid */
  .admissions-grid { grid-template-columns: 1fr 1fr; }

  /* Currently strip — vertical */
  .currently { flex-direction: column; align-items: flex-start; gap: 0.3rem; }
  .currently__items { flex-direction: column; }
  .currently__item { padding: 0.15rem 0; border-right: none; border-bottom: 0.5px solid var(--rule); width: 100%; }

  /* Explore iframe — taller on mobile */
  iframe[title="Explore SAKS ideas"] { height: 480px; }

  /* Inline grid overrides for sections that use inline styles */
  /* These target the index-slider/parallax program cards */
}

/* ── Explore page specific ───────────────────────────────── */
@media (max-width: 768px) {
  /* Show a "tap to explore" message, hide complex controls */
  #btn-back { bottom: 1rem; font-size: 8px; padding: 0.5rem 1rem; }
  #nav-hint { font-size: 7px; bottom: 0.3rem; }
}


/* ── Inline grid overrides (index-slider / index-parallax) ── */
/* Sections using inline display:grid need media query via !important */
@media (max-width: 768px) {
  /* Philosophy quote bar — stack on tablet */
  section[style*="grid-template-columns:1fr 1fr"][style*="border-top"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
    padding: 2.5rem var(--pad-page) !important;
  }

  /* 3-col programs grid → 1-col on tablet */
  section[style*="repeat(3,1fr)"] {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  section[style*="grid-template-columns:1fr 1fr"] {
    display: flex !important;
    flex-direction: column !important;
  }
}

/* ── Hero slider responsive ──────────────────────────────── */
@media (max-width: 768px) {
  .hero-slider { height: 70vh; min-height: 460px; }
  .hero__text { width: 80%; padding: 2rem var(--pad-page) 6rem; }
  .slide__caption { bottom: 6rem; right: var(--pad-page); max-width: 260px; }
  .slider-bar { padding: 0 var(--pad-page); }
}

@media (max-width: 480px) {
  .hero-slider { height: 85vh; }
  .hero__text { width: 100%; }
  .slide__caption { display: none; } /* Caption hidden on small mobile — in band only */
  .slide-zone--prev { width: 15%; }
  .slide-zone--next { width: 15%; }
}

/* ── Parallax hero responsive ────────────────────────────── */
@media (max-width: 768px) {
  .hero-wrap { grid-template-columns: 1fr; }
  .hero__left {
    position: relative;
    top: auto;
    height: auto;
    padding: 2.5rem var(--pad-page);
    border-right: none;
    border-bottom: 0.5px solid var(--rule);
  }
  .art-panel { height: 60vh; }
}

