/* ==========================================================================
   ABOUT PAGE STYLESHEET — CINEMATIC STACKING CARDS & STICKY LEFT RAIL
   Towards My Bharat (TMB) Web Platform
   ==========================================================================
   
   ARCHITECTURAL ROLE:
   - Houses specialized layout physics and visual presentation for `about.html`.
   - Cooperates directly with `about.js` to deliver an Apple-inspired narrative
     card-stacking experience where story chapters overlap sequentially as the user scrolls.

   RELATIONSHIP TO OTHER SYSTEM COMPONENTS:
   - Markup (`about.html`):
     - `.about-experience-grid`: 2-column parent layout (Sticky Left Rail + Story Cards Stream).
     - `.about-rail`: Left-hand navigation sidebar pinned via `position: sticky`.
     - `.rail-item`: Individual timeline milestone buttons.
     - `.story-card`: Full-height chapter cards pinned at `top: 110px`.
   - Controller (`about.js`):
     - Dynamically adds `.active` to `.rail-item` as corresponding cards scroll into view.
     - Applies `.is-covered` to cards scrolled beneath newer cards.
   - Global Styles (`style.css`):
     - Inherits typography tokens (`--font-serif`, `--font-sans`) and brand colors (`--color-accent`).
   - Theme Engine (`theme.js`):
     - Supports both Dark Mode (default luxury slate `#06090e`) and Light Mode (`html[data-theme="light"]`).

   KEY CONCEPTS & TERMINOLOGY FOR ONBOARDING DEVELOPERS:
   - Sticky Stacking: Combining `position: sticky; top: 110px;` with ascending `z-index`
     values (10, 20, 30...) and large bottom margins (`margin-bottom: 45vh`) causes
     each subsequent card to slide over and pin on top of the previous one.
   - Stacking Context: The CSS 3D layer hierarchy formed by relative/sticky elements and z-index.
   - will-change: Hint to browser GPU compositor (`will-change: transform, opacity`)
     to optimize scroll rendering and prevent frame drops.
   - Clamp Typography: Fluid responsive font sizing using CSS `clamp(min, preferred, max)`
     to eliminate jagged breakpoint jumps.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. PAGE ROOT & THEME BACKGROUND BASES
   -------------------------------------------------------------------------- */
.about-page {
  background-color: #06090e; /* Deep obsidian luxury dark background */
  color: #e2e8f0;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Light Mode Overrides (Triggered when html has data-theme="light") */
html[data-theme="light"] .about-page {
  background-color: #f3f6f1; /* Soft warm ivory / parchment tone */
  color: #1e293b;
}

/* --------------------------------------------------------------------------
   2. PAGE HERO HEADER SECTION
   -------------------------------------------------------------------------- */
.about-hero {
  padding: 8rem 0 3.5rem;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: radial-gradient(circle at 50% 0%, rgba(197, 160, 89, 0.08) 0%, transparent 70%);
}

html[data-theme="light"] .about-hero {
  border-bottom: 1px solid rgba(46, 93, 58, 0.12);
  background: radial-gradient(circle at 50% 0%, rgba(167, 201, 87, 0.15) 0%, transparent 70%);
}

.about-hero-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

/* Category pill badge atop the hero headline */
.about-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  background: rgba(197, 160, 89, 0.1);
  border: 1px solid rgba(197, 160, 89, 0.35);
  color: #c5a059; /* Brand warm gold */
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

html[data-theme="light"] .about-hero-badge {
  background: rgba(46, 93, 58, 0.08);
  border-color: rgba(46, 93, 58, 0.25);
  color: #2e5d3a;
}

/* Hero primary narrative title */
.about-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5.5vw, 4.2rem);
  font-weight: 700;
  line-height: 1.12;
  color: #ffffff;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

html[data-theme="light"] .about-hero-title {
  color: #1a2e20;
}

.about-hero-title .text-gold {
  color: #c5a059;
}

html[data-theme="light"] .about-hero-title .text-gold {
  color: #2e5d3a;
}

.about-hero-description {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.7);
  max-width: 720px;
  margin: 0 auto;
}

html[data-theme="light"] .about-hero-description {
  color: #475569;
}

