/* =================================================================== */
/* ===== FEATURE 3: PREAMBLE EXPLORER STYLES (HISTORIC & REFINED) ===== */
/* =================================================================== */

/* Variables inheriting from global style tokens with premium extensions */
:root {
    --preamble-saffron: #FF9933;
    --preamble-green: #138808;
    --preamble-navy: #000080;
    --preamble-gold-primary: #b5893d;
    --preamble-gold-bright: #d4af37;
    --preamble-gold-dark: #8a6d3b;
    --preamble-maroon-historic: #4a1805;
    /* Deep, rich calligraphic maroon from original image */
    --preamble-parchment: #f4f6e4;
    /* Authentic light-sage/warm cream aged parchment */
    --preamble-parchment-border: #8c734b;
    --preamble-glass-bg: rgba(255, 255, 255, 0.45);
    --preamble-glass-border: rgba(255, 255, 255, 0.6);
    --preamble-shadow: 0 25px 55px rgba(12, 16, 25, 0.2), 0 8px 30px rgba(0, 0, 0, 0.06);
    --preamble-transition: all 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Background Flow & Particle Effects */
body {
    min-height: 100vh;
    background-color: #f3f5ee;
    background-image:
        radial-gradient(rgba(74, 24, 5, 0.03) 1.5px, transparent 1.5px),
        linear-gradient(135deg, #FFEFE2 0%, #FFFFFF 50%, #E8FDF0 100%);
    background-size: 30px 30px, 100% 100%;
}

.main {
    padding-top: calc(60px + var(--space-md) * 2); /* Proper header clearance */
}

/* DECREASED CONTAINER WIDTH FOR HISTORIC SCROLL RATIO */
.preamble-container {
    width: 100%;
    max-width: 860px; /* Sized to fit comfortably on desktop viewports */
    margin: 10px auto 10px;
    padding: 0 var(--space-lg);
    box-sizing: border-box;
    z-index: 2;
}

/* Background Orbs */
.preamble-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: visible;
}

.preamble-bg .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    mix-blend-mode: multiply;
    animation: orbFloat 15s ease-in-out infinite alternate;
}

.orb--saffron {
    top: -10%;
    left: 5%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--preamble-saffron) 0%, transparent 70%);
}

.orb--green {
    bottom: -10%;
    right: 5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--preamble-green) 0%, transparent 70%);
    animation-delay: -3s;
}

.orb--navy {
    top: 40%;
    left: 45%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--preamble-navy) 0%, transparent 70%);
    animation-delay: -6s;
}

@keyframes orbFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(30px, -40px) scale(1.1);
    }

    100% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}

/* Introduction Headers */
.preamble-header {
    text-align: center;
    max-width: 750px;
    margin: 0 auto 0.4rem;
    z-index: 10;
    position: relative;
}

.preamble-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--preamble-maroon-historic);
    margin: 0;
}

.header-badge {
    display: none; /* Hidden on desktop to achieve no-scroll single screen */
}

.intro-lead {
    display: none; /* Hidden on desktop to achieve no-scroll single screen */
}

.header-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    background: rgba(74, 24, 5, 0.06);
    border: 1px solid rgba(74, 24, 5, 0.15);
    color: var(--preamble-maroon-historic);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-md);
    box-shadow: 0 4px 10px rgba(74, 24, 5, 0.05);
}

