/* ==========================================================================
   SOUTH INDIA SHELTERS (S.I.S) — MASTER CANONICAL TYPOGRAPHY & DESIGN SYSTEM
   Single Source of Truth across all pages (Home, About, People, Projects, Journal)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Faculty+Glyphic&family=Familjen+Grotesk:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&display=swap');

:root {
  /* Brand Color Palette */
  --garnet: #A21C40;
  --garnet-subtle: rgba(162, 28, 64, 0.08);
  --garnet-hairline: rgba(162, 28, 64, 0.35);
  --pewter: #6E6F71;
  --warm-white: #F3EFE7;
  --parchment: #F3EFE7;
  --charcoal: #2A2723;
  --charcoal-deep: #1D1A18;
  --travertine: #E3D9C6;
  --limestone: #CFC5B4;
  --warm-concrete: #B9AFA0;
  --accent: #2D3A2D;

  /* Semantic Theme Surfaces & Text */
  --surface-page: var(--warm-white);
  --surface-card: #FFFFFF;
  --surface-sunken: var(--travertine);
  --surface-dark: var(--charcoal);
  --text-primary: var(--charcoal);
  --text-secondary: var(--pewter);
  --text-on-dark: var(--warm-white);
  --text-on-dark-muted: var(--limestone);
  --interactive: var(--garnet);
  --border-subtle: var(--limestone);
  --border-hairline: 1px solid var(--border-subtle);
  --border-on-dark: rgba(243, 239, 231, 0.22);
  --structure: var(--pewter);

  /* Spacing Scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 144px;
  --margin-page: clamp(24px, 7vw, 120px);

  /* Canonical Font Families */
  --font-display: 'Faculty Glyphic', Georgia, serif;
  --font-text: 'Familjen Grotesk', Georgia, serif;
  --font-sans: 'Familjen Grotesk', 'Söhne', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Familjen Grotesk', 'Söhne Mono', ui-monospace, monospace;

  /* ========================================================================
     MASTER TYPOGRAPHIC SCALE (Calculated against 1rem = 16px)
     ======================================================================== */

  /* Display XL — Hero H1 (44px - 76px) */
  --text-display-xl: 400 clamp(2.75rem, 5vw, 4.75rem)/1.05 var(--font-display);

  /* Display LG — Manifesto / Interstitial H2 (36px - 52px) */
  --text-display-lg: 400 clamp(2.25rem, 3.6vw, 3.25rem)/1.10 var(--font-display);

  /* Display MD — Standard Section Headings H2 (Strictly 32px) */
  --text-display-md: 400 2.00rem/1.18 var(--font-display);

  /* Heading — Card & Section Level H3 (Strictly 22px Semi-bold) */
  --text-heading: 600 1.375rem/1.35 var(--font-sans);

  /* Subheading — Eyebrows & Overlines (Strictly 12.5px Semi-bold Uppercase) */
  --text-subheading: 600 0.78rem/1.40 var(--font-sans);

  /* Primary Body — Main Narrative Paragraphs (Strictly 17px Italic) */
  --text-body: italic 400 1.0625rem/1.75 var(--font-text);

  /* Secondary Body — Compact Paragraphs & Descriptions (Strictly 15px Italic) */
  --text-body-sm: italic 400 0.9375rem/1.65 var(--font-text);

  /* Captions & Attributions (Strictly 13px) */
  --text-caption: 400 0.8125rem/1.50 var(--font-sans);

  /* UI Primary & Secondary (15px / 13px) */
  --text-ui: 500 0.9375rem/1.30 var(--font-sans);
  --text-ui-sm: 500 0.8125rem/1.30 var(--font-sans);

  /* Monospace Numerals (15px) */
  --text-numeral: 600 0.9375rem/1.20 var(--font-mono);

  /* Label Letter-Spacing */
  --tracking-label: 0.14em;

  /* Motion & Easing */
  --ease-reveal: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-cinematic: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-reveal: 640ms;
  --duration-fast: 200ms;
}

/* ==========================================================================
   CANONICAL TYPOGRAPHIC ELEMENT STYLES
   ========================================================================== */

