/*
    RSG Logic - Clean Design
    Inspired by CyberPools minimalist approach
    Light, inviting, professional
    WCAG 2.1 Level AA Compliant
*/

/* ============================================
   CSS VARIABLES - THEME SUPPORT
   ============================================ */

:root {
    /* Light Theme (Default) */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f7fa;
    --text-primary: #1a2332;
    --text-secondary: #4a5568;
    --text-tertiary: #5a6c7d;
    --border-color: #e5e7eb;
    --header-bg: rgba(255, 255, 255, 0.98);
    --card-bg: #f8f9fa;
    --hero-overlay: rgba(26, 35, 50, 0.65);
    --shadow-color: rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] {
    /* Dark Theme */
    --bg-primary: #1a202c;
    --bg-secondary: #2d3748;
    --text-primary: #ffffff;
    --text-secondary: #f7fafc;
    --text-tertiary: #e2e8f0;
    --border-color: #4a5568;
    --header-bg: rgba(26, 32, 44, 0.98);
    --card-bg: #2d3748;
    --hero-overlay: rgba(26, 32, 44, 0.75);
    --shadow-color: rgba(0, 0, 0, 0.4);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
    background: var(--bg-primary);
    transition: background 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: #1a2332;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
    color: #4a5568;
}

.section-intro {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    text-align: center;
}

/* ============================================
   HEADER
   ============================================ */

#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

#header.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
}

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    transition: opacity 0.3s ease;
}

.logo-text:hover {
    opacity: 0.8;
}

.logo-img {
    height: 55px;
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.logo-full {
    width: auto;
    filter: invert(1) grayscale(1);
    display: block;
}

.logo-icon {
    width: 55px;
    height: 55px;
    display: none;
}

.logo-icon-light {
    display: none;
}

.logo-icon-dark {
    display: none;
}

.logo-img:hover {
    opacity: 0.8;
}

/* Theme-based logo color switching - dark mode shows white logo */
[data-theme="dark"] .logo-full {
    filter: invert(0);
}

nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #ee6c4d;
}

[data-theme="dark"] nav a {
    color: #ffffff;
}

[data-theme="dark"] nav a:hover {
    color: #ee6c4d;
}

nav a.cta-button {
    background: linear-gradient(135deg, #ee6c4d 0%, #ff7f59 100%);
    color: #ffffff !important;
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
}

nav a.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(238, 108, 77, 0.3);
}

/* ============================================
   BUTTONS
   ============================================ */

.button {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.button.primary {
    background: linear-gradient(135deg, #ee6c4d 0%, #ff7f59 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(238, 108, 77, 0.25);
}

.button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 108, 77, 0.35);
}

.button.outline {
    background: transparent;
    border: 2px solid #4A90E2;
    color: #4A90E2;
}

.button.outline:hover {
    background: #4A90E2;
    color: #ffffff;
}

/* ============================================
   HERO SECTION
   ============================================ */

#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(26, 35, 50, 0.6), rgba(26, 35, 50, 0.7)),
                url('../../images/arizona-local.jpg') center center / cover no-repeat;
    background-attachment: fixed;
    position: relative;
    padding-top: 100px;
    color: #ffffff;
    text-align: center;
}

.hero-content {
    max-width: 900px;
    padding: 3rem 0;
}

.eyebrow {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #98c1d9;
    margin-bottom: 1rem;
}

#hero h1 {
    color: #ffffff;
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #ffffff;
    margin-bottom: 2.5rem;
    line-height: 1.7;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.eyebrow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.trust-bar {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.trust-bar span {
    font-size: 0.9rem;
    color: #ffffff;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ============================================
   ABOUT SECTION
   ============================================ */

#about {
    padding: 6rem 0;
    background: #ffffff;
    text-align: center;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.about-card {
    text-align: left;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 8px;
    border-left: 4px solid #4A90E2;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.15);
}

.about-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.about-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ============================================
   SERVICES SECTION
   ============================================ */

#services {
    padding: 6rem 0;
    background: #f5f7fa;
    text-align: center;
}

.services-table {
    max-width: 900px;
    margin: 0 auto 3rem;
}

.service-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    padding: 1.5rem;
    background: #ffffff;
    border-left: 4px solid #4A90E2;
    margin-bottom: 1rem;
    border-radius: 8px;
    text-align: left;
    transition: all 0.3s ease;
}

.service-row:hover {
    border-left-color: #ee6c4d;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transform: translateX(5px);
}

.service-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.service-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

.service-cta {
    margin-top: 2rem;
}

/* ============================================
   HOW WE WORK SECTION
   ============================================ */

#how-we-work {
    padding: 6rem 0;
    background: #ffffff;
    text-align: center;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.process-step {
    text-align: center;
    padding: 2rem;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ee6c4d 0%, #ff7f59 100%);
    color: #ffffff;
    font-size: 1.75rem;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 1.5rem;
}

.process-step h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.process-step p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ============================================
   CONTACT SECTION
   ============================================ */