.preamble-header h2 {
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 800;
    color: var(--preamble-maroon-historic);
    margin: 0;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.intro-lead {
    font-size: clamp(0.95rem, 2vw, 1.05rem);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: var(--space-sm);
}

/* DECREASED WIDTH: Parchment Paper Constitution Container */
.parchment-frame {
    position: relative;
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
    background: var(--preamble-parchment);
    box-shadow: var(--preamble-shadow), inset 0 0 100px rgba(216, 185, 147, 0.25);
    border-radius: 12px;
    padding: 8px;
    box-sizing: border-box;
    z-index: 5;
    margin-bottom: 0px;
}

/* AUTHENTIC DEEP PADDING: Text pushed inside the 110px border strips on all 4 sides */
.parchment-inner {
    position: relative;
    background: var(--preamble-parchment);
    /* top/bottom: 100px border + compact margin */
    /* left/right: 110px side border + compact margin */
    padding: 4.8rem 5.2rem 4.2rem 5.2rem;
    border-radius: 8px;
    overflow: hidden;
}



/* ══════════════════════════════════════════════════════════
   FOUR-SIDED AUTHENTIC BORDER
   Each side uses a dedicated pre-rotated SVG (border-top/bottom/left/right.svg)
   No CSS rotation tricks — just simple absolute positioning.
   ══════════════════════════════════════════════════════════ */

.preamble-golden-border {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    overflow: visible;
}

/* ── TOP: full width strip anchored to the top edge ── */
.border-top {
    position: absolute;
    display: block;
    top: -12px;
    left: -14px;
    width: calc(100% + 28px);
    height: 100px;
    object-fit: fill;
}

/* ── BOTTOM: same SVG as top, flipped vertically with CSS scaleY(-1) ── */
.border-bottom {
    position: absolute;
    display: block;
    bottom: -12px;
    left: -14px;
    width: calc(100% + 28px);
    height: 100px;
    object-fit: fill;
    transform: scaleY(-1);
    transform-origin: center center;
}

/* ── LEFT: narrow full-height strip on the left edge ── */
.border-left {
    position: absolute;
    display: block;
    left: -14px;
    top: -12px;
    width: 110px;
    height: calc(100% + 24px);
    object-fit: fill;
}

/* ── RIGHT: narrow full-height strip on the right edge ── */
.border-right {
    position: absolute;
    display: block;
    right: -14px;
    top: -12px;
    width: 110px;
    height: calc(100% + 24px);
    object-fit: fill;
}

/* ── Responsive: slightly thinner strips on mobile ── */
@media (max-width: 600px) {

    .border-top,
    .border-bottom {
        height: 74px;
        top: -4px;
        left: -4px;
        width: calc(100% + 8px);
    }

    .border-bottom {
        bottom: -4px;
        top: unset;
    }

    .border-left {
        left: -4px;
        top: -4px;
        width: 72px;
        height: calc(100% + 8px);
    }

    .border-right {
        right: -4px;
        top: -4px;
        width: 72px;
        height: calc(100% + 8px);
    }
}




/* Watermark: Extremely subtle background details */
.chakra-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(300px, 60vw, 420px);
    height: clamp(300px, 60vw, 420px);
    opacity: 0.32;
    /* stronger but still subtle */
    pointer-events: none;
    user-select: none;
    z-index: 1;
    transform-origin: center center;
    animation: rotateChakra 180s linear infinite;
}

@keyframes rotateChakra {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* External-image watermark rules */
.chakra-watermark .chakra-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    opacity: 0.3;
    /* final visibility is controlled by parent */
}

/* AUTHENTIC BLACKLETTER TITLES: Exact match of original document */
.preamble-title {
    font-family: 'Grenze Gotisch', 'EB Garamond', serif;
    font-size: 1.8rem;
    /* Enlarged, majestic Gothic title */
    font-weight: 800;
    text-align: center;
    color: var(--preamble-maroon-historic);
    letter-spacing: 0.02em;
    margin-top: 0.4rem;
    margin-bottom: 0.1rem;
    position: relative;
    z-index: 10;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.9);
}

/* Calligraphic Traditional Divider Under Title */
.traditional-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 180px;
    height: 18px;
    margin: 0.2rem auto 0.4rem;
    position: relative;
    z-index: 10;
    opacity: 0.9;
}

.traditional-divider svg {
    width: 100%;
    height: 100%;
}

.preamble-subtitle {
    font-family: 'Cinzel', 'Times New Roman', serif;
    font-size: 0.95rem;
    font-weight: 800;
    text-align: center;
    color: var(--preamble-maroon-historic);
    letter-spacing: 0.22em;
    margin-bottom: 0.6rem;
    position: relative;
    z-index: 10;
}

