:root {
  --bg: #fffaf1;
  --surface: #ffffff;
  --surface-warm: #fff2da;
  --ink: #271b16;
  --muted: #695a50;
  --maroon: #7d2026;
  --maroon-dark: #54171b;
  --gold: #d99a25;
  --teal: #28756f;
  --teal-soft: #e4f1ee;
  --line: #eadcc7;
  --shadow: 0 18px 44px rgba(67, 38, 22, 0.13);
  --radius: 8px;
  font-family:
    Inter, "Noto Sans Tamil", "Nirmala UI", "Latha", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(255, 246, 227, 0.95) 0%, rgba(255, 250, 241, 1) 42%),
    var(--bg);
  color: var(--ink);
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 24px;
  min-height: 76px;
  padding: 12px clamp(16px, 4vw, 56px);
  border-bottom: 1px solid rgba(125, 32, 38, 0.12);
  background: rgba(255, 250, 241, 0.92);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.brand img {
  width: 52px;
  height: 52px;
  border: 2px solid rgba(217, 154, 37, 0.5);
  border-radius: 50%;
  object-fit: cover;
}

.brand span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.brand strong {
  overflow: hidden;
  color: var(--maroon-dark);
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.primary-nav a {
  min-height: 38px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
  background: var(--surface-warm);
  color: var(--maroon);
}

.header-actions {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid rgba(125, 32, 38, 0.18);
  border-radius: var(--radius);
  background: var(--surface);
}

.lang-button {
  min-width: 52px;
  min-height: 38px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.lang-button.is-active {
  background: var(--maroon);
  color: #fffaf1;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  min-height: calc(100vh - 76px);
  padding: clamp(34px, 6vw, 76px) clamp(16px, 5vw, 72px) 44px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  color: var(--maroon-dark);
  font-size: clamp(2.35rem, 6vw, 5.9rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h1 span {
  display: block;
}

.tamil-title {
  margin-top: 14px;
  color: var(--teal);
  font-size: clamp(1.35rem, 3.4vw, 3.2rem);
  line-height: 1.12;
}

.hero-text {
  max-width: 640px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1.04rem, 1.7vw, 1.28rem);
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 13px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
}

.button-primary {
  background: var(--maroon);
  color: #fffaf1;
  box-shadow: 0 10px 24px rgba(125, 32, 38, 0.2);
}

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

.button-secondary {
  border-color: rgba(125, 32, 38, 0.2);
  background: rgba(255, 255, 255, 0.72);
  color: var(--maroon);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: #fff;
}

.hero-media {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(217, 154, 37, 0.28);
  border-radius: var(--radius);
  background: #130d0b;
  box-shadow: var(--shadow);
}

.hero-media img {
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: min(76vh, 760px);
  object-fit: cover;
  object-position: center center;
}

.hero-media figcaption {
  position: absolute;
  right: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  padding: 8px 10px;
  border-radius: var(--radius);
  background: rgba(39, 27, 22, 0.82);
  color: #fffaf1;
  font-size: 0.85rem;
  font-weight: 800;
}

.trust-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  max-width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.trust-bar div {
  display: grid;
  gap: 6px;
  min-height: 108px;
  padding: 22px;
  background: var(--surface);
}

.trust-bar strong {
  color: var(--maroon-dark);
  font-size: clamp(1rem, 2vw, 1.35rem);
}

.trust-bar span {
  color: var(--muted);
  line-height: 1.45;
}

.section {
  padding: clamp(58px, 8vw, 104px) clamp(16px, 5vw, 72px);
}

.section-split {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(300px, 1.2fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.section-copy,
.section-heading {
  max-width: 740px;
}

.section-heading {
  margin: 0 auto 32px;
  text-align: center;
}

h2 {
  margin: 0;
  color: var(--maroon-dark);
  font-size: clamp(1.75rem, 3.6vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  color: var(--maroon-dark);
  font-size: 1.12rem;
  line-height: 1.2;
}

.section-copy p:not(.eyebrow),
.section-heading p:not(.eyebrow),
.donate-copy p:not(.eyebrow),
.contact-section p {
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.75;
}

.info-grid,
.seva-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.info-card,
.seva-card,
.contact-card,
.donor-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(67, 38, 22, 0.06);
}

.info-card {
  display: grid;
  gap: 14px;
  min-height: 230px;
  padding: 22px;
}

.info-card p,
.seva-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.card-mark {
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 900;
}

.devotional-band {
  padding-block: 52px;
  background: var(--maroon-dark);
  color: #fffaf1;
}

.devotional-band blockquote {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

.devotional-band p {
  margin: 0;
  font-size: clamp(1.6rem, 3.8vw, 3.8rem);
  font-weight: 900;
  line-height: 1.12;
}

.devotional-band cite {
  display: block;
  margin-top: 16px;
  color: #f1c56a;
  font-style: normal;
  font-weight: 800;
}

.story-section {
  background: #fffdf8;
}

.story-timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
}

.story-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(67, 38, 22, 0.06);
}

.story-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.story-card > div {
  display: grid;
  gap: 10px;
  padding: 20px;
}

.story-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.story-year {
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.story-card-alert .story-year,
.story-card-alert h3 {
  color: var(--maroon);
}

.story-card-rebuild .story-year,
.story-card-rebuild h3 {
  color: var(--teal);
}

.story-photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.story-photo-grid figure {
  position: relative;
  display: grid;
  place-items: end start;
  overflow: hidden;
  min-height: 220px;
  margin: 0;
  border-radius: var(--radius);
  background: var(--maroon-dark);
}

.story-photo-grid img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-photo-grid figcaption {
  position: relative;
  z-index: 1;
  margin: 10px;
  padding: 7px 9px;
  border-radius: var(--radius);
  background: rgba(39, 27, 22, 0.82);
  color: #fffaf1;
  font-size: 0.85rem;
  font-weight: 900;
}

.seva-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.seva-card {
  display: grid;
  gap: 14px;
  min-height: 220px;
  padding: 22px;
}

.seva-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal);
  font-weight: 900;
}

.donate-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.76fr) minmax(300px, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
  background: linear-gradient(180deg, rgba(255, 242, 218, 0.7), rgba(255, 250, 241, 1));
}

.donate-notes {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.donate-notes li {
  position: relative;
  padding-left: 24px;
  color: var(--muted);
  line-height: 1.55;
}

.donate-notes li::before {
  position: absolute;
  top: 0.12em;
  left: 0;
  color: var(--teal);
  content: "✓";
  font-weight: 900;
}

.donor-form {
  display: grid;
  gap: 18px;
  padding: clamp(20px, 4vw, 34px);
}

.hidden-field {
  display: none;
}

.form-row {
  display: grid;
  gap: 8px;
}

.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.two-column > div {
  display: grid;
  gap: 8px;
}

label,
.consent-row {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.35;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #d9c9b4;
  border-radius: var(--radius);
  background: #fffdf8;
  color: var(--ink);
  outline: none;
  padding: 11px 12px;
}

textarea {
  min-height: 116px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(40, 117, 111, 0.13);
}

.consent-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.consent-row input {
  width: 18px;
  min-height: 18px;
  margin: 2px 0 0;
}

.form-submit {
  width: 100%;
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--teal);
  font-weight: 800;
  line-height: 1.45;
}

.gallery-section {
  padding-top: 72px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 16px;
}

.gallery-grid figure {
  position: relative;
  display: grid;
  place-items: end start;
  overflow: hidden;
  min-height: 260px;
  margin: 0;
  border-radius: var(--radius);
  background: var(--maroon-dark);
  color: #fffaf1;
}

.gallery-grid img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-grid figcaption,
.gallery-placeholder span {
  position: relative;
  z-index: 1;
  margin: 14px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: rgba(39, 27, 22, 0.82);
  color: #fffaf1;
  font-weight: 900;
}

.gallery-placeholder {
  background:
    linear-gradient(135deg, rgba(84, 23, 27, 0.92), rgba(40, 117, 111, 0.86)),
    var(--maroon-dark);
}

.post-submit-page[hidden] {
  display: none;
}

.post-submit-page {
  min-height: calc(100vh - 76px);
  padding: clamp(40px, 7vw, 84px) clamp(16px, 5vw, 72px);
  background:
    linear-gradient(180deg, rgba(255, 242, 218, 0.82), rgba(255, 250, 241, 1)),
    var(--bg);
}

.notice-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(300px, 1.14fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
}

.notice-copy {
  display: grid;
  gap: 18px;
}

.notice-copy h2 {
  max-width: 760px;
}

.notice-copy p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 1.78;
}

.notice-copy .button {
  justify-self: start;
  margin-top: 8px;
}

.notice-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.72fr);
  gap: 14px;
  align-items: stretch;
}

