:root {
    color-scheme: light;
    --maroon: #752d20;
    --deep-maroon: #4f1d17;
    --gold: #b17a25;
    --gold-text: #8a5a14;
    --ink: #453126;
    --muted: #766456;
    --cream: #fffaf0;
    --parchment: #f8ecd1;
    --sand: #f4ead7;
    --line: rgba(144, 91, 33, 0.2);
    /* Invitation page, top to bottom: hero (dark picture) > shloka (gold band) > invitation
       (cream) > programme (sand) > story links (cream) > vakta (parchment) > closing (deep maroon). */
    --serif: "Noto Serif Devanagari", "Nirmala UI", "Mangal", serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 84px;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--cream);
    font-family: var(--serif);
    line-height: 1.8;
}

a {
    color: inherit;
}

/* Bootstrap's reboot (assets/vendor/bootstrap, loaded before this file) changes browser defaults
   this design was built on: headings set to weight 500 and line-height 1.2, and paragraph, list
   and figure margins. Put them back so Bootstrap's utilities can be used without moving anything. */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: inherit;
}

h1 {
    margin: 0.67em 0;
    font-size: 2em;
}

h2 {
    margin: 0.83em 0;
    font-size: 1.5em;
}

h3 {
    margin: 1em 0;
    font-size: 1.17em;
}

p,
ol,
ul {
    margin: 1em 0;
}

ol,
ul {
    padding-left: 40px;
}

figure {
    margin: 1em 40px;
}

img,
svg {
    vertical-align: baseline;
}

.hero {
    display: grid;
    min-height: min(820px, 100svh);
    padding: 138px 24px 72px;
    place-items: center;
    background:
        linear-gradient(180deg, rgba(47, 22, 14, 0.48), rgba(54, 28, 14, 0.24) 48%, rgba(39, 20, 12, 0.68)),
        url("../images/background.png") center top / cover no-repeat;
    color: #fffaf0;
    text-align: center;
}

.hero-content {
    width: min(800px, 100%);
    margin-top: 24px;
}

.hero-content>* {
    animation: hero-enter 700ms both;
}

.hero-content> :nth-child(1) {
    animation-delay: 80ms;
}

.hero-content> :nth-child(2) {
    animation-delay: 180ms;
}

.hero-content> :nth-child(3) {
    animation-delay: 280ms;
}

.hero-content> :nth-child(4) {
    animation-delay: 380ms;
}

.hero-content> :nth-child(5) {
    animation-delay: 480ms;
}

.hero-content> :nth-child(6) {
    animation-delay: 580ms;
}

.hero-content> :nth-child(7) {
    animation-delay: 680ms;
}