/* CENTERED PREAMBLE BODY TEXT (Authentic layout) */
.preamble-text {
    position: relative;
    z-index: 10;
    text-align: center;
    line-height: 1.8;
    font-family: 'EB Garamond', 'Georgia', serif;
    font-size: 1.05rem;
    /* Enhanced calligraphic readability */
    color: #2e1d13;
    padding: 0 10px;
    text-shadow: 0 0.5px 1.5px rgba(74, 24, 5, 0.08);
}

.solemn-resolve {
    margin-bottom: 0.8rem;
    text-align: center;
}

.sovereign-block {
    display: block;
    font-family: 'Cinzel', serif;
    font-weight: 800;
    font-size: 1.12rem;
    color: var(--preamble-maroon-historic);
    letter-spacing: 0.04em;
    margin-top: 0.3rem;
    line-height: 1.4;
}

/* CENTERED VALUES LIST (Authentic Symmetrical Flow) */
.values-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin: 0.8rem 0;
    padding-left: 0;
    border-left: none;
    align-items: center;
}

.value-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
    width: 100%;
}

.fraternity-lead {
    margin: 0.4rem 0 0.2rem;
    font-style: italic;
    color: var(--text-muted);
    font-size: 1rem;
}

.value-subtext {
    color: #3d2f23;
    font-size: 0.98rem;
    line-height: 1.4;
    max-width: 92%;
}

.adoption-clause {
    margin-top: 0.8rem;
    text-align: center;
    font-style: italic;
    line-height: 1.5;
    font-size: 0.95rem;
}

/* ── Interactive Highlight Term Buttons ── */
.term-wrapper {
    display: inline-block;
    position: relative;
    z-index: 15;
}

.preamble-term {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 1rem;
    font-family: 'Cinzel', serif;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    border-radius: 8px;
    user-select: none;
    transition: var(--preamble-transition);
    outline: none;
}

/* Term Colors matching the actual Preamble's rich dark-red/bronze accent tones */
#term-justice {
    color: var(--preamble-maroon-historic);
    background: rgba(74, 24, 5, 0.04);
}

#term-justice .outline-svg {
    color: var(--preamble-saffron);
}

#term-liberty {
    color: var(--preamble-maroon-historic);
    background: rgba(74, 24, 5, 0.04);
}

#term-liberty .outline-svg {
    color: var(--preamble-navy);
}

#term-equality {
    color: var(--preamble-maroon-historic);
    background: rgba(74, 24, 5, 0.04);
}

#term-equality .outline-svg {
    color: var(--preamble-green);
}

#term-fraternity {
    color: var(--preamble-maroon-historic);
    background: rgba(74, 24, 5, 0.04);
}

#term-fraternity .outline-svg {
    color: var(--preamble-gold-primary);
}

/* Interactive Hover States */
.preamble-term:hover,
.preamble-term:focus-visible {
    transform: translateY(-2.5px) scale(1.04);
}

#term-justice:hover,
#term-justice:focus-visible {
    color: #e65c00; /* Richer saffron */
    background: rgba(255, 153, 51, 0.08);
    box-shadow: 0 4px 15px rgba(255, 153, 51, 0.18);
}

#term-liberty:hover,
#term-liberty:focus-visible {
    color: var(--preamble-navy);
    background: rgba(0, 0, 128, 0.06);
    box-shadow: 0 4px 15px rgba(0, 0, 128, 0.15);
}

#term-equality:hover,
#term-equality:focus-visible {
    color: var(--preamble-green);
    background: rgba(19, 136, 8, 0.08);
    box-shadow: 0 4px 15px rgba(19, 136, 8, 0.18);
}

#term-fraternity:hover,
#term-fraternity:focus-visible {
    color: var(--preamble-gold-dark);
    background: rgba(138, 109, 59, 0.08);
    box-shadow: 0 4px 15px rgba(138, 109, 59, 0.18);
}

.preamble-term:active {
    transform: translateY(0) scale(1);
}

/* SVG Outline Drawer logic */
.outline-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    border-radius: 8px;
}

