/* Base & Typography */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(201, 98, 58, 0.15);
    color: #2C2420;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf5ed;
}
::-webkit-scrollbar-thumb {
    background: #d9bc88;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c9a366;
}

/* Navigation */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background-color: #c9623a;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Navbar scrolled state handled by JS */
.navbar-scrolled {
    background-color: rgba(250, 247, 242, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.06);
}

/* Mobile Menu */
.menu-line {
    display: block;
}
#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-toggle.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.25rem;
}

/* Program Cards */
.program-card {
    overflow: hidden;
}

/* Approach Cards */
.approach-card {
    position: relative;
}
.approach-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #c9623a, #e07d56);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
    border-radius: 2px 2px 0 0;
}
.approach-card:hover::before {
    transform: scaleX(1);
}

/* Testimonial Cards */
.testimonial-card {
    position: relative;
}
.testimonial-card::before {
    content: '\201C';
    position: absolute;
    top: 16px;
    right: 24px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 6rem;
    color: rgba(201, 98, 58, 0.07);
    line-height: 1;
    pointer-events: none;
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .approach-card::before { transform: scaleX(1); }
    .program-card img, .testimonial-card img { transition: none; }
}

/* Mobile menu link hover */
.mobile-menu-link {
    position: relative;
}

/* Form focus states */
input:focus, select:focus, textarea:focus {
    outline: none;
}

/* Image aspect ratios */
img {
    display: block;
}

/* Smooth anchor offsets for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

/* CTA decorative elements */
.bg-terra-600 .absolute div {
    animation: float 8s ease-in-out infinite;
}
.bg-terra-600 .absolute > div:first-child {
    animation-delay: 0s;
}
.bg-terra-600 .absolute > div:last-child {
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -20px) scale(1.05); }
}

/* Subtle pulse on CTA button */
@keyframes subtle-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(201, 98, 58, 0.3); }
    50% { box-shadow: 0 0 0 8px rgba(201, 98, 58, 0); }
}

/* Counter animation */
.counter-value {
    display: inline-block;
}
