/* =========================================================
   Wissa Sobhy Archive — Visual Design System v3
   Direction: digital historical archive / Coptic heritage
   ========================================================= */

:root {
    --forest: #14273f;
    --forest-2: #244c40;
    --forest-3: #24405f;
    --ivory: #f5f0e6;
    --paper: #fbf8f1;
    --sand: #e8dfcf;
    --gold: #b08a45;
    --gold-soft: #d6bf8a;
    --ink: #242824;
    --muted: #6d7069;
    --burgundy: #8b3a32;
    --line: rgba(23, 58, 50, 0.15);
    --line-strong: rgba(23, 58, 50, 0.25);
    --white: #ffffff;
    --shadow-sm: 0 5px 18px rgba(31, 42, 36, 0.07);
    --shadow-md: 0 14px 38px rgba(31, 42, 36, 0.10);
    --radius-sm: 8px;
    --radius: 16px;
    --radius-lg: 24px;
    --container: 1180px;
    --transition: 180ms ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Cairo', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: var(--ink);
    background: var(--ivory);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 1rem;
    color: var(--forest);
    font-weight: 700;
    line-height: 1.35;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.65rem, 3vw, 2.35rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.15rem; }

p { margin: 0 0 1rem; }
a {
    color: var(--forest-2);
    text-decoration: none;
    transition: color var(--transition), border-color var(--transition), background var(--transition), transform var(--transition);
}
a:hover { color: var(--gold); }
a:focus-visible, button:focus-visible {
    outline: 3px solid var(--gold-soft);
    outline-offset: 3px;
}
img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-right: 1.35rem; }

.container {
    width: min(100% - 2rem, var(--container));
    margin-inline: auto;
}

/* ================= Navigation ================= */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: .8rem 0;
    color: var(--white);
    background: rgba(23, 58, 50, .97);
    border-bottom: 1px solid rgba(214, 191, 138, .45);
    box-shadow: 0 6px 22px rgba(23, 58, 50, .12);
    backdrop-filter: blur(12px);
}
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}
.logo { min-width: 230px; }
.logo h1 {
    margin: 0;
    color: var(--white);
    font-size: clamp(1.05rem, 2vw, 1.5rem);
    line-height: 1.35;
}
.logo .tagline {
    margin: .15rem 0 0;
    color: var(--gold-soft);
    font-size: .78rem;
    letter-spacing: .04em;
}
.nav-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.nav-menu a {
    display: block;
    padding: .45rem .7rem;
    color: rgba(255,255,255,.88);
    border-bottom: 1px solid transparent;
    font-weight: 600;
    font-size: .92rem;
}
.nav-menu a:hover,
.nav-menu a.active {
    color: var(--gold-soft);
    border-bottom-color: var(--gold);
}
.language-switch { display: flex; gap: .5rem; }
.lang-en {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: .4rem .7rem;
    color: var(--forest) !important;
    background: var(--gold-soft);
    border: 1px solid var(--gold);
    border-radius: 999px;
    font-weight: 700;
}
.lang-en:hover { color: var(--forest) !important; background: var(--white); }

/* ================= Hero / archival masthead ================= */
.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(4.5rem, 9vw, 7rem) 0 clamp(4rem, 8vw, 6rem);
    color: var(--white);
    text-align: center;
    background:
        radial-gradient(circle at 12% 18%, rgba(214,191,138,.14), transparent 28%),
        radial-gradient(circle at 88% 80%, rgba(49,90,77,.34), transparent 30%),
        var(--forest);
    border-bottom: 1px solid rgba(176,138,69,.45);
}
.hero::before {
    content: '';
    position: absolute;
    width: min(520px, 70vw);
    height: min(520px, 70vw);
    left: 50%;
    top: -310px;
    transform: translateX(-50%);
    border: 1px solid rgba(214,191,138,.16);
    border-radius: 50%;
    box-shadow: 0 0 0 42px rgba(214,191,138,.035), 0 0 0 84px rgba(214,191,138,.025);
}
.hero::after {
    content: '✦';
    position: absolute;
    left: 50%;
    bottom: 1.1rem;
    transform: translateX(-50%);
    color: var(--gold-soft);
    font-size: .9rem;
    opacity: .75;
}
.hero-content { position: relative; z-index: 1; max-width: 920px; margin-inline: auto; }
.hero h2 {
    margin-bottom: .55rem;
    color: var(--white);
    font-size: clamp(2.25rem, 6vw, 4.4rem);
    letter-spacing: -.02em;
}
.hero .subtitle {
    margin-bottom: 1.6rem;
    color: var(--gold-soft);
    font-size: clamp(1.05rem, 2.3vw, 1.35rem);
    font-weight: 700;
}
.hero-intro {
    max-width: 800px;
    margin: 0 auto;
    color: rgba(255,255,255,.86);
    font-family: 'Amiri', 'Cairo', serif;
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    line-height: 2;
}
.hero-intro p { margin-bottom: .7rem; }
.hero-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 2rem;
}
.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .75rem;
    max-width: 780px;
    margin: 2.5rem auto 0;
}
.stat {
    padding: 1rem;
    background: rgba(255,255,255,.065);
    border: 1px solid rgba(214,191,138,.25);
    border-radius: var(--radius-sm);
}
.stat-number { display: block; color: var(--gold-soft); font-size: 2rem; font-weight: 800; line-height: 1.2; }
.stat-label { color: rgba(255,255,255,.72); font-size: .8rem; }

