/* ============================================================
   BuyJohnstonCounty.com — Main Stylesheet
   Brand: Deep forest green + warm gold + cream
   Fonts: DM Serif Display (headings) + Outfit (body)
   ============================================================ */

:root {
    /* ── Brand Colors ─────────────────────────────────────── */
    --forest:       #1B3A2D;
    --forest-light: #2A5A42;
    --forest-dark:  #0F2419;
    --gold:         #D4A847;
    --gold-light:   #E8C97A;
    --gold-dark:    #B8912E;
    --cream:        #FBF8F1;
    --cream-dark:   #F0EAD6;
    --charcoal:     #2C2C2C;
    --slate:        #5A6872;
    --white:        #FFFFFF;
    --error:        #C0392B;
    --success:      #27AE60;

    /* ── Typography ───────────────────────────────────────── */
    --font-heading: 'DM Serif Display', Georgia, serif;
    --font-body:    'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;

    /* ── Spacing ──────────────────────────────────────────── */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;

    /* ── Layout ───────────────────────────────────────────── */
    --max-width: 1200px;
    --radius: 6px;
    --radius-lg: 12px;
    --shadow: 0 2px 20px rgba(27, 58, 45, 0.08);
    --shadow-lg: 0 8px 40px rgba(27, 58, 45, 0.12);
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--charcoal);
    background: var(--cream);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--forest); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold-dark); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.2;
    color: var(--forest-dark);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.2rem; font-family: var(--font-body); font-weight: 600; }

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

.skip-link {
    position: absolute; top: -100px; left: 0;
    background: var(--forest); color: var(--white); padding: 8px 16px; z-index: 9999;
}
.skip-link:focus { top: 0; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
    border: 2px solid transparent;
    letter-spacing: 0.02em;
}
.btn-gold {
    background: var(--gold);
    color: var(--forest-dark);
    border-color: var(--gold);
}
.btn-gold:hover {
    background: var(--gold-dark);
    border-color: var(--gold-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(212, 168, 71, 0.35);
}
.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.4);
}
.btn-outline:hover {
    background: var(--white);
    color: var(--forest-dark);
    border-color: var(--white);
}
.btn-forest {
    background: var(--forest);
    color: var(--white);
}
.btn-forest:hover {
    background: var(--forest-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(27, 58, 45, 0.3);
}

/* ── Header ────────────────────────────────────────────────── */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: var(--forest);
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    transition: background 0.3s;
}
.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.logo {
    display: flex; align-items: center; gap: 8px;
    color: var(--white); text-decoration: none;
}
.logo-icon { font-size: 1.6rem; }
.logo-text {
    font-family: var(--font-body); font-weight: 300; font-size: 1.1rem; color: var(--cream);
}
.logo-text strong { font-weight: 700; color: var(--white); }
.logo-text small { color: var(--gold); font-weight: 400; }

.main-nav ul {
    list-style: none; display: flex; gap: 4px; align-items: center;
}
.main-nav a {
    color: rgba(255,255,255,0.85);
    font-size: 0.88rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius);
    transition: all 0.2s;
}
.main-nav a:hover { color: var(--white); background: rgba(255,255,255,0.1); }
.nav-cta {
    background: var(--gold) !important;
    color: var(--forest-dark) !important;
    font-weight: 600 !important;
}
.nav-cta:hover {
    background: var(--gold-dark) !important;
    color: var(--white) !important;
}

.header-phone {
    color: var(--gold-light); font-size: 0.88rem; font-weight: 500;
    display: flex; align-items: center; gap: 6px;
}
.header-phone:hover { color: var(--white); }

.mobile-menu-toggle {
    display: none;
    flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 8px;
}
.mobile-menu-toggle span {
    display: block; width: 24px; height: 2px; background: var(--white); transition: 0.3s;
}