@keyframes hero-enter {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-invocation {
    margin: 0 0 14px;
    color: #ffe3a2;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 700;
}

.eyebrow {
    margin: 0 0 12px;
    color: #f5d28f;
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.hero h1 {
    margin: 0 auto 18px;
    color: #fffaf0;
    font-size: clamp(2.15rem, 6vw, 4.5rem);
    line-height: 1.4;
    text-shadow: 0 3px 20px rgba(0, 0, 0, 0.4);
}

.hero-copy {
    max-width: 700px;
    margin: 0 auto;
    color: rgba(255, 250, 240, 0.94);
    font-size: clamp(1rem, 2vw, 1.15rem);
}

.hero-date {
    margin: 26px 0 22px;
    color: #ffe3a2;
    font-size: clamp(1.05rem, 2.5vw, 1.35rem);
    font-weight: 700;
}

.button {
    display: inline-flex;
    min-height: 48px;
    padding: 10px 24px;
    align-items: center;
    justify-content: center;
    border: 1px solid #f4d18c;
    border-radius: 999px;
    background: #f4d18c;
    color: var(--deep-maroon);
    font-weight: 700;
    text-decoration: none;
    transition: background-color 160ms ease, transform 160ms ease;
}

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

[hidden] {
    display: none !important;
}

.button {
    gap: 8px;
}

.icon {
    flex: none;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.button-whatsapp {
    border-color: #1e7e4a;
    background: #1e7e4a;
    color: #fff;
}

.button-whatsapp:hover {
    background: #196b3f;
}

.button-maroon {
    border-color: var(--maroon);
    background: var(--maroon);
    color: #fff6e3;
}

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

.countdown {
    display: inline-block;
    margin: -6px 0 24px;
    padding: 5px 20px;
    border: 1px solid rgba(244, 209, 140, 0.55);
    border-radius: 999px;
    background: rgba(40, 18, 10, 0.45);
    color: #fff6e3;
    font-size: 0.98rem;
}

.countdown strong {
    color: #ffe3a2;
    font-size: 1.12em;
}

.shloka-band {
    padding: 28px 20px 24px;
    border-bottom: 1px solid rgba(177, 122, 37, 0.3);
    background:
        radial-gradient(ellipse at center, rgba(255, 250, 240, 0.7), transparent 70%),
        linear-gradient(90deg, #f1dcae, #f8ecd1 50%, #f1dcae);
    text-align: center;
}

.shloka {
    margin: 0;
    color: var(--deep-maroon);
    font-size: clamp(1.08rem, 2.6vw, 1.4rem);
    font-weight: 600;
    line-height: 1.9;
}

.shloka-source {
    margin: 6px 0 0;
    color: var(--gold-text);
    font-size: 0.88rem;
    font-weight: 600;
}

.shloka-meaning {
    max-width: 720px;
    margin: 14px auto 0;
    padding-top: 14px;
    border-top: 1px solid rgba(177, 122, 37, 0.3);
    color: var(--ink);
    font-size: 0.98rem;
    line-height: 1.85;
}

.section {
    padding: clamp(54px, 8vw, 90px) 24px;
}

.section-inner {
    width: min(1050px, 100%);
    margin: 0 auto;
}

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

.section-heading .eyebrow {
    color: var(--gold-text);
}

.section-heading h1,
.section-heading h2 {
    margin: 0 0 10px;
    color: var(--deep-maroon);
    font-size: clamp(1.7rem, 4vw, 2.5rem);
    line-height: 1.5;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
}

.invitation-section {
    background:
        radial-gradient(ellipse at top, rgba(239, 215, 164, 0.24), transparent 60%),
        var(--cream);
}

.home-stories {
    background:
        radial-gradient(ellipse at top, rgba(239, 215, 164, 0.2), transparent 62%),
        var(--cream);
}

.home-story-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}

.home-story-card {
    display: flex;
    overflow: hidden;
    flex-direction: column;
    align-items: flex-start;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 250, 240, 0.88);
    box-shadow: 0 6px 18px rgba(92, 48, 16, 0.08);
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.home-story-card:hover {
    transform: translateY(-3px);
    border-color: rgba(117, 45, 32, 0.38);
    box-shadow: 0 12px 26px rgba(92, 48, 16, 0.14);
}

.home-story-card:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

.home-story-art {
    display: grid;
    width: 100%;
    height: clamp(170px, 25vw, 230px);
    overflow: hidden;
    grid-template-columns: minmax(0, 1fr);
    background: var(--deep-maroon);
}

.home-story-art img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
}

.home-story-art-bhagwat img {
    object-position: center 62%;
}

.home-story-content {
    display: flex;
    width: 100%;
    min-height: 205px;
    padding: clamp(20px, 3vw, 28px);
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
}

.home-story-number {
    color: var(--gold-text);
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.home-story-card h3 {
    margin: 8px 0;
    color: var(--deep-maroon);
    font-size: 1.35rem;
}

.home-story-description {
    margin: 0 0 18px;
    color: var(--muted);
}

.home-story-link {
    display: inline-flex;
    margin-top: auto;
    align-items: center;
    gap: 6px;
    color: var(--maroon);
    font-weight: 700;
}

.home-story-link .icon {
    width: 20px;
    height: 20px;
}

@media (min-width: 600px) {
    .home-story-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 22px;
    }
}

.invitation-copy,
.profile-copy {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

.invitation-copy p,
.profile-copy p {
    margin: 0 0 16px;
}

.blessing {
    color: var(--gold-text);
    font-weight: 700;
}

.highlight {
    color: var(--maroon);
    font-size: 1.08rem;
    font-weight: 700;
}

.event-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 38px;
}

.detail-card {
    padding: 22px 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.68);
    text-align: center;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.detail-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(92, 48, 16, 0.1);
}

.detail-card span {
    display: block;
    margin-bottom: 4px;
    color: var(--gold-text);
    font-size: 0.9rem;
    font-weight: 700;
}

.detail-card strong {
    color: var(--deep-maroon);
    font-size: 1.05rem;
}

.detail-link {
    display: block;
    margin-top: 4px;
    color: var(--maroon);
    font-size: 0.92rem;
    font-weight: 600;
    text-underline-offset: 3px;
}

/* Where the katha is held: the hall on Google Maps (app/views/partials/venue-map.php). */
/* Comes right after the programme (#f4ead7), so it takes the cream of the invitation. */
.venue-section {
    background:
        radial-gradient(ellipse at top, rgba(239, 215, 164, 0.24), transparent 60%),
        var(--cream);
}

.speaker-section {
    background:
        radial-gradient(ellipse at center, rgba(244, 209, 140, 0.16), transparent 65%),
        linear-gradient(180deg, var(--maroon), var(--deep-maroon));
    color: #fff6e3;
    text-align: center;
}

.home-speaker-section {
    background:
        radial-gradient(ellipse at top, rgba(239, 215, 164, 0.3), transparent 65%),
        linear-gradient(180deg, var(--parchment), var(--cream));
    color: var(--ink);
}

.home-speaker-section .eyebrow {
    color: var(--gold-text);
}

.speaker-card {
    max-width: 760px;
    margin: 0 auto;
}

/* The प्रवक्ता's picture in a gold-ringed circle: on the invitation page and, larger, on the
   profile page. A picture of any shape fits; it is cropped to the circle, keeping the upper
   part where a portrait has the face. */
.speaker-photo {
    display: block;
    width: clamp(132px, 36vw, 164px);
    margin: 0 auto 18px;
    overflow: hidden;
    border: 2px solid rgba(244, 209, 140, 0.85);
    border-radius: 50%;
    background: #f1dcae;
    box-shadow: 0 0 0 6px rgba(244, 209, 140, 0.14);
    aspect-ratio: 1;
    transition: box-shadow 200ms ease;
}

a.speaker-photo:hover {
    box-shadow: 0 0 0 9px rgba(244, 209, 140, 0.24);
}

a.speaker-photo:focus-visible {
    outline: 2px solid #ffe3a2;
    outline-offset: 8px;
}

.speaker-photo-large {
    width: clamp(176px, 48vw, 232px);
    margin-bottom: 22px;
}

.speaker-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
}

.speaker-more {
    margin: 24px 0 0;
}

.speaker-section h1,
.speaker-section h2 {
    margin: 0 0 14px;
    color: #ffe3a2;
    font-size: clamp(1.9rem, 5vw, 2.8rem);
    line-height: 1.4;
}

.home-speaker-section h1,
.home-speaker-section h2 {
    color: var(--deep-maroon);
}

.speaker-copy {
    max-width: 640px;
    margin: 0 auto;
    color: rgba(255, 246, 227, 0.9);
}

.home-speaker-section .speaker-copy {
    color: var(--muted);
}

/* Profile page (/vakta): the प्रवक्ता's life as an article. An opening paragraph, three figures
   from the कथा-यात्रा, the life in short chapters, then the same facts as a list to scan. */
.profile-lead {
    max-width: 760px;
    margin: 0 auto;
    font-size: 1.08rem;
    text-align: center;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    max-width: 820px;
    margin: 30px auto 0;
    padding: 0;
    list-style: none;
}

.profile-stats li {
    padding: 18px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.68);
    line-height: 1.5;
    text-align: center;
}

.profile-stats strong {
    display: block;
    color: var(--maroon);
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.profile-stats span {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 600;
}

/* Unlike the short centred copy elsewhere, the chapters are long enough to read from the left. */
.profile-article {
    max-width: 760px;
    margin: 40px auto 0;
}

.profile-article section + section {
    margin-top: 28px;
}

.profile-article h3 {
    margin: 0 0 8px;
    padding-left: 14px;
    border-left: 3px solid var(--gold);
    color: var(--deep-maroon);
    font-size: clamp(1.2rem, 3vw, 1.4rem);
    line-height: 1.5;
}

.profile-article p {
    margin: 0;
}

.profile-article p + p {
    margin-top: 10px;
}

.profile-facts {
    max-width: 760px;
    margin: 40px auto 0;
    padding: 22px clamp(18px, 4vw, 34px);
    border: 1px solid rgba(177, 122, 37, 0.28);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.68);
}

.profile-facts h3 {
    margin: 0 0 10px;
    color: var(--maroon);
    font-size: 1.2rem;
    text-align: center;
}

.profile-facts dl {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: 22px;
    margin: 0;
}

.profile-facts dt,
.profile-facts dd {
    margin: 0;
    padding: 8px 0;
    border-top: 1px solid var(--line);
}

.profile-facts dt {
    color: var(--gold-text);
    font-size: 0.95rem;
    font-weight: 700;
}

.profile-facts dd {
    color: var(--deep-maroon);
    font-weight: 600;
}

