/* ========================================
   RAB Kustoms — Auto Repair Website
   Teal + Slate Grey | Confident Corporate
======================================== */

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

:root {
    --teal-50: #f0fdfa;
    --teal-100: #ccfbf1;
    --teal-200: #99f6e4;
    --teal-400: #2dd4bf;
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    --teal-700: #0f766e;
    --teal-800: #115e59;
    --teal-900: #134e4a;

    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --slate-950: #020617;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-body);
    color: var(--slate-800);
    background: var(--slate-50);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

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

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

.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    background: var(--teal-600);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    z-index: 9999;
    font-weight: 600;
}
.skip-link:focus {
    top: 16px;
}

/* --- Preloader --- */
#preloader {
    position: fixed;
    inset: 0;
    background: var(--slate-950);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
#preloader.loaded {
    opacity: 0;
    visibility: hidden;
}
.loader {
    position: relative;
    width: 48px;
    height: 48px;
}
.loader-ring {
    position: absolute;
    inset: 0;
    border: 3px solid var(--slate-800);
    border-top-color: var(--teal-400);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
.loader-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: var(--teal-400);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 1s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.5); opacity: 0.5; }
}

/* --- Header --- */
#site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: background var(--transition);
}
#site-header.scrolled {
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    transition: opacity var(--transition);
}
.logo:hover { opacity: 0.85; }
.logo-icon {
    color: var(--teal-400);
}
.logo-text {
    font-weight: 700;
}
.logo-accent {
    color: var(--teal-400);
    font-weight: 800;
}
.logo-light { color: white; }

.nav-list {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}
.nav-list a {
    color: var(--slate-300);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}
.nav-list a:hover {
    color: white;
    background: rgba(255,255,255,0.08);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}
.btn-primary {
    background: var(--teal-600);
    color: white;
    border-color: var(--teal-600);
}
.btn-primary:hover {
    background: var(--teal-500);
    border-color: var(--teal-500);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(13, 148, 136, 0.35);
}
.btn-outline-light {
    background: transparent;
    color: white;
    border-color: rgba(255,255,255,0.3);
}
.btn-outline-light:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
}
.btn-lg { padding: 16px 32px; font-size: 1rem; }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-full { width: 100%; justify-content: center; }

/* --- Mobile Nav Toggle --- */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}
.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all var(--transition);
}
.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}
.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(2, 6, 23, 0.92) 0%,
        rgba(15, 23, 42, 0.85) 40%,
        rgba(13, 148, 136, 0.4) 100%
    );
}
.hero-grain {
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    pointer-events: none;
}
.hero-content {
    position: relative;
    z-index: 1;
    padding: 120px 0 80px;
    max-width: 720px;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(13, 148, 136, 0.15);
    border: 1px solid rgba(13, 148, 136, 0.3);
    color: var(--teal-300);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 8px 16px;
    border-radius: 50px;
    margin-bottom: 24px;
}
.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--teal-400);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}
.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    font-weight: 800;
    color: white;
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}
.text-gradient {
    background: linear-gradient(135deg, var(--teal-300) 0%, var(--teal-400) 50%, var(--teal-200) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-desc {
    font-size: 1.15rem;
    color: var(--slate-400);
    line-height: 1.7;
    margin-bottom: 36px;
    max-width: 540px;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 56px;
}
.hero-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}
.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--slate-400);
    font-size: 0.85rem;
    font-weight: 500;
}
.trust-item svg {
    color: var(--teal-400);
    flex-shrink: 0;
}
.scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--slate-500);
    animation: bounce 2s ease-in-out infinite;
    transition: color var(--transition);
}
.scroll-indicator:hover { color: var(--teal-400); }
@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* --- Section Shared --- */
.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 56px;
}
.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--teal-600);
    margin-bottom: 12px;
}
.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    color: var(--slate-900);
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}
.section-desc {
    font-size: 1.05rem;
    color: var(--slate-500);
    line-height: 1.7;
}

/* --- Services --- */
.services {
    padding: 100px 0;
    background: white;
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.service-card {
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--teal-600), var(--teal-400));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}
.service-card:hover {
    border-color: var(--teal-200);
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    background: white;
}
.service-card:hover::before {
    transform: scaleX(1);
}
.service-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 148, 136, 0.1);
    border-radius: var(--radius-md);
    color: var(--teal-600);
    margin-bottom: 20px;
    transition: all var(--transition);
}
.service-card:hover .service-icon {
    background: var(--teal-600);
    color: white;
}
.service-card h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}
.service-card p {
    font-size: 0.9rem;
    color: var(--slate-500);
    line-height: 1.65;
}

/* --- About --- */
.about {
    padding: 100px 0;
    background: var(--slate-50);
}
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}
.about-images {
    position: relative;
}
.about-img-main {
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}
.about-img-main img {
    width: 100%;
    height: 420px;
    object-fit: cover;
}
.about-img-secondary {
    position: absolute;
    bottom: -40px;
    right: -40px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 4px solid white;
}
.about-img-secondary img {
    width: 220px;
    height: 220px;
    object-fit: cover;
}
.about-stat-badge {
    position: absolute;
    top: -20px;
    right: 40px;
    background: var(--teal-600);
    color: white;
    padding: 16px 24px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-lg);
}
.about-stat-badge .stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}
.about-stat-badge .stat-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.85;
}
.about-content { padding: 8px 0; }
.about-body {
    font-size: 1rem;
    color: var(--slate-600);
    line-height: 1.75;
    margin-bottom: 20px;
}
.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 32px;
}
.about-feature {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.88rem;
    color: var(--slate-700);
    font-weight: 500;
}
.check-icon {
    color: var(--teal-500);
    flex-shrink: 0;
    margin-top: 1px;
}