.svg-rect {
    stroke-dasharray: 450;
    stroke-dashoffset: 450;
    stroke: currentColor;
    transition: stroke-dashoffset 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* On hover/focus drawing trigger */
.preamble-term:hover .svg-rect,
.preamble-term:focus-visible .svg-rect {
    stroke-dashoffset: 0;
}

/* Dynamic glow values on focus */
.preamble-term:focus-visible {
    box-shadow: 0 0 0 3px rgba(74, 24, 5, 0.25);
}

/* Mobile instruction hint */
.tap-hint {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 15px;
    display: none;
    font-family: 'EB Garamond', serif;
}

/* ── Elegant Glassmorphic Modal overlay ── */
.preamble-modal-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: var(--z-fixed);
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms ease;
    padding: var(--space-md);
    box-sizing: border-box;
}

.preamble-modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.preamble-modal-card {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid var(--preamble-glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 30px 70px rgba(6, 10, 20, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.94) translateY(20px);
    transition: transform 450ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 300ms ease;
    opacity: 0;
    overflow: hidden;
    font-family: system-ui, -apple-system, sans-serif;
}

.preamble-modal-overlay.active .preamble-modal-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Modal Header styling */
.modal-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid rgba(0, 0, 128, 0.08);
    background: rgba(255, 255, 255, 0.4);
}

.modal-term-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(0, 0, 128, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--preamble-navy);
    font-size: 1.25rem;
    margin-right: var(--space-md);
}

.modal-header h3 {
    margin: 0;
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--preamble-navy);
}

.modal-close-btn {
    background: rgba(15, 23, 42, 0.05);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--preamble-transition);
}

.modal-close-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    transform: rotate(90deg);
}

/* Modal Scroll Body content */
.modal-body-content {
    padding: var(--space-xl);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    max-height: 55vh;
}

.content-section {
    padding: var(--space-lg);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: var(--preamble-transition);
}

.content-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.03);
}

/* Colors matching the categories */
.card-saffron {
    background: rgba(255, 153, 51, 0.035);
    border-left: 4px solid var(--preamble-saffron);
}

.card-saffron .section-title {
    color: var(--preamble-saffron);
}

.card-navy {
    background: rgba(0, 0, 128, 0.025);
    border-left: 4px solid var(--preamble-navy);
}

.card-navy .section-title {
    color: var(--preamble-navy);
}

.card-green {
    background: rgba(19, 136, 8, 0.03);
    border-left: 4px solid var(--preamble-green);
}

.card-green .section-title {
    color: var(--preamble-green);
}

.section-title {
    margin: 0 0 10px 0;
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.content-section p {
    margin: 0;
    color: #374151;
    font-size: 0.98rem;
    line-height: 1.6;
}

/* Modal Footer & CTA Button */
.modal-footer {
    padding: var(--space-lg) var(--space-xl);
    border-top: 1px solid rgba(0, 0, 128, 0.08);
    background: rgba(255, 255, 255, 0.4);
    display: flex;
    justify-content: flex-end;
}

.modal-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--preamble-navy);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 8px 20px rgba(0, 0, 128, 0.2);
    transition: var(--preamble-transition);
}

.modal-action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(0, 0, 128, 0.3);
    background: var(--navy-dark);
}

.modal-action-btn:active {
    transform: translateY(0);
}

/* ── National Emblem of India Styling ── */
.preamble-emblem {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    position: relative;
    z-index: 10;
}

.preamble-emblem.top {
    margin-top: 1.2rem;
    margin-bottom: 0.5rem;
}

.preamble-emblem.bottom {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.emblem-img {
    width: 60px;
    height: auto;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.08));
    transition: transform var(--preamble-transition);
}

.emblem-img:hover {
    transform: scale(1.06);
}

/* =====================================================
   PREAMBLE EXPLORER — COMPLETE RESPONSIVE MEDIA QUERIES
   Replace ALL existing @media blocks in preamble.css
   Breakpoints: 768 | 600 | 480 | 375 | 320
   ===================================================== */

