/* ========================================
   RIDEOUT DELIVERY - Design System & Styles
   ======================================== */

/* --- Design Tokens --- */
:root {
    --color-primary: #1E40AF;
    --color-primary-dark: #1E3A8A;
    --color-accent: #F59E0B;
    --color-accent-dark: #D97706;
    --color-bg: #FFFFFF;
    --color-bg-light: #F8FAFC;
    --color-bg-dark: #0F172A;
    --color-text: #1F2937;
    --color-text-light: #6B7280;
    --color-border: #E5E7EB;

    --font-stack: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;

    --spacing-xs: clamp(0.25rem, 1vw, 0.5rem);
    --spacing-sm: clamp(0.5rem, 2vw, 1rem);
    --spacing-md: clamp(1rem, 3vw, 2rem);
    --spacing-lg: clamp(2rem, 5vw, 4rem);
    --spacing-xl: clamp(3rem, 7vw, 6rem);

    --radius: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);

    --header-height: 72px;
    --max-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

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

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

a {
    color: var(--color-primary);
    text-decoration: none;
}

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

ul {
    list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    line-height: 1.2;
    font-weight: 700;
    color: var(--color-text);
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

p {
    color: var(--color-text-light);
    line-height: 1.7;
}

/* --- Layout --- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

section {
    padding: var(--spacing-xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-header h2 {
    margin-bottom: var(--spacing-sm);
}

.section-header p {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.125rem;
}

.bg-light {
    background: var(--color-bg-light);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-family: var(--font-stack);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    color: #fff;
}

.btn-accent {
    background: var(--color-accent);
    color: var(--color-bg-dark);
}

.btn-accent:hover {
    background: var(--color-accent-dark);
    color: var(--color-bg-dark);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: #fff;
}

.btn-white {
    background: #fff;
    color: var(--color-primary);
}

.btn-white:hover {
    background: #F1F5F9;
    color: var(--color-primary-dark);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
    border-radius: var(--radius-md);
}

/* --- Header --- */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    height: var(--header-height);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

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

.header-logo svg {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.header-logo span {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.header-nav a {
    color: var(--color-text-light);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: color 0.2s;
}

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

.header-phone {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-primary);
    color: #fff;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: background 0.2s;
}

.header-phone:hover {
    background: var(--color-primary-dark);
    color: #fff;
}

.header-phone svg {
    width: 18px;
    height: 18px;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

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

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

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

/* --- Hero --- */
.hero {
    background: linear-gradient(135deg, var(--color-bg-dark) 0%, #1E3A5F 100%);
    color: #fff;
    padding: var(--spacing-xl) 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(30, 64, 175, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.15) 0%, transparent 40%);
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 700px;
}

.hero h1 {
    color: #fff;
    margin-bottom: var(--spacing-sm);
    font-size: clamp(2.25rem, 5.5vw, 3.75rem);
}

.hero h1 .accent {
    color: var(--color-accent);
}

.hero p {
    color: rgba(255, 255, 255, 0.85);
    font-size: clamp(1.125rem, 2.5vw, 1.375rem);
    margin-bottom: var(--spacing-md);
    max-width: 560px;
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: var(--spacing-md);
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

.hero-badge svg {
    width: 16px;
    height: 16px;
    color: var(--color-accent);
}

/* --- Services --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--spacing-md);
}

.service-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    transition: transform 0.2s, box-shadow 0.2s;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    width: 56px;
    height: 56px;
    background: rgba(30, 64, 175, 0.08);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-sm);
}

.service-icon svg {
    width: 28px;
    height: 28px;
    color: var(--color-primary);
}

.service-card h3 {
    margin-bottom: 0.5rem;
}

.service-card p {
    font-size: 0.9375rem;
    margin-bottom: var(--spacing-sm);
}

.service-card .card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--color-primary);
}

.service-card .card-link:hover {
    gap: 0.5rem;
}

.service-card .card-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s;
}

.service-card .card-link:hover svg {
    transform: translateX(4px);
}

/* --- Why Choose Us --- */
.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.trust-item {
    text-align: center;
    padding: var(--spacing-md);
}

.trust-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--spacing-sm);
    background: rgba(30, 64, 175, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trust-icon svg {
    width: 28px;
    height: 28px;
    color: var(--color-primary);
}

.trust-item h3 {
    margin-bottom: 0.5rem;
}

.trust-item p {
    font-size: 0.9375rem;
}

/* --- Service Area --- */
.area-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: start;
}

.area-content h3 {
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.area-content h3 svg {
    width: 20px;
    height: 20px;
    color: var(--color-primary);
}

.area-list {
    margin-bottom: var(--spacing-md);
}

.area-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.area-list li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
    flex-shrink: 0;
}

.area-list li:last-child {
    border-bottom: none;
}

/* --- Quote Form --- */
.quote-section {
    background: var(--color-bg-dark);
    color: #fff;
}

.quote-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--spacing-lg);
    align-items: start;
}

.quote-info h2 {
    color: #fff;
    margin-bottom: var(--spacing-sm);
}

.quote-info p {
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: var(--spacing-md);
    font-size: 1.125rem;
}

.quote-phone {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.08);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
}

