/* ============================================
   Driving Safe TX — Custom Styles
   ============================================ */

/* Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: rgba(13, 148, 136, 0.15);
    color: #0f766e;
}

/* ============================================
   Header / Navigation
   ============================================ */
#site-header {
    background: rgba(255, 255, 255, 0.0);
    backdrop-filter: blur(0px);
    transition: background 0.5s ease, backdrop-filter 0.5s ease, box-shadow 0.5s ease;
}

#site-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #0D9488;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Menu */
#mobile-menu {
    z-index: 40;
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.menu-line {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

#menu-toggle.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-toggle.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.5rem;
}

/* ============================================
   Hero Section
   ============================================ */
.hero-title {
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    letter-spacing: 0.3em;
}

.hero-desc {
    letter-spacing: 0.01em;
}

/* Floating card animation */
.floating-card {
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

/* ============================================
   Section Labels & Titles
   ============================================ */
.section-label {
    letter-spacing: 0.3em;
}

.section-title {
    letter-spacing: -0.01em;
}

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    transition: background 0.4s ease;
}

.service-card:hover {
    background: #fafafa;
}

.service-icon svg {
    transition: transform 0.4s ease;
}

.service-card:hover .service-icon svg {
    transform: scale(1.05);
}

/* ============================================
   Testimonial Cards
   ============================================ */
.testimonial-card {
    transition: background 0.4s ease;
}

.testimonial-card:hover {
    background: #fafafa;
}

/* ============================================
   Contact Form
   ============================================ */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: 1.5rem;
}

/* ============================================
   Scroll Reveal (progressive enhancement)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reduced motion: ensure everything is visible */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 767px) {
    .hero-title {
        font-size: 2.75rem;
    }
    
    .section-title {
        font-size: 2.25rem;
    }
    
    .floating-card {
        display: none;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero-title {
        font-size: 4rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 5.5rem;
    }
}
