/* ============================================
   The Opinions — HOMEPAGE-ONLY STYLES
   Load this AFTER style.css, only on index.html:
     <link rel="stylesheet" href="style.css" />
     <link rel="stylesheet" href="home.css" />
   ============================================ */

/* ---------- Generic <section> rhythm (only homepage uses raw <section>) ---------- */

section {
    padding: var(--space-6) var(--space-3);
}

section>* {
    max-width: var(--max-width);
    margin-left: auto;
    margin-right: auto;
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, var(--brick) 0%, var(--brick-deep) 48%, var(--ink) 100%);
    padding-top: var(--space-7);
    padding-bottom: var(--space-6);
    text-align: center;
}

.hero-watermark {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-watermark svg {
    position: absolute;
    top: 0;
    right: -4%;
    width: 60%;
    max-width: 560px;
    height: auto;
}

.hero-inner {
    position: relative;
    max-width: 46rem;
    margin: 0 auto;
}

.hero-urdu {
    font-family: var(--font-urdu);
    font-size: 1.4rem;
    color: var(--marigold);
    margin-bottom: var(--space-2);
    animation: rise 0.7s ease both;
}

.hero h1 {
    color: var(--paper);
    font-size: clamp(2.2rem, 4.6vw, 3.5rem);
    animation: rise 0.7s ease 0.08s both;
}

.hero-sub {
    margin: var(--space-3) auto 0;
    max-width: 46ch;
    font-size: 1.08rem;
    color: rgba(255, 255, 255, 0.82);
    animation: rise 0.7s ease 0.16s both;
}

.hero-actions {
    margin-top: var(--space-4);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-2);
    animation: rise 0.7s ease 0.24s both;
    margin-bottom: 1pc;
}

.hero-form-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 0.75rem;
    row-gap: 1rem;
    max-width: 40rem;
    margin: var(--space-4) auto 0;
    animation: rise 0.7s ease 0.3s both;
    margin-bottom: 20px;
}

.hero-form-tab {
    padding: 0.65rem 1.2rem;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    color: var(--paper);
    font-weight: 700;
    font-size: 0.88rem;
    white-space: nowrap;
    max-width: 100%;
    overflow-wrap: anywhere;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.hero-form-tab:hover,
.hero-form-tab:focus-visible {
    background: var(--paper);
    color: var(--brick-deep);
    border-color: var(--paper);
}

/* Mobile: guarantee one button per row, full width, with clear
   vertical spacing — not accidental wrap. */
@media (max-width: 600px) {
    .hero-form-tabs {
        flex-direction: column;
        align-items: stretch;
        row-gap: 0.7rem;
    }

    .hero-form-tab {
        white-space: normal;
        text-align: center;
    }
}

.hero-form-tabs-loading,
.hero-form-tabs-empty {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.88rem;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gentle pulse so the eye is drawn from the hero straight down to the
   forms — used only on the hero's secondary CTA that jumps to #involved. */
@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.35);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.hero-actions .btn-ghost-light {
    animation: rise 0.7s ease 0.24s both, pulse-ring 2.6s ease-in-out 1.2s infinite;
}

/* ---------- Stat strip (overlaps hero seam) ---------- */

.stat-strip-wrap {
    position: relative;
    z-index: 5;
    padding: 0 var(--space-3);
    margin-top: calc(var(--space-6) * -1);
}

.stat-strip {
    max-width: var(--max-width);
    margin: 0 auto;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: 0 18px 40px rgba(17, 17, 17, 0.16);
    padding: var(--space-3);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.3rem;
    padding: var(--space-2);
    border-left: 1px solid var(--line);
}

.stat-item:first-child {
    border-left: none;
}

.stat-item svg {
    width: 24px;
    height: 24px;
    color: var(--brick);
    margin-bottom: 0.2rem;
}

.stat-item strong {
    font-family: var(--font-display);
    font-size: 1.7rem;
    color: var(--ink);
    line-height: 1;
}

.stat-item span {
    font-size: 0.85rem;
    color: var(--ink-soft);
}

/* ---------- Mission / values ---------- */

.mission {
    padding-top: var(--space-7);
}

.value-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
}

.value-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    text-align: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.value-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    margin-bottom: var(--space-2);
}

.value-icon svg {
    width: 24px;
    height: 24px;
}

.value-icon-brick {
    background: var(--brick-tint);
    color: var(--brick);
}