/* ── Hero Section ──────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(72px + var(--space-xl)) var(--space-md) var(--space-xl);
    background: linear-gradient(160deg, var(--forest-dark) 0%, var(--forest) 40%, var(--forest-light) 100%);
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(212,168,71,0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(255,255,255,0.04) 0%, transparent 50%);
}
.hero::after {
    content: '';
    position: absolute; bottom: 0; left: 0; right: 0;
    height: 120px;
    background: linear-gradient(to top, var(--cream) 0%, transparent 100%);
}
.hero-content {
    position: relative; z-index: 2;
    max-width: 800px;
}
.hero-badge {
    display: inline-block;
    background: rgba(212,168,71,0.15);
    border: 1px solid rgba(212,168,71,0.3);
    color: var(--gold-light);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 18px;
    border-radius: 100px;
    margin-bottom: var(--space-md);
}
.hero h1 {
    color: var(--white);
    margin-bottom: var(--space-sm);
    line-height: 1.15;
}
.hero h1 em {
    font-style: normal;
    color: var(--gold);
}
.hero-sub {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.75);
    margin-bottom: var(--space-md);
    line-height: 1.65;
    max-width: 640px;
    margin-left: auto; margin-right: auto;
}
.hero-actions {
    display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
}

/* ── Stat Bar ──────────────────────────────────────────────── */
.stat-bar {
    position: relative; z-index: 3;
    margin-top: -50px;
    margin-bottom: var(--space-lg);
}
.stat-bar-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.stat-item {
    padding: var(--space-md);
    text-align: center;
    border-right: 1px solid var(--cream-dark);
}
.stat-item:last-child { border-right: none; }
.stat-number {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--forest);
    display: block;
}
.stat-label {
    font-size: 0.82rem;
    color: var(--slate);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 4px;
}

/* ── Section Styles ────────────────────────────────────────── */
.section {
    padding: var(--space-xl) 0;
}
.section-alt {
    background: var(--white);
}
.section-dark {
    background: var(--forest);
    color: var(--white);
}
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark p { color: rgba(255,255,255,0.8); }

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-lg);
}
.section-header h2 { margin-bottom: var(--space-sm); }
.section-header p { color: var(--slate); font-size: 1.05rem; }
.section-header .gold-line {
    display: block; width: 60px; height: 3px;
    background: var(--gold); margin: var(--space-sm) auto 0; border-radius: 2px;
}

/* ── Card Grids ────────────────────────────────────────────── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-md);
}
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    box-shadow: var(--shadow);
    transition: transform 0.25s, box-shadow 0.25s;
    border: 1px solid rgba(0,0,0,0.04);
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.card-icon {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, var(--forest) 0%, var(--forest-light) 100%);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    margin-bottom: var(--space-sm);
}
.card h3 { margin-bottom: 8px; font-size: 1.25rem; }
.card p { color: var(--slate); font-size: 0.92rem; }
.card .card-stat {
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--cream-dark);
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--forest);
}

/* ── Town Grid ─────────────────────────────────────────────── */
.town-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-sm);
}
.town-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--cream-dark);
    transition: all 0.25s;
}
.town-card:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow);
}
.town-card h4 { color: var(--forest); margin-bottom: 6px; }
.town-card .town-price {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--gold-dark);
    margin-bottom: 8px;
}
.town-card p { font-size: 0.85rem; color: var(--slate); line-height: 1.55; }

/* ── Data Table ────────────────────────────────────────────── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.data-table thead { background: var(--forest); }
.data-table th {
    color: var(--white); font-weight: 600; font-size: 0.85rem;
    text-transform: uppercase; letter-spacing: 0.04em;
    padding: 14px 20px; text-align: left;
}
.data-table td { padding: 14px 20px; border-bottom: 1px solid var(--cream-dark); font-size: 0.92rem; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(212,168,71,0.04); }
.data-table .highlight { color: var(--forest); font-weight: 600; }

/* ── Agent Profile ─────────────────────────────────────────── */
.agent-section {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: var(--space-lg);
    align-items: start;
}
.agent-photo {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.agent-photo img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.agent-info h2 { margin-bottom: var(--space-sm); }
.agent-info p { margin-bottom: var(--space-sm); color: var(--slate); }
.agent-credentials {
    display: flex; flex-wrap: wrap; gap: 12px; margin: var(--space-md) 0;
}
.credential {
    background: var(--cream);
    border: 1px solid var(--cream-dark);
    padding: 8px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--forest);
}

/* ── Contact Form ──────────────────────────────────────────── */
.contact-section {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: var(--space-lg);
    align-items: start;
}
.form-group { margin-bottom: var(--space-sm); }
.form-group label {
    display: block;
    font-weight: 600; font-size: 0.88rem;
    color: var(--charcoal);
    margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    border: 2px solid var(--cream-dark);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--charcoal);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212,168,71,0.15);
}
.form-group textarea { resize: vertical; min-height: 120px; }

/* Honeypot — visually hidden but accessible to bots */
.form-hp {
    position: absolute; left: -9999px; top: -9999px;
    width: 1px; height: 1px; overflow: hidden;
    opacity: 0; pointer-events: none;
}

.form-message {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: var(--space-md);
    font-weight: 500;
}
.form-message-success {
    background: #E8F5E9; border: 1px solid #A5D6A7; color: #2E7D32;
}
.form-message-error {
    background: #FFEBEE; border: 1px solid #EF9A9A; color: #C62828;
}

