/* ============================================================================
   THE CIVILISATIONAL THINKER — Rik Amrit
   Directly derived from sample/rik_amrit_homepage_sample.html
   ============================================================================ */

/* ── Typography & Letterpress Fonts ───────────────────────────────────────── */
@font-face {
  font-family: 'Figgins Pica';
  src: url('/public/assets/fonts/bengali/Figgins_Pica_Updated.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --parchment: #f3eddf;
  --paper: #fbf8f0;
  --ink: #141719;
  --navy: #101d29;
  --navy-soft: #192a38;
  --maroon: #70252b;
  --maroon-dark: #51191f;
  --gold: #bd8b43;
  --gold-light: #d8b675;
  --muted: #6d6a63;
  --line: rgba(20,23,25,.16);
  --font-letterpress-en: "IM Fell English", "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-letterpress-bn: "Figgins Pica Updated", "Figgins Pica", "Noto Serif Bengali", serif;
  --font-bengali: "Noto Serif Bengali", serif;
  --serif: var(--font-letterpress-en);
  --sans: Inter, "Helvetica Neue", Arial, sans-serif;
  --page: 1240px;
}

[data-theme="dark"] {
  --paper: #101d29;
  --ink: #fbf8f0;
  --parchment: #192a38;
  --line: rgba(255,255,255,.12);
  --muted: #a3a098;
}

/* ── Utilities ───────────────────────────────────────────────────────────── */
.wrap {
  width: min(var(--page), calc(100% - 48px));
  max-width: var(--page);
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(16px, 3vw, 32px);
  padding-right: clamp(16px, 3vw, 32px);
}

.eyebrow {
  font: 600 11px/1.4 var(--sans);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--maroon);
}

[data-theme="dark"] .eyebrow {
  color: var(--gold-light);
}

.gold-rule {
  display: inline-block;
  width: 34px;
  height: 2px;
  background: var(--gold);
  vertical-align: middle;
  margin-right: 12px;
}

.text-link {
  color: var(--maroon);
  font: 600 11px var(--sans);
  letter-spacing: .13em;
  text-transform: uppercase;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.text-link:hover {
  color: var(--maroon-dark);
}

[data-theme="dark"] .text-link {
  color: var(--gold-light);
}

/* ── Section 1: Hero ─────────────────────────────────────────────────────── */
.hero {
  min-height: 650px;
  position: relative;
  overflow: hidden;
  color: #fbf7ef;
  background: var(--navy);
  isolation: isolate;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.hero-photo {
  position: absolute;
  z-index: -2;
  inset: 0;
  background-image: 
    linear-gradient(90deg, 
      rgba(16, 29, 41, 0.94) 0%, 
      rgba(16, 29, 41, 0.88) 32%, 
      rgba(16, 29, 41, 0.60) 60%, 
      rgba(16, 29, 41, 0.35) 80%, 
      rgba(16, 29, 41, 0.48) 100%
    ), 
    url('../images/hero_covers/cover_hero.jpg');
  background-size: cover;
  background-position: center 15%;
  filter: grayscale(1) contrast(1.05);
  opacity: .92;
  pointer-events: none;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(circle at 75% 45%, transparent 20%, rgba(16,29,41,.3) 70%, rgba(16,29,41,.7) 100%);
  pointer-events: none;
}

.hero::after {
  display: none;
}

.hero-inner {
  min-height: clamp(520px, 75vh, 650px);
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);
  align-items: end;
  gap: 32px;
  padding-top: 110px;
  padding-bottom: 58px;
}

.hero-copy {
  width: 100%;
  max-width: 650px;
  box-sizing: border-box;
  padding-bottom: 10px;
  animation: rise .85s ease both;
}

.hero-kicker {
  color: var(--gold-light);
  font: 11px var(--sans);
  letter-spacing: .24em;
  text-transform: uppercase;
  margin-bottom: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 6px;
  max-width: 100%;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(34px, 5.5vw, 84px);
  line-height: .98;
  font-weight: 300;
  letter-spacing: -.03em;
  margin: 0 0 24px;
  max-width: 700px;
  color: #FFFFFF;
}

.hero h1 em {
  font-weight: 400;
  color: #e4c38c;
  font-style: italic;
}

.hero-desc {
  font-family: var(--serif);
  font-size: clamp(17px,1.4vw,20px);
  line-height: 1.6;
  color: rgba(251,247,239,.9);
  max-width: 570px;
  margin: 0 0 29px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 22px;
  font: 600 11px var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--maroon);
  border: 1px solid var(--gold);
  color: #fff8ed;
}

.button-primary:hover {
  background: var(--maroon-dark);
}

.button-outline {
  border: 1px solid var(--line);
  color: var(--ink);
  background: transparent;
}

.button-outline:hover {
  border-color: var(--maroon);
  color: var(--maroon);
}