/* Eyebrows / Kickers (Uniform across every section) */
.eyebrow,
.section-eyebrow,
.kicker {
  font: var(--text-subheading);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 14px;
}

.eyebrow.is-garnet {
  color: var(--garnet);
}

/* Canonical Garnet Architectural Accent Rule (matching meet-the-people.html) */
.section-rule {
  width: 56px;
  height: 2px;
  background: var(--garnet) !important;
  opacity: 1 !important;
  margin-bottom: var(--space-5);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.8s var(--ease-reveal) 0.15s;
}
[data-reveal-id].is-revealed .section-rule {
  transform: scaleX(1);
}

/* Canonical Hero Accent Underline (matching meet-the-people.html hero span::after) */
.hero-line,
.hero-copy h1 span,
.hero-h1 span.hero-line {
  position: relative;
  display: inline-block;
}
.hero-line::after,
.hero-copy h1 span::after,
.hero-h1 span.hero-line::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--garnet);
  opacity: 0.85;
}

/* Standard Section Headings (Uniform 32px Faculty Glyphic) */
.section-heading,
.section-title,
section > h2,
.split-editorial h2,
.purpose-editorial h2,
.chamber-header h2,
.projects-head h2,
.why-h2,
.sisway-intro h2,
.legacy-h2,
.awards-intro h2,
.awards-header-row h2,
.journal-head h2,
.milestones-intro h2,
.details-header-row h2,
.today-content h2,
.about-closing h2 {
  font: var(--text-display-md) !important;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin: 0 0 18px;
}

/* Section Headings on Dark */
.on-dark .section-heading,
.on-dark section > h2,
.pov-copy h2,
.today-content h2,
.about-closing h2,
.legacy-h2 {
  color: var(--text-on-dark) !important;
}

/* Italic Emphasized words inside Headings */
h1 em, h2 em, h3 em {
  font-style: italic;
  color: inherit;
}

/* Hero Headings */
.hero-h1,
.hero-copy h1 {
  font: var(--text-display-xl);
  letter-spacing: -0.025em;
  color: var(--text-on-dark);
  margin: 0 0 20px;
}

/* Card Headings (Uniform 22px Semi-bold Familjen Grotesk) */
.card-title,
.community-text h3,
.pillar h3,
.detail-card h3,
.award-card h3,
.split-editorial p.lead {
  font: var(--text-heading);
  color: var(--text-primary);
}

/* Primary Narrative Paragraphs */
p,
p.body,
.split-editorial p.body,
.purpose-editorial p.body,
.journal-copy p,
.sisway-intro p {
  font: var(--text-body);
  color: var(--text-secondary);
  margin: 0 0 20px;
  line-height: 1.75;
}

/* On Dark Backgrounds */
.on-dark p,
.on-dark p.body,
.pov-copy p.body,
.legacy-lead {
  color: var(--text-on-dark-muted);
}

/* Secondary Compact Body */
p.desc,
.desc,
.pillar p,
.award-card p,
.detail-card p,
.life-line {
  font: var(--text-body-sm);
  color: var(--text-secondary);
  line-height: 1.65;
}

/* Tagline / Sub-lead */
.tagline {
  font: 400 1.0625rem/1.40 var(--font-text);
  color: var(--text-primary);
}

/* Captions, Footnotes, Attributions */
.caption,
.footnote,
.attrib,
.ph span,
.today-footnote {
  font: var(--text-caption);
  color: var(--text-secondary);
  line-height: 1.50;
}

/* UI Numerals */
.numeral,
.h-year,
.award-year {
  font: var(--text-numeral);
  font-variant-numeric: tabular-nums;
}

/* Link Underline Sweeps */
.link-sweep {
  font: var(--text-ui-sm);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--interactive);
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: 0% 1px;
  padding-bottom: 3px;
  transition: background-size 0.45s var(--ease-reveal), opacity 0.2s;
  white-space: nowrap;
}
.link-sweep:hover {
  background-size: 100% 1px;
  opacity: 1;
}