.value-icon-teal {
    background: rgba(0, 0, 0, 0.08);
    color: var(--teal);
}

.value-icon-marigold {
    background: rgba(0, 0, 0, 0.10);
    color: var(--marigold);
}

.value-icon-moss {
    background: rgba(0, 0, 0, 0.12);
    color: var(--moss);
}

.value-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
}

.value-card p {
    font-size: 0.92rem;
}

/* ---------- Transparency (dark band) ---------- */

.transparency {
    background: linear-gradient(135deg, var(--ink) 0%, var(--ink-deep) 55%, #000000 100%);
    text-align: center;
}

.transparency-inner>* {
    max-width: 100%;
}

.transparency-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    align-items: center;
    text-align: left;
    max-width: 52rem;
    margin: 0 auto var(--space-4);
}

.trust-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 0.85rem;
}

.trust-list li {
    padding-left: 1.5rem;
    position: relative;
    color: var(--paper);
    font-weight: 600;
    font-size: 0.97rem;
}

.trust-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--marigold);
}

.ledger-art {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line-light);
    border-radius: var(--radius-md);
    padding: var(--space-3);
}

.ledger-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0.2rem;
    border-bottom: 1px dashed var(--line-light);
    font-size: 0.92rem;
    color: var(--paper);
}

.ledger-row:last-child {
    border-bottom: none;
}

.ledger-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--paper);
    background: rgba(255, 255, 255, 0.14);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
}

.ledger-tag-income {
    color: var(--ink-deep);
    background: var(--paper);
}

.ledger-row-muted span:first-child {
    color: rgba(255, 255, 255, 0.55);
    font-style: italic;
    font-size: 0.85rem;
}

/* ---------- Areas of work ---------- */

.pillar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-3);
}

.pillar {
    position: relative;
    background: var(--paper-deep);
    border-top: 3px solid var(--line);
    border-radius: var(--radius-sm);
    padding: var(--space-3);
    transition: border-color 0.2s ease;
}

.pillar-tag {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--ink-soft);
    background: rgba(17, 17, 17, 0.08);
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}

.pillar-teal {
    border-top-color: var(--teal);
}

.pillar-marigold {
    border-top-color: var(--marigold);
}

.pillar-moss {
    border-top-color: var(--moss);
}

.pillar-brick {
    border-top-color: var(--brick);
}

.pillar-icon {
    width: 30px;
    height: 30px;
    margin-bottom: var(--space-2);
}

.pillar-teal .pillar-icon {
    color: var(--teal);
}

.pillar-marigold .pillar-icon {
    color: var(--marigold);
}

.pillar-moss .pillar-icon {
    color: var(--moss);
}

.pillar-brick .pillar-icon {
    color: var(--brick);
}

.pillar h3 {
    font-size: 1.15rem;
    margin-bottom: 0.4rem;
}

.pillar p {
    font-size: 0.95rem;
}

/* ---------- Get involved (THE main conversion section — deliberately the
   most visually loud section on the page, so a first-time visitor's eye
   lands here before anywhere else) ---------- */

.involved {
    position: relative;
    overflow: hidden;
    background: var(--spotlight);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

/* Soft radial glow behind the heading — a "spotlight" cue, not a hard block
   of color, so it stays readable and doesn't fight the form cards for
   attention. */
.involved::before {
    content: "";
    position: absolute;
    top: -180px;
    left: 50%;
    width: 720px;
    height: 720px;
    transform: translateX(-50%);
    background: radial-gradient(circle, var(--brick-glow) 0%, transparent 68%);
    pointer-events: none;
}

.involved .section-head,
.involved .involved-grid {
    position: relative;
    z-index: 1;
}

.involved-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--brick);
    color: var(--paper);
    font-weight: 700;
    font-size: 0.76rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    margin-bottom: var(--space-2);
}

.involved-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-3);
}

.involved-loading {
    text-align: center;
    grid-column: 1 / -1;
}

.form-card {
    position: relative;
    display: block;
    background: #fff;
    border: 1px solid var(--line);
    border-top: 4px solid var(--brick);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.form-card:hover,
.form-card:focus-visible {
    border-color: var(--brick);
    transform: translateY(-6px);
    box-shadow: 0 22px 40px rgba(0, 0, 0, 0.2);
}

/* Icon badge for dynamically-rendered form cards — icon SVG comes from
   main.js's formIconSvg(), chosen per form type (blood, member, health,
   school, financial, etc.) and injected as <span class="form-card-icon">. */
.form-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    margin-bottom: var(--space-2);
    border-radius: 50%;
    background: var(--brick);
    color: #fff;
}

