/* ===================================
   Bridgeway Media - Main Stylesheet
   File: /var/www/html/style.css
   =================================== */

/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --accent: #A77757;
    --background: #F6F3EC;
    --text: #31291F;
    --white: #FFFFFF;
    --light-accent: rgba(167, 119, 87, 0.1);
    --success: #2D7A3E;
    --error: #C53030;
}

html {
    scroll-behavior: smooth;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    line-height: 1.2;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent);
    color: var(--white);
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 10000;
}

.skip-link:focus {
    top: 0;
}

/* Focus Styles */
*:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(246, 243, 236, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1.5rem 5%;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    transition: padding 0.3s ease, box-shadow 0.3s ease;
}

nav.scrolled {
    padding: 1rem 5%;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

nav .container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo img {
    height: 60px;
    width: auto;
    transition: height 0.3s ease;
}

nav.scrolled .logo img {
    height: 50px;
}

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

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

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

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

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

.nav-cta {
    margin-left: 1rem;
}

.nav-cta .btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
}

.mobile-menu span {
    width: 25px;
    height: 3px;
    background: var(--text);
    transition: 0.3s;
}

.mobile-menu[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.mobile-menu[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 5% 4rem;
    background: linear-gradient(135deg, #F6F3EC 0%, #E8E2D5 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(167, 119, 87, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(167, 119, 87, 0.08) 0%, transparent 50%);
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.hero-content {
    max-width: 900px;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 1.5rem;
    color: var(--text);
    animation: fadeInUp 0.8s ease;
}

.hero .subheadline {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    margin-bottom: 2.5rem;
    color: var(--text);
    opacity: 0.85;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

/* Buttons */
.btn {
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
}

.btn-primary:hover {
    background: #8f6448;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(167, 119, 87, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-secondary:hover {
    background: var(--accent);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(167, 119, 87, 0.2);
}

.btn-loading {
    display: none;
}

/* Trusted By Strip */
.trusted-by {
    background: var(--white);
    padding: 2rem 5%;
    text-align: center;
    border-bottom: 1px solid var(--light-accent);
}

.trusted-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text);
    opacity: 0.6;
    margin-bottom: 1rem;
}

.trust-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.5rem 1.5rem;
    background: var(--light-accent);
    color: var(--accent);
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.95rem;
}

/* Section Styles */
section {
    padding: 6rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
    color: var(--text);
}

.section-header p {
    font-size: 1.2rem;
    opacity: 0.8;
    max-width: 700px;
    margin: 0 auto;
}

/* Case Studies / Proof Section */
.proof-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.case-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    padding: 2rem;
}

.case-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(167, 119, 87, 0.15);
}