/* --------------------------------------------------------------------------
   3. EXPERIENCE SECTION GRID (Sticky Left Rail + Stacking Cards Stream)
   -------------------------------------------------------------------------- */
.about-experience-section {
  position: relative;
  padding: 3rem 0 6rem;
  background-color: #06090e;
}

html[data-theme="light"] .about-experience-section {
  background-color: #f3f6f1;
}

/* Two-column layout on desktop: 280px sticky rail + fluid cards stream */
.about-experience-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3.5rem;
  align-items: start;
  position: relative;
}

/* ==========================================================================
   STICKY LEFT SIDEBAR RAIL
   ========================================================================== */
.about-rail {
  position: sticky;
  top: 130px;
  align-self: start;
  z-index: 40;
  padding: 1.5rem 0;
}

.rail-category-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #c5a059;
  margin-bottom: 2.25rem;
  display: block;
}

html[data-theme="light"] .rail-category-tag {
  color: #2e5d3a;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.rail-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  group: hover;
  transition: opacity 0.3s ease;
}

.rail-item-num {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 0.35rem;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
}

html[data-theme="light"] .rail-item-num {
  color: #94a3b8;
}

.rail-item-text {
  font-size: 1.15rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.38);
  position: relative;
  padding-bottom: 0.5rem;
  transition: color 0.3s ease;
  line-height: 1.3;
}

html[data-theme="light"] .rail-item-text {
  color: #64748b;
}

/* Active Highlight State */
.rail-item.active .rail-item-num {
  color: #c5a059;
}

html[data-theme="light"] .rail-item.active .rail-item-num {
  color: #2e5d3a;
}

.rail-item.active .rail-item-text {
  color: #ffffff;
  font-weight: 700;
}

html[data-theme="light"] .rail-item.active .rail-item-text {
  color: #0f172a;
}

/* The Gold Underline Bar */
.rail-item-underline {
  display: block;
  width: 0;
  height: 2px;
  background-color: #c5a059;
  margin-top: 0.25rem;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="light"] .rail-item-underline {
  background-color: #2e5d3a;
}

.rail-item.active .rail-item-underline {
  width: 100%;
}

.rail-item:hover .rail-item-text {
  color: rgba(255, 255, 255, 0.85);
}

html[data-theme="light"] .rail-item:hover .rail-item-text {
  color: #1e293b;
}

/* ==========================================================================
   4. RIGHT STACKING CARDS STREAM (CINEMATIC OVERLAPPING PHYSICS)
   ========================================================================== */
/**
 * THE STACKING MECHANISM EXPLAINED:
 * 1. Each `.story-card` has `position: sticky; top: 110px;`.
 * 2. When the user scrolls down, a card moves upward until its top reaches 110px,
 *    where it locks/pins into place.
 * 3. `margin-bottom: 45vh` creates physical scrolling travel distance before the next
 *    card arrives.
 * 4. Ascending `z-index` (10, 20, 30...) ensures each subsequent card naturally
 *    slides over and covers the previous card.
 * 5. `about.js` detects when a card is obscured and applies `.is-covered`, which slightly
 *    scales down (0.975), shifts up (-10px), dims opacity (0.45), and blurs (1.5px).
 */
.about-cards-stream {
  position: relative;
  display: flex;
  flex-direction: column;
  padding-bottom: 8vh;
}

/* Base Card Style */
.story-card {
  position: sticky;
  top: 110px;
  min-height: calc(100vh - 140px);
  margin-bottom: 45vh;
  border-radius: 24px;
  overflow: hidden;
  background-color: #0a0f18;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -25px 60px rgba(0, 0, 0, 0.95), 0 25px 70px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4rem 4.5rem;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              opacity 0.4s ease, 
              filter 0.4s ease,
              box-shadow 0.4s ease;
  will-change: transform, opacity;
}

html[data-theme="light"] .story-card {
  background-color: #ffffff;
  border: 1px solid rgba(46, 93, 58, 0.16);
  box-shadow: 0 -15px 40px rgba(46, 93, 58, 0.12), 0 20px 50px rgba(0, 0, 0, 0.08);
}

/* Layering hierarchy: subsequent cards overlap previous ones */
.story-card:nth-child(1) {
  z-index: 10;
}

.story-card:nth-child(2) {
  z-index: 20;
}