.hero .button-outline {
  border: 1px solid rgba(255,255,255,.48);
  color: #fff8ed;
}

.hero .button-outline:hover {
  border-color: var(--gold-light);
  color: var(--gold-light);
}

.hero-aside {
  align-self: center;
  justify-self: end;
  max-width: 170px;
  border-left: 1px solid var(--gold);
  padding: 12px 0 12px 19px;
  color: var(--gold-light);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.45;
  margin-top: 80px;
  font-style: italic;
}

.hero-aside span {
  display: block;
  font: 9px var(--sans);
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: #f7eee0;
  font-style: normal;
}

/* ── Section 2: Four Pillars Bar ─────────────────────────────────────────── */
.pillars {
  background: var(--parchment);
  border-bottom: 1px solid var(--line);
  position: relative;
}

.pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 32px 0;
}

.pillar {
  text-align: center;
  padding: 0 24px;
  border-right: 1px solid rgba(189,139,67,.4);
}

.pillar:last-child {
  border: 0;
}

.pillar-icon {
  color: var(--maroon);
  font-size: 22px;
  line-height: 1;
  margin-bottom: 10px;
}

[data-theme="dark"] .pillar-icon {
  color: var(--gold);
}

.pillar h2 {
  margin: 0 0 6px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink);
}

.pillar p {
  margin: 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.45;
}

/* ── Section 3: Selected Work Grid ───────────────────────────────────────── */
.section {
  padding: 72px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.section-head h2 {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 400;
  letter-spacing: -.03em;
  color: var(--ink);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.work-card {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.work-image {
  height: 240px;
  overflow: hidden;
  background: #d4c6ad;
  margin-bottom: 18px;
  position: relative;
  border-radius: 2px;
}

.work-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(.75);
  transition: transform .55s ease;
}

.work-card:hover .work-image img {
  transform: scale(1.04);
}

.work-image.book-cover {
  background: #d8cdb9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.book-cover-inner {
  width: 66%;
  height: 90%;
  padding: 24px 16px;
  border: 1px solid #88765b;
  box-shadow: 6px 8px 18px rgba(0,0,0,.15);
  background: #eee5d5;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  color: #242321;
}

.book-cover-inner strong {
  font-family: var(--serif);
  font-size: clamp(22px, 2.5vw, 32px);
  line-height: .95;
  font-weight: 400;
  letter-spacing: .04em;
}

.book-cover-inner small {
  font: 9px var(--sans);
  letter-spacing: .2em;
}

.card-type {
  color: var(--maroon);
  font: 600 9px var(--sans);
  letter-spacing: .18em;
  text-transform: uppercase;
}

[data-theme="dark"] .card-type {
  color: var(--gold);
}

.work-card h3 {
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.15;
  font-weight: 500;
  margin: 8px 0 10px;
  color: var(--ink);
}

.work-card p {
  color: var(--muted);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.55;
  margin: 0 0 18px;
  flex-grow: 1;
}

/* ── Section 4: Quote Band ───────────────────────────────────────────────── */
.quote-band {
  background: #e9e0ce;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 44px 0;
}

[data-theme="dark"] .quote-band {
  background: var(--navy-soft);
}

.quote-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: center;
}

blockquote {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(22px, 2.5vw, 32px);
  line-height: 1.3;
  font-style: italic;
  max-width: 700px;
  color: var(--ink);
}

blockquote::before {
  content: "“";
  color: var(--gold);
  font-size: 56px;
  line-height: 0;
  vertical-align: -.25em;
  margin-right: 7px;
}

.quote-by {
  margin-top: 14px;
  font: 600 11px var(--sans);
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--ink);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.stat {
  padding: 5px 18px;
  text-align: center;
  border-left: 1px solid rgba(189,139,67,.5);
}

.stat strong {
  display: block;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 400;
  color: var(--ink);
}

.stat span {
  font: 9px/1.4 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Section 5: Literature & Language ────────────────────────────────────── */
.lit-section {
  background: var(--paper);
  padding: 64px 0;
  border-bottom: 1px solid var(--line);
}

.lit-bengali-quote {
  font-family: 'Noto Sans Bengali', sans-serif;
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--maroon);
  border-left: 2px solid var(--gold);
  padding-left: 1rem;
  margin: 1.5rem 0;
  font-style: normal;
}

[data-theme="dark"] .lit-bengali-quote {
  color: var(--gold-light);
}

/* ── Section 6: Poorvam Institutional Showcase ────────────────────────────── */
.poorvam {
  background: var(--navy);
  color: #f7f0e4;
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.poorvam::before {
  display: none;
}

.poorvam .wrap {
  position: relative;
}

.poorvam-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 300px);
  gap: clamp(32px, 4vw, 56px);
  padding: 72px 0;
  align-items: center;
}

