/* ==========================================================================
   Grace Bible Studies — Modern Design System
   A lightweight, dependency-free stylesheet for the ASP.NET Web Forms site.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
    /* Brand */
    --gbs-blue-900: #0b1d4d;
    --gbs-blue-800: #122a6b;
    --gbs-blue-700: #1a3a8f;
    --gbs-blue-600: #2251c9;
    --gbs-blue-500: #2e63e8;
    --gbs-blue-100: #e4ecfd;
    --gbs-blue-50:  #f1f5fe;
    --gbs-gold-600: #b97e0e;
    --gbs-gold-500: #e9a212;
    --gbs-gold-400: #f5b83d;
    --gbs-gold-100: #fdf0d5;

    /* Neutrals */
    --ink-900: #101828;
    --ink-700: #344054;
    --ink-500: #667085;
    --ink-300: #d0d5dd;
    --ink-200: #e4e7ec;
    --ink-100: #f2f4f7;
    --paper:   #f8fafc;
    --white:   #ffffff;

    /* Type */
    --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-serif: "Lora", Georgia, "Times New Roman", serif;

    /* Shape + depth */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-pill: 999px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .10);
    --shadow-md: 0 4px 8px -2px rgba(16, 24, 40, .10), 0 2px 4px -2px rgba(16, 24, 40, .06);
    --shadow-lg: 0 12px 24px -6px rgba(16, 24, 40, .16), 0 4px 10px -4px rgba(16, 24, 40, .08);

    --header-h: 72px;
    --content-max: 1160px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink-700);
    background-color: var(--paper);
}

img { max-width: 100%; height: auto; }

a { color: var(--gbs-blue-600); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--gbs-blue-800); text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
    color: var(--ink-900);
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 .5em;
    letter-spacing: -0.015em;
}

h1 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em; }

/* ---------- Layout primitives ---------- */
.gbs-container {
    width: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 24px;
}

.gbs-section { padding: 56px 0; }
.gbs-section--tight { padding: 32px 0; }
.gbs-section--alt { background: var(--white); border-top: 1px solid var(--ink-200); border-bottom: 1px solid var(--ink-200); }

.gbs-grid { display: grid; gap: 24px; }
.gbs-grid--2 { grid-template-columns: repeat(2, 1fr); }
.gbs-grid--3 { grid-template-columns: repeat(3, 1fr); }
.gbs-grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
    .gbs-grid--3, .gbs-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
    .gbs-grid--2, .gbs-grid--3, .gbs-grid--4 { grid-template-columns: 1fr; }
}

/* ---------- Header / navigation ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .88);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--ink-200);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: var(--header-h);
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none !important;
    color: var(--ink-900) !important;
    flex-shrink: 0;
}
.brand__mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--gbs-blue-600), var(--gbs-blue-800));
    color: #fff;
    box-shadow: var(--shadow-sm);
}
.brand__mark svg { width: 24px; height: 24px; }
.brand__name { font-weight: 800; font-size: 1.1rem; letter-spacing: -0.02em; line-height: 1.1; }
.brand__tag { display: block; font-size: .68rem; font-weight: 600; color: var(--ink-500); letter-spacing: .08em; text-transform: uppercase; }

.site-nav { display: flex; align-items: center; gap: 4px; }

.site-nav a { text-decoration: none !important; }

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: var(--radius-pill);
    font-size: .95rem;
    font-weight: 600;
    color: var(--ink-700);
    background: transparent;
    border: 0;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.nav-link:hover { background: var(--gbs-blue-50); color: var(--gbs-blue-800); }
.nav-link .caret { width: 10px; height: 10px; transition: transform .15s ease; }

/* Dropdowns */
.nav-item { position: relative; }
.nav-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 240px;
    max-height: 70vh;
    overflow-y: auto;
    background: var(--white);
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    display: none;
}
.nav-item:hover > .nav-dropdown,
.nav-item:focus-within > .nav-dropdown,
.nav-item.is-open > .nav-dropdown { display: block; }
.nav-item:hover > .nav-link .caret,
.nav-item.is-open > .nav-link .caret { transform: rotate(180deg); }

