/* MTS Homepage V17 — pastel continuous canvas; no stretch, no repeat. */
/* =========================================================
   Murugan Thiruvarut Sangam — Homepage V16
   Composition & Typography
   ---------------------------------------------------------
   The AI artwork is used as a soft, proportional page canvas.
   Sections are transparent; the canvas and gold curves provide the
   visual rhythm while content remains the focus.
   ========================================================= */

:root {
  --ink: #16496d;
  --ink-soft: #486c7e;
  --ink-faint: #6d8490;
  --vermilion: #b84d38;
  --gold: #b88727;
  --gold-soft: rgba(184, 135, 39, .72);
  --ivory: #fbf5e9;
  --content-width: 1340px;
  --shadow: 0 18px 40px rgba(35, 67, 79, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.72;
  background-color: #f7efe1;
  background-image: url("images/mts-home-bg.webp?v=17");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% auto;
  overflow-x: hidden;
}

a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }

.container {
  width: min(var(--content-width), calc(100% - 5rem));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: 1000;
  padding: .55rem .8rem;
  color: #fff;
  background: var(--ink);
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- Header ---------- */
.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 20;
  background: transparent;
}
.header-inner {
  min-height: 96px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
}
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(184, 135, 39, .52);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 250, 239, .18);
  font-size: 1.35rem;
  line-height: 1;
}
.brand-text { display: grid; gap: .05rem; }
.brand-text strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.04rem;
  line-height: 1.25;
  letter-spacing: .01em;
}
.brand-text span {
  color: var(--ink-soft);
  font-size: .73rem;
  letter-spacing: .03em;
}
.primary-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .12rem;
}
.primary-nav a {
  position: relative;
  padding: .4rem .55rem;
  color: var(--ink);
  font-size: .79rem;
  font-weight: 650;
  text-decoration: none;
  text-shadow: 0 1px 9px rgba(255, 250, 239, .8);
}
.primary-nav a::after {
  content: "";
  position: absolute;
  left: .55rem;
  right: .55rem;
  bottom: .12rem;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .22s ease;
}
.primary-nav a:hover::after,
.primary-nav a:focus-visible::after,
.primary-nav a[aria-current="page"]::after { transform: scaleX(1); }
.primary-nav .nav-donate {
  margin-left: .35rem;
  padding: .48rem .95rem;
  border-radius: 999px;
  color: #fff;
  background: var(--vermilion);
  box-shadow: 0 8px 20px rgba(150, 62, 44, .18);
}
.primary-nav .nav-donate::after { display: none; }

