/* Sanyukt Jain Mahila Mandal: warm editorial design.
   Paper tones, serif headings, arch-shaped photo frames (a nod to temple arches), hairline rules.
   The five Jain flag colours appear only as small accents (logo, footer line).
   One screen per section: every .section fills the viewport under the pinned header. */

:root {
  --paper: #fbf7f0;
  --paper-2: #f3ece0;
  --ink: #2b211c;
  --body: #4d4039;
  --muted: #6f625a;
  --rule: #ddd2c2;
  --accent: #8c2f26;
  --accent-deep: #72241d;
  --gold: #c98a2b;
  --sage: #4f7a5a;
  --oxblood: #5e2620;

  --flag: linear-gradient(90deg, #c0392b 0 20%, #e3b341 20% 40%, #e9e4d8 40% 60%, #4f8a5b 60% 80%, #3a3430 80% 100%);

  --serif: Fraunces, "Noto Serif Devanagari", Georgia, "Times New Roman", serif;
  --sans: Figtree, "Noto Sans Devanagari", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --header-h: 68px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  font: 400 17px/1.65 var(--sans);
  color: var(--ink);
  background: var(--paper);
}

html[lang="hi"] body {
  font-size: 18px;
  line-height: 1.75;
}

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

h1,
h2,
h3,
h4,
p,
figure {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 768px) {
  .container {
    padding: 0 48px;
  }
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Type ---------- */
.eyebrow {
  font: 500 13px/1.4 var(--sans);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-title,
.page-title,
.h3,
.h4,
.brand-1,
.date-day,
.step-num,
.row-num {
  font-family: var(--serif);
  font-weight: 500;
  color: inherit;
}

.hero-title {
  font-size: 44px;
  line-height: 1.08;
  letter-spacing: -0.5px;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 60px;
  }
}

@media (min-width: 1100px) {
  .hero-title {
    font-size: 72px;
  }
}

.page-title {
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.3px;
}

@media (min-width: 768px) {
  .page-title {
    font-size: 44px;
  }
}

.h3 {
  font-size: 24px;
  line-height: 1.25;
}

.h4 {
  font-size: 20px;
  line-height: 1.3;
}

.lead {
  font-size: 18px;
  line-height: 1.65;
  color: var(--body);
  max-width: 46ch;
  margin-top: 18px;
}

.muted {
  color: var(--muted);
}

.placeholder-note {
  color: var(--muted);
  font-style: italic;
}

html[lang="hi"] :is(.eyebrow, .hero-title, .page-title, .brand-2, .date-mon, .label, .role, .footer-grid h2) {
  letter-spacing: 0;
  text-transform: none;
}

html[lang="hi"] :is(.hero-title, .page-title) {
  line-height: 1.3;
}

html[lang="hi"] .h3 {
  line-height: 1.4;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 26px;
  border: 1px solid transparent;
  font: 500 16px/1.3 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-deep);
}

.btn-secondary,
.btn-on-cream {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}

.btn-secondary:hover,
.btn-on-cream:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.badge {
  display: inline-block;
  padding: 2px 0;
  font: 500 12px/1.6 var(--sans);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

html[lang="hi"] .badge {
  letter-spacing: 0;
  text-transform: none;
  font-size: 14px;
}

.badge-cream {
  color: var(--sage);
}

.badge-dark {
  color: var(--accent);
}

/* ---------- Header ---------- */
#site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--header-h);
}

.site-header {
  background: rgba(251, 247, 240, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: calc(var(--header-h) - 1px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark {
  width: 26px;
  height: 33px;
}

.brand-logo {
  height: 44px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-1 {
  font-size: 20px;
}

.brand-2 {
  font: 500 11px/1.4 var(--sans);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  margin-left: auto;
}

.nav ul {
  display: flex;
  gap: 8px;
}

.nav a {
  display: block;
  padding: 10px 12px;
  color: var(--ink);
  text-decoration: none;
  font: 500 15px/1.3 var(--sans);
}

.nav a:not(.btn):hover {
  color: var(--accent);
}

.nav-join {
  display: none;
}

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

.lang {
  display: inline-flex;
  border: 1px solid var(--rule);
}

.lang button {
  min-width: 44px;
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  font: 500 14px/1 var(--sans);
  color: var(--muted);
  cursor: pointer;
}

.lang button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--rule);
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
}

.header-cta {
  min-height: 40px;
  padding: 6px 20px;
}

@media (max-width: 1099px) {
  .header-actions {
    margin-left: auto;
  }

  .header-cta {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 8px 24px 24px;
  }

  .nav.is-open {
    display: block;
  }

  .nav ul {
    flex-direction: column;
    gap: 0;
  }

  .nav li:not(.nav-join) a {
    padding: 14px 4px;
    border-bottom: 1px solid var(--rule);
    font-size: 17px;
  }

  .nav-join {
    display: block;
    margin-top: 18px;
  }

  .nav-join .btn {
    width: 100%;
  }
}

.nav a.btn {
  color: #fff;
  text-align: center;
  padding: 10px 26px;
}

/* ---------- Sections: one screen each ---------- */
.section {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
  padding: 72px 0;
  background: var(--paper);
}

@media (min-width: 768px) {
  .section {
    padding: 96px 0;
  }
}

.section-tint {
  background: var(--paper-2);
}

.section>.container {
  position: relative;
}

/* editorial two-column: title left, content right */
.section:not(.hero)>.container {
  display: grid;
  gap: 36px;
}

@media (min-width: 960px) {
  .section:not(.hero)>.container {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: 72px;
    align-items: start;
  }

  .section-intro {
    position: sticky;
    top: calc(var(--header-h) + 32px);
  }
}

.section-intro::before {
  content: "";
  display: block;
  width: 40px;
  height: 2px;
  margin-bottom: 24px;
  background: var(--accent);
}

/* ---------- Arch photo frame ---------- */
.arch {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 999px 999px 6px 6px;
  overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #efd9b6 0%, #e4bf93 38%, #c98f6b 72%, #a8604a 100%);
}

.arch::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px 999px 2px 2px;
  pointer-events: none;
}

.arch.has-photo::before {
  display: none;
}

.arch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Hero ---------- */
.hero {
  padding-top: 40px;
  padding-bottom: 40px;
}

.hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 1.25fr 0.75fr;
    gap: 72px;
  }
}