.form-card-icon svg {
    width: 22px;
    height: 22px;
}

.form-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.4rem;
}

.form-card p {
    font-size: 0.93rem;
}

.form-card .form-card-open {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: var(--space-3);
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--paper);
    background: var(--brick);
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    transition: background-color 0.18s ease, gap 0.18s ease;
}

.form-card .form-card-open::after {
    content: "\2192";
    transition: transform 0.18s ease;
}

.form-card:hover .form-card-open {
    background: var(--brick-deep);
}

.form-card:hover .form-card-open::after {
    transform: translateX(3px);
}

/* ---------- Responsive (homepage-only sections) ---------- */

@media (max-width: 960px) {
    .value-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pillar-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .transparency-grid {
        grid-template-columns: 1fr;
    }

    .stat-strip {
        grid-template-columns: repeat(2, 1fr);
        row-gap: var(--space-2);
    }

    .stat-item:nth-child(3) {
        border-left: none;
    }
}

@media (max-width: 600px) {
    .value-grid {
        grid-template-columns: 1fr;
    }

    .pillar-grid {
        grid-template-columns: 1fr;
    }

    .stat-strip {
        grid-template-columns: 1fr 1fr;
    }

    .stat-item:nth-child(2n+1) {
        border-left: none;
    }

    section {
        padding: var(--space-5) var(--space-2);
    }

    .stat-strip-wrap {
        margin-top: calc(var(--space-5) * -1);
    }
}

/* Latin motto under the crest (logo) — reuses hero-inner's rise animation cue */
.hero-motto {
    font-family: var(--font-display);
    font-style: italic;
    letter-spacing: 0.05em;
    font-size: 0.95rem;
    color: var(--marigold);
    margin-bottom: var(--space-2);
    animation: rise 0.7s ease both;
}

/* Subtle ring so the crest logo doesn't blend into the maroon footer gradient */
.footer-logo {
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.publications {
    padding: var(--space-6) var(--space-3);
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 600px) {
    .publications {
        padding: var(--space-5) var(--space-2);
    }
}

.publications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: 24px;
    margin-top: 40px;
}

/* Newspaper-style card: no big banner image — a round author avatar
   sits in the byline instead, same treatment as the full publications
   listing page and the single-article page. */
.publication-card {
    background: var(--paper, #fff);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Legacy banner-image rules — no longer used by main.js (cards now use
   the round byline avatar below), kept in case anything else needs one. */
.publication-card-img {
    width: 100%;
    aspect-ratio: 16 / 10;
    height: auto;
    object-fit: cover;
    display: block;
    background: #eee;
}

.publication-card-img-placeholder {
    aspect-ratio: 16 / 10;
    width: 100%;
    background: linear-gradient(135deg, #f1ede4, #e6dfd0);
}

.publication-card-body {
    padding: 22px 20px 22px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.publication-card-tag {
    display: inline-block;
    align-self: flex-start;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #1A1A1A;
    background: rgba(0, 0, 0, 0.08);
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.publication-card-body h3 {
    margin: 0 0 12px;
    font-family: 'Zilla Slab', serif;
    font-size: 1.15rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* ---- Byline: round author avatar + name, newspaper op-ed style ---- */
.publication-card-byline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
}

.publication-card-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: linear-gradient(135deg, #f1ede4, #e6dfd0);
    border: 2px solid #ece6d8;
}

.publication-card-author {
    font-size: 13px;
    color: var(--muted-2, #777);
    margin: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.publication-card-excerpt {
    font-size: 14px;
    line-height: 1.55;
    color: #444;
    margin: 0 0 14px;
    flex: 1;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.publications-cta {
    margin-top: 36px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

.publications-loading {
    text-align: center;
    color: var(--muted-2, #777);
}

/* Cards are now <a> tags — remove underline, and add the "Read more"
   label to match the full listing page's card style. */
a.publication-card {
    text-decoration: none;
    color: inherit;
}

.publication-card-read {
    font-size: 13px;
    font-weight: 700;
    color: #1A1A1A;
    margin-top: auto;
}

.publication-card-read::after {
    content: " →";
}

.publication-card-excerpt.is-urdu {
    line-height: 1.9;
}