.poorvam .eyebrow {
  color: var(--gold-light);
}

.poorvam h2 {
  margin: 13px 0 8px;
  font-family: var(--serif);
  font-size: clamp(52px, 7vw, 84px);
  font-weight: 400;
  line-height: .95;
  letter-spacing: -.04em;
  color: #FFFFFF;
}

.poorvam-lead {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.45;
  max-width: 650px;
  margin: 0 0 14px;
  color: #f7f0e4;
}

.poorvam-copy {
  color: #d8d7d1;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.65;
  max-width: 660px;
  margin-bottom: 24px;
}

.button-light {
  background: var(--parchment);
  color: var(--navy);
  border: 1px solid var(--gold);
}

.button-light:hover {
  background: #ffffff;
}

.ecosystem {
  border-left: 1px solid var(--gold);
  padding-left: 28px;
  display: grid;
  gap: 18px;
}

.eco-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
  color: inherit;
}

.eco-item:hover {
  transform: translateX(4px);
  opacity: 0.95;
}

.eco-item:hover strong {
  color: var(--gold-light);
}

.eco-icon {
  color: var(--gold-light);
  font-size: 20px;
}

.eco-item strong {
  display: block;
  font: 11px var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #FFFFFF;
  transition: color 0.2s ease;
}

.eco-item span {
  display: block;
  color: #d4d0c7;
  font-size: 13px;
  margin-top: 2px;
}

/* ── Section 7: The Living Archive ───────────────────────────────────────── */
.archive {
  background: var(--paper);
  padding: 64px 0;
}

.archive-filters {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font: 13px var(--sans);
  color: var(--muted);
}

.archive-filters a {
  padding-bottom: 2px;
  transition: color .2s ease;
}

.archive-filters a:first-child,
.archive-filters a.active {
  color: var(--maroon);
  border-bottom: 2px solid var(--gold);
}

[data-theme="dark"] .archive-filters a:first-child,
[data-theme="dark"] .archive-filters a.active {
  color: var(--gold-light);
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 28px;
}

.archive-card {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
}

.archive-card img {
  width: 100%;
  height: 155px;
  object-fit: cover;
  display: block;
  margin-bottom: 13px;
  filter: saturate(.75);
  border-radius: 2px;
}

.archive-card .card-type {
  font-size: 9px;
}

.archive-card h3 {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.25;
  font-weight: 500;
  margin: 7px 0 10px;
  color: var(--ink);
  flex-grow: 1;
}

.archive-date {
  color: var(--muted);
  font: 10px var(--sans);
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ── Animations ──────────────────────────────────────────────────────────── */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 950px) {
  .wrap { width: min(100% - 40px, var(--page)); padding-left: 20px; padding-right: 20px; }
  .hero-inner { grid-template-columns: 1fr; gap: 28px; padding-top: 100px; padding-bottom: 50px; min-height: auto; }
  .hero-photo { inset: 0; background-position: 60% 10%; }
  .hero-aside { max-width: 480px; margin-top: 10px; justify-self: start; align-self: start; }
  .work-grid { gap: 20px; }
  .work-image { height: 200px; }
  .archive-grid { grid-template-columns: repeat(2, 1fr); }
  .poorvam-grid { grid-template-columns: 1fr; gap: 36px; }
  .ecosystem { grid-template-columns: repeat(2, 1fr); border-left: 0; border-top: 1px solid var(--gold); padding: 24px 0 0; }
}