.notice-gallery img {
  width: 100%;
  min-height: 420px;
  border: 1px solid rgba(217, 154, 37, 0.28);
  border-radius: var(--radius);
  object-fit: cover;
  box-shadow: var(--shadow);
}

.notice-gallery img:last-child {
  min-height: 520px;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.75fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
  background: #fffdf8;
}

.contact-card {
  padding: 24px;
}

.contact-card dl {
  display: grid;
  gap: 20px;
  margin: 0;
}

.contact-card div {
  display: grid;
  gap: 5px;
}

.contact-card dt {
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.contact-card dd {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.45;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px clamp(16px, 5vw, 72px);
  background: var(--maroon-dark);
  color: #fffaf1;
}

.site-footer p {
  margin: 0;
  line-height: 1.45;
}

.site-footer a {
  color: #f1c56a;
  font-weight: 900;
}

@media (max-width: 980px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .primary-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: center;
    overflow-x: auto;
  }

  .header-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .hero,
  .section-split,
  .donate-section,
  .contact-section,
  .notice-shell {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .info-grid,
  .seva-grid,
  .story-timeline,
  .story-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-grid {
    grid-template-columns: 1fr 1fr;
  }

  .notice-gallery {
    grid-template-columns: 1fr 1fr;
  }

  .notice-gallery img,
  .notice-gallery img:last-child {
    min-height: 320px;
  }
}

@media (max-width: 680px) {
  .site-header {
    gap: 12px;
    min-height: 70px;
  }

  .brand img {
    width: 44px;
    height: 44px;
  }

  .brand strong {
    white-space: normal;
  }

  .brand small {
    display: none;
  }

  .header-actions {
    grid-template-columns: 1fr 1fr;
  }

  .lang-button {
    min-width: 46px;
    min-height: 34px;
    font-size: 0.8rem;
  }

  .primary-nav {
    justify-content: start;
    padding-bottom: 2px;
  }

  .primary-nav a {
    min-width: max-content;
  }

  .hero {
    padding-top: 32px;
  }

  h1 {
    font-size: clamp(2.2rem, 13vw, 4.2rem);
  }

  .hero-actions,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .trust-bar,
  .info-grid,
  .seva-grid,
  .story-timeline,
  .story-photo-grid,
  .two-column,
  .gallery-grid,
  .notice-gallery {
    grid-template-columns: 1fr;
  }

  .trust-bar div {
    min-height: 92px;
  }

  .gallery-grid figure {
    min-height: 220px;
  }

  .story-photo-grid figure {
    min-height: 210px;
  }

  .notice-copy .button {
    justify-self: stretch;
  }

  .notice-gallery img,
  .notice-gallery img:last-child {
    min-height: 260px;
  }
}
