/* =====================================================================
   Abundant Grace Fellowship — Church of God of Prophecy
   Built to the COGOP Brand Guidelines (2026): Navy / Red / Purple /
   Brown / Gold color system. Archivo for headlines (closest free
   match to the brand's Aktiv Grotesk Ex), Nunito Sans for body copy
   (the official brand body font), Lora italic for accent text
   (closest free match to Berkeley Oldstyle).
   ===================================================================== */
:root {
    /* Official COGOP color palette */
    --navy: #172172;
    --navy-deep: #101a5c;
    --red: #FD070C;
    --red-deep: #c60408;
    --purple: #4B2787;
    --brown: #88600B;
    --gold: #EDC732;

    /* Neutrals built around the palette */
    --paper: #FFFFFF;
    --paper-tint: #F3F3F8;
    --ink: #1B1E3A;
    --ink-soft: #4A4E6B;
    --line: rgba(23,33,114,0.12);

    --font-display: "Archivo", "Arial Narrow", sans-serif;
    --font-accent: "Lora", Georgia, serif;
    --font-body: "Nunito Sans", -apple-system, BlinkMacSystemFont, sans-serif;

    --container: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink-soft);
    background: var(--paper);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 0 0 0.4em;
    color: var(--navy);
    text-transform: uppercase;
}

h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1.08; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.3rem); line-height: 1.18; }
h2 em, h1 em { font-family: var(--font-accent); font-style: italic; text-transform: none; font-weight: 500; color: var(--red); }

p { margin: 0 0 1em; color: var(--ink-soft); }

.eyebrow {
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--red);
    margin: 0 0 0.9em;
}