@media (max-width: 700px) {
  .wrap { width: 100%; max-width: 100%; padding-left: 20px; padding-right: 20px; box-sizing: border-box; margin-left: auto; margin-right: auto; }
  .hero { min-height: auto; width: 100%; overflow: hidden; }
  .hero-inner {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    min-height: auto;
    padding-top: 90px;
    padding-bottom: 40px;
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
  }
  .hero-copy {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    align-self: stretch;
    padding-bottom: 0;
  }
  .hero h1 {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-break: normal;
  }
  .hero-desc {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  .hero-photo { 
    inset: 0; 
    background-image: 
      linear-gradient(180deg, 
        rgba(16, 29, 41, 0.94) 0%, 
        rgba(16, 29, 41, 0.78) 45%, 
        rgba(16, 29, 41, 0.96) 100%
      ), 
      url('../images/hero_covers/cover_hero.jpg');
    background-position: center 20%; 
    opacity: .55;
  }
  .hero-aside { 
    display: block; 
    width: 100%;
    max-width: 100%; 
    margin-top: 14px; 
    padding: 10px 0 10px 16px; 
    border-left: 2px solid var(--gold); 
    font-size: 15px;
    box-sizing: border-box;
    align-self: stretch;
  }
  .pillar-grid { grid-template-columns: repeat(2, 1fr); padding: 10px 0; }
  .pillar { padding: 18px 12px; border-right: 1px solid rgba(189,139,67,.4); border-bottom: 1px solid rgba(189,139,67,.4); }
  .pillar:nth-child(2) { border-right: 0; }
  .pillar:nth-child(3), .pillar:nth-child(4) { border-bottom: 0; }
  .work-grid { grid-template-columns: 1fr; }
  .quote-inner { grid-template-columns: 1fr; gap: 28px; }
  .ecosystem { grid-template-columns: 1fr; }
  .archive-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .wrap {
    padding-left: 16px;
    padding-right: 16px;
  }
  .hero-inner {
    padding-top: 80px;
    padding-bottom: 34px;
    gap: 18px;
    align-items: stretch;
  }
  .hero-copy {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    align-self: stretch;
  }
  .hero-kicker { 
    font-size: 10px; 
    letter-spacing: .14em; 
    margin-bottom: 14px; 
    flex-wrap: wrap; 
    align-items: center;
    gap: 6px; 
    max-width: 100%;
  }
  .hero-kicker .gold-rule { width: 20px; margin-right: 6px; flex-shrink: 0; }
  .hero-kicker span:not(.gold-rule) { word-break: break-word; }
  .hero h1 { 
    font-size: clamp(28px, 8vw, 38px); 
    line-height: 1.08; 
    margin: 0 0 14px; 
    letter-spacing: -.02em; 
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: normal;
  }
  .hero-desc { 
    font-size: 15px; 
    line-height: 1.55; 
    margin: 0 0 18px; 
    max-width: 100%;
  }
  .hero-actions { 
    flex-direction: column; 
    align-items: stretch; 
    width: 100%; 
    gap: 10px; 
  }
  .hero-actions .button { 
    width: 100%; 
    justify-content: center; 
    text-align: center; 
    padding: 13px 18px; 
    box-sizing: border-box;
    min-height: 44px;
  }
  .hero-aside { 
    margin-top: 8px; 
    font-size: 14px; 
    line-height: 1.45;
    padding: 8px 0 8px 14px; 
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    align-self: stretch;
  }
  .hero-aside span {
    font-size: 8.5px;
    margin-bottom: 8px;
  }
}

/* ── High-End Editorial Book Gallery (3D Volume Showcase) ────────────────── */
.books-showcase-section {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 84px 0 96px;
  position: relative;
}

.books-3d-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  margin-top: 44px;
  align-items: stretch;
}

@media (max-width: 1024px) {
  .books-3d-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }
}

@media (max-width: 640px) {
  .books-3d-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.book-card-3d {
  background: #FFFFFF;
  border: 1px solid rgba(20, 23, 25, 0.08);
  border-top: 3px solid var(--maroon);
  border-radius: 3px;
  padding: 36px 28px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 0;
  height: 100%;
  box-sizing: border-box;
  box-shadow: 0 4px 20px rgba(16, 29, 41, 0.04);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
  position: relative;
}

.book-card-3d:hover {
  transform: translateY(-6px);
  border-color: rgba(189, 139, 67, 0.35);
  border-top-color: var(--gold);
  box-shadow: 0 20px 42px rgba(16, 29, 41, 0.09);
}

[data-theme="dark"] .book-card-3d {
  background: var(--navy-soft);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-top: 3px solid var(--gold);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .book-card-3d:hover {
  border-color: rgba(189, 139, 67, 0.5);
  border-top-color: var(--gold-light);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.45);
}

.book-3d-viewport {
  width: 100%;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  position: relative;
  background: radial-gradient(ellipse at 50% 88%, rgba(189, 139, 67, 0.08) 0%, transparent 68%);
}

.book-3d-viewport::after {
  content: '';
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
  height: 12px;
  background: radial-gradient(ellipse at center, rgba(16, 29, 41, 0.24) 0%, rgba(16, 29, 41, 0.06) 45%, transparent 75%);
  filter: blur(3px);
  pointer-events: none;
  transition: transform 0.35s ease, opacity 0.35s ease, width 0.35s ease;
}

.book-card-3d:hover .book-3d-viewport::after {
  transform: translateX(-50%) scale(1.08);
  width: 145px;
  opacity: 0.85;
}

/* Books with existing 3D transparent mockups */
.book-3d-object {
  height: 220px;
  max-width: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(4px 8px 18px rgba(16, 29, 41, 0.22));
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), filter 0.35s ease;
  z-index: 2;
}

.book-3d-object img {
  max-height: 220px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.book-card-3d:hover .book-3d-object {
  transform: translateY(-5px) scale(1.02);
  filter: drop-shadow(8px 16px 26px rgba(16, 29, 41, 0.3));
}

/* Realistic 3D Volume rendering for flat cover scans */
.book-volume-stand {
  perspective: 1100px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 220px;
  width: 100%;
  position: relative;
  z-index: 2;
}

.book-volume-3d {
  position: relative;
  width: 142px;
  height: 210px;
  transform-style: preserve-3d;
  transform: rotateY(-20deg) rotateX(3deg);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), filter 0.35s ease;
  filter: drop-shadow(4px 8px 18px rgba(16, 29, 41, 0.24));
}

