/* ===== DESIGN TOKENS ===== */
:root {
    /* Forest Greens */
    --primary: #2D6A4F;
    --primary-dark: #1B4332;
    --primary-light: #40916C;
    --accent-green: #52B788;
    --light-green: #B7E4C7;
    --pale-green: #D8F3DC;

    /* Walnut/Bark Browns */
    --bark-dark: #2C1810;
    --bark: #3E2723;
    --bark-medium: #5D4037;
    --bark-light: #8D6E63;
    --bark-pale: #A1887F;

    /* Light Theme Backgrounds */
    --bg-white: #FDFCFA;
    --bg-cream: #F5F1EB;
    --bg-light: #FAF8F5;
    --bg-section: #F0EDE8;

    /* Text */
    --text-primary: #2C1810;
    --text-secondary: #5D4037;
    --text-tertiary: #8D6E63;

    /* Borders */
    --border: #D7CCC8;
    --border-light: #EFEBE9;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(44, 24, 16, 0.08);
    --shadow-md: 0 4px 12px rgba(44, 24, 16, 0.1);
    --shadow-lg: 0 8px 24px rgba(44, 24, 16, 0.12);

    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    --font-serif: Georgia, 'Times New Roman', serif;

    /* Spacing */
    --section-padding: 5rem 0;
    --container-width: 1140px;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    background-color: var(--bg-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

/* ===== ACCESSIBILITY ===== */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary);
    color: #fff;
    padding: 0.75rem 1.5rem;
    z-index: 10000;
    font-weight: 600;
    border-radius: 0 0 8px 0;
    transition: top 0.2s ease;
}

.skip-to-content:focus {
    top: 0;
    color: #fff;
}

.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;
}

*:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* ===== LAYOUT ===== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== NAVBAR ===== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    height: 2.25rem;
    width: auto;
}

.logo-text {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    letter-spacing: -0.5px;
}

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

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
    white-space: nowrap;
}

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

.nav-cta {
    background: var(--primary);
    color: #fff !important;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    transition: background 0.2s ease, transform 0.2s ease !important;
}

.nav-cta:hover {
    background: var(--primary-dark) !important;
    color: #fff !important;
    transform: translateY(-1px);
}

/* Language Switcher */
.language-switcher {
    position: relative;
}

.language-switcher button {
    background: transparent;
    border: 2px solid var(--border);
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    transition: border-color 0.2s ease, background 0.2s ease;
    font-family: var(--font-sans);
}

.language-switcher button:hover {
    border-color: var(--primary);
    background: var(--bg-light);
}

.lang-arrow {
    font-size: 0.625rem;
    transition: transform 0.2s ease;
}

.language-switcher.open .lang-arrow {
    transform: rotate(180deg);
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    list-style: none;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    overflow: hidden;
}

.language-switcher.open .language-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-dropdown li {
    list-style: none;
}

.language-dropdown button {
    width: 100%;
    background: none;
    border: none;
    padding: 0.625rem 1rem;
    text-align: left;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s ease;
    min-height: 44px;
    font-family: var(--font-sans);
}

.language-dropdown button:hover,
.language-dropdown button:focus-visible {
    background: var(--bg-cream);
}

.language-dropdown button.active {
    color: var(--primary);
    font-weight: 600;
    background: var(--pale-green);
}

/* ===== HERO ===== */
.hero {
    background: linear-gradient(135deg, var(--bg-cream) 0%, var(--bg-white) 50%, var(--pale-green) 100%);
    padding: 6rem 0 5rem;
    text-align: center;
}

.hero-content {
    max-width: 720px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.25rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--bark-dark);
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero .subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    min-height: 48px;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--primary);
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    min-height: 48px;
    border: 2px solid var(--primary);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    text-decoration: none;
}

.btn-secondary:hover {
    background: var(--pale-green);
    transform: translateY(-2px);
    color: var(--primary-dark);
}

/* ===== FEATURES ===== */
.features {
    padding: var(--section-padding);
    background: var(--bg-white);
}

.section-title {
    text-align: center;
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--bark-dark);
    margin-bottom: 3rem;
    letter-spacing: -0.5px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-green);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--bark-dark);
    margin-bottom: 0.75rem;
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* ===== WHY ARBOR ===== */
.why-arbor {
    padding: var(--section-padding);
    background: var(--bg-cream);
}

.why-arbor-content {
    max-width: 800px;
    margin: 0 auto;
}

.why-arbor .section-description {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.why-items {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.why-item {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.why-item-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    margin-top: 0.125rem;
}

.why-item h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--bark-dark);
    margin-bottom: 0.375rem;
}

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

/* ===== ABOUT ===== */
.about {
    padding: var(--section-padding);
    background: var(--bg-white);
}

.about-content {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 1.5rem;
}

.about-content p:last-child {
    margin-bottom: 0;
}

/* ===== CONTACT ===== */
.contact {
    padding: var(--section-padding);
    background: var(--bg-cream);
}

.contact-wrapper {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.contact .section-description {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.contact-form {
    text-align: left;
}

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

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

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

.form-group input,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: var(--font-sans);
    min-height: 44px;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.1);
    outline: none;
}

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

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

.contact-form .btn-primary {
    width: 100%;
    margin-top: 0.5rem;
    font-size: 1rem;
}

.contact-form .btn-primary.success {
    background: var(--accent-green);
}

.contact-form .btn-primary.error {
    background: #C62828;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bark-dark);
    color: rgba(255, 255, 255, 0.85);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 3rem;
    margin-bottom: 2.5rem;
}

.footer-brand .logo {
    margin-bottom: 0.75rem;
}

.footer-brand .logo-text {
    color: #fff;
}

.footer-brand .logo-icon {
    filter: brightness(2);
}

.footer-tagline {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-links {
    display: flex;
    gap: 4rem;
    justify-content: flex-end;
}

.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

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

.footer-col li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
}

.footer-copyright {
    font-size: 0.825rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ===== MOBILE MENU ===== */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    min-height: 44px;
    min-width: 44px;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* ===== RTL SUPPORT ===== */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .navbar .container {
    flex-direction: row-reverse;
}

[dir="rtl"] .nav-links {
    flex-direction: row-reverse;
}

[dir="rtl"] .hero-buttons {
    flex-direction: row-reverse;
}

[dir="rtl"] .why-item {
    flex-direction: row-reverse;
    text-align: right;
}

[dir="rtl"] .footer-content {
    direction: rtl;
}

[dir="rtl"] .footer-links {
    flex-direction: row-reverse;
    justify-content: flex-start;
}

[dir="rtl"] .language-dropdown {
    right: auto;
    left: 0;
}

[dir="rtl"] .language-dropdown button {
    text-align: right;
}

/* ===== ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 968px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 3.5rem 0;
    }

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

    .hero {
        padding: 4rem 0 3.5rem;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .hero .subtitle {
        font-size: 1.05rem;
    }

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

@media (max-width: 640px) {
    .navbar .container {
        height: 3.5rem;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-white);
        border-bottom: 1px solid var(--border);
        padding: 1rem;
        box-shadow: var(--shadow-md);
        gap: 0;
    }

    .nav-links.mobile-visible {
        display: flex;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 0.75rem 1rem;
        border-radius: 6px;
    }

    .nav-links a:hover {
        background: var(--bg-cream);
    }

    .nav-cta {
        text-align: center;
        justify-content: center;
        margin-top: 0.5rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }

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

    .hero {
        padding: 3rem 0 2.5rem;
    }

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

    .footer-links {
        flex-direction: column;
        gap: 2rem;
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .fade-in {
        opacity: 1;
        transform: none;
    }
}