.contact-sidebar {
    background: var(--forest);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    color: var(--white);
    position: sticky;
    top: 100px;
}
.contact-sidebar h3 { color: var(--white); margin-bottom: var(--space-sm); }
.contact-sidebar p { color: rgba(255,255,255,0.8); font-size: 0.92rem; margin-bottom: var(--space-sm); }
.contact-sidebar a { color: var(--gold-light); }
.contact-sidebar a:hover { color: var(--white); }
.sidebar-photo {
    width: 100%; border-radius: var(--radius);
    margin-bottom: var(--space-sm);
}

/* ── CTA Banner ────────────────────────────────────────────── */
.cta-banner {
    background: var(--forest);
    padding: var(--space-lg) var(--space-md);
    text-align: center;
}
.cta-banner h2 { color: var(--white); margin-bottom: var(--space-xs); }
.cta-banner p { color: rgba(255,255,255,0.75); font-size: 1.05rem; margin-bottom: var(--space-md); }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
    background: var(--forest-dark);
    color: rgba(255,255,255,0.7);
    padding-top: var(--space-lg);
}
.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-lg);
}
.footer-brand .logo-text { font-size: 1.1rem; color: var(--cream); }
.footer-brand .logo-text strong { color: var(--white); }
.footer-brand .logo-text small { color: var(--gold); }
.footer-brand p { margin-top: var(--space-sm); font-size: 0.88rem; line-height: 1.6; }
.footer-agent { margin-top: var(--space-sm); }
.footer-agent a { color: var(--gold-light); }

.footer-links h4 {
    color: var(--white); font-size: 0.9rem;
    text-transform: uppercase; letter-spacing: 0.06em;
    margin-bottom: var(--space-sm);
}
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: rgba(255,255,255,0.6); font-size: 0.88rem; }
.footer-links a:hover { color: var(--gold-light); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: var(--space-lg);
    padding: var(--space-md);
    text-align: center;
    font-size: 0.82rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.footer-credit { margin-top: 4px; }
.footer-credit a { color: var(--gold); }

/* ── Page-Level Content ────────────────────────────────────── */
.page-hero {
    padding: calc(72px + var(--space-lg)) var(--space-md) var(--space-lg);
    background: var(--forest);
    text-align: center;
}
.page-hero h1 { color: var(--white); margin-bottom: var(--space-xs); }
.page-hero p { color: rgba(255,255,255,0.7); font-size: 1.1rem; }

.content-section { max-width: 900px; margin: 0 auto; }
.content-section h2 { margin: var(--space-lg) 0 var(--space-sm); }
.content-section h3 { margin: var(--space-md) 0 var(--space-xs); }
.content-section p { margin-bottom: var(--space-sm); color: var(--slate); }
.content-section ul, .content-section ol { margin: 0 0 var(--space-sm) var(--space-md); color: var(--slate); }
.content-section li { margin-bottom: 6px; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .main-nav { display: none; }
    .mobile-menu-toggle { display: flex; }
    .header-phone { display: none; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .agent-section { grid-template-columns: 1fr; }
    .contact-section { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-item:nth-child(2) { border-right: none; }
    .stat-item:nth-child(1), .stat-item:nth-child(2) { border-bottom: 1px solid var(--cream-dark); }
    .footer-inner { grid-template-columns: 1fr; gap: var(--space-md); }
    .hero { min-height: 70vh; }
    .data-table { font-size: 0.85rem; }
    .data-table th, .data-table td { padding: 10px 12px; }
}

@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr; }
    .stat-item { border-right: none; border-bottom: 1px solid var(--cream-dark); }
    .stat-item:last-child { border-bottom: none; }
}

/* ── Mobile Navigation Overlay ─────────────────────────────── */
.mobile-nav-overlay {
    position: fixed; inset: 0;
    background: var(--forest-dark);
    z-index: 999;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 8px;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.mobile-nav-overlay.active { opacity: 1; visibility: visible; }
.mobile-nav-overlay a {
    color: var(--white); font-size: 1.4rem; font-family: var(--font-heading);
    padding: 12px 24px; transition: color 0.2s;
}
.mobile-nav-overlay a:hover { color: var(--gold); }
.mobile-nav-close {
    position: absolute; top: 20px; right: 24px;
    background: none; border: none; color: var(--white);
    font-size: 2rem; cursor: pointer;
}

/* ── Animations ────────────────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-in {
    animation: fadeInUp 0.6s ease-out both;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