.story-card:nth-child(3) {
  z-index: 30;
  margin-bottom: 0; /* Final card does not need trailing space */
}

/* Depth-of-Field Dimming Effect (Controlled by about.js) */
.story-card.is-covered {
  transform: scale(0.975) translateY(-10px);
  opacity: 0.45;
  filter: blur(1.5px) brightness(0.65);
}

html[data-theme="light"] .story-card.is-covered {
  filter: blur(1.5px) opacity(0.5);
}

/* Card Atmospheric Background Layers */
.card-bg-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.18;
  mix-blend-mode: luminosity;
  pointer-events: none;
  transition: transform 0.8s ease;
}

.card-bg-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(197, 160, 89, 0.1) 0%, transparent 60%),
              linear-gradient(to right, #0a0f18 35%, rgba(10, 15, 24, 0.88) 100%),
              linear-gradient(to bottom, rgba(10, 15, 24, 0.3) 0%, #0a0f18 100%);
  pointer-events: none;
}

html[data-theme="light"] .card-bg-overlay {
  background: radial-gradient(circle at 80% 20%, rgba(167, 201, 87, 0.15) 0%, transparent 60%),
              linear-gradient(to right, #ffffff 45%, rgba(255, 255, 255, 0.85) 100%),
              linear-gradient(to bottom, rgba(255, 255, 255, 0.4) 0%, #ffffff 100%);
}

.card-content-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Top Pill Badge */
.card-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.38rem 1rem;
  border-radius: 999px;
  background: rgba(197, 160, 89, 0.08);
  border: 1px solid rgba(197, 160, 89, 0.32);
  color: #c5a059;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  width: fit-content;
}

html[data-theme="light"] .card-pill {
  background: rgba(46, 93, 58, 0.08);
  border-color: rgba(46, 93, 58, 0.28);
  color: #2e5d3a;
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #c5a059;
}

html[data-theme="light"] .pill-dot {
  background-color: #2e5d3a;
}

/* Card Main Headline */
.card-headline {
  font-family: var(--font-sans);
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  font-weight: 800;
  line-height: 1.14;
  color: #ffffff;
  letter-spacing: -0.025em;
  margin-bottom: 2.2rem;
  max-width: 840px;
}

html[data-theme="light"] .card-headline {
  color: #0f172a;
}

/* Vertical Gold Accent Block (Exact match with inspiration image) */
.card-story-block {
  border-left: 2px solid #c5a059;
  padding-left: 1.75rem;
  margin-bottom: 2.5rem;
  max-width: 780px;
}

html[data-theme="light"] .card-story-block {
  border-left-color: #2e5d3a;
}

.card-story-paragraph {
  font-size: clamp(1.05rem, 1.4vw, 1.18rem);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
}

html[data-theme="light"] .card-story-paragraph {
  color: #334155;
}

/* Huge Metric & Stat Row (Matches inspiration image) */
.card-metric-row {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

html[data-theme="light"] .card-metric-row {
  border-top-color: rgba(46, 93, 58, 0.12);
}

.metric-big-num {
  font-family: var(--font-serif);
  font-size: clamp(3.2rem, 6vw, 4.8rem);
  font-weight: 700;
  color: #c5a059;
  line-height: 1;
  letter-spacing: -0.02em;
}

html[data-theme="light"] .metric-big-num {
  color: #2e5d3a;
}

.metric-caption {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}

html[data-theme="light"] .metric-caption {
  color: #475569;
}

/* Additional Pillar Breakdown Grid for Section 3 */
.pillars-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
  max-width: 820px;
}

.pillar-mini-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.25rem 1.4rem;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

html[data-theme="light"] .pillar-mini-card {
  background: #f8fafc;
  border-color: rgba(46, 93, 58, 0.15);
}

.pillar-mini-card:hover {
  background: rgba(197, 160, 89, 0.06);
  border-color: rgba(197, 160, 89, 0.3);
  transform: translateY(-2px);
}

html[data-theme="light"] .pillar-mini-card:hover {
  background: rgba(46, 93, 58, 0.05);
  border-color: #2e5d3a;
}

.pillar-mini-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.pillar-mini-num {
  font-size: 0.8rem;
  font-weight: 700;
  color: #c5a059;
  letter-spacing: 0.05em;
}

html[data-theme="light"] .pillar-mini-num {
  color: #2e5d3a;
}

.pillar-mini-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.35rem;
}

html[data-theme="light"] .pillar-mini-title {
  color: #0f172a;
}

.pillar-mini-desc {
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.65);
}