/* ---------- Global typography ---------- */
.section { position: relative; padding: 6.6rem 0; }
.section-heading { max-width: 690px; }
.section-kicker,
.eyebrow,
.date {
  margin: 0 0 .45rem;
  color: var(--vermilion);
  font-size: .66rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .22em;
  text-transform: uppercase;
}
h1,
h2,
h3,
strong { font-family: Georgia, "Times New Roman", serif; }
h1, h2, h3, p { margin-top: 0; }
h2 {
  margin-bottom: .7rem;
  font-size: clamp(2rem, 3vw, 2.85rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.015em;
}
h3 {
  margin-bottom: .42rem;
  font-size: 1.18rem;
  line-height: 1.3;
  font-weight: 600;
}
.section-heading > p:last-child {
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: .9rem;
  line-height: 1.7;
}
.section-heading::after {
  content: "";
  display: block;
  width: 58px;
  height: 1px;
  margin-top: 1rem;
  background: linear-gradient(90deg, var(--vermilion), var(--gold));
}
.text-link,
.explore-item em,
.resource-item em {
  display: inline-block;
  color: var(--ink);
  font-size: .79rem;
  font-style: normal;
  font-weight: 750;
  text-decoration: underline;
  text-decoration-color: rgba(184, 135, 39, .7);
  text-decoration-thickness: 1px;
  text-underline-offset: .18rem;
}
.text-link:hover,
.text-link:focus-visible,
.explore-item:hover em,
.resource-item:hover em { color: var(--vermilion); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: .55rem 1rem;
  border: 1px solid rgba(22, 73, 109, .28);
  border-radius: 999px;
  font-size: .77rem;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  transition: transform .2s ease, background-color .2s ease, border-color .2s ease;
}
.button:hover,
.button:focus-visible { transform: translateY(-2px); }
.button-primary { color: #fff; background: var(--ink); border-color: var(--ink); }
.button-secondary { color: var(--ink); background: rgba(255, 250, 239, .08); }
.button-secondary:hover,
.button-secondary:focus-visible { background: rgba(255, 250, 239, .28); border-color: rgba(22, 73, 109, .45); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 820px;
  padding: 11.5rem 0 8.5rem;
}
.hero-inner {
  min-height: 590px;
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(500px, 1.06fr);
  align-items: center;
  gap: clamp(3rem, 8vw, 8rem);
}
.hero-copy { max-width: 650px; padding-left: 1.5vw; }
.hero h1 {
  margin-bottom: .2rem;
  color: var(--ink);
  font-size: clamp(2.8rem, 4.8vw, 4.15rem);
  font-weight: 500;
  line-height: 1.02;
}
.hero-tamil {
  margin: .1rem 0 .8rem;
  color: var(--vermilion);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2.3vw, 1.9rem);
  line-height: 1.25;
}
.hero-lead {
  max-width: 610px;
  margin-bottom: 1.35rem;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.75;
  text-shadow: 0 1px 14px rgba(255, 250, 239, .9);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.hero-aside { align-self: center; }
.hero-figure {
  position: relative;
  width: min(680px, 100%);
  margin: 2rem -3vw 0 auto;
  transform: rotate(-.6deg);
}
.hero-photo {
  width: 100%;
  border-radius: 54px 150px 42px 115px;
  box-shadow: var(--shadow);
}
.hero-figure figcaption {
  position: absolute;
  right: -1.3rem;
  bottom: -2.1rem;
  width: min(285px, 58%);
  padding: 1rem 1.2rem;
  border-radius: 24px 24px 50px 22px;
  background: rgba(255, 250, 239, .48);
  box-shadow: 0 12px 28px rgba(50, 77, 81, .08);
  backdrop-filter: blur(3px);
}
.hero-figure figcaption strong {
  display: block;
  margin-bottom: .28rem;
  color: var(--ink);
  font-size: .92rem;
}
.hero-figure figcaption span {
  display: block;
  color: var(--ink-soft);
  font-size: .72rem;
  line-height: 1.65;
}



/* ---------- Gold section threads ---------- */
.header-divider,
.section-divider {
  position: relative;
  width: 100%;
  height: 58px;
  margin: -1px 0 0;
  pointer-events: none;
  z-index: 3;
}
.header-divider svg,
.section-divider svg,
.footer-thread svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.header-divider path,
.section-divider path,
.footer-thread path {
  fill: none;
  stroke: rgba(184, 135, 39, .82);
  stroke-width: 1.15;
  vector-effect: non-scaling-stroke;
}
.header-divider::after,
.section-divider::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  left: 42.5%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #b88727;
}
.section-divider-about::after { left: 67%; }
.section-divider-explore::after { left: 34%; }
.section-divider-news::after { left: 63%; }
.section-divider-tradition::after { left: 38%; }
.section-divider-donation::after { left: 74%; }
.section-divider-resources::after { left: 48%; }

.hero,
.section {
  position: relative;
}

/* The divider belongs to the section it closes, so content never depends on
   absolute page-height calculations. */
.hero .section-divider,
.section .section-divider {
  position: absolute;
  left: 0;
  bottom: -29px;
  z-index: 4;
}

.hero {
  padding-bottom: 7rem;
}
.section {
  padding-bottom: 7rem;
}

.section-divider path {
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- About ---------- */
.about-section { padding-top: 4.5rem; padding-bottom: 7.2rem; }
.about-layout {
  display: grid;
  grid-template-columns: minmax(340px, .78fr) minmax(580px, 1.22fr);
  gap: clamp(4rem, 9vw, 9rem);
  align-items: center;
}
.about-copy { max-width: 530px; padding-left: 2.5vw; }
.about-copy p:not(.section-kicker) {
  margin-bottom: 1rem;
  color: var(--ink-soft);
  font-size: .9rem;
  line-height: 1.8;
  text-shadow: 0 1px 13px rgba(255, 250, 239, .88);
}
.history-figure {
  width: min(820px, 100%);
  margin: 0 -7vw 0 auto;
  transform: rotate(-1.2deg);
}
.history-figure img {
  width: 100%;
  border-radius: 3px 34px 3px 52px;
  box-shadow: 0 20px 42px rgba(42, 64, 72, .15);
}
.history-figure figcaption {
  max-width: 520px;
  margin: .75rem 0 0 1.2rem;
  color: var(--ink-soft);
}
.history-figure figcaption strong,
.history-figure figcaption span { display: block; }
.history-figure figcaption strong { font-size: .9rem; }
.history-figure figcaption span { font-size: .72rem; line-height: 1.6; }

/* ---------- Explore ---------- */
.explore-section { padding-top: 5.5rem; padding-bottom: 7rem; }
.explore-heading { margin-left: 1.5vw; }
.explore-links {
  position: relative;
  min-height: 420px;
  margin-top: 3rem;
}
.explore-item {
  position: absolute;
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  width: min(285px, 23vw);
  color: var(--ink);
  text-decoration: none;
  transition: transform .2s ease;
}
.explore-item:hover,
.explore-item:focus-visible { transform: translateY(-3px); }
.explore-founders { left: 0; top: 0; }
.explore-activities { left: 31%; top: 92px; }
.explore-publications { left: 59%; top: 15px; }
.explore-gallery { right: 0; top: 145px; }
.feature-icon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(184, 135, 39, .6);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 250, 239, .08);
  font-size: 1rem;
  line-height: 1;
}
.item-copy { display: grid; gap: .26rem; }
.item-copy strong { font-size: 1.15rem; line-height: 1.25; }
.item-copy span { color: var(--ink-soft); font-size: .75rem; line-height: 1.62; }
.item-copy em { margin-top: .2rem; }