.hero .arch {
  max-height: 58vh;
  justify-self: center;
  width: auto;
  height: min(58vh, 560px);
}

@media (max-width: 959px) {
  .hero .arch {
    height: 260px;
    aspect-ratio: 4/3;
    border-radius: 999px 999px 6px 6px;
    width: 70%;
  }
}

.hero .eyebrow {
  margin-bottom: 20px;
}

.hero-title {
  max-width: 14ch;
}

html[lang="hi"] .hero-title {
  max-width: 16ch;
}

.hero-sub {
  font-size: 19px;
  line-height: 1.65;
  color: var(--body);
  max-width: 46ch;
  margin: 22px 0 32px;
}

.hero-next {
  margin-top: 44px;
  max-width: 560px;
}

.next-card {
  display: grid;
  gap: 14px;
  padding: 4px 0 4px 20px;
  border-left: 2px solid var(--gold);
}

@media (min-width: 640px) {
  .next-card {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 22px;
  }
}

.next-card .btn {
  min-height: 42px;
  padding: 6px 20px;
}

/* ---------- Blocks, rows, steps ---------- */
.about-grid {
  display: grid;
  gap: 36px;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 0.8fr 1.2fr;
    gap: 56px;
    align-items: center;
  }
}

.about-grid .arch {
  max-width: 340px;
}

.founder-fig {
  margin: 0;
  max-width: 340px;
}

#founder-cap {
  display: flex;
  flex-direction: column;
  margin-top: 14px;
}

.cap-name {
  font: 500 20px/1.3 var(--serif);
}

.cap-role {
  font: 500 12px/1.6 var(--sans);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
}

html[lang="hi"] .cap-role {
  letter-spacing: 0;
  text-transform: none;
  font-size: 14px;
}

#founder p {
  color: var(--body);
  font-style: italic;
}

.album-desc {
  color: var(--body);
  max-width: 60ch;
  margin: -6px 0 18px;
}

.block {
  padding: 22px 0;
  border-top: 1px solid var(--rule);
}

.block:first-child {
  border-top: 0;
  padding-top: 0;
}

.block .h3 {
  margin-bottom: 8px;
}

.block p {
  color: var(--body);
}

.rows {
  border-top: 1px solid var(--rule);
}