/* The shloka between two sections of a page, not under the hero, is ruled off on both sides. */
.section + .shloka-band {
    border-top: 1px solid rgba(177, 122, 37, 0.3);
}

@media (max-width: 620px) {
    /* Each figure becomes a row: the figure on the left, what it counts beside it. */
    .profile-stats {
        grid-template-columns: 1fr;
        gap: 10px;
        max-width: 520px;
    }

    .profile-stats li {
        display: grid;
        padding: 12px 18px;
        grid-template-columns: 8rem minmax(0, 1fr);
        align-items: center;
        gap: 14px;
        text-align: left;
    }

    .profile-stats strong {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    /* Each fact's name sits above it, so a long fact keeps the full width. */
    .profile-facts dl {
        grid-template-columns: 1fr;
    }

    .profile-facts dt {
        padding-bottom: 0;
    }

    .profile-facts dd {
        padding-top: 0;
        border-top: 0;
    }
}

.schedule-section {
    background: var(--sand);
}

/* Timeline: a spine with one dated circle per day. A single rail on the left by default;
   from 761px up the cards alternate down both sides of a central spine. */
.schedule {
    --marker: 42px; /* date circle sitting on the spine */
    --stem: 14px;   /* connector between a card and its circle */
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 0 0 calc(var(--marker) + var(--stem));
    list-style: none;
}

.schedule::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(var(--marker) / 2 - 1px);
    width: 2px;
    background: linear-gradient(to bottom,
            transparent,
            rgba(177, 122, 37, 0.65) 20px,
            rgba(177, 122, 37, 0.65) calc(100% - 110px),
            transparent);
    content: "";
}

.schedule > li {
    position: relative;
    padding: 16px 20px;
    border: 1px solid rgba(177, 122, 37, 0.32);
    border-radius: 12px;
    background: rgba(255, 250, 240, 0.92) no-repeat right 12px bottom 10px / 88px;
    transition: box-shadow 180ms ease;
}

.schedule > li:hover {
    box-shadow: 0 9px 20px rgba(92, 48, 16, 0.09);
}

/* A motif from each day's प्रसंग sits in the empty corner of its card. */
.schedule > li[data-day="18"] {
    background-image: url("../images/schedule/kalash.svg");
}

.schedule > li[data-day="19"] {
    background-image: url("../images/schedule/dhruva.svg");
}

.schedule > li[data-day="20"] {
    background-image: url("../images/schedule/stambh.svg");
}

.schedule > li[data-day="21"] {
    background-image: url("../images/schedule/chakra.svg");
}

.schedule > li[data-day="22"] {
    background-image: url("../images/schedule/matki.svg");
}

.schedule > li[data-day="23"] {
    background-image: url("../images/schedule/bansuri.svg");
}

.schedule > li[data-day="24"] {
    background-image: url("../images/schedule/granth.svg");
}

.schedule > li[data-day="25"] {
    background-image: url("../images/schedule/havan.svg");
}

.schedule > li::before {
    position: absolute;
    top: 12px;
    right: calc(100% + 1px + var(--stem));
    display: grid;
    box-sizing: border-box;
    width: var(--marker);
    height: var(--marker);
    place-items: center;
    border: 2px solid var(--gold);
    border-radius: 50%;
    background: var(--cream);
    color: var(--maroon);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1;
    content: attr(data-day);
}

.schedule > li::after {
    position: absolute;
    top: calc(11px + var(--marker) / 2);
    right: calc(100% + 1px);
    width: var(--stem);
    height: 2px;
    background: rgba(177, 122, 37, 0.65);
    content: "";
}

.schedule > li.closing-day {
    background-color: #fff3d9;
}

.schedule > li.closing-day::before {
    border-color: var(--gold-text);
    background: var(--gold-text);
    color: #fffaf0;
}

.schedule > li.is-today {
    border-color: var(--maroon);
    background-color: #fff;
    box-shadow: 0 0 0 2px rgba(117, 45, 32, 0.18), 0 10px 24px rgba(92, 48, 16, 0.12);
}

.schedule > li.is-today::before {
    border-color: var(--maroon);
    background: var(--maroon);
    color: #fff6e3;
    animation: today-pulse 2.2s ease-out infinite;
}

.schedule > li.is-today::after {
    background: var(--maroon);
}

.schedule > li.is-today strong {
    padding-right: 46px;
}

@keyframes today-pulse {
    from {
        box-shadow: 0 0 0 0 rgba(117, 45, 32, 0.45);
    }

    to {
        box-shadow: 0 0 0 12px rgba(117, 45, 32, 0);
    }
}

@media (min-width: 761px) {
    .schedule {
        --marker: 48px;
        --stem: 16px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px calc(var(--marker) + 2 * var(--stem));
        padding-left: 0;
    }

    .schedule::before {
        left: calc(50% - 1px);
    }

    /* Every card spans two rows. Starting the second card one row down staggers the two
       columns, and auto-placement keeps the rest alternating along the spine. */
    .schedule > li {
        grid-row: span 2;
        align-self: start;
        background-position: right 18px bottom 14px;
        background-size: clamp(84px, 11vw, 108px);
    }

    .schedule > li:nth-child(2) {
        grid-row: 2 / span 2;
    }

    .schedule > li:nth-child(odd) {
        grid-column: 1;
    }

    .schedule > li:nth-child(even) {
        grid-column: 2;
    }

    .schedule > li:nth-child(odd)::before {
        right: auto;
        left: calc(100% + 1px + var(--stem));
    }

    .schedule > li:nth-child(odd)::after {
        right: auto;
        left: calc(100% + 1px);
    }
}

.today-badge {
    position: absolute;
    top: 16px;
    right: 14px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--maroon);
    color: #fff6e3;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.8;
}

.schedule strong {
    display: block;
    margin-bottom: 2px;
    color: var(--maroon);
    font-size: 0.98rem;
}

.tithi {
    display: block;
    margin-bottom: 8px;
    color: var(--gold-text);
    font-size: 0.85rem;
    font-style: normal;
    font-weight: 600;
}

.prasang {
    margin: 0;
    padding: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.65;
    list-style: none;
}

.prasang li {
    position: relative;
    padding-left: 16px;
}

.prasang li + li {
    margin-top: 3px;
}

.prasang li::before {
    position: absolute;
    top: 0.72em;
    left: 2px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gold);
    content: "";
}

.special-note {
    max-width: 850px;
    margin: 34px auto 0;
    padding: 22px clamp(18px, 4vw, 34px);
    border: 1px solid rgba(177, 122, 37, 0.28);
    border-radius: 14px;
    background: rgba(255, 250, 240, 0.78);
    text-align: center;
}

