/* =============================================
   Buy and Sell Norwich — Main Stylesheet
   Colors derived from group logo
   ============================================= */

:root {
    --gold: #E8B828;
    --gold-dark: #C99B10;
    --blue: #4A90D9;
    --blue-dark: #3570B0;
    --green: #3D8B37;
    --navy: #1B2A4A;
    --navy-light: #2A3F6A;
    --white: #FFFFFF;
    --warm-white: #FAFAF5;
    --light-grey: #F0F0EB;
    --mid-grey: #D0D0C8;
    --text: #2C2C2C;
    --text-light: #6B6B6B;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 20px rgba(27, 42, 74, 0.08);
    --shadow-lg: 0 12px 40px rgba(27, 42, 74, 0.12);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--warm-white);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--blue);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--blue-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =============================================
   Navigation
   ============================================= */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: all var(--transition);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    border-bottom-color: var(--mid-grey);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--navy);
    font-weight: 700;
    font-size: 1.1rem;
}

.nav-logo:hover {
    color: var(--navy);
}

.nav-logo-img {
    height: 44px;
    width: auto;
    border-radius: 6px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-links a {
    color: var(--navy);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.nav-links a:hover {
    color: var(--blue);
    background: rgba(74, 144, 217, 0.08);
}

.nav-cta {
    background: var(--gold) !important;
    color: var(--navy) !important;
    font-weight: 600 !important;
    padding: 10px 20px !important;
    border-radius: var(--radius) !important;
}

.nav-cta:hover {
    background: var(--gold-dark) !important;
    color: var(--navy) !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--navy);
    border-radius: 2px;
    transition: all var(--transition);
}

/* =============================================
   Hero Section
   ============================================= */

.hero {
    padding-top: 72px;
    background: var(--navy);
}

.hero-banner {
    width: 100%;
    line-height: 0;
}

.hero-banner-img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-bottom {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    padding: 40px 0 48px;
    text-align: center;
}

.hero-content {
    text-align: center;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto 32px;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* =============================================
   Buttons
   ============================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font);
    font-weight: 600;
    font-size: 1rem;
    padding: 14px 28px;
    border-radius: var(--radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.2;
}

.btn-primary {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
}

.btn-primary:hover {
    background: var(--gold-dark);
    border-color: var(--gold-dark);
    color: var(--navy);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(232, 184, 40, 0.35);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--navy);
    border-color: var(--white);
    transform: translateY(-2px);
}

.btn-outline-dark {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline-dark:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.7);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.05rem;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    flex-shrink: 0;
}

/* =============================================
   Counter Section
   ============================================= */

.counter-section {
    background: var(--navy);
    color: var(--white);
    padding: 64px 0;
    text-align: center;
}

.counter-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 20px;
}

.counter-number {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 8px;
}

.counter-label {
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.counter-tagline {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

/* =============================================
   Section Common Styles
   ============================================= */

.section-title {
    text-align: center;
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 12px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 550px;
    margin: 0 auto 48px;
}

/* =============================================
   How It Works
   ============================================= */

.how-it-works {
    padding: 96px 0;
    background: var(--warm-white);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.step-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 40px 28px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    position: relative;
}

.step-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.step-number {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 36px;
    background: var(--gold);
    color: var(--navy);
    font-weight: 800;
    font-size: 0.95rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 12px rgba(232, 184, 40, 0.4);
}

.step-icon {
    width: 64px;
    height: 64px;
    margin: 12px auto 20px;
    color: var(--blue);
}

.step-icon svg {
    width: 100%;
    height: 100%;
}

.step-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 10px;
}

.step-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* =============================================
   Safety Section
   ============================================= */

.safety-section {
    padding: 96px 0;
    background: var(--light-grey);
}

.safety-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.safety-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    border-left: 4px solid var(--green);
}

.safety-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.safety-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    color: var(--green);
}

.safety-icon svg {
    width: 100%;
    height: 100%;
}

.safety-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 6px;
}

