/* Inter, served from this site (SIL Open Font License — fonts/Inter-OFL.txt), so no
   visitor's browser contacts a third party to draw the page. */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('/fonts/inter-latin-wght-normal.woff2') format('woff2');
}

:root {
    /* --- Koinonia Cloud Brand Colors --- */
    --kc-bg-dark: #121721;
    --kc-white: #FFFFFF;
    --kc-cyan-glow: #66D9E8;
    --kc-amethyst: #7048E8;
    --kc-giving: #F08C60;
    --kc-talents: #FFD43B;
    --kc-attendance: #3BC9DB;

    /* --- Mapped to existing variable names for compatibility --- */
    --primary: #7048E8;
    --primary-light: #8B6BF0;
    --secondary: #66D9E8;
    --secondary-light: #8CE8F5;
    --accent: #9BA3AF;
    --background: #000000;
    --foreground: #E9ECEF;
    --foreground-muted: #9BA3AF;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(112, 72, 232, 0.2);
    --glass-hover: rgba(255, 255, 255, 0.07);
    --glow-gold: 0 0 40px rgba(102, 217, 232, 0.35), 0 0 80px rgba(102, 217, 232, 0.15);
    --glow-text-gold: 0 0 20px rgba(102, 217, 232, 0.6), 0 0 40px rgba(102, 217, 232, 0.3);
    --kc-gradient-glow: linear-gradient(135deg, #7048E8 0%, #66D9E8 100%);
    --font-heading: 'Inter', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --nav-height: 80px;
    --border-radius: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--background);
    color: var(--foreground);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

::selection {
    background: var(--kc-amethyst);
    color: white;
}

/* ===== UTILITY CLASSES ===== */
.glow-text {
    color: var(--secondary);
    text-shadow: var(--glow-text-gold);
}

.gradient-blur {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
}

/* ===== PROTECTION UTILITIES ===== */
.protected-container {
    position: relative;
    display: inline-block;
}

.protected-asset {
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
}

.protected-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    background: transparent;
}

.gradient-blur-blue {
    background: radial-gradient(circle, rgba(112, 72, 232, 0.35) 0%, transparent 70%);
}

.gradient-blur-gold {
    background: radial-gradient(circle, rgba(102, 217, 232, 0.2) 0%, transparent 70%);
}

/* ===== GLASS CARD ===== */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 1.75rem;
    transition: var(--transition);
}

.glass-card:hover {
    transform: translateY(-6px);
    border-color: rgba(102, 217, 232, 0.35);
    background: var(--glass-hover);
    box-shadow: var(--glow-gold);
}