/* --- Why Us --- */
.why-us {
    padding: 100px 0;
    background: var(--slate-900);
    position: relative;
    overflow: hidden;
}
.why-us::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(13,148,136,0.12) 0%, transparent 70%);
    pointer-events: none;
}
.why-us .section-title { color: white; }
.why-us .section-desc { color: var(--slate-400); }
.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    position: relative;
}
.why-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    transition: all var(--transition);
}
.why-card:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(13,148,136,0.4);
    transform: translateY(-4px);
}
.why-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    color: rgba(13,148,136,0.2);
    line-height: 1;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
}
.why-card h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
}
.why-card p {
    font-size: 0.9rem;
    color: var(--slate-400);
    line-height: 1.7;
}

/* --- CTA Banner --- */
.cta-banner {
    position: relative;
    padding: 80px 0;
    overflow: hidden;
}
.cta-bg {
    position: absolute;
    inset: 0;
}
.cta-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cta-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(13,148,136,0.9) 0%, rgba(15,23,42,0.92) 100%);
}
.cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 680px;
    margin: 0 auto;
}
.cta-title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    color: white;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}
.cta-desc {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.75);
    line-height: 1.7;
    margin-bottom: 32px;
}
.cta-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

/* --- Contact --- */
.contact {
    padding: 100px 0;
    background: white;
}
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
}
.contact-desc {
    font-size: 1rem;
    color: var(--slate-500);
    line-height: 1.7;
    margin-bottom: 36px;
}
.contact-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.contact-item {
    display: flex;
    gap: 16px;
}
.contact-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--slate-100);
    border-radius: var(--radius-md);
    color: var(--teal-600);
    flex-shrink: 0;
}
.contact-item strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 4px;
}
.contact-item p {
    font-size: 0.9rem;
    color: var(--slate-500);
    line-height: 1.6;
}
.contact-item a {
    color: var(--teal-600);
    transition: color var(--transition);
}
.contact-item a:hover { color: var(--teal-500); }

/* --- Form --- */
.contact-form-wrap {
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-xl);
    padding: 40px;
}
.form-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 28px;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--slate-700);
    margin-bottom: 6px;
    letter-spacing: 0.02em;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--slate-200);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--slate-800);
    background: white;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
    appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--teal-500);
    box-shadow: 0 0 0 3px rgba(13,148,136,0.1);
}
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--slate-400);
}
.form-group textarea {
    resize: vertical;
    min-height: 100px;
}
.form-success {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(13,148,136,0.08);
    border: 1px solid rgba(13,148,136,0.2);
    color: var(--teal-700);
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 16px;
}
.form-success svg { color: var(--teal-500); flex-shrink: 0; }

/* --- Footer --- */
.footer {
    background: var(--slate-950);
    color: var(--slate-400);
    padding: 64px 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 48px;
    padding-bottom: 48px;
}
.footer-brand p {
    font-size: 0.88rem;
    line-height: 1.7;
    margin-top: 16px;
    color: var(--slate-500);
    max-width: 280px;
}
.footer-links strong,
.footer-contact strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}
.footer-links ul,
.footer-contact ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer-links a,
.footer-contact a {
    font-size: 0.88rem;
    color: var(--slate-500);
    transition: color var(--transition);
}
.footer-links a:hover,
.footer-contact a:hover {
    color: var(--teal-400);
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--slate-600);
}

/* --- Animations --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.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; }

/* --- Responsive --- */
@media (max-width: 1024px) {
    .about-grid { gap: 48px; }
    .contact-grid { gap: 48px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav-list {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: var(--slate-900);
        flex-direction: column;
        align-items: stretch;
        padding: 88px 24px 32px;
        gap: 4px;
        transform: translateX(100%);
        transition: transform var(--transition);
        box-shadow: -10px 0 30px rgba(0,0,0,0.3);
    }
    .nav-list.open { transform: translateX(0); }
    .nav-list a {
        padding: 14px 16px;
        font-size: 1rem;
        border-radius: var(--radius-md);
    }
    .nav-list .btn {
        margin-top: 12px;
        text-align: center;
        justify-content: center;
    }

    .hero-content { padding: 100px 0 60px; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; justify-content: center; }
    .hero-trust { flex-direction: column; gap: 12px; }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 56px;
    }
    .about-img-secondary {
        right: -16px;
        bottom: -24px;
    }
    .about-img-secondary img { width: 160px; height: 160px; }
    .about-features { grid-template-columns: 1fr; }

    .contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .contact-form-wrap { padding: 28px; }
    .form-row { grid-template-columns: 1fr; }

    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .services, .about, .why-us, .contact { padding: 72px 0; }
    .services-grid { grid-template-columns: 1fr; }
    .why-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 2.4rem; }
}