.row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 4px 20px;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 768px) {
  .row {
    grid-template-columns: 72px 0.9fr 1.1fr;
    align-items: baseline;
  }
}

.row-num {
  font-size: 22px;
  color: var(--gold);
}

.row p {
  color: var(--body);
  grid-column: 2;
}

@media (min-width: 768px) {
  .row p {
    grid-column: 3;
  }
}

/* ---------- Dates and events ---------- */
.date-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex-shrink: 0;
  min-width: 64px;
}

.date-day {
  font-size: 44px;
  line-height: 1;
  color: var(--accent);
}

.date-mon {
  margin-top: 6px;
  font: 500 12px/1.2 var(--sans);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  margin: 10px 0;
  color: var(--body);
  font-size: 15.5px;
}

.meta li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta .icon {
  color: var(--muted);
  flex-shrink: 0;
}

.segmented {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--rule);
  margin: 0 0 8px;
}

.segmented button {
  padding: 8px 0 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: transparent;
  font: 500 16px/1.3 var(--sans);
  color: var(--muted);
  cursor: pointer;
}

.segmented button[aria-pressed="true"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.event-list {
  display: block;
}

.event-card {
  display: grid;
  gap: 14px;
  padding: 32px 0;
  border-bottom: 1px solid var(--rule);
}

@media (min-width: 640px) {
  .event-card {
    grid-template-columns: 96px 1fr;
    gap: 28px;
  }
}

.event-card .h3 {
  margin: 2px 0 4px;
}

.event-card p {
  color: var(--body);
  margin-top: 6px;
}

.event-card .btn-row {
  margin-top: 18px;
}

.event-card .btn {
  min-height: 42px;
  padding: 6px 20px;
  font-size: 15px;
}

.empty {
  padding: 32px 0;
  color: var(--muted);
}

/* ---------- Team ---------- */
.team-grid {
  display: grid;
  gap: 28px 20px;
  grid-template-columns: repeat(2, 1fr);
  /* 2 columns on mobile (3 rows) */
}

@media (min-width: 768px) {
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
    /* 3 columns on tablet/desktop (2 rows of 3) */
    gap: 36px 28px;
  }
}

.team-card {
  text-align: left;
}

.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 4 / 5;
  margin-bottom: 16px;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, #ecd9bb, #dcc39e);
  color: rgba(43, 33, 28, 0.45);
  overflow: hidden;
}

