/* ============================================
   Southern Utah Driving School — Stylesheet
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --emerald-900: #064e3b;
    --emerald-800: #065f46;
    --emerald-700: #047857;
    --emerald-600: #059669;
    --emerald-500: #10b981;
    --cream-50: #fafaf5;
    --cream-100: #f5f5ed;
    --cream-200: #e8e8dc;
    --cream-300: #d4d4c4;
    --stone-50: #fafaf9;
    --stone-100: #f5f5f4;
    --stone-200: #e7e5e4;
    --stone-300: #d6d3d1;
    --stone-400: #a8a29e;
    --stone-500: #78716c;
    --stone-600: #57534e;
    --stone-700: #44403c;
    --stone-800: #292524;
    --stone-900: #1c1917;
    --white: #ffffff;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-sans);
    font-weight: 300;
    line-height: 1.7;
    color: var(--stone-800);
    background-color: var(--cream-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Navigation --- */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(250, 250, 245, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--cream-200);
    transition: box-shadow var(--transition);
}

.nav.scrolled {
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--emerald-800);
    letter-spacing: -0.01em;
}

.nav-logo span {
    display: none;
}

@media (min-width: 768px) {
    .nav-logo span {
        display: inline;
    }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--stone-600);
    transition: color var(--transition);
    letter-spacing: 0.01em;
}

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

.nav-cta {
    background: var(--emerald-800);
    color: var(--white) !important;
    padding: 10px 20px;
    border-radius: 100px;
    font-weight: 500;
    transition: background var(--transition), transform var(--transition);
}

.nav-cta:hover {
    background: var(--emerald-700);
    color: var(--white) !important;
    transform: translateY(-1px);
}

.nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 22px;
    height: 1.5px;
    background: var(--stone-700);
    transition: var(--transition);
    transform-origin: center;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -5px);
}

@media (min-width: 1024px) {
    .nav-toggle {
        display: none;
    }
}

@media (max-width: 1023px) {
    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(250, 250, 245, 0.98);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 32px 24px;
        gap: 24px;
        border-bottom: 1px solid var(--cream-200);
        transform: translateY(-120%);
        opacity: 0;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
        pointer-events: none;
    }

    .nav-links.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-links a {
        font-size: 1rem;
    }
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 100px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: all var(--transition);
    cursor: pointer;
    border: none;
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--emerald-700);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(6, 95, 70, 0.25);
}

.btn-ghost {
    background: transparent;
    color: var(--emerald-800);
    border: 1.5px solid var(--emerald-800);
}

.btn-ghost:hover {
    background: var(--emerald-800);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-large {
    padding: 18px 36px;
    font-size: 1rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* --- Hero --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 0 60px;
    position: relative;
    overflow: hidden;
    background: var(--cream-50);
}

.hero-bg-pattern {
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(6, 95, 70, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(6, 95, 70, 0.03) 0%, transparent 40%);
    pointer-events: none;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    position: relative;
    z-index: 1;
}

@media (min-width: 1024px) {
    .hero-container {
        grid-template-columns: 1.1fr 0.9fr;
        gap: 60px;
    }
}

.hero-card {
    background: var(--white);
    border-radius: 20px;
    padding: 48px 40px;
    border: 1px solid var(--cream-200);
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.04);
}

.hero-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--emerald-700);
    background: rgba(6, 95, 70, 0.08);
    padding: 8px 16px;
    border-radius: 100px;
    margin-bottom: 24px;
}

.hero-headline {
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 500;
    line-height: 1.15;
    color: var(--stone-900);
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-headline em {
    font-style: italic;
    color: var(--emerald-700);
}

.hero-sub {
    font-size: 1.05rem;
    color: var(--stone-600);
    line-height: 1.8;
    margin-bottom: 36px;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

@media (min-width: 768px) {
    .hero-card {
        padding: 56px 48px;
    }
}

/* Hero Stats */
.hero-stats {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 1024px) {
    .hero-stats {
        justify-content: center;
    }
}

.stat-card {
    background: var(--white);
    border-radius: 16px;
    padding: 28px 32px;
    border: 1px solid var(--cream-200);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.03);
    transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

.stat-number {
    font-family: var(--font-serif);
    font-size: 2.4rem;
    font-weight: 500;
    color: var(--emerald-800);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--stone-500);
    line-height: 1.5;
}

/* Hero Images */
.hero-image-grid {
    display: none;
    position: absolute;
    right: -40px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 0;
}

@media (min-width: 1400px) {
    .hero-image-grid {
        display: block;
    }
}

.hero-img {
    position: absolute;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.1);
}

.hero-img-1 {
    width: 320px;
    height: 420px;
    top: -60px;
    right: 0;
}

.hero-img-2 {
    width: 260px;
    height: 180px;
    bottom: -20px;
    right: 40px;
}

/* --- Section Shared --- */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 64px;
}

.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--emerald-700);
    background: rgba(6, 95, 70, 0.08);
    padding: 8px 16px;
    border-radius: 100px;
    margin-bottom: 20px;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 500;
    color: var(--stone-900);
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.section-title em {
    font-style: italic;
    color: var(--emerald-700);
}

.section-desc {
    font-size: 1.05rem;
    color: var(--stone-500);
    line-height: 1.8;
}

/* --- Services --- */
.services {
    background: var(--white);
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 640px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.service-card {
    padding: 36px 32px;
    border-radius: 16px;
    border: 1px solid var(--cream-200);
    background: var(--cream-50);
    transition: all var(--transition);
}

.service-card:hover {
    border-color: var(--emerald-300, var(--cream-300));
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    transform: translateY(-4px);
}

.service-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(6, 95, 70, 0.08);
    border-radius: 12px;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--stone-800);
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.service-card p {
    font-size: 0.925rem;
    color: var(--stone-500);
    line-height: 1.7;
}

