/* ============================================================
   77x Web Services — main.css
   Global styles: variables, reset, nav, buttons, footer,
   modal, forms, scroll animations
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
    --bg-dark:        #0c1520;
    --bg-card:        #111e2e;
    --bg-elevated:    #192840;
    --accent-primary: #c9973a;
    --accent-secondary: #7a3a1f;
    --accent-light:   #e8c068;
    --accent-tertiary: #4a7c9e;
    --text-primary:   #f5f0e8;
    --text-secondary: #b8a990;
    --text-muted:     #7a6f60;
    --border-subtle:  rgba(255, 255, 255, 0.07);
    --border-accent:  rgba(201, 151, 58, 0.35);
    --gradient-hero:  linear-gradient(135deg, #0c1520 0%, #13203a 50%, #0c1520 100%);
    --gradient-accent: linear-gradient(135deg, #c9973a 0%, #8b5a1a 100%);
    --shadow-glow:    0 0 60px rgba(201, 151, 58, 0.18);
    --shadow-card:    0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Lato', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.8;
    overflow-x: hidden;
    max-width: 100vw;
}

/* Allow text descenders to render */
p, span, a, li, div { overflow: visible; }

h1, h2, h3, h4, h5, h6, p, a, span, li, label {
    padding-bottom: 0.2em;
    margin-bottom: 0.1em;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
    overflow: visible;
}

/* ── Noise texture overlay ──────────────────────────────────── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 1000;
}

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    line-height: 1.4 !important;
    padding-bottom: 0.25em;
    overflow: visible !important;
    margin-bottom: 0.1em;
    letter-spacing: 0.01em;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover { color: var(--accent-light); }

/* ── Navigation ─────────────────────────────────────────────── */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 100;
    padding: 1.5rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(12, 21, 32, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    transition: background 0.3s ease;
    overflow: visible;
    box-sizing: border-box;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 56px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    align-items: center;
    line-height: 1.5;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 0.3em;
    display: inline-block;
    line-height: 1.6 !important;
    overflow: visible !important;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-accent);
    transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-cta {
    background: var(--gradient-accent);
    color: var(--bg-dark) !important;
    padding: 0.75rem 1.75rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(201, 151, 58, 0.3);
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(201, 151, 58, 0.4);
    color: var(--bg-dark) !important;
}

/* ── Page Header (inner pages) ──────────────────────────────── */
.page-header {
    padding: 10rem 4rem 4rem;
    text-align: center;
    background: var(--gradient-hero);
    position: relative;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.page-header h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--gradient-accent);
    color: var(--bg-dark);
    box-shadow: 0 4px 20px rgba(201, 151, 58, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 40px rgba(201, 151, 58, 0.4);
    color: var(--bg-dark);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
    border-color: var(--accent-primary);
    background: rgba(201, 151, 58, 0.05);
    color: var(--text-primary);
}

/* ── Section Shared ─────────────────────────────────────────── */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
    overflow: visible;
    padding-bottom: 0.5rem;
}

.section-label {
    display: inline-block;
    color: var(--accent-primary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    margin-bottom: 1rem;
    padding: 0.3rem 1.1rem;
    border: 1px solid rgba(201, 151, 58, 0.32);
    border-radius: 50px;
    background: rgba(201, 151, 58, 0.08);
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    line-height: 1.4 !important;
    padding-bottom: 0.3em;
    overflow: visible !important;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
    padding-bottom: 0.2em;
}

.highlight {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Content Section (inner pages) ─────────────────────────── */
.content-section {
    padding: 5rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.content-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.content-section p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

/* ── Card (generic) ─────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    padding: 2rem;
    transition: all 0.3s ease;
}

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

/* ── Modal ──────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 2rem;
    overflow-y: auto;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    padding: 2.5rem;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    background: var(--accent-primary);
    color: var(--bg-dark);
    border-color: var(--accent-primary);
}

.modal-header {
    margin-bottom: 2rem;
    padding-right: 3rem;
}

.modal-header h3 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.modal-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ── Forms ──────────────────────────────────────────────────── */
.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    color: var(--text-primary);
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(201, 151, 58, 0.12);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%237a6f60' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.form-group select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-submit {
    margin-top: 0.5rem;
    width: 100%;
    justify-content: center;
}

.form-recaptcha-notice {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    text-align: center;
}

.form-recaptcha-notice a {
    color: var(--accent-primary);
}

.form-success {
    text-align: center;
    padding: 2rem;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--bg-dark);
    margin: 0 auto 1.5rem;
}

.form-success h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
.form-success p  { color: var(--text-secondary); margin-bottom: 1.5rem; }

/* ── Footer ─────────────────────────────────────────────────── */
footer {
    padding: 4rem;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-card);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-top: 1rem;
    font-size: 0.95rem;
    line-height: 1.7;
}