/* ── 768px: Tablets & small laptops ── */
@media (max-width: 768px) {
    .main {
        padding-top: calc(60px + var(--space-md) * 2);
    }

    .preamble-container {
        margin-top: 10px;
        margin-bottom: 24px;
        max-width: 100%;
        padding: 0 var(--space-md);
    }

    .header-badge {
        display: inline-flex; /* Show badge on mobile scrolling viewports */
    }

    .intro-lead {
        display: block; /* Show lead on mobile scrolling viewports */
    }

    .parchment-frame {
        padding: 8px;
        border-radius: 10px;
    }

    .parchment-inner {
        padding: clamp(5.8rem, 8vw, 6.8rem) clamp(4.8rem, 7vw, 5.8rem);
    }

    .preamble-title {
        font-size: clamp(2rem, 4.5vw, 3rem);
    }

    .preamble-subtitle {
        font-size: clamp(1.05rem, 1.8vw, 1.2rem);
        letter-spacing: 0.22em;
    }

    .preamble-text {
        font-size: clamp(1rem, 1.9vw, 1.2rem);
    }

    .modal-body-content {
        padding: var(--space-md);
        gap: var(--space-md);
    }

    .content-section {
        padding: var(--space-md);
    }

    .values-list {
        gap: 1.4rem;
        margin: 1.5rem 0;
    }

    .value-subtext {
        font-size: 1.05rem;
        max-width: 95%;
    }

    /* Border SVGs */
    .border-top,
    .border-bottom {
        height: 100px;
        top: -12px;
        left: -14px;
        width: calc(100% + 28px);
    }

    .border-bottom {
        bottom: -12px;
        top: unset;
    }

    .border-left {
        left: -14px;
        top: -12px;
        width: 124px;
        height: calc(100% + 24px);
    }

    .border-right {
        right: -14px;
        top: -12px;
        width: 124px;
        height: calc(100% + 24px);
    }

    .preamble-emblem.top {
        margin-top: 0.8rem;
        margin-bottom: 0.4rem;
    }

    .preamble-emblem.bottom {
        margin-top: 1.2rem;
        margin-bottom: 1.2rem;
    }

    .emblem-img {
        width: clamp(65px, 12vw, 88px);
    }
}

/* ── 600px: Large phones landscape / small tablets ── */
@media (max-width: 600px) {

    .preamble-container {
        margin: 40px auto 18px;
        /* smaller top/bottom gap on mobile */
    }

    .parchment-frame {
        max-width: 100%;
        margin-bottom: 12px;
        padding: 8px;
        border-radius: 10px;
    }

    .parchment-inner {
        padding: clamp(2.2rem, 8vw, 3.6rem) clamp(1.2rem, 6vw, 2.2rem);
    }

    .preamble-header h2 {
        margin-top: 0.6rem;
        font-size: 2.4rem;
    }

    /* Border SVGs — thinner strips */
    .border-top,
    .border-bottom {
        height: 74px;
        top: -4px;
        left: -4px;
        width: calc(100% + 8px);
    }

    .border-bottom {
        bottom: -4px;
        top: unset;
    }

    .border-left,
    .border-right {
        width: 72px;
        top: 24px;
        height: calc(100% - 48px);
    }

    .border-right {
        right: -4px;
        left: unset;
    }

    .sovereign-block {
        font-size: clamp(1.05rem, 2vw, 1.25rem);
    }

    .modal-header {
        padding: var(--space-md) var(--space-lg);
    }

    .modal-footer {
        padding: var(--space-md) var(--space-lg);
    }
}

