﻿/* styles.css - Classic & Prestigious Overhaul v2 */
:root {
    /* Core Colors - Deepened for Contrast */
    --navy: #081426;
    --navy-light: #0f1e36;
    --gold: #8A1538;
    --gold-light: #b01c47;
    --gold-glow: rgba(138, 21, 56, 0.4);
    --cream: #f7f6f2;
    --white: #ffffff;
    --text: #1a2a3a;
    --text-light: #4a5b6a;

    /* Shadows - Multi-level */
    --shadow-sm: 0 2px 8px rgba(8, 20, 38, 0.06);
    --shadow-md: 0 6px 20px rgba(8, 20, 38, 0.1);
    --shadow-lg: 0 12px 40px rgba(8, 20, 38, 0.15);
    --shadow-glow: 0 0 30px var(--gold-glow);

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Spacing */
    --section-gap: 6rem;
    --border: 1px solid rgba(8, 20, 38, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Lato', sans-serif;
    background: var(--cream);
    color: var(--text);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Playfair Display', serif;
    color: var(--navy);
    margin-top: 0;
    margin-bottom: 1rem;
    font-weight: 700;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
.site-header {
    background: var(--white);
    border-bottom: 3px solid var(--gold);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.02em;
}

.brand img {
    height: 48px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--navy);
    position: relative;
    padding-bottom: 0.25rem;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
}

.menu-toggle {
    display: none;
}

/* Animated Hamburger Menu */
.hamburger {
    display: none;
    width: 24px;
    height: 18px;
    position: relative;
    cursor: pointer;
    z-index: 101;
}

.hamburger span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: var(--navy);
    border-radius: 2px;
    left: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-origin: center;
}

.hamburger span:nth-child(1) {
    top: 0;
}

.hamburger span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger span:nth-child(3) {
    bottom: 0;
}

/* Animated X transformation */
#nav-toggle:checked+.menu-toggle .hamburger span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

#nav-toggle:checked+.menu-toggle .hamburger span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

#nav-toggle:checked+.menu-toggle .hamburger span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* Hero Section */
.hero {
    background-image: linear-gradient(rgba(10, 25, 47, 0.85), rgba(10, 25, 47, 0.7)), url('_/background.webp');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 8rem 0;
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.eyebrow {
    font-family: 'Lato', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.85rem;
    color: var(--gold);
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--white);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero h1 .title-full {
    display: inline;
}

.hero h1 .title-short {
    display: none;
}

.tagline {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

/* Buttons - Premium Interactive */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.9rem;
    border-radius: 4px;
    transition: all var(--transition-smooth);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* Shine effect overlay */
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:not(.ghost) {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    color: var(--white);
    border: none;
    box-shadow: 0 4px 15px rgba(138, 21, 56, 0.25);
}

.btn:not(.ghost):hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(138, 21, 56, 0.4);
}

.btn.ghost {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn.ghost:hover {
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.05);
}

/* Sections */
section {
    padding: 5rem 0;
}

section h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--gold);
    margin: 1rem auto 0;
}

/* Cards - Glassmorphism & Depth */
.card-grid {
    display: grid;
    gap: 2rem;
}

.card-grid.three {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card-grid.four {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(8, 20, 38, 0.06);
    border-radius: 8px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--navy) 0%, var(--gold) 100%);
    opacity: 0.8;
    transition: opacity var(--transition-fast);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(138, 21, 56, 0.15);
}

.card:hover::before {
    opacity: 1;
}

.icon-circle {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--navy);
    background: var(--cream);
    border-radius: 50%;
    border: 1px solid var(--gold);
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card p {
    color: var(--text-light);
    font-size: 1rem;
}

/* Dual Section */
.dual-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    background: var(--white);
    padding: 5rem 2rem;
    /* Added horizontal padding for full-width background feel if wrapper allows, otherwise container handles it */
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: 4rem;
}

.dual-section h2 {
    text-align: left;
    left: 0;
    transform: none;
}

.dual-section h2::after {
    margin: 1rem 0 0;
}

.checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.checklist li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
    font-size: 1.1rem;
}

