/* =========================================================
   The Church of the Solitary Flame — Solara Uniqua
   ========================================================= */

:root {
    --bg: #070911;
    --bg-alt: #0d1120;
    --panel: #10142333;
    --panel-solid: #10162a;
    --border: #2a3252;
    --gold: #f2c14e;
    --gold-soft: #ffe9b0;
    --ember: #e8892e;
    --violet: #7c5cff;
    --text: #e8e9f3;
    --text-dim: #a8adc4;
    --font-head: 'Cinzel', serif;
    --font-body: 'Cormorant Garamond', serif;
    --font-ui: 'Jost', sans-serif;
    --max-width: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: radial-gradient(ellipse at top, #101532 0%, #070911 55%, #04050a 100%);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 19px;
    line-height: 1.7;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

#starfield {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-soft); }

h1, h2, h3, h4 {
    font-family: var(--font-head);
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--gold-soft);
    line-height: 1.3;
}

h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.5rem); }

p { color: var(--text); }

.eyebrow {
    font-family: var(--font-ui);
    text-transform: uppercase;
    letter-spacing: 0.28em;
    font-size: 0.78rem;
    color: var(--violet);
}

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
    background: rgba(7, 9, 17, 0.75);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong {
    font-family: var(--font-head);
    color: var(--gold-soft);
    font-size: 1.05rem;
    letter-spacing: 0.03em;
}

.brand-text em {
    font-family: var(--font-ui);
    font-style: normal;
    font-size: 0.68rem;
    color: var(--text-dim);
    letter-spacing: 0.08em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    font-family: var(--font-ui);
}

.main-nav a {
    color: var(--text-dim);
    font-size: 0.92rem;
    letter-spacing: 0.02em;
    padding: 0.4rem 0;
    border-bottom: 1px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--gold);
    border-color: var(--gold);
}

.main-nav .nav-item {
    position: relative;
    display: flex;
    align-items: center;
}

.dropdown-caret {
    font-size: 0.6rem;
    margin-left: 2px;
    color: var(--violet);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: -0.8rem;
    min-width: 190px;
    background: var(--panel-solid);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.5rem;
    display: none;
    flex-direction: column;
    gap: 0.15rem;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5);
    z-index: 60;
}

.nav-item:hover .dropdown-menu,
.nav-item:focus-within .dropdown-menu {
    display: flex;
}

.dropdown-menu a {
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    border-bottom: none !important;
    font-size: 0.88rem;
}

.dropdown-menu a:hover,
.dropdown-menu a.active {
    background: rgba(242, 193, 78, 0.1);
}

.main-nav a.nav-cta {
    border: 1px solid var(--gold);
    border-radius: 999px;
    padding: 0.45rem 1.2rem;
    color: var(--gold);
}

.main-nav a.nav-cta:hover,
.main-nav a.nav-cta.active {
    background: var(--gold);
    color: #14100a;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--gold-soft);
    display: block;
}

/* ---------- Layout helpers ---------- */
main { position: relative; z-index: 1; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

section { padding: 4.5rem 0; }
section.tight { padding: 2.5rem 0; }

.section-head {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 2.8rem;
}

.divider {
    width: 60px;
    height: 2px;
    margin: 1rem auto 0;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ---------- Hero ---------- */
.hero {
    padding: 5.5rem 0 4rem;
    text-align: center;
    position: relative;
}

.hero-flame {
    width: 90px;
    height: 90px;
    margin: 0 auto 1.6rem;
    filter: drop-shadow(0 0 22px rgba(242, 193, 78, 0.55));
}

.hero h1 { margin: 0 0 0.6rem; }

.hero .tagline {
    font-family: var(--font-ui);
    color: var(--text-dim);
    letter-spacing: 0.06em;
    font-size: 1rem;
    margin-bottom: 1.8rem;
}

.hero-lede {
    max-width: 700px;
    margin: 0 auto 2.3rem;
    font-size: 1.25rem;
    color: var(--text-dim);
}

.btn-row {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    font-family: var(--font-ui);
    letter-spacing: 0.04em;
    padding: 0.8rem 1.7rem;
    border-radius: 999px;
    font-size: 0.92rem;
    border: 1px solid var(--gold);
    transition: transform 0.2s, background 0.2s, color 0.2s;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--ember));
    color: #14100a;
    border-color: transparent;
    font-weight: 600;
}

.btn-primary:hover { transform: translateY(-2px); color: #14100a; }

.btn-ghost { color: var(--gold); }
.btn-ghost:hover { background: rgba(242, 193, 78, 0.1); transform: translateY(-2px); }

/* ---------- Tenet callout ---------- */
.tenet {
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(124, 92, 255, 0.08), rgba(242, 193, 78, 0.04));
    border-radius: 18px;
    padding: 2.6rem 2rem;
    text-align: center;
    max-width: 780px;
    margin: 0 auto;
}

.tenet .eyebrow { display: block; margin-bottom: 0.6rem; }

.tenet blockquote {
    margin: 0;
    font-size: clamp(1.3rem, 2.6vw, 1.7rem);
    color: var(--gold-soft);
    font-style: italic;
}