/* ── 480px: Standard phones ── */
@media (max-width: 480px) {
    .tap-hint {
        display: block;
    }

    /* header may be fixed; ensure container sits below it */
    .main {
        padding-top: calc(60px + var(--space-md) * 2);
    }

    .preamble-container {
        margin-top: 0;
        margin-bottom: 4px;
        padding: 0 var(--space-sm);
    }

    .header-badge {
        display: inline-flex;
    }

    .preamble-header h2 {
        font-size: 2rem;
    }

    .intro-lead {
        display: block;
        font-size: 0.9rem;
    }

    .parchment-frame {
        border-radius: 8px;
        padding: 5px;
        margin-bottom: 6px;
    }

    .parchment-inner {
        padding: 2.6rem 1.6rem;
    }

    .preamble-title {
        font-size: clamp(1.8rem, 6vw, 2.4rem);
        margin-top: 0.8rem;
    }

    .preamble-subtitle {
        font-size: 1rem;
        letter-spacing: 0.2em;
        margin-bottom: 1.4rem;
    }

    .preamble-text {
        font-size: 1.05rem;
        line-height: 1.95;
        padding: 0 8px;
    }

    .sovereign-block {
        font-size: 1.1rem;
    }

    .preamble-term {
        padding: 0.3rem 1rem;
        font-size: 1.12rem;
    }

    .values-list {
        gap: 0.8rem;
        margin: 0.8rem 0;
    }

    .value-subtext {
        font-size: 1rem;
        max-width: 100%;
    }

    .fraternity-lead {
        font-size: 1.05rem;
    }

    .adoption-clause {
        font-size: 0.95rem;
        margin-top: 1.2rem;
    }

    /* Emblems */
    .preamble-emblem.top {
        margin-top: 2.2rem;
        margin-bottom: 0.4rem;
    }

    .preamble-emblem.bottom {
        margin-top: 1.2rem;
        margin-bottom: 2.2rem;
    }

    .emblem-img {
        width: 65px;
    }

    /* Chakra watermark — slightly smaller */
    .chakra-watermark {
        width: clamp(220px, 55vw, 320px);
        height: clamp(220px, 55vw, 320px);
    }

    /* Modal */
    .modal-header {
        padding: var(--space-md);
        grid-template-columns: auto 1fr auto;
        gap: 0;
    }

    .modal-term-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        margin-right: var(--space-sm);
    }

    .modal-header h3 {
        font-size: 1.2rem;
    }

    .modal-body-content {
        max-height: 60vh;
        padding: var(--space-sm) var(--space-md);
        gap: var(--space-sm);
    }

    .content-section {
        padding: var(--space-sm) var(--space-md);
    }

    .modal-footer {
        padding: var(--space-md);
        justify-content: center;
    }

    .modal-action-btn {
        width: 100%;
        justify-content: center;
    }

    /* Orbs — pull back for performance */
    .orb--saffron {
        width: 220px;
        height: 220px;
    }

    .orb--green {
        width: 260px;
        height: 260px;
    }

    .orb--navy {
        width: 180px;
        height: 180px;
    }
}

/* ── 375px: iPhone SE / compact phones ── */
@media (max-width: 375px) {
    .preamble-container {
        margin-top: 8px;
        padding: 0 8px;
    }

    .parchment-frame {
        padding: 4px;
        border-radius: 6px;
    }

    .parchment-inner {
        padding: 3.6rem 3rem;
    }

    .preamble-title {
        font-size: 1.7rem;
        letter-spacing: 0.01em;
    }

    .preamble-subtitle {
        font-size: 0.92rem;
        letter-spacing: 0.14em;
        margin-bottom: 1rem;
    }

    .preamble-text {
        font-size: 0.96rem;
        line-height: 1.9;
        padding: 0 4px;
    }

    .sovereign-block {
        font-size: 1rem;
        letter-spacing: 0.02em;
    }

    .preamble-term {
        padding: 0.25rem 0.75rem;
        font-size: 1rem;
    }

    .values-list {
        gap: 1rem;
        margin: 1rem 0;
    }

    .value-subtext {
        font-size: 0.92rem;
    }

    .fraternity-lead {
        font-size: 0.98rem;
        margin: 0.5rem 0 0.3rem;
    }

    .adoption-clause {
        font-size: 0.88rem;
        margin-top: 1.4rem;
        line-height: 1.7;
    }

    .traditional-divider {
        max-width: 180px;
        height: 18px;
        margin: 0.5rem auto 1rem;
    }

    .emblem-img {
        width: 55px;
    }

    .preamble-emblem.top {
        margin-top: 0.6rem;
        margin-bottom: 0.4rem;
    }

    .preamble-emblem.bottom {
        margin-top: 1.2rem;
        margin-bottom: 0.8rem;
    }

    /* Border strips */
    .border-top {
        height: 58px;
        top: -10px;
        left: -8px;
        width: calc(100% + 16px);
    }

    .border-bottom {
        height: 58px;
        bottom: -10px;
        top: unset;
        left: -8px;
        width: calc(100% + 16px);
    }

    .border-left {
        left: -8px;
        top: -10px;
        width: 56px;
        height: calc(100% + 20px);
    }

    .border-right {
        right: -8px;
        top: -10px;
        width: 56px;
        height: calc(100% + 20px);
    }


    /* Modal */
    .preamble-modal-card {
        border-radius: 16px;
    }

    .modal-header h3 {
        font-size: 1.1rem;
    }

    .modal-term-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
        border-radius: 8px;
    }

    .modal-body-content {
        max-height: 55vh;
        padding: 0.75rem;
        gap: 0.6rem;
    }

    .content-section {
        padding: 0.65rem 0.75rem;
        border-radius: 10px;
    }

    .section-title {
        font-size: 0.9rem;
    }

    .content-section p {
        font-size: 0.88rem;
    }

    .modal-action-btn {
        font-size: 0.88rem;
        padding: 0.65rem 1.2rem;
    }

    .header-badge {
        font-size: 0.78rem;
        padding: 0.3rem 0.75rem;
    }

    .preamble-header h2 {
        font-size: 1.8rem;
    }

    .intro-lead {
        font-size: 0.85rem;
        line-height: 1.5;
    }
}