/* ---------------- Buttons ---------------- */
.btn {
    display: inline-block;
    padding: 13px 28px;
    border-radius: 6px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    border: 1.5px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.btn--gold,
.btn--primary { background: var(--red); color: #fff; }
.btn--gold:hover,
.btn--primary:hover { background: var(--red-deep); }

.btn--wine,
.btn--secondary { background: var(--navy); color: #fff; }
.btn--wine:hover,
.btn--secondary:hover { background: var(--navy-deep); }

.btn--ghost { background: transparent; color: var(--navy); border-color: rgba(23,33,114,0.3); }
.btn--ghost:hover { border-color: var(--navy); background: rgba(23,33,114,0.05); }

.btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,0.5); }
.btn--ghost-light:hover { border-color: #fff; background: rgba(255,255,255,0.08); }

/* ---------------- Header ---------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(8px);
    border-bottom: 3px solid var(--red);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 84px;
    gap: 24px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
    min-width: 0;
}
.logo img { height: 48px; width: auto; display: block; flex-shrink: 0; }
.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    white-space: nowrap;
    min-width: 0;
}
.logo-text .logo-local {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.92rem;
    color: var(--navy);
    text-transform: uppercase;
    white-space: nowrap;
}
.logo-text .logo-denom {
    font-family: var(--font-accent);
    font-style: italic;
    font-size: 0.74rem;
    color: var(--red);
    white-space: nowrap;
}

.desktop-nav ul { list-style: none; display: flex; gap: 30px; margin: 0; padding: 0; }
.desktop-nav a {
    text-decoration: none;
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.02em;
    color: var(--ink-soft);
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: border-color 0.15s ease, color 0.15s ease;
}
.desktop-nav a:hover,
.desktop-nav a[aria-current="page"] { color: var(--navy); border-color: var(--red); }

.site-utils { display: flex; align-items: center; gap: 12px; }

.nav-toggle { display: none; }
.hamburger {
    display: none;
    position: absolute;
    top: 0; bottom: 0; right: 28px;
    margin: auto 0;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    height: 84px;
    cursor: pointer;
    padding: 6px;
}
.hamburger span { width: 24px; height: 2px; background: var(--navy); display: block; transition: transform 0.2s ease, opacity 0.2s ease; }

.mobile-nav {
    display: none;
    max-height: 0;
    overflow: hidden;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    transition: max-height 0.25s ease;
}
.mobile-nav ul { list-style: none; margin: 0; padding: 8px 28px 18px; }
.mobile-nav a { display: block; padding: 10px 0; text-decoration: none; color: var(--navy); font-weight: 700; border-bottom: 1px solid var(--line); }

.nav-toggle:checked ~ .mobile-nav { max-height: 400px; }
.nav-toggle:checked + .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle:checked + .hamburger span:nth-child(2) { opacity: 0; }
.nav-toggle:checked + .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------- Hero ---------------- */
.hero {
    position: relative;
    background: radial-gradient(120% 90% at 50% -10%, #202b7f 0%, var(--navy) 55%, var(--navy-deep) 100%);
    color: var(--paper);
    padding: 72px 0 0;
    overflow: hidden;
    text-align: center;
}
.hero-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(45% 40% at 50% 25%, rgba(237,199,50,0.22), transparent 70%);
    pointer-events: none;
}
.hero-inner { position: relative; max-width: 720px; padding-bottom: 64px; }
.hero-mark { height: 88px; width: auto; margin: 0 auto 22px; }

.hero .eyebrow { color: var(--gold); }
.hero h1 { color: var(--paper); }
.hero-copy { color: rgba(255,255,255,0.82); font-size: 1.08rem; max-width: 560px; margin-inline: auto; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }

/* Flag-palette rule — a thin three-color seam referencing the All
   Nations colors (red / navy / purple); an abstract nod, not a
   reproduction of the protected Church flag artwork. */
.flag-rule {
    height: 6px;
    background: linear-gradient(90deg, var(--red) 0 34%, var(--navy) 34% 67%, var(--purple) 67% 100%);
}

/* ---------------- Sections ---------------- */
.section { padding: 84px 0; }
.section-tint { background: var(--paper-tint); }
.section-head { max-width: 620px; margin: 0 auto 44px; text-align: center; }
.section-head h2 { margin: 0; }

/* Standard image frame — clean rounded rectangle */
.img-frame {
    overflow: hidden;
    border-radius: 14px;
    background: var(--paper-tint);
    box-shadow: 0 18px 40px -18px rgba(23,33,114,0.35);
}
.img-frame img { width: 100%; height: 100%; object-fit: cover; }
.img-frame--portrait { aspect-ratio: 3 / 4; }

/* ---------------- Welcome ---------------- */
.welcome-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 64px;
    align-items: center;
}
.welcome-copy h2 { margin-bottom: 0.5em; }
.welcome-frame { max-width: 380px; margin: 0 auto; }

/* ---------------- Gallery ---------------- */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.gallery-item {
    margin: 0;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 4 / 3;
    background: var(--paper);
    box-shadow: 0 14px 30px -18px rgba(23,33,114,0.3);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item--tall { aspect-ratio: 3 / 4; }

/* ---------------- Location ---------------- */
.location-grid {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 56px;
    align-items: start;
}
.location-copy h2 { margin-bottom: 0.3em; }

.place-card {
    background: var(--navy);
    color: var(--paper);
    padding: 26px 26px 22px;
    border-radius: 14px;
    border-top: 4px solid var(--gold);
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 28px 0 30px;
    max-width: 420px;
}
.place-name { font-family: var(--font-display); font-size: 1.1rem; font-weight: 800; text-transform: uppercase; }
.place-sub { color: var(--gold); font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; }
.place-address { color: rgba(255,255,255,0.82); margin-top: 6px; }

.schedule { display: flex; flex-direction: column; gap: 2px; }
.schedule-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}
.schedule-row:last-child { border-bottom: none; }
.schedule-label { font-weight: 700; color: var(--navy); }
.schedule-time { font-family: var(--font-accent); font-style: italic; color: var(--red); font-size: 1.1rem; }

.map {
    width: 100%;
    height: 100%;
    min-height: 420px;
    border-radius: 14px;
    box-shadow: 0 18px 40px -18px rgba(23,33,114,0.35);
}
.church-img {
    border-radius: 14px;
    box-shadow: 0 18px 40px -18px rgba(23,33,114,0.35);
}

/* ---------------- Footer ---------------- */
footer { background: var(--navy-deep); color: rgba(255,255,255,0.75); }
.footer-inner { text-align: center; padding: 40px 0 48px; }
.footer-mark { height: 96px; width: auto; margin: 0 auto 18px; }
.footer-name { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.2rem; color: var(--paper); }
.footer-sub { margin-top: 4px; color: var(--gold); font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; }
.socials { display: flex; gap: 22px; justify-content: center; margin: 22px 0; flex-wrap: wrap; }
.socials a { text-decoration: none; color: rgba(255,255,255,0.85); font-weight: 700; border-bottom: 1px solid rgba(255,255,255,0.3); padding-bottom: 2px; }
.socials a:hover { border-color: var(--gold); color: var(--gold); }
.footer-copy { font-size: 0.82rem; color: rgba(255,255,255,0.5); margin-top: 18px; }

a:focus-visible, button:focus-visible, label:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 2px;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
    .welcome-grid, .location-grid { grid-template-columns: 1fr; gap: 40px; }
    .welcome-frame { order: -1; max-width: 320px; }
    .gallery { grid-template-columns: repeat(2, 1fr); }
    .map { min-height: 320px; }
}

@media (max-width: 720px) {
    .desktop-nav { display: none; }
    .site-utils .btn--ghost { display: none; }
    .hamburger { display: flex; }
    .mobile-nav { display: block; }
    .section { padding: 60px 0; }
    .hero { padding-top: 56px; }
    .hero-inner { padding-bottom: 56px; }
    .gallery { grid-template-columns: 1fr 1fr; }
    .place-card { max-width: none; }
    .logo-text .logo-local { font-size: 0.9rem; }
    .logo img { height: 42px; }
}

@media (max-width: 460px) {
    .gallery { grid-template-columns: 1fr; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .btn { text-align: center; }
}
