/* =========================================================
   COIK — The Church of Infinite Knowledge
      Midnight Scholar palette
         ---------------------------------------------------------
            ALL COLORS LIVE IN :root BELOW.
               To re-theme the entire site, change variables here only.
                  ========================================================= */

:root {
    /* Backgrounds */
    --color-bg:            #0E1116;   /* page background, near-black indigo */
    --color-bg-panel:      #1A1F2B;   /* cards, sections, raised panels */
    --color-bg-elevated:   #232A39;   /* hover / inputs / elevated UI */

    /* Text */
    --color-text:          #EAE6D9;   /* bone-white body text */
    --color-text-muted:    #A8A698;   /* secondary text */
    --color-text-strong:   #FFFFFF;   /* headings */

    /* Accents */
    --color-accent:        #D9B36C;   /* luminous gold (primary accent) */
    --color-accent-soft:   #E8CFA0;   /* lighter gold for hover */
    --color-link:          #5BB3B0;   /* teal links/interactive */
    --color-link-hover:    #8FD3D0;

    /* Borders & dividers */
    --color-border:        #2A3142;
    --color-border-strong: #3A4358;

    /* Status / focus */
    --color-focus:         #D9B36C;

    /* Logo badge (light circle so the black logo art remains visible) */
    --color-logo-badge:    #EAE6D9;   /* bone-white badge under black logo */
    --color-logo-ring:     #D9B36C;

    /* Typography */
    --font-serif: 'Cormorant Garamond', 'Iowan Old Style', 'Apple Garamond', Georgia, 'Times New Roman', serif;
    --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

    /* Layout */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 22px;
    --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.35);
    --maxw: 920px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

body {
    background:
      radial-gradient(1200px 600px at 80% -10%, rgba(217, 179, 108, 0.08), transparent 60%),
      radial-gradient(900px 500px at -10% 110%, rgba(91, 179, 176, 0.07), transparent 60%),
      var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    color: var(--color-text-strong);
    letter-spacing: 0.01em;
    line-height: 1.2;
    margin: 0 0 0.6em;
}

h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); color: var(--color-accent); }
h3 { font-size: 1.25rem; color: var(--color-accent-soft); }

p { margin: 0 0 1.1em; }

a {
    color: var(--color-link);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color .15s ease, border-color .15s ease;
}
a:hover { color: var(--color-link-hover); border-bottom-color: currentColor; }

/* ---------- Layout containers ---------- */
.container {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 24px;
}

main { flex: 1; padding: 48px 0 80px; }

/* ---------- Header / nav ---------- */
.site-header {
    border-bottom: 1px solid var(--color-border);
    background: rgba(14, 17, 22, 0.85);
    backdrop-filter: blur(6px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    padding-bottom: 14px;
    gap: 16px;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-serif);
    color: var(--color-text-strong);
    border: none;
}
.brand:hover { color: var(--color-accent); }

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-logo-badge);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px var(--color-logo-ring), var(--shadow-soft);
    overflow: hidden;
    flex: 0 0 auto;
}
.brand-mark img { width: 78%; height: 78%; object-fit: contain; display: block; }

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text .title { font-size: 1.15rem; }
.brand-text .sub   { font-size: 0.78rem; color: var(--color-text-muted); letter-spacing: 0.12em; text-transform: uppercase; }

nav.primary {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
nav.primary a {
    color: var(--color-text);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-size: 0.95rem;
}
nav.primary a:hover {
    color: var(--color-accent);
    border-color: var(--color-border-strong);
    background: var(--color-bg-elevated);
}
nav.primary a.active {
    color: var(--color-accent);
    border-color: var(--color-border-strong);
    background: var(--color-bg-panel);
}

/* ---------- Hero ---------- */
.hero {
    text-align: center;
    padding: 56px 0 24px;
}
.hero .badge-lg {
    width: 128px;
    height: 128px;
    border-radius: 50%;
    background: var(--color-logo-badge);
    margin: 0 auto 24px;
    box-shadow: 0 0 0 4px var(--color-logo-ring), var(--shadow-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hero .badge-lg img { width: 78%; height: 78%; object-fit: contain; }

.hero .lede {
    font-family: var(--font-serif);
    font-size: clamp(1.1rem, 1.8vw, 1.35rem);
    color: var(--color-text-muted);
    max-width: 640px;
    margin: 0 auto 28px;
    font-style: italic;
}

/* ---------- Sections / panels ---------- */
.panel {
    background: var(--color-bg-panel);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin: 24px 0;
    box-shadow: var(--shadow-soft);
}

.panel + .panel { margin-top: 18px; }

.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-border-strong), transparent);
    margin: 40px 0;
    border: 0;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 12px 22px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.98rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    border: 1px solid var(--color-accent);
    background: var(--color-accent);
    color: #1B1410;
    text-decoration: none;
    transition: transform .08s ease, background .15s ease, color .15s ease;
}
.btn:hover { background: var(--color-accent-soft); border-color: var(--color-accent-soft); color: #1B1410; }
.btn:active { transform: translateY(1px); }

.btn.ghost {
    background: transparent;
    color: var(--color-accent);
}
.btn.ghost:hover { background: rgba(217, 179, 108, 0.08); color: var(--color-accent-soft); }

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ---------- Tenets list ---------- */
.tenets {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 18px;
}
.tenets li {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-accent);
    border-radius: var(--radius-md);
    padding: 20px 22px;
}
.tenets li h3 {
    margin: 0 0 6px;
    color: var(--color-accent);
    font-family: var(--font-serif);
    font-size: 1.2rem;
}
.tenets li p { margin: 0; color: var(--color-text); }

/* ---------- Forms ---------- */
form.contact {
    display: grid;
    gap: 14px;
    margin-top: 8px;
}
form.contact label {
    display: block;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 6px;
}
form.contact input[type="text"],
form.contact input[type="email"],
form.contact textarea {
    width: 100%;
    background: var(--color-bg-elevated);
    color: var(--color-text);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
form.contact textarea { min-height: 160px; resize: vertical; }
form.contact input:focus,
form.contact textarea:focus {
    border-color: var(--color-focus);
    box-shadow: 0 0 0 3px rgba(217, 179, 108, 0.18);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* Honeypot hidden field */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 0.88rem;
    padding: 24px 0 40px;
    text-align: center;
}
.site-footer a { color: var(--color-text-muted); }
.site-footer a:hover { color: var(--color-accent); }

/* ---------- Utility ---------- */
.center { text-align: center; }
.small  { font-size: 0.9rem; color: var(--color-text-muted); }