/* ── 320px: Very small / older phones (Galaxy S5 etc) ── */
@media (max-width: 320px) {
    .preamble-container {
        margin-top: 56px;
        padding: 0 6px;
    }

    .parchment-inner {
        padding: 3.4rem 2.8rem;
    }

    .preamble-title {
        font-size: 1.45rem;
    }

    .preamble-subtitle {
        font-size: 0.82rem;
        letter-spacing: 0.1em;
    }

    .preamble-text {
        font-size: 0.92rem;
        line-height: 1.85;
        padding: 0;
    }

    .sovereign-block {
        font-size: 0.92rem;
    }

    .preamble-term {
        padding: 0.2rem 0.6rem;
        font-size: 0.92rem;
    }

    .value-subtext {
        font-size: 0.88rem;
    }

    .adoption-clause {
        font-size: 0.82rem;
    }

    .emblem-img {
        width: 46px;
    }

    .preamble-emblem.top {
        margin-top: 0.5rem;
        margin-bottom: 0.4rem;
    }

    .preamble-emblem.bottom {
        margin-top: 1rem;
        margin-bottom: 0.6rem;
    }

    .border-top,
    .border-bottom {
        height: 50px;
        top: -2px;
        left: -2px;
        width: calc(100% + 4px);
    }

    .border-bottom {
        bottom: -2px;
        top: unset;
    }

    .border-left {
        left: -2px;
        top: -2px;
        width: 48px;
        height: calc(100% + 4px);
    }

    .border-right {
        right: -2px;
        top: -2px;
        width: 48px;
        height: calc(100% + 4px);
    }

    .preamble-header h2 {
        font-size: 1.55rem;
    }

    .intro-lead {
        font-size: 0.82rem;
    }

    .chakra-watermark {
        width: 180px;
        height: 180px;
    }
}

/* ── 321px - 374px: Narrow modern phones between 320 and 375 widths ── */
@media (min-width: 321px) and (max-width: 374px) {
    .preamble-container {
        margin-top: 8px;
        padding: 0 8px;
    }

    .parchment-frame {
        padding: 4px;
        border-radius: 6px;
    }

    .parchment-inner {
        padding: 3.6rem 3rem;
    }

    .preamble-title {
        font-size: 1.7rem;
    }

    .preamble-subtitle {
        font-size: 0.92rem;
        letter-spacing: 0.14em;
    }

    .preamble-text {
        font-size: 0.96rem;
        line-height: 1.9;
        padding: 0 4px;
    }

    .border-left {
        left: -8px;
        top: -10px;
        width: 66px;
        height: calc(100% + 20px);
    }
    .border-right {
        width: 66px;
        top: -10px;
        height: calc(100% + 20px);
        right: -8px;
    }

    .chakra-watermark {
        width: 200px;
        height: 200px;
        opacity: 0.28;
    }

    .emblem-img {
        width: 58px;
    }
}