.nav-dropdown a {
    display: block;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: .92rem;
    font-weight: 500;
    color: var(--ink-700);
    white-space: nowrap;
}
.nav-dropdown a:hover { background: var(--gbs-blue-50); color: var(--gbs-blue-800); }
.nav-dropdown__label {
    padding: 10px 12px 4px;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-500);
}
.nav-dropdown__rule { border: 0; border-top: 1px solid var(--ink-200); margin: 6px 4px; }
.nav-dropdown--wide { min-width: 460px; column-count: 2; column-gap: 4px; }
.nav-dropdown--wide .nav-dropdown__label { column-span: all; }

/* Donate button in nav */
.btn-donate {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, var(--gbs-gold-400), var(--gbs-gold-500));
    color: #3d2c05 !important;
    font-weight: 700;
    font-size: .95rem;
    text-decoration: none !important;
    box-shadow: var(--shadow-sm);
    transition: transform .15s ease, box-shadow .15s ease;
}
.btn-donate:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--ink-300);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    cursor: pointer;
    color: var(--ink-700);
}
.nav-toggle svg { width: 22px; height: 22px; display: block; }

@media (max-width: 1020px) {
    .nav-toggle { display: block; }
    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        background: var(--white);
        border-bottom: 1px solid var(--ink-200);
        box-shadow: var(--shadow-lg);
        padding: 12px 16px 20px;
        max-height: calc(100vh - var(--header-h));
        overflow-y: auto;
    }
    .site-nav.is-open { display: flex; }
    .nav-item { width: 100%; }
    .nav-link { width: 100%; justify-content: space-between; border-radius: var(--radius-sm); }
    .nav-dropdown, .nav-dropdown--wide {
        position: static;
        display: none;
        min-width: 0;
        border: 0;
        box-shadow: none;
        padding: 0 0 4px 12px;
        column-count: 1;
        max-height: none;
    }
    .nav-item.is-open > .nav-dropdown { display: block; }
    .nav-item:hover > .nav-dropdown { display: none; }
    .nav-item.is-open:hover > .nav-dropdown { display: block; }
    .nav-dropdown a { white-space: normal; }
    .btn-donate { justify-content: center; margin-top: 8px; }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(1000px 420px at 85% -10%, rgba(245, 184, 61, .22), transparent 60%),
        radial-gradient(800px 500px at -10% 110%, rgba(46, 99, 232, .35), transparent 55%),
        linear-gradient(150deg, var(--gbs-blue-900) 0%, var(--gbs-blue-800) 55%, var(--gbs-blue-700) 100%);
    color: #eaf0ff;
    padding: 80px 0 88px;
}
.hero h1 { color: #fff; margin-bottom: .4em; }
.hero .lead { color: #c6d4f7; font-size: 1.15rem; max-width: 640px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__verse {
    margin-top: 40px;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.02rem;
    color: #9fb4e8;
    max-width: 560px;
}
.hero__verse cite { font-style: normal; font-size: .85rem; color: #7e96d6; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-pill);
    font-family: inherit;
    font-size: .98rem;
    font-weight: 700;
    text-decoration: none !important;
    border: 0;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }

.btn--primary { background: var(--gbs-blue-600); color: #fff !important; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--gbs-blue-700); box-shadow: var(--shadow-md); }

.btn--gold { background: linear-gradient(135deg, var(--gbs-gold-400), var(--gbs-gold-500)); color: #3d2c05 !important; box-shadow: var(--shadow-sm); }
.btn--gold:hover { box-shadow: var(--shadow-md); }

.btn--ghost { background: rgba(255, 255, 255, .12); color: #fff !important; border: 1px solid rgba(255, 255, 255, .35); }
.btn--ghost:hover { background: rgba(255, 255, 255, .2); }

.btn--outline { background: var(--white); color: var(--gbs-blue-700) !important; border: 1.5px solid var(--gbs-blue-600); }
.btn--outline:hover { background: var(--gbs-blue-50); }

.btn--sm { padding: 8px 16px; font-size: .88rem; }

/* ---------- Type helpers ---------- */
.eyebrow {
    display: inline-block;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gbs-blue-600);
    margin-bottom: 10px;
}
.lead { font-size: 1.12rem; color: var(--ink-500); }
.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.text-center { text-align: center; }
.muted { color: var(--ink-500); }
.small { font-size: .88rem; }

/* Scripture blockquote */
.scripture {
    margin: 24px 0;
    padding: 20px 24px;
    border-left: 4px solid var(--gbs-gold-500);
    background: var(--gbs-gold-100);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.06rem;
    color: #574010;
}
.scripture cite { display: block; margin-top: 8px; font-style: normal; font-weight: 600; font-size: .88rem; color: var(--gbs-gold-600); }

/* ---------- Cards ---------- */
.card {
    background: var(--white);
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease;
}
.card--hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card h3 { margin-top: 0; }

.card__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--gbs-blue-100);
    color: var(--gbs-blue-700);
    margin-bottom: 16px;
}
.card__icon svg { width: 24px; height: 24px; }
.card__icon--gold { background: var(--gbs-gold-100); color: var(--gbs-gold-600); }

/* Series / link-list cards */
.link-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: var(--white);
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    font-weight: 600;
    color: var(--ink-900) !important;
    text-decoration: none !important;
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.link-card:hover { border-color: var(--gbs-blue-500); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.link-card .arrow { color: var(--gbs-blue-500); flex-shrink: 0; }

/* ---------- Badges & pills ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .02em;
}
.badge--new { background: var(--gbs-gold-100); color: var(--gbs-gold-600); }
.badge--blue { background: var(--gbs-blue-100); color: var(--gbs-blue-700); }
.badge--green { background: #e6f4ea; color: #1e7e39; }
.badge--muted { background: var(--ink-100); color: var(--ink-500); }

/* ---------- App store badges ---------- */
.store-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.store-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px 9px 14px;
    border-radius: 10px;
    background: var(--ink-900);
    color: #fff !important;
    text-decoration: none !important;
    line-height: 1.15;
    transition: transform .15s ease, opacity .15s ease;
}
.store-badge:hover { transform: translateY(-1px); }
.store-badge svg { width: 22px; height: 22px; flex-shrink: 0; }
.store-badge__label { display: block; font-size: .62rem; font-weight: 500; opacity: .8; letter-spacing: .03em; }
.store-badge__store { display: block; font-size: .92rem; font-weight: 700; }
.store-badge--soon { background: var(--ink-100); color: var(--ink-500) !important; cursor: default; pointer-events: none; border: 1px dashed var(--ink-300); }

/* ---------- App showcase ---------- */
.app-card { display: flex; flex-direction: column; }
.app-card__art {
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--gbs-blue-50);
    display: grid;
    place-items: center;
    min-height: 180px;
    margin-bottom: 20px;
}
.app-card__art img { display: block; max-height: 220px; width: auto; }
.app-card .store-badges { margin-top: auto; padding-top: 16px; }