/* ---------- News ---------- */
.news-section { padding-top: 5.8rem; padding-bottom: 7rem; }
.news-heading { margin-left: 5.5vw; }
.news-links {
  position: relative;
  min-height: 380px;
  margin-top: 2.5rem;
}
.news-item {
  position: absolute;
  width: min(330px, 26vw);
}
.news-one { left: 4%; top: 28px; }
.news-two { left: 43%; top: 0; }
.news-three { right: 3%; top: 112px; }
.news-item .date { display: block; }
.news-item h3 { color: var(--ink); font-size: 1.1rem; }
.news-item p { margin-bottom: .8rem; color: var(--ink-soft); font-size: .78rem; line-height: 1.7; text-shadow: 0 1px 12px rgba(255, 250, 239, .9); }

/* ---------- Tiruppugazh ---------- */
.tradition-section { padding-top: 5.5rem; padding-bottom: 7rem; }
.tradition-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(430px, .86fr);
  gap: clamp(4rem, 9vw, 9rem);
  align-items: center;
}
.tradition-copy { max-width: 650px; padding-left: 2vw; }
.tradition-copy h2 { max-width: 650px; }
.tradition-copy > p:not(.section-kicker) { max-width: 600px; color: var(--ink-soft); font-size: .92rem; line-height: 1.8; }
.tradition-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.1rem; }
.tradition-figure { margin: 1rem -5vw 0 auto; transform: rotate(1.1deg); }
.tradition-figure img {
  width: min(620px, 100%);
  border-radius: 26px 90px 30px 75px;
  box-shadow: var(--shadow);
}

/* ---------- Donation ---------- */
.donation-section { padding-top: 5.2rem; padding-bottom: 6.6rem; }
.donation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, .68fr);
  gap: clamp(4rem, 9vw, 8rem);
  align-items: center;
}
.donation-copy { max-width: 650px; padding-left: 7vw; }
.donation-copy h2 { max-width: 610px; }
.donation-copy > p:not(.section-kicker):not(.donation-note) { color: var(--ink-soft); font-size: .9rem; line-height: 1.8; }
.donation-note {
  max-width: 560px;
  margin-top: 1.2rem;
  padding-left: .9rem;
  border-left: 1px solid var(--vermilion);
  color: var(--ink-faint);
  font-size: .73rem;
  line-height: 1.65;
}
.razorpay-button-wrap {
  min-height: 115px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(255, 250, 239, .08);
  transform: translateX(1vw);
}
.razorpay-button-wrap form { display: flex; justify-content: center; }