html[data-theme="light"] .pillar-mini-desc {
  color: #64748b;
}

/* ==========================================================================
   CALL TO ACTION BANNER (Before Footer)
   ========================================================================== */
.about-cta-banner {
  padding: 5rem 0;
  background: linear-gradient(180deg, #06090e 0%, #0a0f18 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

html[data-theme="light"] .about-cta-banner {
  background: linear-gradient(180deg, #f3f6f1 0%, #e8f0e4 100%);
  border-top-color: rgba(46, 93, 58, 0.12);
}

.about-cta-box {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 2rem;
  border-radius: 20px;
  background: rgba(197, 160, 89, 0.04);
  border: 1px solid rgba(197, 160, 89, 0.2);
}

html[data-theme="light"] .about-cta-box {
  background: #ffffff;
  border-color: rgba(46, 93, 58, 0.25);
  box-shadow: 0 10px 30px rgba(46, 93, 58, 0.08);
}

.about-cta-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1rem;
}

html[data-theme="light"] .about-cta-title {
  color: #1a2e20;
}

.about-cta-text {
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 2rem;
}

html[data-theme="light"] .about-cta-text {
  color: #475569;
}

.about-cta-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.btn-gold-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 2rem;
  border-radius: 6px;
  background: #c5a059;
  color: #06090e;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn-gold-primary:hover {
  background: #dfbc77;
  transform: translateY(-2px);
}

html[data-theme="light"] .btn-gold-primary {
  background: #2e5d3a;
  color: #ffffff;
}

html[data-theme="light"] .btn-gold-primary:hover {
  background: #397247;
}

.btn-outline-light {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 2rem;
  border-radius: 6px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.btn-outline-light:hover {
  border-color: #c5a059;
  color: #c5a059;
  background: rgba(197, 160, 89, 0.05);
}

html[data-theme="light"] .btn-outline-light {
  border-color: rgba(46, 93, 58, 0.3);
  color: #2e5d3a;
}

html[data-theme="light"] .btn-outline-light:hover {
  border-color: #2e5d3a;
  background: rgba(46, 93, 58, 0.06);
}

/* ==========================================================================
   RESPONSIVE DESIGN (Tablets & Mobile)
   ========================================================================== */
@media (max-width: 1024px) {
  .about-experience-grid {
    grid-template-columns: 220px 1fr;
    gap: 2rem;
  }

  .story-card {
    padding: 3rem 2.5rem;
    min-height: calc(100vh - 160px);
  }

  .pillars-mini-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .about-experience-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Make sidebar rail into a sleek sticky top horizontal bar on mobile */
  .about-rail {
    position: sticky;
    top: 70px;
    z-index: 50;
    background: rgba(6, 9, 14, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.85rem 1rem;
    margin: 0 -1rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  html[data-theme="light"] .about-rail {
    background: rgba(243, 246, 241, 0.94);
    border-bottom-color: rgba(46, 93, 58, 0.15);
  }

  .rail-category-tag {
    display: none; /* Hide category label to save vertical space on mobile */
  }

  .rail-nav {
    flex-direction: row;
    justify-content: space-around;
    gap: 0.5rem;
  }

  .rail-item {
    align-items: center;
  }

  .rail-item-num {
    display: none; /* Compact presentation */
  }

  .rail-item-text {
    font-size: 0.88rem;
    padding-bottom: 0.25rem;
  }

  .story-card {
    top: 130px;
    min-height: auto;
    padding: 2.25rem 1.5rem;
    margin-bottom: 30vh;
  }

  .card-headline {
    font-size: 1.85rem;
    margin-bottom: 1.5rem;
  }

  .card-story-block {
    padding-left: 1rem;
    margin-bottom: 1.75rem;
  }

  .card-story-paragraph {
    font-size: 1rem;
  }

  .card-metric-row {
    flex-direction: column;
    gap: 0.35rem;
  }

  .metric-big-num {
    font-size: 2.8rem;
  }
}