.safety-card p {
    color: var(--text-light);
    font-size: 0.93rem;
    line-height: 1.6;
}

/* =============================================
   Community / Testimonials Section
   ============================================= */

.community-section {
    padding: 96px 0;
    background: var(--warm-white);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.testimonial-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.testimonial-stars {
    color: var(--gold);
    font-size: 1.2rem;
    margin-bottom: 14px;
    letter-spacing: 2px;
}

.testimonial-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text);
    flex: 1;
    margin-bottom: 20px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1px solid var(--light-grey);
    padding-top: 16px;
}

.testimonial-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--blue);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.testimonial-author strong {
    display: block;
    font-size: 0.95rem;
    color: var(--navy);
}

.testimonial-author span {
    font-size: 0.82rem;
    color: var(--text-light);
}

/* =============================================
   Contact Section
   ============================================= */

.contact-section {
    padding: 96px 0;
    background: var(--light-grey);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: start;
}

.contact-form {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--navy);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--mid-grey);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 0.95rem;
    color: var(--text);
    background: var(--warm-white);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
}

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

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

.form-honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

#submitBtn {
    margin-top: 8px;
    position: relative;
}

#submitBtn .btn-loading {
    display: none;
    align-items: center;
    gap: 8px;
}

#submitBtn.loading .btn-text {
    display: none;
}

#submitBtn.loading .btn-loading {
    display: inline-flex;
}

.spinner {
    width: 20px;
    height: 20px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.form-status {
    margin-top: 16px;
    padding: 0;
    border-radius: var(--radius-sm);
    font-size: 0.93rem;
    font-weight: 500;
    transition: all var(--transition);
}

.form-status.success {
    padding: 14px 18px;
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.form-status.error {
    padding: 14px 18px;
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.contact-info-card {
    background: var(--white);
    padding: 36px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.contact-info-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 24px;
}

.contact-method {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
}

.contact-method svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--blue);
    margin-top: 2px;
}

.contact-method strong {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.contact-method a {
    font-size: 0.95rem;
    font-weight: 500;
    word-break: break-all;
}

.contact-note {
    margin-top: 24px;
    padding: 14px 18px;
    background: rgba(74, 144, 217, 0.08);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    color: var(--navy);
    line-height: 1.5;
}

/* =============================================
   Footer
   ============================================= */

.footer {
    background: var(--navy);
    color: rgba(255, 255, 255, 0.8);
    padding: 64px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    height: 60px;
    width: auto;
    border-radius: 8px;
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 0.93rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.6);
}

.footer-links h4 {
    color: var(--white);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.93rem;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-bottom {
    text-align: center;
    padding: 24px 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

/* =============================================
   Scroll Reveal Animation
   ============================================= */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =============================================
   Responsive Design
   ============================================= */

@media (max-width: 992px) {
    .steps-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
    }

    .safety-grid {
        grid-template-columns: 1fr;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .counter-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 24px;
        gap: 4px;
        border-bottom: 1px solid var(--mid-grey);
        box-shadow: var(--shadow-lg);
        transform: translateY(-120%);
        opacity: 0;
        transition: all var(--transition);
        pointer-events: none;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-links a {
        display: block;
        padding: 12px 16px;
        width: 100%;
    }

    .nav-cta {
        text-align: center;
        margin-top: 8px;
    }

    .nav-logo-text {
        display: none;
    }

    .hero-bottom {
        padding: 28px 0 36px;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-actions .btn {
        width: 100%;
        max-width: 320px;
    }

    .counter-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .counter-item {
        padding: 12px 0;
    }

    .how-it-works,
    .safety-section,
    .community-section,
    .contact-section {
        padding: 64px 0;
    }

    .section-subtitle {
        margin-bottom: 36px;
    }

    .contact-form {
        padding: 24px;
    }

    .contact-info-card {
        padding: 24px;
    }

    .safety-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .counter-number {
        font-size: 2.2rem;
    }
}

/* =============================================
   Mobile nav toggle animation
   ============================================= */

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}