.book-card-3d:hover .book-volume-3d {
  transform: rotateY(-12deg) rotateX(1deg) translateY(-5px) scale(1.02);
  filter: drop-shadow(8px 16px 26px rgba(16, 29, 41, 0.32));
}

.book-cover-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 2px 4px 4px 2px;
  overflow: hidden;
  background: #101d29;
  box-shadow: inset 1px 0 2px rgba(255, 255, 255, 0.18);
}

.book-cover-face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.book-cover-face::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    rgba(0,0,0,0.22) 0%,
    rgba(255,255,255,0.16) 3%,
    rgba(0,0,0,0.06) 6%,
    transparent 14%,
    rgba(255,255,255,0.05) 85%,
    rgba(0,0,0,0.15) 100%
  );
  pointer-events: none;
}

.book-spine-edge {
  position: absolute;
  top: 0;
  left: 0;
  width: 16px;
  height: 100%;
  transform-origin: left;
  transform: rotateY(-90deg);
  background: linear-gradient(to right, #101d29 0%, #2a3746 45%, #101d29 100%);
  border-radius: 2px 0 0 2px;
  box-shadow: inset -2px 0 4px rgba(0,0,0,0.5);
}

.book-pages-edge {
  position: absolute;
  top: 3px;
  bottom: 3px;
  right: -9px;
  width: 9px;
  transform-origin: left;
  transform: rotateY(90deg);
  background: repeating-linear-gradient(
    to bottom,
    #FBF8F1 0px,
    #FBF8F1 2px,
    #DFD8C7 3px
  );
  box-shadow: inset 1px 0 2px rgba(0,0,0,0.2);
  border-radius: 0 2px 2px 0;
}

/* Colophon Kicker */
.book-colophon-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 600 10px/1.2 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
  padding: 5px 12px;
  border-radius: 2px;
  background: rgba(189, 139, 67, 0.08);
  border: 1px solid rgba(189, 139, 67, 0.2);
}

.book-colophon-kicker.forthcoming {
  color: var(--maroon);
  background: rgba(112, 37, 43, 0.06);
  border-color: rgba(112, 37, 43, 0.18);
}

[data-theme="dark"] .book-colophon-kicker {
  color: var(--gold-light);
  background: rgba(189, 139, 67, 0.15);
  border-color: rgba(189, 139, 67, 0.28);
}

[data-theme="dark"] .book-colophon-kicker.forthcoming {
  color: #e07a7a;
  background: rgba(224, 122, 122, 0.12);
  border-color: rgba(224, 122, 122, 0.25);
}

.edition-dot {
  font-size: 7px;
  opacity: 0.7;
}

/* Book Titles & Typography */
.book-card-3d h3 {
  font-family: var(--font-letterpress-en);
  font-size: 23px;
  line-height: 1.25;
  font-weight: 500;
  margin: 0 0 6px;
  color: var(--ink);
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.book-card-3d h3.bengali-heading {
  font-family: var(--font-letterpress-bn);
  font-size: 26px;
}

.book-card-3d .book-meta-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  margin-bottom: 14px;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.book-card-3d p {
  font-family: var(--serif);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 24px;
  flex-grow: 1;
  text-align: center;
}

/* Action Buttons */
.book-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  font: 600 11px/1.2 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  box-sizing: border-box;
  transition: all 0.25s ease;
  margin-top: auto;
}

.book-btn .btn-arrow {
  font-size: 13px;
  transition: transform 0.2s ease;
}

.book-btn:hover .btn-arrow {
  transform: translate(2px, -2px);
}

.book-btn--primary {
  background: var(--navy);
  color: #FFFFFF;
  border: 1px solid var(--navy);
}

.book-btn--primary:hover {
  background: var(--maroon);
  border-color: var(--maroon);
  color: #FFFFFF;
  box-shadow: 0 6px 18px rgba(112, 37, 43, 0.25);
}

.book-btn--preview {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(20, 23, 25, 0.25);
}

.book-btn--preview:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: #FFFFFF;
  box-shadow: 0 6px 18px rgba(16, 29, 41, 0.2);
}

[data-theme="dark"] .book-btn--primary {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}

[data-theme="dark"] .book-btn--primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
}

[data-theme="dark"] .book-btn--preview {
  background: transparent;
  color: var(--paper);
  border-color: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .book-btn--preview:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--gold-light);
  color: var(--gold-light);
}