/* ===== BUTTONS ===== */
.btn-primary {
    background: var(--kc-gradient-glow);
    color: #000;
    padding: 0.9rem 2.2rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    font-family: var(--font-body);
    transition: var(--transition);
    display: inline-block;
    border: none;
    cursor: pointer;
    letter-spacing: 0.01em;
    text-decoration: none;
    box-shadow: 0 0 15px rgba(102, 217, 232, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 0 25px rgba(102, 217, 232, 0.7);
    transform: translateY(-2px) scale(1.02);
}

.btn-secondary {
    background: transparent;
    color: var(--foreground);
    padding: 0.9rem 2.2rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    font-weight: 600;
    font-size: 0.95rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
    text-decoration: none;
}

.btn-secondary:hover {
    background: var(--glass);
    border-color: rgba(102, 217, 232, 0.4);
    color: var(--secondary);
}

/* ===== DIVIDER ===== */
.section-divider {
    width: 60px;
    height: 4px;
    background: var(--kc-gradient-glow);
    border-radius: 2px;
    margin: 1.5rem 0;
}

.section-divider.centered {
    margin: 1.5rem auto;
}

/* ===== BADGE ===== */
.badge {
    display: inline-block;
    background: rgba(112, 72, 232, 0.12);
    color: var(--secondary);
    border: 1px solid rgba(112, 72, 232, 0.3);
    padding: 0.35rem 1rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ===== LAYOUT & SECTIONS ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
}

.section {
    padding: 1.5rem 0;
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    scroll-margin-top: var(--nav-height);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 1.5rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin: 0.75rem 0;
}

.section-sub {
    color: var(--foreground-muted);
    font-size: 1.1rem;
    line-height: 1.75;
}

/* ===== NAV ===== */
.nav {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-inner {
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.nav-logo img {
    height: 120px;
    width: auto;
    object-fit: contain;
    margin-left: -22px;
}

.nav-logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--foreground);
    font-size: 1.05rem;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .nav-logo-text { font-size: 0.9rem; }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--foreground-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.25s;
}

.nav-links a:hover {
    color: var(--foreground);
}

.nav-links a.btn-primary,
.nav-links a.btn-primary:hover {
    color: #000;
}

/* ===== HERO ===== */
.hero {
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    padding: 4rem 0 6rem;
}

.hero-content {
    max-width: 620px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero-headline {
    font-size: clamp(2.5rem, 6vw, 4rem);
    line-height: 1.05;
}

.hero-leadin {
    font-size: 1.15rem;
    font-style: italic;
    color: var(--foreground-muted);
    margin: 0.25rem 0 0.75rem;
}

.hero-subheadline {
    font-size: 1.2rem;
    color: var(--foreground-muted);
    line-height: 1.7;
    max-width: 520px;
}

.cta-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-visual {
    flex: 0 0 380px;
    height: 380px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vector-ring {
    position: absolute;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    border: 1px solid rgba(102, 217, 232, 0.15);
    animation: rotateRing 20s linear infinite;
}

.vector-ring-2 {
    position: absolute;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    border: 1px solid rgba(112, 72, 232, 0.3);
    animation: rotateRing 14s linear infinite reverse;
}

@keyframes rotateRing {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* ===== GRID REPRESENTS THE LAW OF INERTIA ===== */
.narrative-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.narrative-grid h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.narrative-grid p {
    color: var(--foreground-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.grid-icon {
    margin-bottom: 0.6rem;
    line-height: 1;
}
.grid-icon svg {
    width: 40px;
    height: 40px;
    stroke: url(#brand-stroke);
    filter: url(#brand-glow);
}

/* ===== PLATFORM / KOINONIA CLOUD ===== */
.platform-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 0;
}

.platform-grid h3 {
    font-size: 1.15rem;
    margin: 0.75rem 0 0.5rem;
}

.platform-card p {
    color: var(--foreground-muted);
    font-size: 0.9rem;
    line-height: 1.65;
}

/* ===== FOOTER ===== */
.footer {
    border-top: 1px solid var(--glass-border);
    padding: 4rem 0 2rem;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer img {
    height: 80px;
    margin-bottom: 1rem;
}

.footer p {
    font-size: 0.875rem;
    color: var(--foreground-muted);
}

.footer-bottom {
    border-top: 1px solid var(--glass-border);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {

    .narrative-grid,
    .platform-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== HAMBURGER MENU ===== */
.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
}

.nav-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--foreground);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-mobile {
    display: none;
    flex-direction: column;
    gap: 0;
    background: rgba(0, 0, 0, 0.97);
    border-top: 1px solid var(--glass-border);
    padding: 0.5rem 0 1rem;
}

.nav-mobile a {
    color: var(--foreground-muted);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.85rem 5%;
    border-bottom: 1px solid rgba(112, 72, 232, 0.08);
    transition: color 0.25s;
}

.nav-mobile a:hover {
    color: var(--foreground);
}

.nav-mobile a.btn-primary {
    margin: 1rem 5% 0;
    text-align: center;
    border-bottom: none;
}

.nav-mobile.open {
    display: flex;
}

.two-col-grid {
    grid-template-columns: 1fr !important;
}

@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 2rem;
    }

    .narrative-grid,
    .platform-grid {
        grid-template-columns: 1fr;
    }

    .cta-group {
        justify-content: center;
    }

    .nav-links {
        display: none;
    }

    .nav-hamburger {
        display: flex;
    }

    .two-col-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .btn-primary {
        box-shadow: 0 0 8px rgba(102, 217, 232, 0.3);
    }
}

/* ===== HERO ANIMATION ===== */
.hero-logo-animated {
    width: 480px;
    height: 480px;
    object-fit: contain;
    filter: drop-shadow(0 0 30px rgba(102, 217, 232, 0.6)) drop-shadow(0 0 60px rgba(112, 72, 232, 0.4));
    animation: heroFloat 8s ease-in-out infinite;
}

@keyframes heroFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.02);
    }
}

/* ===== SCROLL REVEAL ANIMATIONS ===== */
@keyframes uf-draw { to { stroke-dashoffset: 0; } }

.section-header {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.section-header.in-view {
    opacity: 1;
    transform: translateY(0);
}

.narrative-grid > *,
.platform-grid > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.narrative-grid.in-view > *,
.platform-grid.in-view > * {
    opacity: 1;
    transform: translateY(0);
}
.narrative-grid.in-view > *:nth-child(2),
.platform-grid.in-view > *:nth-child(2) { transition-delay: 0.08s; }
.narrative-grid.in-view > *:nth-child(3),
.platform-grid.in-view > *:nth-child(3) { transition-delay: 0.16s; }
.platform-grid.in-view > *:nth-child(4) { transition-delay: 0.24s; }
.platform-grid.in-view > *:nth-child(5) { transition-delay: 0.32s; }
.platform-grid.in-view > *:nth-child(6) { transition-delay: 0.40s; }

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .section-header,
    .narrative-grid > *,
    .platform-grid > * {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ===== WEBGL PARTICLE BACKGROUND ===== */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    pointer-events: none;
}

/* ===== TEXT LEGIBILITY OVER ANIMATED BACKGROUNDS ===== */
/* Soft dark halo around body text so the WebGL particles fade behind characters */
main p,
main blockquote p {
    text-shadow:
        0 0 14px rgba(0, 0, 0, 0.92),
        0 0 28px rgba(0, 0, 0, 0.6);
}
main h2,
main h3 {
    text-shadow:
        0 0 16px rgba(0, 0, 0, 0.7);
}

/* ===== SOFT PARAGRAPH BACKDROP (homepage-wide) =====
   Adds a feathered dark halo behind body text not contained in a glass-card.
   Visually darkens/fades the WebGL particles wherever text sits — no hard card edges. */
main p:not(.glass-card p):not(.glass-card *)::before {
    content: '';
    position: absolute;
    inset: -12px -26px;
    background: radial-gradient(ellipse at center,
        rgba(0, 0, 0, 1) 50%,
        rgba(0, 0, 0, 0.85) 75%,
        transparent 100%);
    filter: blur(12px);
    z-index: -1;
    pointer-events: none;
    border-radius: 20px;
}
main p:not(.glass-card p):not(.glass-card *) {
    position: relative;
    isolation: isolate;
}

/* ===== ABOUT PAGE — JUMP NAV =====
   Sticky pill bar below the hero that lets readers jump between sections. */
.about-jumpnav {
    position: sticky;
    top: var(--nav-height);
    z-index: 100;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.75rem 0;
}

.about-jumpnav-inner {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
}

.jumpnav-pill {
    display: inline-block;
    background: rgba(112, 72, 232, 0.10);
    color: var(--secondary);
    border: 1px solid rgba(112, 72, 232, 0.30);
    padding: 0.4rem 1.15rem;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
}

.jumpnav-pill:hover {
    background: rgba(102, 217, 232, 0.16);
    border-color: rgba(102, 217, 232, 0.55);
    color: var(--foreground);
}

.jumpnav-pill.is-active {
    background: var(--kc-gradient-glow);
    color: #000;
    border-color: transparent;
    box-shadow: 0 0 14px rgba(102, 217, 232, 0.35);
}

/* Sections targeted by the jumpnav need extra scroll-margin to clear both the main nav AND the jumpnav. */
#origin, #compass, #standards, #brand {
    scroll-margin-top: calc(var(--nav-height) + 64px);
}

@media (max-width: 480px) {
    .jumpnav-pill {
        padding: 0.35rem 0.85rem;
        font-size: 0.72rem;
        letter-spacing: 0.04em;
    }
}

/* ===== TRADEMARK SUPERSCRIPT =====
   Polished sizing for ™ marks next to brand names — smaller and tighter than browser default,
   with line-height: 0 so the superscript doesn't push lines taller. */
sup {
    font-size: 0.55em;
    vertical-align: super;
    line-height: 0;
    margin-left: 0.05em;
    font-weight: 500;
    letter-spacing: 0;
}

/* Slightly larger ™ specifically in the nav wordmark — the global 0.55em is too small at nav font size */
.nav-logo-text sup {
    font-size: 0.7em;
}

/* ===== PRODUCTS SECTION (homepage) =====
   Two-product showcase replacing the old single-product Koinonia Cloud detail.
   Each card: logo + name + tagline + body + CTA. Per-product accent on hover. */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.product-card {
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 1.5rem 2rem;
}

.product-card-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 72px;
    margin-bottom: 0.75rem;
}
.product-card-logo img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    object-fit: contain;
}

.product-card-title {
    font-size: clamp(1.4rem, 2.2vw, 1.75rem);
    margin-bottom: 0.5rem;
}

.product-card-tagline {
    color: var(--kc-cyan-glow);
    font-style: italic;
    font-size: 1.05rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}

.product-card-body {
    color: var(--foreground-muted);
    font-size: 0.975rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.product-card-cta {
    margin-top: auto;
    align-self: center;
    background: var(--kc-gradient-glow);
    color: #000;
    padding: 0.85rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 0 15px rgba(102, 217, 232, 0.4);
    letter-spacing: 0.01em;
    display: inline-block;
}
.product-card-cta:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 25px rgba(102, 217, 232, 0.7);
}

/* Koinonia Cloud — cyan accent on card hover */
.product-card-koinonia:hover {
    border-color: rgba(102, 217, 232, 0.45);
}

/* PastorEchoes — gold accent (per brand brief: gold as the single accent) */
.product-card-pastorechoes .product-card-tagline {
    color: #D2A85B;
}
.product-card-pastorechoes:hover {
    border-color: rgba(210, 168, 91, 0.45);
}
.product-card-cta-pastorechoes {
    background: #D2A85B;
    color: #0B0D12;
    box-shadow: 0 0 15px rgba(210, 168, 91, 0.4);
}
.product-card-cta-pastorechoes:hover {
    background: #DCB670;
    box-shadow: 0 0 25px rgba(210, 168, 91, 0.7);
}

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

.product-card-verse {
    font-style: italic;
    font-size: 0.85rem;
    color: var(--kc-cyan-glow);
    opacity: 0.85;
    margin: -0.5rem 0 1.25rem;
}
.product-card-verse span {
    font-style: normal;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--foreground-muted);
    margin-left: 0.35rem;
}

.footer-bottom {
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.footer-tm {
    flex-basis: 100%;
    font-size: 0.75rem;
    opacity: 0.8;
}

/* One section per screen on desktop: scrolling settles each section right under
   the nav instead of leaving the next one peeking in at the bottom. */
@media (min-width: 769px) and (min-height: 600px) {
    html {
        scroll-snap-type: y mandatory;
    }
    main > section {
        scroll-snap-align: start;
        scroll-margin-top: var(--nav-height);
    }
    .footer {
        scroll-snap-align: end;
    }
}