/* Color rotation for your 6 cards */
.team-card:nth-child(4n+2) .avatar {
  background: linear-gradient(180deg, #e9cfc4, #d6aea0);
}

.team-card:nth-child(4n+3) .avatar {
  background: linear-gradient(180deg, #d9e0cf, #b9c8b1);
}

.team-card:nth-child(4n) .avatar {
  background: linear-gradient(180deg, #ece3d6, #d2c6b4);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card .role {
  color: var(--muted);
  font-size: 15px;
  margin-top: 2px;
}

/* ---------- Team ---------- */
.team-grid {
  display: grid;
  gap: 20px 16px;
  grid-template-columns: repeat(2, 1fr);
  max-width: 680px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px 20px;
  }
}

.team-card {
  text-align: left;
}

.team-card:nth-child(n+7) {
  display: none;
}

.avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin-bottom: 10px;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, #ecd9bb, #dcc39e);
  color: rgba(43, 33, 28, 0.45);
  overflow: hidden;
}

.team-card:nth-child(4n+2) .avatar {
  background: linear-gradient(180deg, #e9cfc4, #d6aea0);
}

.team-card:nth-child(4n+3) .avatar {
  background: linear-gradient(180deg, #d9e0cf, #b9c8b1);
}

.team-card:nth-child(4n) .avatar {
  background: linear-gradient(180deg, #ece3d6, #d2c6b4);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card .h4 {
  font-size: 16px;
}

.team-card .role {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

/* ---------- Gallery ---------- */
.tile-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 150px;
}

@media (min-width: 768px) {
  .tile-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 190px;
  }
}

.tile {
  display: block;
  overflow: hidden;
  border-radius: 4px;
  background: var(--paper);
}

.tile:nth-child(1) {
  grid-row: span 2;
  border-radius: 999px 999px 4px 4px;
}

.tile:nth-child(4) {
  grid-column: span 2;
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tile--0 {
  background: #ecd9bb;
}

.tile--1 {
  background: #e9cfc4;
}

.tile--2 {
  background: #d9e0cf;
}

.tile--3 {
  background: #e3d3b8;
}

.tile--4 {
  background: #d8cdbd;
}

/* Gallery page: one continuous masonry, uncropped, large enough to view without zooming */
.masonry {
  column-count: 1;
  column-gap: 16px;
}

@media (min-width: 560px) {
  .masonry {
    column-count: 2;
  }
}

@media (min-width: 1100px) {
  .masonry {
    column-count: 3;
  }
}

.masonry-item {
  display: block;
  margin: 0 0 16px;
  break-inside: avoid;
  overflow: hidden;
  border-radius: 6px;
  background: var(--paper);
}

.masonry-item img {
  display: block;
  width: 100%;
  height: auto;
}

/* Gallery page only: title on top, photos full-width underneath and bigger */
body[data-page="gallery"] .section>.container {
  max-width: 1480px;
  grid-template-columns: minmax(0, 1fr);
  gap: 36px;
}

body[data-page="gallery"] .section-intro {
  position: static;
}

body[data-page="gallery"] .section-intro .lead {
  max-width: 60ch;
}

@media (min-width: 960px) {
  body[data-page="gallery"] .masonry {
    column-count: 2;
    column-gap: 24px;
  }

  body[data-page="gallery"] .masonry-item {
    margin-bottom: 24px;
  }
}

.album+.album {
  margin-top: 72px;
}

.album-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 18px;
}

.album-note {
  color: var(--muted);
  margin-top: 14px;
  font-size: 15px;
}

/* ---------- Join (deep tone) ---------- */
.section-dark {
  background: var(--oxblood);
  color: #f6ede0;
}

.section-dark .page-title {
  color: #fbf3e6;
}

.section-dark .lead {
  color: #e8d6c4;
}

.section-dark .section-intro::before {
  background: var(--gold);
}

.section-dark .placeholder-note {
  color: #d9c3ae;
}

.steps {
  display: grid;
  gap: 0;
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
}

.step {
  padding: 24px 0;
  border-top: 1px solid rgba(246, 237, 224, 0.28);
}

.step-num {
  font-size: 40px;
  line-height: 1;
  color: var(--gold);
  margin-bottom: 14px;
}

.step .h3 {
  margin-bottom: 8px;
  color: #fbf3e6;
}

.step p:not(.step-num) {
  color: #e8d6c4;
}

.details {
  margin-top: 28px;
  padding: 24px 28px;
  border: 1px solid rgba(246, 237, 224, 0.28);
}

.details .h3 {
  margin-bottom: 6px;
  color: #fbf3e6;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  gap: 40px;
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 1.1fr 1fr;
    gap: 64px;
  }
}

.contact-item {
  display: flex;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
}

.contact-item:first-child {
  border-top: 1px solid var(--rule);
}

.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 1px solid var(--rule);
  color: var(--accent);
  border-radius: 50%;
}

.contact-item .label {
  font: 500 12px/1.4 var(--sans);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-item a {
  color: var(--ink);
  text-underline-offset: 3px;
}

.chat-box .h3 {
  margin-bottom: 8px;
}

.chat-box p {
  color: var(--body);
}

.social-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 12px;
}

.chat-box .h4 {
  font-size: 18px;
}

/* ---------- Footer ---------- */
.flag-stripe {
  height: 3px;
  background: var(--flag);
}

.site-footer {
  background: #2b211c;
  color: #f1e7d8;
  padding: 64px 0 32px;
  font-size: 16px;
}

.site-footer a {
  color: #f1e7d8;
  text-underline-offset: 3px;
}

.site-footer .brand-1 {
  color: #fbf3e6;
}

.footer-grid {
  display: grid;
  gap: 32px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.6fr 1fr 1.4fr 1fr;
  }
}

.footer-grid h2 {
  font: 500 12px/1.4 var(--sans);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #c9b8a3;
  margin-bottom: 12px;
}

.footer-grid li {
  padding: 4px 0;
}

.footer-grid p {
  color: #d9c9b6;
  max-width: 320px;
  margin-top: 12px;
}

.footer-bottom {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(241, 231, 216, 0.2);
  color: #c9b8a3;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}