/* ── Press Logos Marquee Carousel ────────────────────────────────────────── */
.press-carousel-section {
  background: var(--parchment);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 48px 0;
  overflow: hidden;
}

.press-carousel-title {
  text-align: center;
  margin-bottom: 28px;
}

.press-carousel-title .eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.press-track-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
}

.press-track {
  display: flex;
  align-items: center;
  gap: 52px;
  width: max-content;
  animation: pressScroll 32s linear infinite;
}

.press-track:hover {
  animation-play-state: paused;
}

.press-item {
  flex-shrink: 0;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: grayscale(100%) opacity(0.65);
  transition: filter 0.3s ease, transform 0.3s ease;
  padding: 4px 12px;
}

.press-item:hover {
  filter: grayscale(0%) opacity(1);
  transform: scale(1.08);
}

.press-item img {
  max-height: 40px;
  max-width: 140px;
  object-fit: contain;
  display: block;
}

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

@media (max-width: 950px) {
  .books-3d-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 650px) {
  .books-3d-grid {
    grid-template-columns: 1fr;
  }
  .press-item {
    height: 40px;
  }
  .press-item img {
    max-height: 32px;
  }
}

/* ── Letterpress Typography Refinements ──────────────────────────────────── */
h1, h2, h3, h4, .section-head h2, .hero h1, .work-card h3, .book-card-3d h3 {
  font-family: "IM Fell English", "Figgins Pica", "Cormorant Garamond", "Noto Serif Bengali", Georgia, serif;
  letter-spacing: -0.01em;
}

.bengali-heading,
.bengali-title,
h1.bengali-heading,
h2.bengali-heading,
h3.bengali-heading,
h4.bengali-heading,
h1[lang="bn"],
h2[lang="bn"],
h3[lang="bn"],
h4[lang="bn"] {
  font-family: var(--font-letterpress-bn) !important;
}

/* General Bengali body, excerpts, and paragraphs render in clean Noto Serif Bengali, not letterpress */
p[lang="bn"],
span[lang="bn"],
div[lang="bn"],
blockquote[lang="bn"],
.bengali-text,
.bengali-body,
[lang="bn"]:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(.bengali-heading):not(.bengali-title) {
  font-family: var(--font-bengali) !important;
}

/* ── Section 9: Horizontal Scrollable Articles Grid ─────────────────────── */
.articles-scroll-section {
  background: var(--paper);
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.articles-header-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.scroll-arrows {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scroll-arrow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--parchment);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.scroll-arrow-btn:hover {
  background: var(--maroon);
  border-color: var(--maroon);
  color: #FFFFFF;
  transform: translateY(-1px);
}

[data-theme="dark"] .scroll-arrow-btn {
  background: var(--navy-soft);
  color: var(--gold-light);
  border-color: var(--line);
}

[data-theme="dark"] .scroll-arrow-btn:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
}

.articles-scroll-container {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 8px 0 20px;
  margin-top: 18px;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) transparent;
  box-sizing: border-box;
}

.articles-scroll-container::-webkit-scrollbar {
  height: 5px;
}

.articles-scroll-container::-webkit-scrollbar-track {
  background: transparent;
}

.articles-scroll-container::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 3px;
}

.articles-scroll-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: clamp(280px, 30vw, 340px);
  gap: 24px;
  width: max-content;
  max-width: none;
  padding: 6px 4px 20px;
  box-sizing: border-box;
}

.article-scroll-card {
  min-width: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  background: var(--parchment);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  scroll-snap-align: start;
}

.article-scroll-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 14px 30px rgba(16, 29, 41, 0.08);
}

[data-theme="dark"] .article-scroll-card {
  background: var(--navy-soft);
}

.article-scroll-media {
  position: relative;
  width: 100%;
  height: 195px;
  overflow: hidden;
  display: block;
  background: var(--navy);
  box-sizing: border-box;
}

.article-scroll-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.article-scroll-card:hover .article-scroll-media img {
  transform: scale(1.05);
}

.article-scroll-body {
  padding: 22px 20px 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  box-sizing: border-box;
}