.special-note h3 {
    margin: 0 0 8px;
    color: var(--maroon);
    font-size: 1.2rem;
}

.special-note p {
    margin: 0;
}

/* The leela section of the invitation page and the whole Krishna Leela page. */
.krishna-leela-section {
    background:
        radial-gradient(ellipse at top, rgba(239, 215, 164, 0.24), transparent 60%),
        var(--cream);
}

/* The leela darshan on the invitation page is the one dark band between the light programme and
   vakta sections: the paintings glow on maroon, like a temple's inner sanctum. */
.krishna-leela-section.leela-section {
    background:
        radial-gradient(ellipse at top, rgba(244, 209, 140, 0.18), transparent 62%),
        linear-gradient(180deg, var(--maroon), var(--deep-maroon));
    color: #fff6e3;
}

.leela-section .section-heading .eyebrow {
    color: #f5d28f;
}

.leela-section .section-heading h2 {
    color: #ffe3a2;
}

.leela-section .section-heading p,
.leela-section .leela-caption {
    color: rgba(255, 246, 227, 0.88);
}

.leela-section .leela-count {
    color: #ffe3a2;
}

.leela-section .leela-card {
    border-color: rgba(226, 192, 120, 0.5);
    box-shadow: 0 8px 18px rgba(20, 6, 3, 0.35);
}

.leela-section .leela-nav,
.leela-section .leela-nav[aria-disabled="true"] {
    border-color: rgba(244, 209, 140, 0.7);
    background: transparent;
    color: #f4d18c;
}

.leela-section .leela-nav:not([aria-disabled="true"]):hover {
    background: #f4d18c;
    color: var(--deep-maroon);
}

.leela-section .leela-nav:focus-visible {
    outline-color: #ffe3a2;
}

/* Gold button on maroon, as in the hero. */
.leela-section .button-maroon {
    border-color: #f4d18c;
    background: #f4d18c;
    color: var(--deep-maroon);
}

.leela-section .button-maroon:hover {
    background: #ffe6af;
}

.story-invitation {
    margin: 30px 0 0;
    text-align: center;
}

/* Leela carousel on the invitation page (Owl Carousel). Every picture is the same 3:4 size, so
   every card is the same height. Until Owl has loaded, or without JavaScript, it is a plain
   swipeable row of the same cards. */
.leela-carousel {
    /* Card width in the fallback row; each value matches what Owl gives it at that breakpoint
       (see the responsive option in main.js), so nothing moves when Owl takes over. */
    --card: calc(100% - 104px);
}

@media (min-width: 540px) {
    .leela-carousel {
        --card: calc((100% - 14px) / 2);
    }
}

@media (min-width: 860px) {
    .leela-carousel {
        --card: calc((100% - 28px) / 3);
    }
}