.quote-phone-icon {
    width: 48px;
    height: 48px;
    background: var(--color-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.quote-phone-icon svg {
    width: 24px;
    height: 24px;
    color: var(--color-bg-dark);
}

.quote-phone-text {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

.quote-phone-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}

.quote-phone-number:hover {
    color: var(--color-accent);
}

.quote-form-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-lg);
}

.quote-form-card h3 {
    margin-bottom: var(--spacing-sm);
    font-size: 1.25rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

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

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

.form-group label .required {
    color: #EF4444;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-family: var(--font-stack);
    font-size: 1rem;
    color: var(--color-text);
    background: var(--color-bg);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #EF4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group .error-message {
    font-size: 0.8125rem;
    color: #EF4444;
    display: none;
}

.form-group .error-message.visible {
    display: block;
}

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

.form-submit {
    margin-top: 1rem;
}

.form-success {
    display: none;
    text-align: center;
    padding: var(--spacing-md);
}

.form-success.visible {
    display: block;
}

.form-success svg {
    width: 48px;
    height: 48px;
    color: #10B981;
    margin: 0 auto var(--spacing-sm);
}

.form-success h3 {
    margin-bottom: 0.5rem;
}

.form-success p {
    color: var(--color-text-light);
}

/* --- FAQ --- */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--color-border);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 1.25rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
    font-family: var(--font-stack);
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--color-text);
    text-align: left;
}

.faq-question:hover {
    color: var(--color-primary);
}

.faq-question svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform 0.3s;
    color: var(--color-text-light);
}

.faq-item.open .faq-question svg {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer-inner {
    padding-bottom: 1.25rem;
}

.faq-answer-inner p {
    font-size: 0.9375rem;
    line-height: 1.7;
}

/* --- Footer --- */
.footer {
    background: var(--color-bg-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-brand h3 {
    color: #fff;
    margin-bottom: var(--spacing-sm);
    font-size: 1.25rem;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9375rem;
    margin-bottom: var(--spacing-sm);
}

.footer-phone {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-accent);
    font-weight: 600;
    font-size: 1.125rem;
}

.footer-phone:hover {
    color: var(--color-accent-dark);
}

.footer-phone svg {
    width: 18px;
    height: 18px;
}

.footer-links h4 {
    color: #fff;
    font-size: 0.9375rem;
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links a {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    padding: 0.25rem 0;
    font-size: 0.9375rem;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

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

.footer-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-badge svg {
    width: 16px;
    height: 16px;
    color: var(--color-accent);
}

/* --- Scroll Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* --- Responsive --- */
@media (max-width: 968px) {
    .area-content {
        grid-template-columns: 1fr;
    }

    .quote-layout {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
}

@media (max-width: 768px) {
    .header-nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: var(--spacing-md);
        gap: 0;
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-lg);
    }

    .header-nav.open {
        display: flex;
    }

    .header-nav a {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--color-border);
        width: 100%;
    }

    .header-nav a:last-of-type {
        border-bottom: none;
    }

    .header-nav .header-phone {
        margin-top: 0.75rem;
        justify-content: center;
    }

    .hamburger {
        display: flex;
    }

    .header-phone.desktop-only {
        display: none;
    }

    .hero {
        min-height: auto;
        padding: var(--spacing-lg) 0;
    }

    .hero h1 {
        font-size: clamp(1.75rem, 7vw, 2.5rem);
    }

    .hero-ctas {
        flex-direction: column;
    }

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

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

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

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

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    :root {
        --header-height: 64px;
    }

    .header-logo span {
        font-size: 1.1rem;
    }

    .quote-phone-number {
        font-size: 1.25rem;
    }
}
