/* ===================================
   Ortiz Auto & RV Sales — Styles
   Palette: Terracotta + Sand
   =================================== */

/* --- CSS Variables --- */
:root {
    --color-terracotta-50: #fef7f4;
    --color-terracotta-100: #fdebd8;
    --color-terracotta-200: #fad4b0;
    --color-terracotta-300: #f5b57e;
    --color-terracotta-400: #ef8d4a;
    --color-terracotta-500: #e06f28;
    --color-terracotta-600: #c9561a;
    --color-terracotta-700: #a84116;
    --color-terracotta-800: #873517;
    --color-terracotta-900: #6f2d17;

    --color-sand-50: #fdfcfa;
    --color-sand-100: #faf5ef;
    --color-sand-200: #f3e8d8;
    --color-sand-300: #e8d4b8;
    --color-sand-400: #d4b892;
    --color-sand-500: #bfa076;
    --color-sand-600: #a3855e;
    --color-sand-700: #846b4e;
    --color-sand-800: #6c5843;
    --color-sand-900: #5a4a39;

    --color-dark: #1a1614;
    --color-dark-soft: #2d2520;
    --color-text: #3d322c;
    --color-text-light: #6b5c54;
    --color-text-muted: #9a8a80;
    --color-white: #ffffff;
    --color-border: #e8e0d8;

    --font-sans: 'Outfit', system-ui, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow-sm: 0 1px 3px rgba(26, 22, 20, 0.06), 0 1px 2px rgba(26, 22, 20, 0.04);
    --shadow-md: 0 4px 16px rgba(26, 22, 20, 0.08), 0 2px 6px rgba(26, 22, 20, 0.04);
    --shadow-lg: 0 12px 40px rgba(26, 22, 20, 0.12), 0 4px 12px rgba(26, 22, 20, 0.06);
    --shadow-xl: 0 24px 60px rgba(26, 22, 20, 0.14), 0 8px 20px rgba(26, 22, 20, 0.08);

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-sand-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

/* --- Utility --- */
.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (min-width: 768px) {
    .container {
        padding: 0 40px;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 48px;
    }
}

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

.serif-italic {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 600;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-xl);
    font-weight: 500;
    font-size: 15px;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-primary {
    background: var(--color-terracotta-600);
    color: var(--color-white);
    box-shadow: 0 4px 16px rgba(201, 86, 26, 0.3);
}

.btn-primary:hover {
    background: var(--color-terracotta-700);
    box-shadow: 0 6px 24px rgba(201, 86, 26, 0.4);
    transform: translateY(-2px);
}

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

.btn-outline:hover {
    background: var(--color-dark);
    color: var(--color-white);
    transform: translateY(-2px);
}

.btn-white {
    background: var(--color-white);
    color: var(--color-terracotta-700);
    box-shadow: var(--shadow-md);
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.15);
    color: var(--color-white);
    border: 1.5px solid rgba(255, 255, 255, 0.4);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.btn-small {
    padding: 10px 20px;
    font-size: 14px;
}

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

/* --- Header --- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(253, 252, 250, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--color-border);
    transition: all var(--transition-smooth);
}

.site-header.scrolled {
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
    color: var(--color-dark);
}

.logo-mark {
    width: 40px;
    height: 40px;
    background: var(--color-terracotta-600);
    color: var(--color-white);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
}

.main-nav {
    display: none;
    align-items: center;
    gap: 32px;
}

.main-nav a {
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text);
    transition: color var(--transition-fast);
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-terracotta-500);
    transition: width var(--transition-fast);
}

.main-nav a:hover {
    color: var(--color-terracotta-600);
}

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

.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--color-dark);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

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

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

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

/* Mobile Nav */
.main-nav.mobile-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-sand-50);
    padding: 40px 24px;
    gap: 24px;
    z-index: 999;
    animation: slideDown 0.3s ease;
}

.main-nav.mobile-open a {
    font-size: 20px;
    color: var(--color-dark);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 1024px) {
    .main-nav {
        display: flex;
    }
    .mobile-menu-btn {
        display: none;
    }
}

/* --- Hero Section --- */
.hero {
    padding-top: 76px;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--color-sand-50);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
    padding: 60px 0 80px;
}

@media (min-width: 768px) {
    .hero-grid {
        grid-template-columns: 1.1fr 0.9fr;
        gap: 64px;
        padding: 80px 0 100px;
    }
}

@media (min-width: 1200px) {
    .hero-grid {
        grid-template-columns: 1.15fr 0.85fr;
        gap: 80px;
        padding: 100px 0 120px;
    }
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--color-terracotta-50);
    border: 1px solid var(--color-terracotta-200);
    border-radius: var(--radius-xl);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-terracotta-700);
    margin-bottom: 24px;
}

.tag-dot {
    width: 8px;
    height: 8px;
    background: var(--color-terracotta-500);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

.hero-headline {
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.08;
    margin-bottom: 24px;
    color: var(--color-dark);
}

.accent-line {
    display: block;
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--color-terracotta-600);
    font-size: 0.85em;
}

.hero-sub {
    font-size: clamp(16px, 2vw, 19px);
    line-height: 1.7;
    color: var(--color-text-light);
    max-width: 520px;
    margin-bottom: 36px;
}

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

.hero-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-number {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-dark);
}

.stat-label {
    font-size: 13px;
    color: var(--color-text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--color-border);
}