/* No horizontal padding here: Owl measures this box before it adds .owl-loaded. */
.leela-carousel:not(.owl-loaded) {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding: 6px 0 22px;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.leela-carousel:not(.owl-loaded)::-webkit-scrollbar {
    display: none;
}

.leela-carousel:not(.owl-loaded) .leela-card {
    flex: 0 0 var(--card);
    scroll-snap-align: center;
}

.leela-carousel:not(.owl-loaded) .leela-card:first-child {
    margin-left: calc(50% - var(--card) / 2);
}

.leela-carousel:not(.owl-loaded) .leela-card:last-child {
    margin-right: calc(50% - var(--card) / 2);
}

.leela-carousel .owl-stage-outer {
    padding: 6px 0 22px; /* room for the cards' shadow */
}

.leela-card {
    position: relative;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(177, 122, 37, 0.55);
    border-radius: 14px;
    background: radial-gradient(ellipse at center, #6a2a1e, #34130e);
    box-shadow: 0 6px 14px rgba(92, 48, 16, 0.16);
    aspect-ratio: 3 / 4;
    transition: border-color 300ms ease, box-shadow 300ms ease;
}

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

.leela-card figcaption {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 46px 14px 12px;
    background: linear-gradient(to top, rgba(40, 15, 8, 0.9), rgba(40, 15, 8, 0.55) 55%, transparent);
    color: #ffe3a2;
    line-height: 1.5;
    text-align: center;
}

.leela-card figcaption span {
    display: block;
    color: #e8c684;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
}

.leela-card figcaption strong {
    display: block;
    font-size: 1.15rem;
}

/* The picture in the middle is the one the caption below describes. */
.leela-carousel .owl-item.center .leela-card {
    border-color: #e2c078;
    box-shadow: 0 0 0 2px #e2c078, 0 8px 14px rgba(92, 48, 16, 0.28);
}

.leela-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.leela-count {
    min-width: 4.5em;
    margin: 0;
    color: var(--maroon);
    font-weight: 700;
    text-align: center;
}

/* Tall enough for the longest caption, so the page below does not jump as the pictures change. */
.leela-caption {
    max-width: 640px;
    min-height: 5.4em;
    margin: 12px auto 0;
    color: var(--ink);
    text-align: center;
}

@media (max-width: 539px) {
    /* One picture with its neighbours peeking in from the screen edges. */
    .leela-carousel {
        width: auto;
        margin-inline: -18px;
    }
}

@media (min-width: 761px) {
    .leela-caption {
        min-height: 3.6em;
    }
}

/* Inner pages (Krishna Leela, 404): a slim bar back to the invitation, and the footer kept at the bottom. */
.page-sub {
    display: flex;
    min-height: 100vh;
    min-height: 100svh;
    flex-direction: column;
}

.page-sub main {
    display: flex;
    flex: 1;
    flex-direction: column;
}

/* On a screen taller than the page, the last section stretches down to the footer. */
.page-sub main > :last-child {
    flex: 1;
}

.page-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    padding: 6px 20px;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    background: linear-gradient(180deg, var(--maroon), var(--deep-maroon));
    box-shadow: 0 2px 12px rgba(40, 15, 8, 0.28);
    color: #ffe3a2;
}

.page-back {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-self: start;
    gap: 4px;
    color: #fff6e3;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.page-back .fa-arrow-left {
    margin-right: 4px;
}

.page-back:hover {
    color: #ffe3a2;
}

.page-bar-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.page-return {
    display: flex;
    margin: 28px 0 0;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

/* Bhagwat katha page: three sections (भागवत कथा, राजा परीक्षित, शुकदेव जी), each a large
   painting beside the story. The picture alternates sides and stays in view while the text
   scrolls; on phones it sits above the text. Parchment, sand, cream, then the maroon message. */
.katha-section {
    scroll-margin-top: 56px; /* clear the sticky page bar when jumped to */
}

.katha-section-intro {
    padding-top: clamp(42px, 7vw, 72px);
    background:
        radial-gradient(ellipse at top, rgba(239, 215, 164, 0.32), transparent 68%),
        linear-gradient(180deg, #fff8e9, var(--cream));
}

.katha-section-sand {
    background: var(--sand);
}

.katha-section-cream {
    background: var(--cream);
}

.katha-header {
    max-width: 780px;
    margin: 0 auto clamp(30px, 5vw, 46px);
    text-align: center;
}

.shri-mad-bhagwat-puran-page .eyebrow {
    color: var(--gold-text);
}

.katha-header h1 {
    margin: 0 0 14px;
    color: var(--deep-maroon);
    font-size: clamp(1.9rem, 5vw, 3rem);
    line-height: 1.5;
}

.katha-lead {
    margin: 0;
    color: var(--muted);
    font-size: clamp(1rem, 2.4vw, 1.15rem);
}

/* Jump links under the title: one pill for each section. */
.katha-jump {
    display: flex;
    margin: 24px 0 0;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.katha-jump a {
    display: inline-flex;
    padding: 8px 18px;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(177, 122, 37, 0.45);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--maroon);
    font-weight: 700;
    text-decoration: none;
    transition: background 180ms ease, color 180ms ease;
}

.katha-jump a:hover,
.katha-jump a:focus-visible {
    background: var(--maroon);
    color: #ffe3a2;
}

.katha-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(24px, 4vw, 48px);
}

.katha-figure {
    width: min(420px, 100%);
    margin: 0 auto;
}

.katha-figure img {
    display: block;
    width: 100%;
    height: auto;
    border: 3px solid rgba(226, 192, 120, 0.95);
    border-radius: 18px;
    background: #34130e;
    box-shadow: 0 0 0 6px rgba(244, 209, 140, 0.22), 0 18px 36px rgba(79, 29, 23, 0.22);
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.katha-figure figcaption {
    margin-top: 16px;
    color: var(--gold-text);
    font-size: 0.92rem;
    font-weight: 600;
    text-align: center;
}

@media (min-width: 860px) {
    .katha-grid {
        grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
        align-items: start;
    }

    .katha-grid-reverse {
        grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
    }

    .katha-grid-reverse .katha-figure {
        order: 2;
    }

    .katha-figure {
        position: sticky;
        top: 76px;
        width: 100%;
    }
}

.katha-text h2 {
    margin: 0 0 12px;
    color: var(--deep-maroon);
    font-size: clamp(1.4rem, 3.4vw, 1.9rem);
    line-height: 1.5;
}

.katha-text h2:not(:first-child) {
    margin-top: 30px;
}

.katha-text .eyebrow + h2 {
    margin-top: 0;
}

.katha-text p {
    margin: 0 0 14px;
    color: var(--ink);
    line-height: 1.9;
}

/* The Bhagwat at a glance: skandh, adhyay, shlok, days. */
.katha-facts {
    display: grid;
    margin: 22px 0 6px;
    padding: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    list-style: none;
}

.katha-facts li {
    padding: 12px 8px;
    border: 1px solid rgba(177, 122, 37, 0.28);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--muted);
    text-align: center;
}

.katha-facts strong {
    display: block;
    color: var(--deep-maroon);
    font-size: clamp(1.3rem, 3.6vw, 1.7rem);
    line-height: 1.4;
}

@media (min-width: 600px) {
    .katha-facts {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* A Sanskrit shloka inside a section, with its meaning below. */
.katha-quote {
    margin: 22px 0 8px;
    padding: 14px 18px;
    border-left: 3px solid var(--gold);
    border-radius: 0 12px 12px 0;
    background: rgba(239, 215, 164, 0.3);
}

.katha-text .katha-quote p {
    margin: 0;
    color: var(--deep-maroon);
    font-size: 1.05rem;
    font-weight: 600;
}

.katha-quote cite {
    display: block;
    margin-top: 4px;
    color: var(--gold-text);
    font-size: 0.85rem;
    font-style: normal;
}

.katha-text .katha-quote-meaning {
    color: var(--muted);
    font-size: 0.95rem;
}

.katha-message {
    max-width: 820px;
    margin: clamp(34px, 5vw, 52px) auto 0;
    padding: 24px clamp(18px, 4vw, 32px);
    border-radius: 16px;
    background: linear-gradient(135deg, var(--maroon), var(--deep-maroon));
    color: #fff6e3;
    text-align: center;
}

.katha-message .fa-om {
    margin-bottom: 8px;
    color: #ffe3a2;
    font-size: 1.6rem;
}

.katha-message p {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}

/* मंगल प्रतीक (app/data/mangal.php): real pictures of the दीपक, कलश, ॐ, स्वस्तिक and शंख, each in a
   gold-edged temple arch, like a mandir doorway. */
.mangal-frame {
    display: block;
    overflow: hidden;
    border: 2px solid rgba(226, 192, 120, 0.9);
    border-radius: 50% 50% 12px 12px / 40% 40% 12px 12px;
    background: #34130e;
    box-shadow: 0 0 0 5px rgba(244, 209, 140, 0.16), 0 10px 22px rgba(40, 15, 8, 0.28);
    aspect-ratio: 4 / 5;
    transition: transform 220ms ease, box-shadow 220ms ease;
}

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

/* Inner pages close on maroon, between the light content and the darker footer. */
.mangal-section {
    background:
        radial-gradient(ellipse at top, rgba(244, 209, 140, 0.18), transparent 62%),
        linear-gradient(180deg, var(--maroon), var(--deep-maroon));
    color: #fff6e3;
}

.mangal-section .section-heading .eyebrow {
    color: #f5d28f;
}

.mangal-section .section-heading h2 {
    color: #ffe3a2;
}

.mangal-section .section-heading p {
    color: rgba(255, 246, 227, 0.85);
}

.mangal-list {
    display: flex;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: center;
    gap: 34px clamp(16px, 3vw, 30px);
    list-style: none;
}

.mangal-list li {
    width: clamp(132px, 16vw, 172px);
}

.mangal-item {
    margin: 0;
    text-align: center;
}

.mangal-item .mangal-frame {
    box-shadow: 0 0 0 5px rgba(244, 209, 140, 0.14), 0 12px 24px rgba(20, 6, 3, 0.4);
}

.mangal-item:hover .mangal-frame {
    transform: translateY(-5px);
    box-shadow: 0 0 0 7px rgba(244, 209, 140, 0.24), 0 16px 28px rgba(20, 6, 3, 0.45);
}

.mangal-item figcaption {
    margin-top: 14px;
    line-height: 1.6;
}

.mangal-item strong {
    display: block;
    color: #ffe3a2;
    font-size: 1.2rem;
}

.mangal-item figcaption span {
    display: block;
    margin-top: 4px;
    color: rgba(255, 246, 227, 0.8);
    font-size: 0.9rem;
}

/* Round arrow buttons of the leela carousel. */
.leela-nav {
    display: grid;
    flex: none;
    width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(177, 122, 37, 0.55);
    border-radius: 50%;
    background: var(--maroon);
    color: #f4d18c;
    cursor: pointer;
    transition: background-color 160ms ease, transform 160ms ease, opacity 160ms ease;
}

.leela-nav:hover {
    transform: scale(1.06);
    background: var(--deep-maroon);
}

/* The carousel does not loop: the arrow at the end it has reached goes dead. */
.leela-nav[aria-disabled="true"] {
    transform: none;
    background: var(--maroon);
    cursor: default;
    opacity: 0.35;
}

.leela-nav:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

.leela-more {
    margin: 22px 0 0;
    text-align: center;
}

/* Leela timeline (Krishna Leela page): the carousel's pictures from first to last down a spine, each
   with its short story. A single rail on the left by default; from 761px up the spine runs down
   the middle, picture and story face each other across it and swap sides at every step. */
.leela-timeline {
    --marker: 42px; /* numbered circle sitting on the spine */
    --stem: 14px;   /* connector between the circle and the picture */
    position: relative;
    display: grid;
    gap: 36px;
    max-width: 940px;
    margin: 0 auto;
    padding: 0 0 0 calc(var(--marker) + var(--stem));
    counter-reset: leela;
    list-style: none;
}

.leela-timeline::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(var(--marker) / 2 - 1px);
    width: 2px;
    background: linear-gradient(to bottom,
            transparent,
            rgba(177, 122, 37, 0.65) 20px,
            rgba(177, 122, 37, 0.65) calc(100% - 60px),
            transparent);
    content: "";
}

.leela-timeline > li {
    position: relative;
    display: grid;
    gap: 14px;
    counter-increment: leela;
    scroll-margin-top: 20px;
}

.leela-timeline > li::before {
    position: absolute;
    top: 12px;
    right: calc(100% + var(--stem));
    z-index: 1;
    display: grid;
    box-sizing: border-box;
    width: var(--marker);
    height: var(--marker);
    place-items: center;
    border: 2px solid var(--gold);
    border-radius: 50%;
    background: var(--cream);
    color: var(--maroon);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1;
    content: counter(leela);
}

.leela-timeline > li::after {
    position: absolute;
    top: calc(11px + var(--marker) / 2);
    right: 100%;
    width: var(--stem);
    height: 2px;
    background: rgba(177, 122, 37, 0.65);
    content: "";
}

/* The last step closes the story: a filled circle, like the closing day of the schedule. */
.leela-timeline > li:last-child::before {
    border-color: var(--gold-text);
    background: var(--gold-text);
    color: #fffaf0;
}

.leela-timeline .leela-card {
    width: 100%;
    max-width: 420px;
}

.leela-story h2 {
    margin: 0 0 4px;
    color: var(--deep-maroon);
    font-size: 1.35rem;
    line-height: 1.5;
}

.leela-story p {
    margin: 0;
    color: var(--ink);
}

@media (min-width: 761px) {
    .leela-timeline {
        --marker: 48px;
        --stem: 18px;
        gap: 48px;
        padding-left: 0;
    }

    .leela-timeline::before {
        left: calc(50% - 1px);
    }

    /* Two equal columns with the spine in the gap between them. */
    .leela-timeline > li {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 0 calc(var(--marker) + 2 * var(--stem));
        align-items: center;
    }

    .leela-timeline > li::before {
        top: calc(50% - var(--marker) / 2);
        right: auto;
        left: calc(50% - var(--marker) / 2);
    }

    /* One line through the circle, reaching the picture on one side and the story on the other. */
    .leela-timeline > li::after {
        top: calc(50% - 1px);
        right: auto;
        left: calc(50% - var(--marker) / 2 - var(--stem));
        width: calc(var(--marker) + 2 * var(--stem));
    }

    .leela-timeline .leela-card {
        max-width: 380px;
        justify-self: end;
    }

    .leela-story {
        max-width: 400px;
    }

    .leela-timeline > li:nth-child(even) .leela-card {
        order: 2;
        justify-self: start;
    }

    .leela-timeline > li:nth-child(even) .leela-story {
        justify-self: end;
    }

    .leela-story h2 {
        margin-bottom: 8px;
        font-size: 1.7rem;
    }

    .leela-story p {
        font-size: 1.05rem;
    }
}

.closing-section {
    padding-top: 56px;
    padding-bottom: 56px;
    background: var(--deep-maroon);
    color: #fff6e3;
    text-align: center;
}

.closing-section h2 {
    margin: 0 0 8px;
    color: #ffe3a2;
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.closing-section p {
    margin: 4px 0;
}

/* The आयोजक's picture, a square; a picture of any shape is cropped to it. */
.organizer-photo {
    display: block;
    width: clamp(150px, 44vw, 200px);
    height: auto;
    margin: 18px auto 0;
    border: 2px solid rgba(244, 209, 140, 0.85);
    border-radius: 14px;
    background: #f1dcae;
    box-shadow: 0 0 0 6px rgba(244, 209, 140, 0.14);
    aspect-ratio: 1;
    object-fit: cover;
    object-position: center 20%;
}

/* A phone number to tap, on the dark sections: the आयोजक's on the invitation page and the
   प्रवक्ता's on the profile page. */
.contact-link {
    display: inline-flex;
    min-height: 44px;
    padding: 6px 20px;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(244, 209, 140, 0.55);
    border-radius: 999px;
    color: #ffe3a2;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 160ms ease;
}

.contact-link:hover {
    background: rgba(244, 209, 140, 0.14);
}

.closing-section .contact {
    margin-top: 16px;
}

.closing-section .family {
    margin-top: 14px;
    color: #ffe3a2;
    font-weight: 700;
}

.closing-section .share-cta {
    max-width: 520px;
    margin: 28px auto 0;
    padding-top: 24px;
    border-top: 1px solid rgba(244, 209, 140, 0.25);
}

.closing-section .share-cta p {
    margin: 0 0 14px;
    color: rgba(255, 246, 227, 0.85);
}

.music-toggle {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 20;
    display: grid;
    width: 52px;
    height: 52px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(244, 209, 140, 0.7);
    border-radius: 50%;
    background: var(--deep-maroon);
    box-shadow: 0 8px 22px rgba(40, 15, 8, 0.35);
    color: #f4d18c;
    cursor: pointer;
    transition: transform 160ms ease;
}

.music-toggle:hover {
    transform: scale(1.06);
}

.music-toggle .icon {
    width: 24px;
    height: 24px;
}

.music-toggle .icon-on,
.music-toggle.is-playing .icon-off {
    display: none;
}

.music-toggle.is-playing .icon-on {
    display: block;
}

.music-toggle.is-playing::after {
    position: absolute;
    inset: -1px;
    border: 1px solid rgba(244, 209, 140, 0.7);
    border-radius: 50%;
    animation: music-pulse 2.4s ease-out infinite;
    content: "";
}

@keyframes music-pulse {
    from {
        opacity: 0.9;
        transform: scale(1);
    }

    to {
        opacity: 0;
        transform: scale(1.5);
    }
}

.site-footer {
    padding: 14px 20px;
    background: #3e1712;
    color: rgba(255, 246, 227, 0.78);
    font-size: 0.85rem;
    text-align: center;
}

@supports (animation-timeline: view()) {

    .section-heading,
    .invitation-copy,
    .profile-copy,
    .profile-lead,
    .profile-stats li,
    .profile-article section,
    .profile-facts,
    .detail-card,
    .speaker-card,
    .schedule > li,
    .special-note,
    .leela,
    .leela-timeline > li,
    .closing-section .section-inner {
        animation: reveal-on-scroll linear both;
        animation-timeline: view();
        animation-range: entry 0% entry 45%;
    }

    .event-details .detail-card:nth-child(2) {
        animation-range: entry 5% entry 50%;
    }

    .event-details .detail-card:nth-child(3) {
        animation-range: entry 10% entry 55%;
    }
}

@keyframes reveal-on-scroll {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 760px) {
    .event-details {
        grid-template-columns: 1fr;
        gap: 10px;
        max-width: 520px;
        margin-right: auto;
        margin-left: auto;
    }

    .detail-card {
        padding: 16px;
    }
}

@media (max-width: 540px) {
    html {
        scroll-padding-top: 20px;
    }

    .hero {
        min-height: 720px;
        min-height: 100svh;
        padding: 130px 20px 58px;
        background-position: center top;
    }

    .hero h1 br {
        display: none;
    }

    .page-bar {
        grid-template-columns: auto 1fr;
    }

    /* Sub-pages keep their bar fixed at the top; a jump to an anchor lands below it. */
    html:has(body.page-sub) {
        scroll-padding-top: 68px;
    }

    .page-bar-title {
        justify-self: end;
    }

    .section {
        padding-right: 18px;
        padding-left: 18px;
    }

    .schedule {
        --marker: 38px;
        --stem: 10px;
        gap: 12px;
    }

    .schedule > li {
        padding: 14px 16px;
    }
}

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

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-delay: 0ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media print {

    .button,
    .countdown,
    .share-cta,
    .music-toggle {
        display: none !important;
    }

    .hero {
        min-height: auto;
        padding: 35mm 15mm;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .section,
    .closing-section,
    .site-footer {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}

/* The link to the वंश वृक्ष, under the आयोजक's name on the invitation page. */
.closing-section .vansh-link {
    margin-top: 18px;
}

/* ---------------------------------------------------------------------------------------------
   वंश वृक्ष page: the family drawn as a banyan. Top to bottom: the canopy (शाखाएँ, the next
   generations), the trunk (तना, the root couple on a plaque), and the earth (जड़ें, the
   ancestors). The art is inline SVG in the view; the names come from app/Data/vansh.php.
   --------------------------------------------------------------------------------------------- */
.vansh-intro {
    padding-top: clamp(42px, 7vw, 72px);
    padding-bottom: clamp(24px, 4vw, 40px);
    background: linear-gradient(180deg, #fff8e9, #fbf1d9);
    text-align: center;
}

.vansh-intro .eyebrow {
    color: var(--gold-text);
}

.vansh-intro h1 {
    margin: 0 0 14px;
    color: var(--deep-maroon);
    font-size: clamp(2rem, 6vw, 3.2rem);
    line-height: 1.4;
}

.vansh-lead {
    max-width: 760px;
    margin: 0 auto;
    color: var(--muted);
    font-size: clamp(1rem, 2.4vw, 1.12rem);
}

.vansh-verse {
    margin: 18px 0 0;
    color: #2f6a35;
    font-weight: 700;
}

/* Shown while app/Data/vansh.php still holds sample names ('sample' => true). */
.vansh-sample {
    display: inline-flex;
    max-width: 640px;
    margin: 18px auto 0;
    padding: 8px 16px;
    align-items: baseline;
    gap: 8px;
    border: 1px dashed rgba(177, 122, 37, 0.6);
    border-radius: 12px;
    background: rgba(255, 243, 205, 0.8);
    color: var(--gold-text);
    font-size: 0.92rem;
}

/* Sky behind the tree, warm at the horizon. */
.vansh-tree-section {
    overflow: hidden;
    background: linear-gradient(180deg, #fbf1d9 0%, #f6e7c4 70%, #efd9a8 100%);
}

.vansh-tree {
    position: relative;
    width: min(1200px, 100%);
    margin: 0 auto;
}

/* A label for each part of the tree. */
.vansh-part {
    display: inline-flex;
    margin: 0 0 18px;
    padding: 6px 16px;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    background: rgba(255, 250, 238, 0.92);
    color: #2f5d34;
    font-size: 0.95rem;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(30, 50, 25, 0.18);
}

.vansh-empty {
    max-width: 420px;
    margin: 0 auto;
    padding: 12px 18px;
    border: 1px dashed rgba(255, 246, 227, 0.7);
    border-radius: 14px;
    background: rgba(28, 52, 30, 0.55);
    color: #fff6e3;
    font-size: 0.95rem;
}

/* Canopy */
.vansh-canopy {
    position: relative;
    z-index: 1;
    display: flex;
    padding: clamp(100px, 15vw, 170px) 16px clamp(80px, 10vw, 130px);
    flex-direction: column;
    justify-content: center;
    text-align: center;
    /* The art's own shape (1200 x 560), so the whole crown shows on wide screens; on phones, or
       with many names, the box grows taller and the crown is cropped at the sides instead.
       (No min-height here: through the aspect ratio it would also force a minimum width.) */
    aspect-ratio: 1200 / 560;
}

.vansh-canopy-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.vansh-canopy-content {
    position: relative;
}

.vansh-branches {
    display: flex;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    gap: 22px clamp(14px, 2.4vw, 26px);
    list-style: none;
}

.vansh-branch {
    display: flex;
    width: min(240px, 100%);
    flex-direction: column;
    align-items: center;
}

/* Grandchildren grow as leaves above their parent's card, joined to it by a stem. */
.vansh-leaves {
    position: relative;
    display: flex;
    margin: 0 0 14px;
    padding: 0;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    list-style: none;
}

.vansh-leaves::after {
    position: absolute;
    bottom: -14px;
    left: 50%;
    width: 3px;
    height: 14px;
    background: #6b4a2f;
    content: "";
}

.vansh-leaf {
    padding: 6px 14px;
    border: 1px solid #7fb35c;
    border-radius: 18px 4px 18px 4px;
    background: linear-gradient(135deg, #f3f9ea, #dcefc9);
    color: #234a28;
    font-weight: 700;
    line-height: 1.5;
    box-shadow: 0 4px 10px rgba(20, 45, 20, 0.25);
}

.vansh-leaf span,
.vansh-leaf small {
    display: block;
    color: #4f7d3c;
    font-size: 0.72rem;
    font-weight: 600;
}

/* Phones: two branches side by side, so the crown stays compact instead of one tall column. */
@media (max-width: 559px) {
    .vansh-branches {
        gap: 18px 10px;
    }

    .vansh-branch {
        width: calc(50% - 5px);
    }

    .vansh-branch .vansh-card {
        padding: 10px 8px;
    }

    .vansh-leaves {
        gap: 6px;
    }

    .vansh-leaf {
        padding: 4px 9px;
        font-size: 0.86rem;
    }
}

.vansh-card {
    display: flex;
    width: 100%;
    padding: 14px 16px;
    flex-direction: column;
    gap: 2px;
    border: 2px solid rgba(226, 192, 120, 0.95);
    border-radius: 16px;
    background: linear-gradient(180deg, #fffaf0, #f8ecd1);
    color: var(--ink);
    text-align: center;
    box-shadow: 0 0 0 4px rgba(255, 250, 240, 0.35), 0 10px 22px rgba(25, 40, 20, 0.35);
}

.vansh-card strong {
    color: var(--deep-maroon);
    font-size: 1.08rem;
    line-height: 1.5;
}

.vansh-relation {
    color: var(--gold-text);
    font-size: 0.78rem;
    font-weight: 700;
}

.vansh-spouse {
    color: var(--maroon);
    font-size: 0.92rem;
}

.vansh-note {
    color: var(--muted);
    font-size: 0.82rem;
}

/* Trunk: the SVG sets the height; the root couple hangs on it as a name plaque. */
.vansh-trunk {
    position: relative;
    /* Tuck the tops of the limbs under the canopy's scalloped lower edge. */
    margin-top: calc(-1 * clamp(28px, 6vw, 72px));
}

/* Beyond 1200px the tree stops growing; carry the ground on to both edges of the screen. Its
   height matches the ground at the sides of the drawing (28 of its 480 units). */
@media (min-width: 1201px) {
    .vansh-trunk {
        z-index: 0;
    }

    .vansh-trunk::after {
        position: absolute;
        z-index: -1;
        right: calc(50% - 50vw);
        bottom: 0;
        left: calc(50% - 50vw);
        height: 28px;
        background: linear-gradient(180deg, #6b4c2e, #5d3f25);
        content: "";
    }
}

.vansh-trunk-art {
    display: block;
    width: 100%;
    height: auto;
}

.vansh-root-couple {
    position: relative;
    display: flex;
    width: min(320px, calc(100% - 32px));
    margin: -18px auto 24px;
    padding: 16px 18px 18px;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    border: 3px solid #e2c078;
    border-radius: 22px;
    background: linear-gradient(180deg, #fffaf0, #f4e3bc);
    text-align: center;
    box-shadow: 0 0 0 6px rgba(107, 74, 47, 0.35), 0 16px 30px rgba(40, 22, 10, 0.4);
}

.vansh-root-couple .vansh-part {
    margin-bottom: 12px;
    background: #2f5d34;
    color: #fff6e3;
}

.vansh-photo {
    display: block;
    width: 112px;
    height: 112px;
    margin-bottom: 10px;
    border: 3px solid #e2c078;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 4px rgba(226, 192, 120, 0.3);
}

.vansh-root-couple strong {
    color: var(--deep-maroon);
    font-size: 1.2rem;
    line-height: 1.5;
}

@media (min-width: 760px) {
    /* On wide screens the plaque hangs on the trunk itself, above the kalawa. */
    .vansh-root-couple {
        position: absolute;
        top: 34%;
        left: 50%;
        margin: 0;
        transform: translate(-50%, -34%);
    }
}

/* Roots: dark earth, the ancestors and where the family is from. */
.vansh-roots {
    position: relative;
    margin: -1px calc(50% - 50vw) 0; /* the earth runs to both edges of the screen */
    padding: clamp(40px, 6vw, 64px) 16px clamp(48px, 7vw, 72px);
    background: linear-gradient(180deg, #5d3f25 0%, #47301c 45%, #33210f 100%);
    color: #fff6e3;
    text-align: center;
}

.vansh-roots-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.vansh-roots-content {
    position: relative;
}

.vansh-roots .vansh-part {
    background: rgba(255, 246, 227, 0.12);
    color: #f5d28f;
    box-shadow: none;
}

.vansh-roots .vansh-empty {
    border-color: rgba(245, 210, 143, 0.5);
    background: rgba(0, 0, 0, 0.2);
}

.vansh-ancestors {
    display: flex;
    max-width: 900px;
    margin: 0 auto;
    padding: 0;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    list-style: none;
}

.vansh-card-root {
    width: min(260px, 100%);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
}

.vansh-kul {
    display: flex;
    margin: 26px auto 0;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 28px;
}

.vansh-kul div {
    display: flex;
    gap: 8px;
}

.vansh-kul dt {
    color: #f5d28f;
    font-weight: 700;
}

.vansh-kul dt::after {
    content: ":";
}

.vansh-kul dd {
    margin: 0;
}

/* What the banyan stands for. */
.vansh-meaning {
    background: var(--cream);
}

.vansh-symbols {
    display: grid;
    max-width: 960px;
    margin: 0 auto;
    padding: 0;
    grid-template-columns: 1fr;
    gap: 16px;
    list-style: none;
}

.vansh-symbols li {
    padding: 22px 20px;
    border: 1px solid rgba(177, 122, 37, 0.25);
    border-radius: 16px;
    background: #fff;
    text-align: center;
    box-shadow: 0 8px 22px rgba(79, 29, 23, 0.06);
}

.vansh-symbols .fa-solid {
    color: #43803f;
    font-size: 1.8rem;
}

.vansh-symbols h3 {
    margin: 10px 0 6px;
    color: var(--deep-maroon);
    font-size: 1.25rem;
}

.vansh-symbols p {
    margin: 0;
    color: var(--ink);
}

@media (min-width: 700px) {
    .vansh-symbols {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