.checklist li i {
    color: var(--gold);
    margin-top: 0.3rem;
}

/* Stay Connected */
.stay-connected {
    background: var(--navy);
    color: var(--white);
    border-radius: 4px;
    padding: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4rem;
    margin-bottom: 4rem;
}

.stay-connected h2 {
    color: var(--white);
    text-align: left;
    left: 0;
    transform: none;
    margin-bottom: 0.5rem;
}

.stay-connected h2::after {
    display: none;
}

.stay-connected p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.stay-connected .btn {
    background: var(--gold);
    color: var(--white);
    border: none;
}

.stay-connected .btn:hover {
    background: var(--gold-light);
}

/* Footer */
footer {
    background: var(--navy);
    color: rgba(255, 255, 255, 0.6);
    padding: 4rem 0 2rem;
    font-size: 0.9rem;
}

.footer-content {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto 2rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0 2rem 3rem;
}

.footer-left {
    justify-self: start;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.footer-middle {
    justify-self: center;
}

.footer-right {
    justify-self: end;
    text-align: right;
}

.footer-logo {
    height: 60px;
    opacity: 0.9;
}

.freedom-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    letter-spacing: 0.1em;
    color: var(--gold);
    font-weight: 800;
}



/* Mobile */
@media (max-width: 768px) {
    .nav-toggle {
        display: none;
        /* Hidden checkbox */
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        cursor: pointer;
    }

    .hamburger {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 3px solid var(--gold);
        transform: translateY(-20px);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
    }

    .nav-links a {
        padding: 0.5rem 0;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    #nav-toggle:checked~.nav-links {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    /* Hero Section - Mobile Compact */
    .hero {
        padding: 4rem 0;
    }

    .hero::before {
        top: 0.5rem;
        left: 0.5rem;
        right: 0.5rem;
        bottom: 0.5rem;
    }

    .hero h1 {
        font-size: 1.85rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }

    .hero h1 .title-full {
        display: none;
    }

    .hero h1 .title-short {
        display: inline;
    }

    .eyebrow {
        font-size: 0.75rem;
        letter-spacing: 0.15em;
        margin-bottom: 0.75rem;
    }

    .tagline {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
        line-height: 1.6;
    }

    .hero-actions {
        flex-direction: column;
        gap: 1rem;
    }

    /* Buttons - Mobile Slim */
    .btn {
        display: flex;
        margin: 0 auto;
        padding: 0.85rem 2rem;
        min-height: 48px;
        width: 100%;
        max-width: 280px;
    }

    /* Sections - Reduced Spacing */
    section {
        padding: 3rem 0;
    }

    section h2 {
        font-size: 1.75rem;
        margin-bottom: 2rem;
    }

    .container {
        padding: 0 1.25rem;
    }

    /* Cards - Improved Grid */
    .card-grid {
        gap: 1.25rem;
    }

    .card-grid.four {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .card {
        padding: 1.25rem 1rem;
    }

    .card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .card p {
        font-size: 0.9rem;
    }

    .card img {
        max-height: 100px;
        object-fit: cover;
        margin-bottom: 0.75rem;
    }

    .icon-circle {
        width: 52px;
        height: 52px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    /* Dual Section */
    .dual-section {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 3rem 1.25rem;
        margin-top: 2rem;
    }

    .checklist li {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    /* Stay Connected */
    .stay-connected {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding: 2rem 1.5rem;
        margin-top: 2rem;
        margin-bottom: 2rem;
    }

    .stay-connected h2 {
        text-align: center;
        font-size: 1.5rem;
    }

    .stay-connected p {
        font-size: 0.9rem;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
        gap: 1.5rem;
        padding: 0 1.25rem 2rem;
    }

    .footer-right {
        text-align: center;
        justify-self: center;
    }

    .footer-left {
        flex-direction: row;
        justify-content: center;
        gap: 1.25rem;
    }

    .freedom-text {
        font-size: 1.5rem;
    }

    .footer-logo {
        height: 48px;
    }

    /* Page Header - Mobile */
    .page-header h1 {
        font-size: 2.2rem;
        line-height: 1.2;
    }

    /* Constitution - Mobile */
    .constitution {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }

    .constitution article {
        margin-bottom: 1.5rem;
        padding-bottom: 1.5rem;
    }

    .constitution h3 {
        font-size: 1.2rem;
    }
}

/* Page Header Styles */
.page-header h1 {
    font-family: 'Caveat', cursive;
    font-size: 3.5rem;
    color: var(--navy);
    margin-bottom: 0;
}

/* Constitution Styles */
.constitution {
    background-color: var(--cream);
    background-image: url('_/oldpaper.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 4rem;
    border: 1px solid rgba(10, 25, 47, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    position: relative;
    margin-bottom: 4rem;
}

.constitution::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: repeating-linear-gradient(45deg,
            var(--navy),
            var(--navy) 10px,
            var(--gold) 10px,
            var(--gold) 20px);
}

.constitution article {
    margin-bottom: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.constitution article:last-child {
    border-bottom: none;
}

.constitution h3 {
    font-family: 'Caveat', cursive;
    color: var(--navy);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.constitution h3::before {
    content: '§';
    color: var(--gold);
    font-size: 1.2em;
}

.constitution p,
.constitution li {
    font-family: 'Caveat', cursive;
    font-size: 1.4rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--text);
}

/* Constitution Title */
.constitution-title {
    font-family: 'Caveat', cursive;
    font-size: 2.5rem;
    color: var(--navy);
    font-weight: 700;
}

.constitution-title .title-full {
    display: inline;
}

.constitution-title .title-short {
    display: none;
}

@media (max-width: 768px) {
    .constitution-title {
        font-size: 1.8rem;
        padding-top: 1rem;
        margin-bottom: 1.5rem;
    }

    .constitution-title .title-full {
        display: none;
    }

    .constitution-title .title-short {
        display: inline;
    }
}

/* ========================================
   ANIMATIONS - Scroll-Triggered System
   ======================================== */
html {
    scroll-behavior: smooth;
}

/* Base Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Fade Variations */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in {
    opacity: 0;
    transition: opacity 0.6s ease-out;
}

.fade-in.is-visible {
    opacity: 1;
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.5s ease-out, transform 0.5s var(--transition-bounce);
}

.scale-in.is-visible {
    opacity: 1;
    transform: scale(1);
}

/* Stagger Delays - Extended */
.stagger-1 {
    transition-delay: 0.1s;
}

.stagger-2 {
    transition-delay: 0.2s;
}

.stagger-3 {
    transition-delay: 0.3s;
}

.stagger-4 {
    transition-delay: 0.4s;
}

.stagger-5 {
    transition-delay: 0.5s;
}

.stagger-6 {
    transition-delay: 0.6s;
}

/* Micro-interactions */
.icon-circle {
    transition: transform var(--transition-smooth), background var(--transition-fast);
}

.card:hover .icon-circle {
    transform: scale(1.1);
    background: var(--navy);
}

.card:hover .icon-circle i {
    color: var(--white);
}

/* Checklist Item Hover */
.checklist li {
    transition: transform var(--transition-fast);
}

.checklist li:hover {
    transform: translateX(5px);
}

/* Link Underline Animation */
a:not(.btn):not(.brand):not(.nav-links a) {
    position: relative;
}

/* Footer Instagram Icon */
.footer-left .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all var(--transition-smooth);
    position: relative;
}

.footer-left .icon .tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    color: var(--navy);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

.footer-left .icon .tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--white);
}

.footer-left .icon:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

.footer-left .icon:hover {
    background: var(--gold);
    transform: scale(1.1);
}

.footer-left .icon i {
    font-size: 1.2rem;
    color: var(--white);
}

/* Stay Connected Section Enhancement */
.stay-connected {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    position: relative;
    overflow: hidden;
}

.stay-connected::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(138, 21, 56, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

/* Hero Text Shadow for Legibility */
.hero h1 {
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.tagline {
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.2);
}

/* Focus States for Accessibility */
.btn:focus-visible,
.nav-links a:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {

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

    .animate-on-scroll,
    .fade-up,
    .fade-in,
    .scale-in {
        opacity: 1;
        transform: none;
    }
}