.article-scroll-meta {
  font: 600 10px var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-scroll-views {
  color: var(--gold);
}

.article-scroll-title {
  font-family: var(--font-letterpress-en);
  font-size: 20px;
  line-height: 1.28;
  font-weight: 500;
  margin: 0 0 10px;
  color: var(--ink);
  min-height: 52px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

.article-scroll-title.bengali-heading {
  font-family: var(--font-letterpress-bn) !important;
  font-size: 21px;
}

.article-scroll-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.article-scroll-title a:hover {
  color: var(--maroon);
}

[data-theme="dark"] .article-scroll-title a:hover {
  color: var(--gold-light);
}

.article-scroll-desc {
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 18px;
  flex-grow: 1;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.article-scroll-desc:lang(bn),
.article-scroll-desc[lang="bn"],
.article-scroll-desc.bengali-text {
  font-family: var(--font-bengali) !important;
  font-size: 14.5px;
  line-height: 1.7;
}

.article-scroll-link {
  margin-top: auto;
  align-self: flex-start;
  color: var(--maroon);
  font-weight: 600;
  transition: color 0.2s ease;
}

.article-scroll-link:hover {
  color: var(--maroon-dark);
}

[data-theme="dark"] .article-scroll-link {
  color: var(--gold-light);
}

[data-theme="dark"] .article-scroll-link:hover {
  color: #ffffff;
}

@media (max-width: 650px) {
  .articles-scroll-track {
    grid-auto-columns: min(290px, 82vw);
    gap: 16px;
  }
  .article-scroll-media {
    height: 170px;
  }
}

/* ── Scholarship & Publications Grid ─────────────────────────────────────── */
.scholarship-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 36px;
}

.scholarship-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--maroon);
  padding: 26px 28px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.scholarship-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.07);
  border-left-color: var(--gold);
}

.scholarship-meta {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 8px;
  font-family: var(--sans);
  letter-spacing: 0.02em;
  line-height: 1.45;
}

.scholarship-title {
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 500;
  line-height: 1.35;
  margin: 0 0 12px;
  color: var(--ink);
}

.scholarship-desc {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 16px;
  flex-grow: 1;
}

.scholarship-action {
  margin-top: auto;
  padding-top: 6px;
}

@media (max-width: 820px) {
  .scholarship-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

/* ── Shelf Header Reset (Prevents global header styles from bleeding) ────── */
.ah-shelf-header,
.shelf-header {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  position: static !important;
  padding: 0 !important;
}

/* ── Sticky Transparent & Coloured Header ─────────────────────────────────── */
header.ct-header,
.ct-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 1000 !important;
  transition: background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), 
              backdrop-filter 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

header.ct-header:not(.scrolled),
.ct-header:not(.scrolled) {
  background: transparent !important;
  background-color: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  border-bottom: 1px solid transparent !important;
  box-shadow: none !important;
}

header.ct-header.scrolled,
.ct-header.scrolled {
  background: rgba(16, 29, 41, 0.94) !important;
  background-color: rgba(16, 29, 41, 0.94) !important;
  backdrop-filter: blur(14px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(180%) !important;
  border-bottom: 1px solid rgba(189, 139, 67, 0.28) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4) !important;
}

/* ── Media Kit Section ───────────────────────────────────────────────────── */
.media-kit-section {
  background: var(--sand);
  padding: clamp(64px, 7vw, 100px) 0;
  border-bottom: 1px solid var(--line);
}

.media-kit-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: clamp(32px, 4vw, 48px);
  gap: 24px;
  flex-wrap: wrap;
}

.media-kit-head h2 {
  font-family: var(--serif);
  font-size: clamp(34px, 4.2vw, 54px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.025em;
  margin: 10px 0 12px;
  color: var(--ink);
}

.media-kit-lead {
  font-family: var(--serif);
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.55;
  color: var(--muted);
  max-width: 760px;
  margin: 0;
}

.media-kit-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(18px, 2vw, 28px);
  margin-bottom: clamp(32px, 4vw, 48px);
}

.media-kit-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: clamp(22px, 2vw, 30px);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.media-kit-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
  border-color: var(--gold);
}

.media-kit-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: rgba(112, 37, 43, 0.08);
  color: var(--maroon);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  transition: background 0.25s ease, color 0.25s ease;
}

.media-kit-card:hover .media-kit-card-icon {
  background: var(--maroon);
  color: #fff8ed;
}

.media-kit-card-badge {
  font: 700 10px var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.media-kit-card-title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 10px;
}

.media-kit-card-desc {
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 16px;
  flex-grow: 1;
}

.media-kit-card-meta {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 12px;
  border-top: 1px solid var(--line);
  margin-bottom: 16px;
}

.media-kit-card-action {
  margin-top: auto;
}

.media-kit-card-action .button {
  width: 100%;
  justify-content: center;
}