/* ---------- Cards ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.6rem;
}

.card {
    border: 1px solid var(--border);
    background: rgba(16, 20, 35, 0.55);
    border-radius: 16px;
    padding: 1.8rem;
    transition: transform 0.25s, border-color 0.25s;
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--gold);
}

.card .icon {
    font-size: 1.6rem;
    margin-bottom: 0.7rem;
    display: inline-block;
}

.card h3 { margin: 0 0 0.6rem; }
.card p { color: var(--text-dim); margin: 0; font-size: 1.05rem; }

/* ---------- Feature split ---------- */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
}

@media (max-width: 780px) {
    .split { grid-template-columns: 1fr; }
}

.split .art {
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, var(--gold-soft), var(--ember) 45%, transparent 70%);
    box-shadow: 0 0 90px rgba(242, 193, 78, 0.25);
    position: relative;
    max-width: 320px;
    margin: 0 auto;
}

.split .art::after {
    content: '';
    position: absolute;
    inset: -30px;
    border-radius: 50%;
    border: 1px dashed rgba(124, 92, 255, 0.35);
}

/* ---------- Contact form ---------- */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.contact-form label {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    color: var(--text-dim);
    margin-top: 0.8rem;
}

.contact-form input,
.contact-form textarea {
    font-family: var(--font-body);
    font-size: 1.05rem;
    background: rgba(16, 20, 35, 0.6);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.7rem 0.9rem;
    color: var(--text);
    resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--gold);
}

.contact-form button {
    margin-top: 1.4rem;
    align-self: flex-start;
    cursor: pointer;
}

/* ---------- FAQ accordion ---------- */
.faq-item {
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 1rem;
    background: rgba(16, 20, 35, 0.5);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: var(--gold-soft);
    font-family: var(--font-head);
    font-size: 1.05rem;
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.faq-question .plus {
    font-family: var(--font-ui);
    color: var(--gold);
    transition: transform 0.25s;
    flex-shrink: 0;
}

.faq-item.open .faq-question .plus { transform: rotate(45deg); }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 1.5rem;
    color: var(--text-dim);
}

.faq-item.open .faq-answer {
    max-height: 480px;
    padding: 0 1.5rem 1.4rem;
}

/* ---------- Timeline (rituals) ---------- */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

.timeline-item {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 1.5rem;
    border-left: 2px solid var(--border);
    padding-left: 1.6rem;
    position: relative;
}

.timeline-item::before {
    content: '✦';
    position: absolute;
    left: -12px;
    top: 0;
    color: var(--gold);
    background: var(--bg);
}

.timeline-item .badge {
    font-family: var(--font-ui);
    color: var(--violet);
    font-size: 0.82rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

@media (max-width: 640px) {
    .timeline-item { grid-template-columns: 1fr; }
}

/* ---------- Quote / list styling ---------- */
.styled-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.styled-list li {
    padding-left: 1.6rem;
    position: relative;
    color: var(--text-dim);
    font-size: 1.1rem;
}

.styled-list li::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: var(--gold);
}

.styled-list strong { color: var(--gold-soft); }

/* ---------- Callout band ---------- */
.band {
    text-align: center;
    padding: 3.5rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: rgba(124, 92, 255, 0.04);
}

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--border);
    background: rgba(4, 5, 10, 0.85);
    position: relative;
    z-index: 1;
    margin-top: 3rem;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 3rem 1.5rem 2rem;
    text-align: center;
}

.footer-mark {
    color: var(--gold);
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
}

.footer-creed {
    font-style: italic;
    color: var(--text-dim);
    max-width: 560px;
    margin: 0 auto 1.6rem;
}

.footer-nav {
    display: flex;
    gap: 1.4rem;
    justify-content: center;
    flex-wrap: wrap;
    font-family: var(--font-ui);
    font-size: 0.88rem;
    margin-bottom: 1.4rem;
}

.footer-nav a { color: var(--text-dim); }
.footer-nav a:hover { color: var(--gold); }

.footer-copy {
    font-family: var(--font-ui);
    font-size: 0.78rem;
    color: #565c78;
    margin: 0;
}

/* ---------- Page header (inner pages) ---------- */
.page-hero {
    padding: 3.5rem 0 2.5rem;
    text-align: center;
}
.page-hero .eyebrow { display: block; margin-bottom: 0.6rem; }
.page-hero p { color: var(--text-dim); max-width: 640px; margin: 1rem auto 0; font-size: 1.15rem; }

/* ---------- Reveal animation ---------- */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Responsive nav ---------- */
@media (max-width: 860px) {
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(7, 9, 17, 0.97);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: stretch;
        padding: 1rem 1.5rem 1.5rem;
        gap: 0.9rem;
        display: none;
    }
    .main-nav.open { display: flex; }
    .nav-toggle { display: flex; }

    .main-nav .nav-item { flex-direction: column; align-items: flex-start; }

    .dropdown-menu {
        position: static;
        display: flex;
        background: none;
        border: none;
        box-shadow: none;
        padding: 0.3rem 0 0 1rem;
        margin-top: 0.2rem;
    }

    .main-nav a.nav-cta {
        align-self: flex-start;
        margin-top: 0.3rem;
    }
}