/* ---------- Giving / donation cards ---------- */
.give-card { text-align: left; }
.give-card__detail {
    background: var(--ink-100);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: .9rem;
    color: var(--ink-900);
    word-break: break-word;
}
.give-note {
    margin-top: 28px;
    padding: 18px 22px;
    border-radius: var(--radius-md);
    background: var(--gbs-blue-50);
    border: 1px solid var(--gbs-blue-100);
    font-size: .9rem;
    color: var(--ink-700);
}

/* ---------- People / leadership ---------- */
.person-card { text-align: center; padding: 32px 24px; }
.person-card__avatar {
    width: 76px;
    height: 76px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--gbs-blue-500), var(--gbs-blue-800));
}
.person-card__avatar--gold { background: linear-gradient(135deg, var(--gbs-gold-400), var(--gbs-gold-600)); }
.person-card h3 { margin-bottom: 2px; }
.person-card .role { font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gbs-blue-600); }

/* ---------- Content / prose (legacy page content) ---------- */
.page-header { padding: 48px 0 8px; }
.page-header h1 { margin-bottom: 8px; }

.gbs-content { padding: 24px 0 64px; }
.gbs-content .prose { max-width: 820px; }

.prose h2 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1em; }
.prose li { margin-bottom: .35em; }

/* Tame legacy inline-styled tables coming from old markup / code-behind */
.gbs-content table { max-width: 100% !important; width: auto; border-collapse: collapse; }
.gbs-content td { padding: 4px 8px; }