/* ---------- Resources ---------- */
.resources-section { padding-top: 5.2rem; padding-bottom: 6.8rem; }
.resources-heading { margin-left: 7vw; }
.resource-links {
  position: relative;
  min-height: 340px;
  margin-top: 2.7rem;
}
.resource-item {
  position: absolute;
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  width: min(300px, 24vw);
  text-decoration: none;
}
.resource-one { left: 3%; top: 30px; }
.resource-two { left: 30%; top: 0; }
.resource-three { left: 58%; top: 95px; }
.resource-four { right: 2%; top: 20px; }
.resource-item > span:last-child { display: grid; gap: .28rem; }
.resource-item strong { font-size: 1.05rem; line-height: 1.3; }
.resource-item small { color: var(--ink-soft); font-size: .72rem; line-height: 1.6; }
.resource-item em { margin-top: .15rem; }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  min-height: 300px;
  padding: 5.5rem 0 1.2rem;
  color: #e8f0f3;
  background: linear-gradient(180deg, rgba(19, 72, 100, .25), rgba(18, 65, 93, .82) 58%, rgba(15, 53, 78, .94));
}
.footer-thread {
  position: absolute;
  left: 0;
  top: -30px;
  width: 100%;
  height: 90px;
  pointer-events: none;
}
.footer-thread path { stroke: rgba(184, 135, 39, .82); stroke-width: 1.15; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.footer-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.5fr .8fr .8fr;
  gap: 3rem;
}
.site-footer h2,
.site-footer h3 { margin-bottom: .5rem; color: #fff; font-weight: 500; }
.site-footer h2 { font-size: 1.22rem; }
.site-footer h3 { font-size: .95rem; }
.site-footer p,
.footer-nav a { color: rgba(231, 241, 245, .78); font-size: .72rem; }
.site-footer p { margin-bottom: .2rem; }
.footer-nav { display: grid; gap: .18rem; }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover,
.footer-nav a:focus-visible { color: #fff; }
.footer-bottom {
  position: relative;
  z-index: 2;
  margin-top: 2.5rem;
  padding-top: .8rem;
  border-top: 1px solid rgba(255, 255, 255, .14);
  color: rgba(220, 233, 239, .62);
  font-size: .64rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 1050px) {
  .container { width: min(var(--content-width), calc(100% - 3rem)); }
  .header-inner { align-items: flex-start; padding-top: 1rem; }
  .hero-inner { grid-template-columns: minmax(0, .95fr) minmax(400px, 1.05fr); gap: 3rem; }
  .hero-figure { margin-right: -2vw; }
  .about-layout { grid-template-columns: .9fr 1.1fr; gap: 4rem; }
  .history-figure { margin-right: -3vw; }
  .explore-item { width: 23vw; }
  .news-item { width: 27vw; }
  .resource-item { width: 24vw; }
}

@media (max-width: 820px) {
  .site-header { position: relative; background: rgba(255, 250, 239, .12); backdrop-filter: blur(5px); }
  .header-inner { display: block; min-height: 0; padding-block: .8rem; }
  .primary-nav { justify-content: flex-start; margin-top: .55rem; }
  .primary-nav a { padding: .3rem .4rem; font-size: .7rem; }
  .primary-nav .nav-donate { margin-left: 0; }

  .hero { min-height: auto; padding: 5.5rem 0 7rem; }
  .hero-inner,
  .about-layout,
  .tradition-layout,
  .donation-layout { grid-template-columns: 1fr; }
  .hero-inner { min-height: 0; gap: 3.5rem; }
  .hero-copy,
  .about-copy,
  .tradition-copy,
  .donation-copy { padding-left: 0; }
  .hero-figure,
  .history-figure,
  .tradition-figure { width: min(720px, 100%); margin: 1rem auto 0; transform: none; }

  .section-divider { height: 48px; }
  .header-divider { height: 46px; }

  .explore-links,
  .news-links,
  .resource-links { min-height: 0; display: grid; gap: 2rem; margin-top: 2.2rem; }
  .explore-item,
  .news-item,
  .resource-item { position: static; width: min(100%, 480px); }
  .explore-item:nth-child(even),
  .news-item:nth-child(even),
  .resource-item:nth-child(even) { margin-left: auto; }
  .news-item { padding-left: 1rem; border-left: 1px solid rgba(184, 135, 39, .55); }
  .resource-item { margin-left: 0; }
  .resource-item:nth-child(even) { margin-left: auto; }
  .resources-heading,
  .news-heading,
  .explore-heading { margin-left: 0; }
  .donation-copy { max-width: 650px; }
  .razorpay-button-wrap { justify-content: flex-start; transform: none; }
  .footer-grid { grid-template-columns: 1.2fr .8fr; }
}

@media (max-width: 560px) {
  body { font-size: 15px; }
  .container { width: min(var(--content-width), calc(100% - 1.4rem)); }
  .brand-text strong { font-size: .92rem; }
  .brand-text span { font-size: .66rem; }
  .primary-nav { gap: .02rem; }
  .primary-nav a { font-size: .63rem; padding: .27rem .28rem; }
  .primary-nav .nav-donate { padding-inline: .65rem; }
  .hero { padding: 4rem 0 5.5rem; }
  .hero h1 { font-size: clamp(2.35rem, 11vw, 3rem); }
  .hero-lead { font-size: .88rem; }
  .hero-figure figcaption { position: relative; right: auto; bottom: auto; width: min(92%, 300px); margin: -1.4rem 0 0 auto; }
  .section { padding-top: 4.8rem; padding-bottom: 5.8rem; }
  .hero { padding-bottom: 5.8rem; }
  h2 { font-size: clamp(1.85rem, 9vw, 2.35rem); }
  .history-figure figcaption { margin-left: .2rem; }
  .feature-icon { flex-basis: 34px; width: 34px; height: 34px; }
  .tradition-actions { align-items: flex-start; flex-direction: column; }
  .donation-note { font-size: .7rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button,
  .explore-item,
  .primary-nav a::after { transition: none; }
  .button:hover,
  .explore-item:hover { transform: none; }
}

/* =========================================================
   V13 POLISH PASS
   Typography, editorial modules, section rhythm and the
   header-to-hero gold thread. The visual canvas remains intact.
   ========================================================= */

/* ---------- Header + first gold thread ---------- */
.site-header {
  position: relative;
  inset: auto;
}
.header-inner {
  min-height: 88px;
}
.header-divider {
  height: 42px;
  margin-top: -1px;
}
.header-divider svg {
  transform: translateY(-1px);
}
.header-divider::after {
  left: 50%;
  top: 50%;
}

/* ---------- Typography refinement ---------- */
body {
  font-size: 16px;
  line-height: 1.75;
}
.hero {
  min-height: 700px;
  padding: 4.7rem 0 6.3rem;
}
.hero-inner {
  min-height: 570px;
}
.hero-copy {
  max-width: 625px;
}
.hero h1 {
  font-size: clamp(2.75rem, 4.35vw, 3.8rem);
  line-height: 1.01;
}
.hero-tamil {
  font-size: clamp(1.3rem, 2.05vw, 1.72rem);
}
.hero-lead {
  max-width: 590px;
  font-size: 1.02rem;
  line-height: 1.82;
}

h2 {
  font-size: clamp(1.95rem, 2.7vw, 2.55rem);
  line-height: 1.14;
}
.section-heading > p:last-child {
  font-size: .94rem;
  line-height: 1.78;
}
.section-kicker,
.eyebrow,
.date {
  font-size: .64rem;
  letter-spacing: .24em;
}
.about-copy p:not(.section-kicker),
.tradition-copy > p:not(.section-kicker),
.donation-copy > p:not(.section-kicker):not(.donation-note) {
  font-size: .94rem;
  line-height: 1.82;
}

/* ---------- About ---------- */
.about-section {
  padding-top: 4.3rem;
  padding-bottom: 6.8rem;
}
.about-layout {
  gap: clamp(3.5rem, 7vw, 7rem);
}
.about-copy {
  max-width: 545px;
}
.history-figure {
  margin-right: -5vw;
}
.history-figure figcaption span {
  font-size: .76rem;
}

/* ---------- Explore: editorial modules, not cards ---------- */
.explore-section {
  padding-top: 5.2rem;
  padding-bottom: 6.7rem;
}
.explore-heading {
  max-width: 650px;
}
.explore-links {
  min-height: 390px;
  margin-top: 2.8rem;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: 1fr 1fr;
  column-gap: clamp(1.5rem, 3vw, 3.5rem);
  row-gap: 2.2rem;
}
.explore-item {
  position: relative;
  inset: auto !important;
  width: auto;
  max-width: 330px;
  align-self: start;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: .9rem;
  padding: .1rem 0 1.2rem;
  border-bottom: 1px solid rgba(184, 135, 39, .24);
}
.explore-founders {
  grid-column: 1 / span 4;
  grid-row: 1;
}
.explore-publications {
  grid-column: 5 / span 4;
  grid-row: 1;
  margin-top: 1.6rem;
}
.explore-activities {
  grid-column: 3 / span 4;
  grid-row: 2;
  margin-top: .2rem;
}
.explore-gallery {
  grid-column: 9 / span 4;
  grid-row: 2;
  margin-top: -1rem;
}
.feature-icon {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  background: rgba(255, 250, 239, .12);
}
.item-copy {
  gap: .3rem;
}
.item-copy strong {
  font-size: 1.08rem;
}
.item-copy span {
  font-size: .78rem;
  line-height: 1.68;
}
.item-copy em {
  margin-top: .25rem;
}

/* ---------- News: slightly more breathing room ---------- */
.news-section {
  padding-top: 5.3rem;
  padding-bottom: 6.8rem;
}
.news-links {
  min-height: 350px;
  margin-top: 2.8rem;
}
.news-item {
  width: min(340px, 27vw);
}
.news-one { left: 3%; top: 18px; }
.news-two { left: 42%; top: 30px; }
.news-three { right: 2%; top: 96px; }
.news-item p {
  font-size: .8rem;
  line-height: 1.72;
}

/* ---------- Tiruppugazh ---------- */
.tradition-section {
  padding-top: 5.1rem;
  padding-bottom: 6.7rem;
}
.tradition-copy > p:not(.section-kicker) {
  max-width: 610px;
}
.tradition-figure {
  margin-right: -4vw;
}

/* ---------- Donation: integrate the payment action into the composition ---------- */
.donation-section {
  padding-top: 4.9rem;
  padding-bottom: 6.4rem;
}
.donation-layout {
  grid-template-columns: minmax(0, 1fr) minmax(300px, .62fr);
  gap: clamp(3rem, 7vw, 7rem);
}
.donation-copy {
  max-width: 660px;
  padding-left: 5vw;
}
.razorpay-button-wrap {
  min-height: 150px;
  justify-content: center;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid rgba(184, 135, 39, .34);
  border-bottom: 1px solid rgba(184, 135, 39, .34);
  background: transparent;
  transform: translate(0, .2rem);
}

/* ---------- Resources: composed rather than evenly tiled ---------- */
.resources-section {
  padding-top: 5rem;
  padding-bottom: 6.6rem;
}
.resources-heading {
  margin-left: 6vw;
}
.resource-links {
  min-height: 310px;
  margin-top: 2.4rem;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: auto auto;
  column-gap: clamp(1.2rem, 2.5vw, 3rem);
  row-gap: 2.4rem;
  align-items: start;
}
.resource-item {
  position: relative;
  inset: auto !important;
  width: auto;
  max-width: 310px;
}
.resource-one {
  grid-column: 1 / span 3;
  grid-row: 1;
}
.resource-two {
  grid-column: 4 / span 3;
  grid-row: 1;
  margin-top: 1.1rem;
}
.resource-three {
  grid-column: 7 / span 3;
  grid-row: 2;
  margin-top: .2rem;
}
.resource-four {
  grid-column: 10 / span 3;
  grid-row: 1;
  margin-top: 2.1rem;
}
.resource-item strong {
  font-size: 1.03rem;
}
.resource-item small {
  font-size: .75rem;
  line-height: 1.68;
}

/* ---------- Section endings ---------- */
.section-divider {
  height: 56px;
}
.section-divider path,
.header-divider path,
.footer-thread path {
  stroke: rgba(184, 135, 39, .86);
  stroke-width: 1.15;
}

/* ---------- Footer ---------- */
.site-footer {
  min-height: 285px;
  padding-top: 5.2rem;
}

/* ---------- Responsive refinements ---------- */
@media (max-width: 1050px) {
  .hero-inner {
    grid-template-columns: minmax(0, .95fr) minmax(400px, 1.05fr);
    gap: 3rem;
  }
  .explore-links {
    column-gap: 2rem;
  }
  .explore-item {
    max-width: 300px;
  }
  .resource-links {
    column-gap: 1.5rem;
  }
}

@media (max-width: 820px) {
  .site-header {
    position: relative;
    background: rgba(255, 250, 239, .12);
    backdrop-filter: blur(5px);
  }
  .header-inner {
    min-height: 0;
  }
  .header-divider {
    height: 44px;
  }
  .hero {
    min-height: auto;
    padding: 3.8rem 0 6rem;
  }
  .hero-inner {
    min-height: 0;
  }
  .explore-links {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: none;
    min-height: 0;
    row-gap: 1.8rem;
  }
  .explore-item,
  .explore-founders,
  .explore-publications,
  .explore-activities,
  .explore-gallery {
    grid-column: 1;
    grid-row: auto;
    max-width: 480px;
    margin: 0 !important;
  }
  .explore-item:nth-child(even) {
    margin-left: auto !important;
  }
  .resource-links {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: none;
    min-height: 0;
  }
  .resource-item,
  .resource-one,
  .resource-two,
  .resource-three,
  .resource-four {
    grid-column: 1;
    grid-row: auto;
    max-width: 480px;
    margin: 0 !important;
  }
  .resource-item:nth-child(even) {
    margin-left: auto !important;
  }
  .donation-copy {
    padding-left: 0;
  }
  .razorpay-button-wrap {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .header-divider {
    height: 38px;
  }
  .hero {
    padding-top: 3.2rem;
  }
  .hero h1 {
    font-size: clamp(2.3rem, 10.5vw, 2.9rem);
  }
  .hero-lead {
    font-size: .9rem;
  }
  h2 {
    font-size: clamp(1.8rem, 8.5vw, 2.25rem);
  }
  .section-divider {
    height: 46px;
  }
}


/* =========================================================
   V14 — CALM EDITORIAL LAYOUT
   ---------------------------------------------------------
   The canvas and gold threads remain unchanged.
   Desktop sections now follow one quiet composition:
   section introduction on the left, content/modules on the right.
   Mobile becomes a single natural column.
   ========================================================= */

/* ---------- Shared section composition ---------- */
.section-split {
  display: grid;
  grid-template-columns: minmax(240px, .72fr) minmax(0, 1.48fr);
  column-gap: clamp(3rem, 7vw, 7rem);
  align-items: start;
}
.section-split > .section-heading {
  margin-left: 0;
  max-width: 430px;
  padding-top: .15rem;
}
.section-split > .section-heading h2 {
  max-width: 420px;
}
.section-split > .section-heading > p:last-child {
  max-width: 390px;
}

/* ---------- Explore ---------- */
.explore-section {
  padding-top: 5.4rem;
  padding-bottom: 6.4rem;
}
.explore-section .section-split {
  align-items: start;
}
.explore-links {
  min-height: 0;
  margin-top: .1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: auto auto;
  column-gap: clamp(2rem, 4vw, 4.5rem);
  row-gap: 2.15rem;
  align-items: start;
}
.explore-item,
.explore-founders,
.explore-publications,
.explore-activities,
.explore-gallery {
  position: relative;
  inset: auto !important;
  grid-column: auto;
  grid-row: auto;
  width: auto;
  max-width: none;
  margin: 0 !important;
  padding: .05rem 0 1.15rem;
}
.explore-item:nth-child(2),
.explore-item:nth-child(3),
.explore-item:nth-child(4) {
  margin-left: 0 !important;
}
.explore-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: .85rem;
  border-bottom: 1px solid rgba(184, 135, 39, .25);
}
.explore-item:hover,
.explore-item:focus-visible { transform: translateY(-2px); }

/* ---------- News ---------- */
.news-section {
  padding-top: 5.25rem;
  padding-bottom: 6.5rem;
}
.news-links {
  min-height: 0;
  margin-top: .1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(1.5rem, 3vw, 3rem);
  align-items: start;
}
.news-item,
.news-one,
.news-two,
.news-three {
  position: relative;
  inset: auto !important;
  width: auto;
  max-width: none;
  padding: .05rem 0 0 1.15rem;
  border-left: 1px solid rgba(184, 135, 39, .34);
}
.news-item:first-child { border-left-color: rgba(184, 135, 39, .48); }
.news-item h3 { font-size: 1.05rem; }
.news-item p { font-size: .78rem; line-height: 1.7; }

/* ---------- Resources ---------- */
.resources-section {
  padding-top: 5rem;
  padding-bottom: 6.35rem;
}
.resources-layout {
  display: grid;
}
.resources-layout > .resource-links {
  min-height: 0;
  margin-top: .1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: auto auto;
  column-gap: clamp(2rem, 4vw, 4rem);
  row-gap: 2rem;
  align-items: start;
}
.resource-item,
.resource-one,
.resource-two,
.resource-three,
.resource-four {
  position: relative;
  inset: auto !important;
  grid-column: auto;
  grid-row: auto;
  width: auto;
  max-width: none;
  margin: 0 !important;
  padding-bottom: 1.05rem;
  border-bottom: 1px solid rgba(184, 135, 39, .22);
}
.resource-item:nth-child(2) { margin-top: 0 !important; }
.resource-item:nth-child(3) { margin-top: 0 !important; }
.resource-item:nth-child(4) { margin-top: 0 !important; }

/* ---------- Donation ---------- */
.donation-section {
  padding-top: 4.9rem;
  padding-bottom: 6.3rem;
}
.donation-layout {
  grid-template-columns: minmax(240px, .9fr) minmax(360px, 1.1fr);
  column-gap: clamp(3rem, 7vw, 7rem);
}
.donation-copy { padding-left: 0; }
.razorpay-button-wrap {
  min-height: 150px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.4rem;
  align-items: center;
  justify-content: initial;
  padding: 1.1rem 0 1.1rem 1.5rem;
  border-top: 1px solid rgba(184, 135, 39, .34);
  border-bottom: 1px solid rgba(184, 135, 39, .34);
  background: transparent;
}
.donation-action-copy {
  display: grid;
  gap: .28rem;
  max-width: 270px;
}
.donation-action-label {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
}
.donation-action-text {
  color: var(--ink-soft);
  font-size: .73rem;
  line-height: 1.65;
}
.razorpay-button-wrap form { flex: 0 0 auto; }

/* ---------- About / tradition keep the same philosophy, with less forced offset ---------- */
.about-copy,
.tradition-copy { padding-left: 0; }
.about-layout {
  grid-template-columns: minmax(240px, .72fr) minmax(0, 1.28fr);
  column-gap: clamp(3rem, 7vw, 7rem);
}
.history-figure,
.tradition-figure { margin-right: -3vw; }
.tradition-layout {
  grid-template-columns: minmax(0, .92fr) minmax(400px, 1.08fr);
  column-gap: clamp(3rem, 7vw, 7rem);
}

/* ---------- Gold threads: keep them as section punctuation ---------- */
.header-divider { height: 42px; }
.section-divider { height: 56px; }
.header-divider::after,
.section-divider::after { width: 4px; height: 4px; }

/* ---------- Tablet ---------- */
@media (max-width: 900px) and (min-width: 821px) {
  .section-split,
  .about-layout,
  .tradition-layout,
  .donation-layout {
    column-gap: 3rem;
  }
  .explore-links { column-gap: 1.5rem; }
  .news-links { column-gap: 1.2rem; }
  .razorpay-button-wrap { grid-template-columns: 1fr; }
}

/* ---------- Mobile: never preserve desktop left/right geometry ---------- */
@media (max-width: 820px) {
  .section-split {
    display: block;
  }
  .section-split > .section-heading {
    max-width: 620px;
    margin: 0 0 2rem;
    padding-top: 0;
  }
  .section-split > .section-heading > p:last-child {
    max-width: 560px;
  }

  .explore-links,
  .news-links,
  .resources-layout > .resource-links {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: none;
    row-gap: 1.6rem;
    min-height: 0;
    margin-top: 0;
  }
  .explore-item,
  .explore-founders,
  .explore-publications,
  .explore-activities,
  .explore-gallery,
  .news-item,
  .news-one,
  .news-two,
  .news-three,
  .resource-item,
  .resource-one,
  .resource-two,
  .resource-three,
  .resource-four {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
    max-width: 620px;
    margin: 0 !important;
  }
  .explore-item:nth-child(even),
  .resource-item:nth-child(even) { margin-left: 0 !important; }

  .news-item,
  .news-one,
  .news-two,
  .news-three {
    padding-left: 1rem;
  }

  .about-layout,
  .tradition-layout,
  .donation-layout {
    grid-template-columns: 1fr;
  }
  .history-figure,
  .tradition-figure { margin-right: auto; }

  .razorpay-button-wrap {
    grid-template-columns: 1fr;
    gap: 1rem;
    min-height: 0;
    padding: 1.2rem 0;
  }
  .donation-action-copy { max-width: 480px; }
}

@media (max-width: 560px) {
  .section-split > .section-heading { margin-bottom: 1.8rem; }
  .explore-item,
  .resource-item { padding-bottom: 1rem; }
  .feature-icon { width: 34px; height: 34px; flex-basis: 34px; }
  .explore-item { grid-template-columns: 34px minmax(0, 1fr); }
}


/* =========================================================
   V18 — Dark Sangam Blue Gradient
   ---------------------------------------------------------
   The page keeps the V17 structure and gold thread dividers.
   The background is now a CSS-only atmospheric gradient built
   from the same deep blue used by the original primary button.
   Content surfaces, text, controls and image captions are
   reoriented for comfortable contrast on the darker canvas.
   ========================================================= */

:root {
  --brand-blue: #16496d;
  --brand-deep: #0a2941;
  --brand-mid: #1b587d;
  --ink: #f2f6f7;
  --ink-soft: #c5d6df;
  --ink-faint: #9fb7c4;
  --vermilion: #d47a63;
  --gold: #c9a04b;
  --gold-soft: rgba(201, 160, 75, .78);
  --ivory: #f4efe4;
  --surface: rgba(238, 246, 249, .075);
  --surface-strong: rgba(238, 246, 249, .12);
  --border-soft: rgba(238, 246, 249, .18);
  --shadow: 0 18px 42px rgba(0, 10, 20, .28);
}

html { background: var(--brand-deep); }
body {
  color: var(--ink);
  background-color: var(--brand-deep);
  background-image:
    radial-gradient(ellipse at 12% 8%, rgba(73, 128, 157, .42) 0%, rgba(73, 128, 157, 0) 34%),
    radial-gradient(ellipse at 90% 20%, rgba(42, 103, 132, .34) 0%, rgba(42, 103, 132, 0) 38%),
    radial-gradient(ellipse at 18% 58%, rgba(32, 91, 119, .30) 0%, rgba(32, 91, 119, 0) 34%),
    radial-gradient(ellipse at 84% 76%, rgba(57, 116, 139, .26) 0%, rgba(57, 116, 139, 0) 36%),
    linear-gradient(180deg, #0b304b 0%, #123f5c 28%, #0d3652 58%, #092b45 100%);
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
}

.site-header {
  background: rgba(7, 29, 45, .16);
  backdrop-filter: blur(3px);
}
.brand-mark {
  color: var(--ivory);
  border-color: rgba(201, 160, 75, .62);
  background: rgba(238, 246, 249, .06);
}
.brand-text strong { color: var(--ivory); }
.brand-text span { color: var(--ink-soft); }
.primary-nav a {
  color: var(--ivory);
  text-shadow: 0 1px 12px rgba(0, 10, 20, .55);
}
.primary-nav .nav-donate {
  color: #fff;
  background: var(--vermilion);
  box-shadow: 0 8px 22px rgba(0, 10, 20, .24);
}

.section-kicker,
.eyebrow,
.date { color: #e1b75e; }
.section-heading::after {
  background: linear-gradient(90deg, var(--gold), rgba(201,160,75,.12));
}
h1, h2, h3 { color: var(--ivory); }
.text-link,
.explore-item em,
.resource-item em { color: var(--ivory); }
.text-link:hover,
.text-link:focus-visible,
.explore-item:hover em,
.resource-item:hover em { color: #e5bb63; }

.button {
  border-color: rgba(201, 160, 75, .55);
  box-shadow: 0 8px 22px rgba(0, 10, 20, .18);
}
.button-primary {
  color: #fff;
  background: var(--brand-blue);
  border-color: var(--brand-blue);
}
.button-secondary {
  color: var(--ivory);
  background: rgba(238, 246, 249, .065);
  border-color: rgba(201, 160, 75, .46);
}
.button-secondary:hover,
.button-secondary:focus-visible {
  color: #fff;
  background: rgba(238, 246, 249, .13);
  border-color: rgba(201, 160, 75, .78);
}

/* ---------- Hero poem ---------- */
.hero h1 { color: var(--ivory); }
.hero-tamil { color: #e2b85e; }
.hero-verse {
  max-width: 590px;
  margin: 1.05rem 0 1.2rem;
  padding-left: 1.05rem;
  border-left: 1px solid rgba(201, 160, 75, .58);
  color: var(--ivory);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.03rem, 1.55vw, 1.22rem);
  line-height: 1.62;
}
.hero-verse p { margin: 0; }
.hero-verse cite {
  display: block;
  margin-top: .55rem;
  color: #d9c18a;
  font-size: .8rem;
  font-style: normal;
}
.hero-lead {
  color: var(--ink-soft);
  text-shadow: none;
}
.hero-figure figcaption {
  color: var(--ivory);
  background: rgba(8, 35, 52, .66);
  border: 1px solid rgba(238, 246, 249, .12);
  box-shadow: 0 14px 30px rgba(0, 8, 16, .26);
  backdrop-filter: blur(7px);
}
.hero-figure figcaption strong { color: var(--ivory); }
.hero-figure figcaption span { color: var(--ink-soft); }

/* ---------- Gold threads: retained from V17 ---------- */
.header-divider path,
.section-divider path,
.footer-thread path {
  stroke: rgba(201, 160, 75, .9);
}
.header-divider::after,
.section-divider::after { background: #c9a04b; }

/* ---------- About ---------- */
.about-copy p:not(.section-kicker),
.tradition-copy > p:not(.section-kicker),
.donation-copy > p:not(.section-kicker):not(.donation-note) {
  color: var(--ink-soft);
  text-shadow: none;
}
.history-figure figcaption { color: var(--ink-soft); }
.history-figure figcaption strong { color: var(--ivory); }

/* ---------- Explore / News / Resources ---------- */
.explore-item,
.resource-item { color: var(--ink); }
.feature-icon {
  color: #e0bb6a;
  background: var(--surface);
  border-color: rgba(201, 160, 75, .62);
}
.item-copy span,
.resource-item small,
.news-item p { color: var(--ink-soft); }
.news-item h3,
.resource-item strong,
.item-copy strong { color: var(--ivory); }
.news-item p { text-shadow: none; }

/* ---------- Donation ---------- */
.donation-note {
  border-left-color: var(--gold);
  color: var(--ink-faint);
}
.razorpay-button-wrap {
  background: var(--surface);
  border: 1px solid rgba(238, 246, 249, .10);
  box-shadow: 0 16px 36px rgba(0, 8, 16, .16);
}

/* ---------- Footer ---------- */
.site-footer {
  color: #e8f0f3;
  background: linear-gradient(180deg, rgba(4, 22, 35, .58), rgba(3, 17, 28, .94));
}

/* ---------- Accessibility / selection ---------- */
::selection {
  color: #fff;
  background: rgba(201, 160, 75, .58);
}

@media (max-width: 820px) {
  .site-header {
    background: rgba(7, 29, 45, .68);
  }
  .hero-verse {
    font-size: 1rem;
    line-height: 1.58;
  }
}