#contact {
    padding: 6rem 0;
    background: #f5f7fa;
    text-align: center;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
    text-align: left;
}

.contact-info h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.contact-method {
    margin-bottom: 1.5rem;
}

.contact-method strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-weight: 600;
    font-size: 1.05rem;
}

.contact-method a,
.contact-method span {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 500;
}

.contact-method a:hover {
    color: #4A90E2;
}

.service-cities {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 1rem;
    line-height: 1.8;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.3s ease, background 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-tertiary);
    opacity: 0.7;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4A90E2;
}

.form-group textarea {
    resize: vertical;
}

/* ============================================
   FOOTER
   ============================================ */

#footer {
    background: #1a2332;
    color: #e0fbfc;
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.footer-col p {
    color: #98c1d9;
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-col a {
    display: block;
    color: #98c1d9;
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: #ee6c4d;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    color: #98c1d9;
    font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 2rem;
    }

    #hero h1 {
        font-size: 2.5rem;
    }

    /* Switch to icon-only logo on tablet */
    .logo-full {
        display: none;
    }

    .logo-icon {
        display: block;
        width: 50px;
        height: 50px;
    }

    /* Light mode: show black icon */
    .logo-icon-light {
        display: none;
    }

    .logo-icon-dark {
        display: block;
    }

    /* Dark mode: show white icon */
    [data-theme="dark"] .logo-icon-light {
        display: block;
    }

    [data-theme="dark"] .logo-icon-dark {
        display: none;
    }

    .header-content {
        gap: 1rem;
    }

    nav {
        gap: 1rem;
        font-size: 0.95rem;
    }

    .trust-bar {
        flex-direction: column;
        gap: 1rem;
        font-size: 0.9rem;
    }

    .service-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .process-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 0 1.5rem;
    }

    #about, #services, #how-we-work, #contact {
        padding: 4rem 0;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    #hero h1 {
        font-size: 2rem;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.6;
    }

    .eyebrow {
        font-size: 0.75rem;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
    }

    .header-content {
        padding: 0.5rem 0;
        gap: 0.75rem;
    }

    nav {
        gap: 0.75rem;
        font-size: 0.9rem;
    }

    nav a {
        padding: 0.5rem;
    }

    .button.primary, .cta-button {
        font-size: 0.9rem;
        padding: 0.75rem 1.5rem;
    }

    #hero {
        background-attachment: scroll;
        padding-top: 80px;
        min-height: 90vh;
    }

    .trust-bar {
        font-size: 0.85rem;
    }

    .trust-bar span {
        padding: 0.5rem 0;
    }

    .section-intro {
        font-size: 1rem;
    }

    .about-card, .process-step {
        padding: 1.5rem;
    }

    .service-row {
        padding: 1.25rem;
    }

    .service-name {
        font-size: 1rem;
    }

    .service-description {
        font-size: 0.9rem;
    }

    .container {
        padding: 0 1rem;
    }

    #about, #services, #how-we-work, #contact {
        padding: 3rem 0;
    }

    .theme-toggle {
        width: 45px;
        height: 45px;
        bottom: 1.5rem;
        right: 1.5rem;
    }

    .theme-toggle svg {
        width: 20px;
        height: 20px;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

/* ============================================
   THEME TOGGLE BUTTON
   ============================================ */

.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4A90E2 0%, #5B9BD5 100%);
    border: 2px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px var(--shadow-color);
    transition: all 0.3s ease;
    z-index: 1000;
}

.theme-toggle:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px var(--shadow-color);
}

.theme-toggle:focus {
    outline: 3px solid #ee6c4d;
    outline-offset: 3px;
}

.theme-toggle svg {
    width: 24px;
    height: 24px;
    fill: #ffffff;
}

/* ============================================
   ACCESSIBILITY - SCREEN READER ONLY
   ============================================ */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ============================================
   ACCESSIBILITY - FOCUS INDICATORS
   ============================================ */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid #ee6c4d;
    outline-offset: 3px;
}

/* ============================================
   FORM ACCESSIBILITY
   ============================================ */

input[aria-invalid="true"],
textarea[aria-invalid="true"] {
    border-color: #F44336;
    border-width: 2px;
}

.error-message {
    color: #F44336;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.error-message.show {
    display: block;
}

/* ============================================
   THEME-AWARE UPDATES
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
}

p {
    color: var(--text-secondary);
}

#header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
}

#about {
    background: var(--bg-primary);
}

#services {
    background: var(--bg-secondary);
}

#how-we-work {
    background: var(--bg-primary);
}

#contact {
    background: var(--bg-secondary);
}

.about-card {
    background: var(--card-bg);
}

.service-row {
    background: var(--bg-primary);
}

input,
textarea {
    background: var(--bg-primary);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

/* ============================================
   WCAG COMPLIANCE STATEMENT
   ============================================ */

.wcag-statement {
    text-align: center;
    padding: 1rem 0;
    font-size: 0.875rem;
    color: var(--text-tertiary);
    border-top: 1px solid var(--border-color);
}