.case-label {
    display: inline-block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    background: var(--light-accent);
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.case-stat {
    font-size: 1.8rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.case-story {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    opacity: 0.85;
}

.case-media {
    width: 100%;
    height: 250px;
    background: var(--light-accent);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 0.9rem;
    text-align: center;
}

/* About Section */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.about-image {
    width: 100%;
    height: 400px;
    background: var(--light-accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--accent);
    overflow: hidden;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.service-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(167, 119, 87, 0.15);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.service-card p {
    opacity: 0.85;
    line-height: 1.7;
}

.services-cta {
    text-align: center;
    margin-top: 3rem;
}

/* Referral Section */
.referral-section {
    padding: 4rem 5%;
}

.referral {
    background: linear-gradient(135deg, var(--accent) 0%, #8f6448 100%);
    color: var(--white);
    border-radius: 16px;
    padding: 4rem;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

.referral h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

.referral-form {
    max-width: 600px;
    margin: 2.5rem auto 0;
    display: grid;
    gap: 1rem;
}

/* Forms */
.form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.contact-form input,
.contact-form textarea {
    padding: 1rem;
    border: 2px solid var(--light-accent);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.3s;
    background: var(--white);
}

.referral-form input {
    border: none;
}

.form-group input:focus,
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox-group label {
    margin: 0;
    font-weight: 400;
}

.privacy-link {
    color: inherit;
    text-decoration: underline;
}

.referral .privacy-link {
    color: var(--white);
}

.referral-form .btn-primary {
    background: var(--white);
    color: var(--accent);
    margin-top: 1rem;
}

.referral-form .btn-primary:hover {
    background: var(--background);
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 6px;
    display: none;
    text-align: center;
    font-weight: 500;
}

.form-message.success {
    display: block;
    background: rgba(45, 122, 62, 0.1);
    color: var(--success);
}

.form-message.error {
    display: block;
    background: rgba(197, 48, 48, 0.1);
    color: var(--error);
}

.referral .form-message.success {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.referral .form-message.error {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

/* Testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.testimonial-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.stars {
    color: #FFB800;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.testimonial-author {
    font-weight: 600;
    color: var(--accent);
}

/* Contact Section */
.contact {
    background: var(--white);
    border-radius: 16px;
    padding: 4rem;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.contact-info p {
    margin-bottom: 2rem;
    opacity: 0.85;
    line-height: 1.8;
}

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

.social-links a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--light-accent);
    border-radius: 8px;
    text-decoration: none;
    color: var(--accent);
    font-weight: 500;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--accent);
    color: var(--white);
    transform: translateY(-3px);
}

.social-links svg {
    width: 20px;
    height: 20px;
}

.contact-form {
    display: grid;
    gap: 1.5rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 5%;
    background: var(--text);
    color: var(--background);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-links {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--background);
    text-decoration: none;
    transition: color 0.3s;
}

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

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(49, 41, 31, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--background);
    padding: 2.5rem;
    border-radius: 12px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#calendlyModal .modal-content {
    max-width: 1000px;
    width: 100%;
}

#privacyModal .modal-content {
    max-width: 800px;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text);
    line-height: 1;
    padding: 0.5rem;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--accent);
}

.calendly-embed iframe {
    border-radius: 8px;
}

.privacy-content {
    line-height: 1.8;
}

.privacy-content h2 {
    margin-bottom: 1.5rem;
}

.privacy-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.privacy-content p {
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    nav .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--background);
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        gap: 1rem;
    }

    nav .nav-links.active {
        display: flex;
    }

    .nav-cta {
        margin-left: 0;
        width: 100%;
    }

    .nav-cta .btn {
        width: 100%;
    }

    .mobile-menu {
        display: flex;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 6rem 5% 3rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    section {
        padding: 4rem 5%;
    }

    .referral,
    .contact {
        padding: 2.5rem 1.5rem;
    }

    .proof-grid,
    .services-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .logo img {
        height: 50px;
    }

    nav.scrolled .logo img {
        height: 45px;
    }

    .trust-badges {
        gap: 1rem;
    }

    .social-links {
        flex-direction: column;
    }

    .social-links a {
        width: 100%;
        justify-content: center;
    }

    .modal-content {
        padding: 2rem 1.5rem;
        max-width: 95%;
    }

    #calendlyModal .calendly-embed iframe {
        height: 500px;
    }
}

/* === NAV + LOGO SIZE — FINAL SINGLE SOURCE OF TRUTH === */
:root{
  --logo-h: 88px;           /* top-of-page logo height */
  --logo-h-scrolled: 68px;  /* after scroll */
  --nav-pad: 1.25rem;       /* top-of-page padding */
  --nav-pad-scrolled: 0.85rem;
}

nav{
  padding: var(--nav-pad) 5%;
  transition: padding .25s ease, background .25s ease, box-shadow .25s ease;
}

nav.scrolled{
  padding: var(--nav-pad-scrolled) 5%;
  background: rgba(246,243,236,.92);
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

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

.logo img{
  height: var(--logo-h);
  width:auto;
  object-fit:contain;
  transition: height .25s ease, transform .25s ease;
}

nav.scrolled .logo img{
  height: var(--logo-h-scrolled);
}

@media (max-width: 768px){
  :root{
    --logo-h: 72px;
    --logo-h-scrolled: 58px;
    --nav-pad: 1rem;
    --nav-pad-scrolled: 0.7rem;
  }
}