/* --- About --- */
.about-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
}

@media (min-width: 1024px) {
    .about-container {
        grid-template-columns: 1fr 1fr;
        gap: 80px;
    }
}

.about-image-wrap {
    position: relative;
}

.about-image {
    border-radius: 20px;
    width: 100%;
    height: 350px;
    object-fit: cover;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
}

.about-accent {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 120px;
    height: 120px;
    background: var(--emerald-800);
    border-radius: 16px;
    z-index: -1;
    opacity: 0.1;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about-text {
    font-size: 1rem;
    color: var(--stone-600);
    line-height: 1.85;
}

.about-values {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 8px;
}

.value-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.925rem;
    color: var(--stone-700);
    font-weight: 400;
}

.value-item svg {
    flex-shrink: 0;
}

/* --- Process --- */
.process {
    background: var(--white);
}

.process-steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

@media (min-width: 768px) {
    .process-steps {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

.process-step {
    padding: 32px 0;
    position: relative;
}

.step-number {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 500;
    color: var(--emerald-800);
    opacity: 0.15;
    line-height: 1;
    margin-bottom: 12px;
}

.process-step h3 {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--stone-800);
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.process-step p {
    font-size: 0.925rem;
    color: var(--stone-500);
    line-height: 1.75;
}

.step-line {
    display: none;
}

@media (max-width: 767px) {
    .process-step:not(:last-child) .step-line {
        display: block;
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: var(--cream-200);
    }
}

/* --- Testimonials --- */
.testimonials-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .testimonials-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.testimonial-card {
    background: var(--white);
    border-radius: 16px;
    padding: 36px 32px;
    border: 1px solid var(--cream-200);
    position: relative;
    transition: all var(--transition);
}

.testimonial-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    transform: translateY(-4px);
}

.testimonial-quote {
    font-family: var(--font-serif);
    font-size: 4rem;
    line-height: 1;
    color: var(--emerald-800);
    opacity: 0.12;
    position: absolute;
    top: 16px;
    left: 24px;
    pointer-events: none;
}

.testimonial-text {
    font-size: 0.95rem;
    color: var(--stone-600);
    line-height: 1.8;
    margin-bottom: 20px;
    padding-top: 24px;
}

.testimonial-author {
    font-size: 0.85rem;
    color: var(--stone-500);
    font-style: italic;
}

/* --- CTA Section --- */
.cta-section {
    background: var(--emerald-900);
    padding: 80px 0;
}

.cta-card {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
}

@media (min-width: 768px) {
    .cta-card {
        grid-template-columns: 1.4fr 1fr;
        gap: 60px;
    }
}

.cta-content .section-tag {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
}

.cta-title {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 500;
    color: var(--white);
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.cta-title em {
    font-style: italic;
    color: var(--emerald-400, #34d399);
}

.cta-text {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.8;
}

.cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.cta-actions .btn-primary {
    background: var(--white);
    color: var(--emerald-900);
}

.cta-actions .btn-primary:hover {
    background: var(--cream-100);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.cta-actions .btn-ghost {
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--white);
}

.cta-actions .btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--white);
}

/* --- Contact --- */
.contact {
    background: var(--white);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
}

@media (min-width: 1024px) {
    .contact-container {
        grid-template-columns: 1fr 1fr;
        gap: 80px;
    }
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-text {
    font-size: 1rem;
    color: var(--stone-500);
    line-height: 1.8;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 8px;
}

.contact-detail {
    display: flex;
    gap: 16px;
}

.contact-detail svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-detail strong {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--stone-800);
    margin-bottom: 4px;
}

.contact-detail p {
    font-size: 0.925rem;
    color: var(--stone-500);
    line-height: 1.6;
}

.contact-detail a {
    color: var(--emerald-700);
    transition: color var(--transition);
}

.contact-detail a:hover {
    color: var(--emerald-600);
}

/* Contact Form */
.contact-form-wrap {
    background: var(--cream-50);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid var(--cream-200);
}

.contact-form h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--stone-800);
    margin-bottom: 28px;
    letter-spacing: -0.01em;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 480px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--stone-600);
}

.form-group input,
.form-group select,
.form-group textarea {
    font-family: var(--font-sans);
    font-size: 0.925rem;
    padding: 14px 16px;
    border: 1.5px solid var(--cream-300);
    border-radius: 10px;
    background: var(--white);
    color: var(--stone-800);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--emerald-600);
    box-shadow: 0 0 0 3px rgba(6, 95, 70, 0.08);
}

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

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

.form-success {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 14px 18px;
    background: rgba(6, 95, 70, 0.08);
    border-radius: 10px;
    color: var(--emerald-800);
    font-size: 0.9rem;
    font-weight: 500;
}

/* --- Map --- */
.map-section {
    border-top: 1px solid var(--cream-200);
}

.map-section iframe {
    width: 100%;
    height: 350px;
    filter: grayscale(30%) contrast(1.05);
}

/* --- Footer --- */
.footer {
    background: var(--stone-900);
    color: rgba(255, 255, 255, 0.6);
    padding: 64px 0 32px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 48px;
}

@media (min-width: 768px) {
    .footer-inner {
        grid-template-columns: 1.5fr 1fr 1fr;
        gap: 48px;
    }
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-top: 16px;
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--white);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.55);
    transition: color var(--transition);
}

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

.footer-contact p {
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.55);
    transition: color var(--transition);
}

.footer-contact a:hover {
    color: var(--white);
}

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

.footer-bottom p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.35);
}

/* --- Scroll Reveal (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    [data-reveal] {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }

    [data-reveal].revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* No-reduce-motion: content always visible */
@media (prefers-reduced-motion: reduce) {
    [data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
