/* Base Setup & Smooth Scroll */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html.lenis,
html.lenis body {
    height: auto;
    width: 100%;
    overflow-x: clip;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

body {
    background-color: #fdfcf9;
    color: #0a0f1a;
    overflow-x: clip;
    max-width: 100%;
    font-family: 'Old Standard TT', Georgia, serif;
}

::selection {
    background: #1fc4bc;
    color: #0a0f1a;
}

p,
li,
.scrub-text {
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

/* Main content */
.main-wrapper {
    position: relative;
    z-index: 10;
    background-color: #fdfcf9;
    color: #0a0f1a;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

/* Scroll Wire */
.scroll-wire-container {
    position: fixed;
    left: 4vw;
    top: 0;
    width: 1px;
    height: 100vh;
    background: rgba(0, 0, 0, 0.06);
    z-index: 50;
}

.scroll-wire-fill {
    width: 1px;
    background: #1fc4bc;
    height: 0%;
    position: absolute;
    top: 0;
    left: 0;
}

/* Contact link — visible on dark hero, adapts on scroll via JS class */
.contact-link {
    background: rgba(10, 15, 26, 0.4);
    backdrop-filter: blur(8px);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-link--light {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.08);
    color: #0a0f1a !important;
}

.contact-link--light:hover {
    color: #1fc4bc !important;
}

/* Horizontal Scroll Section */
.horizontal-section {
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    position: relative;
    background: #0a0f1a;
    color: #fdfcf9;
}

@media (min-width: 768px) {
    .horizontal-section {
        height: 100vh;
    }

    .horizontal-container {
        display: flex;
        width: 300%;
        height: 100%;
    }

    .horizontal-panel {
        width: 33.333%;
        flex-shrink: 0;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        padding: 0 5vw;
    }
}

/* Mobile: compact stacked panels — no forced 100vh empty space */
@media (max-width: 767px) {
    .horizontal-section {
        height: auto;
    }

    .horizontal-container {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: auto;
        gap: 0;
    }

    .horizontal-panel {
        width: 100%;
        min-height: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        padding: 3rem 1.25rem;
    }

    .horizontal-panel:not(:last-child) {
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }
}

/* Typography */
.scrub-text .word {
    opacity: 0.15;
    transition: opacity 0.1s;
}

.char {
    display: inline-block;
}

/* Hero section */
.hero-section {
    min-height: 100vh;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-section > .relative.z-10 {
    min-height: 0;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

/* Hero headline — newspaper masthead */
.hero-perspective {
    perspective: 1200px;
    perspective-origin: 50% 40%;
}

.hero-title {
    width: 100%;
    max-width: 100%;
    overflow: visible;
    transform-style: preserve-3d;
}

.shabbat-scroll-layer {
    position: relative;
    z-index: 20;
    transform-origin: 0% 100%;
    will-change: transform;
}

.hero-line-1,
.hero-line-2 {
    display: block;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    letter-spacing: -0.02em;
    transform-style: preserve-3d;
    font-family: 'Old Standard TT', Georgia, serif;
}

.hero-line-inner {
    display: inline-block;
}

.hero-line-1 {
    font-size: clamp(1.5rem, 5.5vw, 4.5rem);
    line-height: 0.9;
    font-weight: 700;
    font-style: italic;
}

.hero-line-2 {
    font-size: clamp(2.2rem, 10vw, 7.5rem);
    line-height: 0.92;
    font-weight: 700;
}

.hero-line-inner--accent .char {
    color: #ffffff;
}

.hero-line-1 .char,
.hero-line-2 .char {
    display: inline-block;
    will-change: transform, opacity, filter;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

.hero-glow {
    opacity: 0;
    will-change: transform, opacity;
}

.scroll-indicator span {
    display: inline-block;
}

/* Body copy */
.font-serif,
.scrub-text {
    font-family: 'Old Standard TT', Georgia, serif;
}

/* Footer / donate headline */
.footer-headline {
    width: 100%;
    max-width: 100%;
    overflow: visible;
}

.footer-line-1,
.footer-line-2,
.footer-line-3,
.footer-line-4 {
    display: block;
    width: 100%;
    white-space: nowrap;
    overflow: visible;
    letter-spacing: -0.02em;
    /* Extra room so gradient/clip-text + serif glyphs aren't cropped */
    padding-block: 0.12em;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.footer-line-1 {
    font-size: clamp(2rem, 11vw, 7rem);
    line-height: 1.05;
    min-height: 1.15em;
}

.footer-line-2 {
    font-size: clamp(1.2rem, 6vw, 4rem);
    line-height: 1.15;
    min-height: 1.2em;
}

.footer-line-3 {
    font-size: clamp(1.6rem, 8.5vw, 5.5rem);
    line-height: 1.1;
    min-height: 1.15em;
}

.footer-line-4 {
    font-size: clamp(1.8rem, 9.5vw, 6.5rem);
    line-height: 1.1;
    min-height: 1.15em;
}

/* Panel headings */
.panel-heading {
    font-size: clamp(2rem, 8vw, 4.5rem);
    line-height: 1.05;
    max-width: 100%;
    overflow-wrap: break-word;
}

/* Bento headings */
.bento-heading-lg {
    font-size: clamp(2rem, 6vw, 3.5rem);
    line-height: 1;
    max-width: 100%;
}

.bento-heading-md {
    font-size: clamp(1.75rem, 5vw, 2.8rem);
    line-height: 1;
    max-width: 100%;
}

/* Scrub text */
.scrub-text {
    font-size: clamp(1.5rem, 5vw, 4.5rem);
    line-height: 1.15;
    max-width: 100%;
}

/* Image masking */
.reveal-img-wrap {
    overflow: hidden;
    position: relative;
}

.reveal-img-wrap img {
    transform: scale(1.3);
    will-change: transform;
}

/* Read more about Eruv banner */
.eruv-read-more {
    display: flex;
    align-items: stretch;
    gap: 0;
    width: 100%;
    max-width: 42rem;
    border-radius: 1.25rem;
    overflow: hidden;
    border: 1px solid rgba(31, 196, 188, 0.2);
    background: #fff;
    box-shadow: 0 16px 48px rgba(10, 15, 26, 0.06);
    text-decoration: none;
    color: inherit;
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.eruv-read-more:hover {
    transform: translateY(-3px);
    border-color: rgba(31, 196, 188, 0.45);
    box-shadow: 0 24px 56px rgba(31, 196, 188, 0.12);
}

.eruv-read-more__image {
    flex-shrink: 0;
    width: clamp(110px, 32%, 180px);
    overflow: hidden;
}

.eruv-read-more__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.eruv-read-more:hover .eruv-read-more__image img {
    transform: scale(1.06);
}

.eruv-read-more__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1.25rem 1rem 1.25rem 1.25rem;
    min-width: 0;
}

.eruv-read-more__eyebrow {
    font-family: 'Old Standard TT', Georgia, serif;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #c69c6d;
    margin-bottom: 0.35rem;
}

.eruv-read-more__title {
    font-family: 'Old Standard TT', Georgia, serif;
    font-size: clamp(1rem, 3.5vw, 1.35rem);
    font-weight: 700;
    color: #1fc4bc;
    line-height: 1.15;
    margin-bottom: 0.4rem;
}

.eruv-read-more__desc {
    font-family: 'Old Standard TT', Georgia, serif;
    font-size: 0.8rem;
    line-height: 1.5;
    color: rgba(10, 15, 26, 0.55);
    margin: 0;
}

.eruv-read-more__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.25rem;
    color: #1fc4bc;
    font-size: 1.35rem;
    transition: transform 0.35s ease;
}

.eruv-read-more:hover .eruv-read-more__arrow {
    transform: translate(3px, -3px);
}

@media (max-width: 480px) {
    .eruv-read-more {
        flex-direction: column;
    }

    .eruv-read-more__image {
        width: 100%;
        height: 140px;
    }

    .eruv-read-more__arrow {
        padding: 0 1.25rem 1.25rem;
        justify-content: flex-end;
    }
}

/* Donate footer — normal document flow, no gap */
.donate-section {
    background: #fdfcf9;
    position: relative;
    width: 100%;
    z-index: 10;
    overflow-x: clip;
    border-top: 1px solid rgba(198, 156, 109, 0.15);
}

/* Gold gradient headline text */
.text-gradient-gold {
    background: linear-gradient(90deg, #a67c52 0%, #c69c6d 35%, #e8c88a 65%, #ffeb3b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.text-gradient-gold-outline {
    background: linear-gradient(90deg, #b8894f 0%, #d4a96a 25%, #e8c88a 50%, #f5d78e 75%, #ffeb3b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-stroke: 1px rgba(166, 124, 82, 0.4);
}

@media (min-width: 768px) {
    .text-gradient-gold-outline {
        -webkit-text-stroke: 1.5px rgba(166, 124, 82, 0.3);
    }
}

/* Nav */
.nav-bar {
    max-width: calc(100vw - 1rem);
    width: max-content;
}

.nav-links-group {
    flex-shrink: 1;
    min-width: 0;
}

.nav-link:hover {
    color: #1fc4bc;
}

/* Campaign counter */
.campaign-counter {
    font-size: clamp(3rem, 12vw, 6rem);
    line-height: 1;
    max-width: 100%;
}

/* Scroll indicator pulse */
@keyframes scroll-pulse {
    0% {
        opacity: 0.3;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(5px);
    }
    100% {
        opacity: 0.3;
        transform: translateY(0);
    }
}

.animate-scroll {
    animation: scroll-pulse 2s ease-in-out infinite;
}

/* Reveal blocks start hidden for GSAP */
.reveal-block {
    will-change: transform, opacity;
}

/* ─── Scroll Background Infographics (definition section only) ─── */
.section-infographics {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.info-card {
    position: absolute;
    border-radius: 1.25rem;
    border: 1px solid rgba(10, 15, 26, 0.08);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    opacity: 0;
    will-change: transform, opacity;
}

.info-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.info-card__caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem 1rem;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.95), transparent);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.info-card__label {
    font-family: 'Old Standard TT', Georgia, serif;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #c69c6d;
}

.info-card__value {
    font-family: 'Old Standard TT', Georgia, serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: #0a0f1a;
}

.info-card__stat-text {
    font-family: 'Old Standard TT', Georgia, serif;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #0a0f1a;
    opacity: 0.5;
    text-align: center;
    padding: 0 1rem 1rem;
}

/* Positions — definition section */
#definition .info-card--map {
    width: clamp(180px, 28vw, 320px);
    height: clamp(140px, 22vw, 240px);
    top: 10%;
    right: 2%;
    left: auto;
}

@media (max-width: 767px) {
    #definition .info-card--map {
        right: -25%;
        top: 6%;
    }
}

@supports (padding: max(0px)) {
    .nav-bar {
        bottom: max(1.5rem, env(safe-area-inset-bottom));
    }

    .donate-section {
        padding-bottom: max(8rem, env(safe-area-inset-bottom));
    }
}

/* —— Google Sites site additions (same UI system) —— */
.eruv-status {
    display: inline-flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.85rem 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(10, 15, 26, 0.45);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
}

.eruv-status__row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.eruv-status__label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #c69c6d;
}

.eruv-status__badge {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
}

.eruv-status__badge--up {
    background: #1fc4bc;
    color: #0a0f1a;
}

.eruv-status__badge--down {
    background: #c43b3b;
    color: #fff;
}

.eruv-status__meta {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
}

.map-embed {
    width: 100%;
    background: #fff;
}

.map-embed iframe {
    width: 100%;
    min-height: 50vh;
}

.faq-item summary {
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item[open] summary .ri-add-line::before {
    content: "\ea13";
}