/* ================= Buttons ================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: .65rem 1.15rem;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    font-size: .95rem;
    font-weight: 700;
    text-align: center;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { color: var(--forest); background: var(--gold-soft); border-color: var(--gold); }
.btn-primary:hover { color: var(--forest); background: #e4d1a2; }
.btn-secondary { color: var(--white); background: var(--forest-2); border-color: rgba(214,191,138,.45); }
.btn-secondary:hover { color: var(--white); background: var(--forest-3); }
.btn-outline { color: var(--forest); background: transparent; border-color: var(--forest-2); }
.btn-outline:hover { color: var(--white); background: var(--forest); }
.cta .btn-outline { color: var(--white); border-color: rgba(255,255,255,.55); }
.cta .btn-outline:hover { color: var(--forest); background: var(--white); }

/* ================= Sections / editorial rhythm ================= */
.quick-info, .major-events, .features, .verification {
    padding: clamp(3.5rem, 7vw, 5.5rem) 0;
}
.quick-info { background: var(--paper); }
.major-events { background: var(--ivory); }
.features { background: var(--sand); }
.verification { background: var(--paper); }
.quick-info h2, .major-events h2, .features h2, .verification h2 { text-align: center; }

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
.info-card, .feature, .event-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.info-card {
    padding: 1.6rem;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.info-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.info-card .icon { margin-bottom: .8rem; font-size: 1.8rem; filter: grayscale(.15); }
.info-card h3 { margin-bottom: .9rem; }
.info-card dl { display: grid; gap: .55rem; }
.info-card dt { color: var(--forest-2); font-weight: 700; }
.info-card dd { margin: 0; color: var(--muted); }
.info-card ul, .footer-section ul { list-style: none; padding: 0; margin: 0; }
.info-card li { padding: .55rem 0; border-bottom: 1px solid var(--line); }
.info-card li:last-child { border-bottom: 0; }

.events-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}
.event-card {
    position: relative;
    overflow: hidden;
    padding: 1.35rem 1.35rem 1.4rem;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: var(--forest-2);
}
.event-card.event-crisis::before, .event-card.event-documentation::before { background: var(--burgundy); }
.event-card.event-transition::before { background: var(--gold); }
.event-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.event-date { margin-bottom: .45rem; color: var(--muted); font-size: .82rem; font-weight: 700; }
.event-card h3 { margin-bottom: .55rem; font-size: 1.18rem; }
.event-card p { color: var(--muted); line-height: 1.65; }
.event-tag {
    display: inline-flex;
    padding: .22rem .65rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
}
.event-tag.verified { color: var(--forest); background: #e2eadf; }
.event-tag.crisis { color: #71332d; background: #f0dedb; }
.event-tag.important { color: #6c5424; background: #eee1c2; }
.text-center { text-align: center; }

/* ================= Relationship / 2025 ================= */
.relationship-section, .year-2025 {
    margin: 0;
    padding: clamp(3.5rem, 7vw, 5.5rem) 0;
    border-top: 1px solid var(--line);
}
.relationship-section { background: var(--paper); }
.year-2025 { background: var(--sand); }
.relationship-section h2, .year-2025 h2 { text-align: center; }
.relationship-section .subtitle, .year-2025 .subtitle { color: var(--muted); text-align: center; }
.relationship-text {
    max-width: 820px;
    margin: 2rem auto 0;
    padding: clamp(1.4rem, 4vw, 2.2rem);
    background: var(--ivory);
    border: 1px solid var(--line);
    border-right: 4px solid var(--gold);
    border-radius: var(--radius);
    color: #4e544e;
    font-family: 'Amiri', 'Cairo', serif;
    font-size: 1.08rem;
    line-height: 2;
}
.relationship-text p:last-child { margin-bottom: 0; }
.relationship-text a { font-weight: 700; border-bottom: 1px solid var(--gold); }
.year-events { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 2rem; }
.year-event {
    padding: 1.4rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-top: 3px solid var(--forest-2);
    border-radius: var(--radius-sm);
}
.year-event .event-date { color: var(--forest-2); }
.year-event .event-title { margin-bottom: .45rem; color: var(--forest); font-weight: 800; }
.year-event p { color: var(--muted); }

/* ================= Features / verification ================= */
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.feature { padding: 1.5rem; text-align: center; }
.feature-icon { margin-bottom: .8rem; font-size: 2.2rem; }
.feature p { color: var(--muted); }
.verification-stats { max-width: 700px; margin: 0 auto 2rem; }
.stat-bar { margin-bottom: 1.1rem; }
.stat-label { display: block; margin-bottom: .4rem; font-weight: 700; }
.progress { height: 12px; overflow: hidden; background: var(--sand); border-radius: 999px; }
.progress-bar { height: 100%; border-radius: inherit; }
.progress-bar.verified { background: var(--forest-2); }
.progress-bar.in-progress { background: var(--gold); }
.progress-bar.pending { background: #9b9b91; }
.verification-note { color: var(--muted); text-align: center; font-size: .9rem; }

/* ================= CTA / Footer ================= */
.cta {
    padding: clamp(3.5rem, 7vw, 5rem) 0;
    color: var(--white);
    text-align: center;
    background:
        radial-gradient(circle at 80% 20%, rgba(214,191,138,.10), transparent 25%),
        var(--forest);
}
.cta h2 { color: var(--white); }
.cta p { color: rgba(255,255,255,.78); }
.cta-buttons { display: flex; justify-content: center; flex-wrap: wrap; gap: .7rem; }
.footer {
    margin-top: 0;
    padding: 3.5rem 0 1.2rem;
    color: rgba(255,255,255,.72);
    background: #112a25;
    border-top: 1px solid rgba(214,191,138,.25);
}
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; margin-bottom: 2.2rem; }
.footer-section h4 { color: var(--gold-soft); margin-bottom: .8rem; }
.footer-section li { margin: .4rem 0; }
.footer-section a { color: rgba(255,255,255,.72); }
.footer-section a:hover { color: var(--gold-soft); }
.footer-bottom { padding-top: 1.1rem; border-top: 1px solid rgba(255,255,255,.10); text-align: center; font-size: .82rem; }
.footer-bottom p { margin: .3rem 0; }
.license, .version, .status { margin: 0 .35rem; }

/* ================= Generic archive components ================= */
main, .page-content, .content-wrapper { min-height: 40vh; }
main > section, .page-section { scroll-margin-top: 90px; }
article, .content-card, .source-card, .media-card, .person-card, .place-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
table { width: 100%; border-collapse: collapse; background: var(--paper); }
th, td { padding: .75rem .8rem; border-bottom: 1px solid var(--line); text-align: right; }
th { color: var(--forest); background: var(--sand); }
blockquote { margin: 1.5rem 0; padding: 1rem 1.25rem; border-right: 4px solid var(--gold); background: var(--sand); color: #4d514c; }

/* ================= Utilities / accessibility ================= */
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; } .mb-2 { margin-bottom: 2rem; } .mb-3 { margin-bottom: 3rem; }
.p-1 { padding: 1rem; } .p-2 { padding: 2rem; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media print {
    .navbar, .language-switch, .cta, .footer { display: none !important; }
    body { background: #fff; color: #000; }
    .container { width: 100%; max-width: none; }
    a { text-decoration: underline; }
    .event-card, .info-card, .feature { break-inside: avoid; box-shadow: none; }
}