.footer-column h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.footer-column ul { list-style: none; }
.footer-column li { margin-bottom: 0.75rem; }

.footer-column a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.footer-column a:hover { color: var(--accent-primary); }

.footer-bottom {
    max-width: 1200px;
    margin: 3rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: var(--bg-elevated);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--accent-primary);
    color: var(--bg-dark);
}

/* ── Scroll Animations ──────────────────────────────────────── */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Grids ──────────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }

/* ── Hamburger Menu ─────────────────────────────────────────── */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    z-index: 200;
}

.hamburger span {
    display: block;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger.open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger.open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Mobile nav drawer */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100vw;
    background: rgba(12, 21, 32, 0.98);
    backdrop-filter: blur(20px);
    z-index: 150;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-nav.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav ul {
    list-style: none;
    text-align: center;
    padding: 0;
    margin: 0;
    width: 100%;
}

.mobile-nav ul li {
    border-bottom: 1px solid var(--border-subtle);
}

.mobile-nav ul li:first-child {
    border-top: 1px solid var(--border-subtle);
}

.mobile-nav ul a {
    display: block;
    padding: 1.25rem 2rem;
    font-size: 1.2rem;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.05em;
    transition: color 0.2s ease, background 0.2s ease;
}

.mobile-nav ul a:hover,
.mobile-nav ul a.active {
    color: var(--accent-primary);
    background: rgba(201, 151, 58, 0.06);
}

.mobile-nav-cta {
    margin-top: 2rem;
    padding: 0 2rem;
    width: 100%;
}

.mobile-nav-cta a {
    display: block;
    text-align: center;
    background: var(--gradient-accent);
    color: var(--bg-dark) !important;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 20px rgba(201, 151, 58, 0.3);
}

.mobile-nav-scripture {
    margin-top: 2.5rem;
    padding: 0 2rem;
    text-align: center;
    color: var(--text-muted);
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 0.95rem;
    line-height: 1.6;
}

.mobile-nav-scripture span {
    color: var(--accent-primary);
    font-style: normal;
    font-size: 0.8rem;
    display: block;
    margin-top: 0.4rem;
    letter-spacing: 0.06em;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .footer-content { grid-template-columns: 1fr 1fr; }

    nav { padding: 1rem 2rem; }

    .nav-links { display: none; }
    .nav-cta   { display: none; }

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

@media (max-width: 768px) {
    .page-header {
        padding: 8rem 1.5rem 3rem;
    }

    .page-header h1 { font-size: clamp(1.8rem, 7vw, 2.5rem); }

    .content-section {
        padding: 3rem 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal {
        padding: 1.5rem;
        margin: 0.75rem;
        max-height: 95vh;
    }

    .modal-header { padding-right: 2.5rem; }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    footer { padding: 3rem 1.5rem 2rem; }

    /* Larger touch targets */
    .btn {
        padding: 0.9rem 1.6rem;
        font-size: 0.95rem;
    }

    .footer-social a {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .modal { margin: 0; border-radius: 20px 20px 0 0; position: fixed; bottom: 0; top: auto; max-height: 92vh; }
    .modal-overlay { align-items: flex-end; padding: 0; }
}