/* Message/series listing table injected by code-behind */
.listing table { width: 100% !important; }
.listing td { padding: 0; }
.listing table a {
    display: block;
    padding: 12px 18px;
    margin-bottom: 8px;
    background: var(--white);
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-md);
    font-weight: 600;
    color: var(--ink-900);
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.listing table a:hover { border-color: var(--gbs-blue-500); box-shadow: var(--shadow-sm); color: var(--gbs-blue-700); }

/* ---------- Forms ---------- */
.form-card { max-width: 640px; }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-size: .88rem; font-weight: 600; color: var(--ink-900); margin-bottom: 6px; }

.form-control,
.gbs-content input[type="text"],
.gbs-content input[type="email"],
.gbs-content input[type="password"],
.gbs-content textarea,
.gbs-content select {
    width: 100%;
    padding: 11px 14px;
    font-family: inherit;
    font-size: .95rem;
    color: var(--ink-900);
    background: var(--white);
    border: 1px solid var(--ink-300);
    border-radius: 10px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control:focus,
.gbs-content input:focus,
.gbs-content textarea:focus,
.gbs-content select:focus {
    outline: none;
    border-color: var(--gbs-blue-500);
    box-shadow: 0 0 0 4px rgba(46, 99, 232, .14);
}
.gbs-content input[type="checkbox"] { width: auto; accent-color: var(--gbs-blue-600); }

/* Style ASP.NET buttons rendered as input[type=submit] when given CssClass="btn ..." */
input.btn { -webkit-appearance: none; appearance: none; }

/* ---------- Announcement bar ---------- */
.announce {
    background: linear-gradient(90deg, var(--gbs-blue-800), var(--gbs-blue-600));
    color: #dbe6ff;
    font-size: .88rem;
    text-align: center;
    padding: 9px 16px;
}
.announce a { color: var(--gbs-gold-400); font-weight: 700; }
.announce a:hover { color: #fff; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--gbs-blue-900);
    color: #aebcdf;
    padding: 56px 0 0;
    margin-top: 64px;
    font-size: .92rem;
}
.site-footer a { color: #cdd9f5; }
.site-footer a:hover { color: #fff; }
.site-footer h4 {
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 40px;
    padding-bottom: 40px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 8px; }

.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 1.05rem; margin-bottom: 12px; }
.footer-brand .brand__mark { width: 36px; height: 36px; border-radius: 10px; }

.footer-leadership { list-style: none; margin: 0; padding: 0; }
.footer-leadership li { margin-bottom: 6px; }
.footer-leadership .role { color: #7e96d6; font-size: .8rem; }

.footer-legal {
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding: 20px 0;
    font-size: .82rem;
    color: #7e96d6;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    align-items: center;
    justify-content: space-between;
}

.nonprofit-note { font-size: .82rem; color: #93a8de; line-height: 1.55; }

/* ---------- CTA band ---------- */
.cta-band {
    background:
        radial-gradient(700px 300px at 90% 0%, rgba(245, 184, 61, .25), transparent 60%),
        linear-gradient(135deg, var(--gbs-blue-800), var(--gbs-blue-600));
    border-radius: var(--radius-lg);
    color: #fff;
    padding: 48px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.cta-band h2 { color: #fff; margin: 0 0 6px; }
.cta-band p { color: #c6d4f7; margin: 0; }
@media (max-width: 620px) { .cta-band { padding: 32px 24px; } }

/* ---------- Misc ---------- */
.divider { border: 0; border-top: 1px solid var(--ink-200); margin: 32px 0; }

.table-wrap { overflow-x: auto; }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--white);
    color: var(--gbs-blue-700);
    padding: 10px 16px;
    z-index: 200;
    border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

::selection { background: var(--gbs-blue-100); color: var(--gbs-blue-900); }