/* Hero Visual */
.hero-visual {
    position: relative;
}

.hero-image-main {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.hero-image-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-image-accent {
    position: absolute;
    bottom: -32px;
    left: -24px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 4px solid var(--color-sand-50);
}

.hero-image-accent img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.accent-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: var(--color-dark);
    color: var(--color-white);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
}

@media (max-width: 767px) {
    .hero-image-accent {
        display: none;
    }
}

/* --- Section Shared --- */
.section-header {
    max-width: 680px;
    margin-bottom: 56px;
}

.text-center {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.section-tag {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-terracotta-600);
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(28px, 4vw, 48px);
    margin-bottom: 20px;
    color: var(--color-dark);
}

.section-desc {
    font-size: 17px;
    line-height: 1.7;
    color: var(--color-text-light);
}

/* --- Inventory Section --- */
.inventory {
    padding: 100px 0;
    background: var(--color-white);
}

.inventory-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

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

.inventory-card {
    background: var(--color-sand-50);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-smooth);
    border: 1px solid var(--color-border);
}

.inventory-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/11;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.inventory-card:hover .card-image img {
    transform: scale(1.05);
}

.card-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--color-terracotta-600);
    color: var(--color-white);
    padding: 6px 14px;
    border-radius: var(--radius-xl);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-content {
    padding: 24px;
}

.card-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--color-dark);
}

.card-content p {
    font-size: 15px;
    line-height: 1.65;
    color: var(--color-text-light);
}

/* --- About Section --- */
.about {
    padding: 100px 0;
    background: var(--color-sand-50);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 56px;
    align-items: center;
}

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

.about-visual {
    position: relative;
}

.about-image-stack {
    position: relative;
    height: 480px;
}

.about-img-main {
    position: absolute;
    top: 0;
    right: 0;
    width: 80%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-img-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-img-secondary {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 55%;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 4px solid var(--color-sand-50);
}

.about-img-secondary img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-content .section-tag {
    margin-bottom: 16px;
}

.about-text {
    font-size: 16px;
    line-height: 1.8;
    color: var(--color-text-light);
    margin-bottom: 20px;
}

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

.value-item {
    display: flex;
    align-items: center;
    gap: 16px;
}

.value-item svg {
    color: var(--color-terracotta-600);
    flex-shrink: 0;
}

.value-item span {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-dark);
}

/* --- Why Us Section --- */
.why-us {
    padding: 100px 0;
    background: var(--color-dark);
}

.why-us .section-tag {
    color: var(--color-terracotta-400);
}

.why-us .section-title {
    color: var(--color-white);
}

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

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }
}

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

.feature-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 36px 28px;
    transition: all var(--transition-smooth);
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: var(--color-terracotta-600);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    margin-bottom: 24px;
}

.feature-card h3 {
    font-size: 18px;
    color: var(--color-white);
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.6);
}

/* --- CTA Section --- */
.cta {
    padding: 100px 0;
    background: var(--color-terracotta-600);
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    pointer-events: none;
}

.cta::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    pointer-events: none;
}

.cta-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 40px;
    position: relative;
    z-index: 1;
}

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

.cta-content .section-title {
    color: var(--color-white);
    max-width: 600px;
}

.cta-text {
    font-size: 17px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    max-width: 500px;
}

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

/* --- Contact Section --- */
.contact {
    padding: 100px 0;
    background: var(--color-white);
}

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

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

.contact-info .section-tag {
    margin-bottom: 16px;
}

.contact-desc {
    font-size: 16px;
    line-height: 1.75;
    color: var(--color-text-light);
    margin-bottom: 40px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.contact-item {
    display: flex;
    gap: 20px;
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: var(--color-terracotta-50);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-terracotta-600);
    flex-shrink: 0;
}

.contact-item strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-dark);
    margin-bottom: 4px;
}

.contact-item p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-text-light);
}

.contact-item a {
    color: var(--color-terracotta-600);
    transition: color var(--transition-fast);
}

.contact-item a:hover {
    color: var(--color-terracotta-700);
}

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

.contact-form h3 {
    font-size: 24px;
    margin-bottom: 28px;
    color: var(--color-dark);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-dark);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--color-white);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 15px;
    color: var(--color-dark);
    transition: border-color var(--transition-fast);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--color-terracotta-500);
}

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

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

.form-success {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: var(--radius-sm);
    color: #2e7d32;
    font-size: 15px;
    font-weight: 500;
    margin-top: 16px;
}

.form-success.show {
    display: flex;
}

/* --- Footer --- */
.site-footer {
    background: var(--color-dark);
    color: rgba(255, 255, 255, 0.6);
    padding: 72px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    padding-bottom: 56px;
}

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

.footer-brand .logo {
    margin-bottom: 16px;
}

.footer-brand .logo-mark {
    background: var(--color-terracotta-600);
}

.footer-brand .logo-text {
    color: var(--color-white);
}

.footer-brand p {
    font-size: 15px;
    line-height: 1.7;
    max-width: 300px;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-white);
    margin-bottom: 20px;
}

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

.footer-links a {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.6);
    transition: color var(--transition-fast);
}

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

.footer-contact p {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 4px;
}

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

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

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

.footer-bottom p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
}

/* --- Reveal Animations --- */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }

    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-sand-100);
}

::-webkit-scrollbar-thumb {
    background: var(--color-sand-400);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-sand-500);
}