/* Callout Banner */
.media-kit-banner {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 5px solid var(--maroon);
  border-radius: 6px;
  padding: clamp(24px, 3vw, 36px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.media-kit-banner-content {
  max-width: 680px;
}

.media-kit-banner-content h4 {
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--ink);
}

.media-kit-banner-content p {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

.media-kit-banner-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Dark Mode */
[data-theme="dark"] .media-kit-section {
  background: var(--sand);
}

[data-theme="dark"] .media-kit-card,
[data-theme="dark"] .media-kit-banner {
  background: var(--paper);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .media-kit-card:hover {
  border-color: var(--gold-light);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .media-kit-card-icon {
  background: rgba(214, 167, 88, 0.15);
  color: var(--gold-light);
}

[data-theme="dark"] .media-kit-card:hover .media-kit-card-icon {
  background: var(--maroon);
  color: #fff8ed;
}

[data-theme="dark"] .media-kit-head h2,
[data-theme="dark"] .media-kit-card-title,
[data-theme="dark"] .media-kit-banner-content h4 {
  color: #fbf8f0;
}

[data-theme="dark"] .media-kit-lead,
[data-theme="dark"] .media-kit-card-desc,
[data-theme="dark"] .media-kit-banner-content p,
[data-theme="dark"] .media-kit-card-meta {
  color: #a3a098;
}

@media (max-width: 1100px) {
  .media-kit-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 650px) {
  .media-kit-grid {
    grid-template-columns: 1fr;
  }
  .media-kit-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .media-kit-banner-actions {
    width: 100%;
  }
  .media-kit-banner-actions .button {
    width: 100%;
  }
}

/* ============================================================================
   HOMEPAGE ANIMATIONS & TEXTUAL MOTION (Rik Amrit)
   - Dynamic Hero Rotating Word Switcher with Gold Shimmer
   - Scroll-Triggered Staggered Reveals
   - Polished Micro-Interactions & Reduced-Motion Accessibility
   ============================================================================ */

/* ── Hero Rotating Word Switcher & Gold Shimmer ───────────────────────────── */
.hero-headline {
  position: relative;
  overflow: visible;
}

.hero-rotator-container {
  display: inline-block;
  vertical-align: baseline;
  position: relative;
}

.hero-word-rotator {
  display: inline-block;
  position: relative;
  vertical-align: baseline;
  white-space: nowrap;
  transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  min-height: 1.12em;
}

.hero-rotating-word {
  display: inline-block;
  font-style: italic;
  font-weight: 400;
  vertical-align: baseline;
  color: #f0cf6f; /* Fallback for browsers without text clip */
  background: linear-gradient(
    115deg,
    #cf9f4d 0%,
    #fae08f 25%,
    #ffffff 50%,
    #fae08f 75%,
    #cfa43b 100%
  );
  background-size: 240% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: goldTextShimmer 6s ease-in-out infinite;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.55s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity, filter;
  transform-origin: center bottom;
}

[data-theme="dark"] .hero-rotating-word {
  background: linear-gradient(
    115deg,
    #d8b675 0%,
    #fae08f 25%,
    #ffffff 50%,
    #fae08f 75%,
    #d4a340 100%
  );
  background-size: 240% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-rotating-word.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
  position: relative;
}

.hero-rotating-word.is-exiting {
  opacity: 0;
  transform: translateY(-42%) scale(0.96);
  filter: blur(4px);
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

.hero-rotating-word.is-entering {
  opacity: 0;
  transform: translateY(42%) scale(0.96);
  filter: blur(4px);
  position: absolute;
  top: 0;
  left: 0;
}

@keyframes goldTextShimmer {
  0% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
  100% {
    background-position: 0% center;
  }
}

/* ── Hero Load Entrance Stagger ───────────────────────────────────────────── */
.hero-copy .hero-kicker {
  animation: heroEntranceFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}
.hero-copy h1 {
  animation: heroEntranceFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}
.hero-copy .hero-desc {
  animation: heroEntranceFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}
.hero-copy .rik-amrit-slider-container {
  animation: heroEntranceFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.55s both;
}
.hero-copy .hero-actions {
  animation: heroEntranceFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.7s both;
}
.hero-aside {
  animation: heroEntranceFade 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.85s both;
}

@keyframes heroEntranceFade {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Non-Destructive Scroll Animations (Never dissolves or hides content) ── */
.reveal-on-scroll {
  opacity: 1;
}

.reveal-on-scroll.is-revealed {
  animation: sectionSoftEntrance 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes sectionSoftEntrance {
  0% {
    opacity: 0.7;
    transform: translateY(12px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger parent and children */
.reveal-stagger-parent .reveal-child {
  opacity: 1;
}

.reveal-stagger-parent.is-revealed .reveal-child {
  animation: cardSoftEntrance 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: calc(var(--stagger-i, 0) * 65ms);
}

@keyframes cardSoftEntrance {
  0% {
    opacity: 0.7;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Card Lift & Sheen Micro-Interactions ─────────────────────────────────── */
.scholarship-card,
.work-card,
.media-kit-card,
.eco-item,
.ah-card {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.35s ease !important;
}

/* ── Prefers Reduced Motion ───────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html.js-reveals-active .reveal-on-scroll,
  html.js-reveals-active .reveal-stagger-parent .reveal-child,
  .hero-copy .hero-kicker,
  .hero-copy h1,
  .hero-copy .hero-desc,
  .hero-copy .rik-amrit-slider-container,
  .hero-copy .hero-actions,
  .hero-aside,
  .hero-rotating-word {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}
