/* Machify Limited — marketing site */

:root {
    --accent: #c2410c;
    --accent-dark: #9a3412;
    --accent-light: #fff7ed;
    --ink: #0f172a;
    --muted: #64748b;
    --surface: #ffffff;
    --bg: #f8fafc;
    --border: #e2e8f0;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    --header-h: 72px;
    --max: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea {
    font: inherit;
}

.container {
    width: min(var(--max), calc(100% - 2rem));
    margin-inline: auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 0;
    background: var(--accent);
    color: #fff;
    padding: 0.75rem 1rem;
    z-index: 9999;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* Header */
.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    height: var(--header-h);
    transition: background 0.25s ease, box-shadow 0.25s ease, backdrop-filter 0.25s ease;
}
.site-header.is-scrolled {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 var(--border);
}
.header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 800;
    font-size: 1.15rem;
    color: #fff;
    transition: color 0.25s ease;
}
.site-header.is-scrolled .brand { color: var(--ink); }
.brand-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}
.brand-text { letter-spacing: -0.02em; }

.site-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.nav-link {
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
    transition: background 0.2s ease, color 0.2s ease;
}
.site-header.is-scrolled .nav-link { color: var(--muted); }
.nav-link:hover,
.nav-link.is-active {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}
.site-header.is-scrolled .nav-link:hover,
.site-header.is-scrolled .nav-link.is-active {
    background: var(--accent-light);
    color: var(--accent);
}
.nav-link-portal {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
}
.site-header.is-scrolled .nav-link-portal {
    background: var(--accent);
    color: #fff !important;
    border-color: var(--accent);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
    padding: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}
.nav-toggle-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.site-header.is-scrolled .nav-toggle { background: var(--bg); }
.site-header.is-scrolled .nav-toggle-bar { background: var(--ink); }

/* Hero */
.hero {
    position: relative;
    min-height: 92vh;
    min-height: 92dvh;
    display: flex;
    align-items: center;
    color: #fff;
    overflow: hidden;
}
.hero-carousel {
    position: absolute;
    inset: 0;
    overflow: hidden;
}
.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.9s ease;
    will-change: opacity;
}
.hero-slide.is-active {
    opacity: 1;
    z-index: 1;
}
.hero-slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    image-rendering: auto;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(15, 23, 42, 0.82) 0%, rgba(15, 23, 42, 0.45) 55%, rgba(194, 65, 12, 0.35) 100%);
}
.hero-content {
    position: relative;
    z-index: 2;
    padding: calc(var(--header-h) + 3rem) 0 6.5rem;
    max-width: 720px;
}
.hero-carousel-bar {
    position: absolute;
    z-index: 3;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem max(1rem, calc((100% - var(--max)) / 2 + 1rem)) 1.35rem;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.72), transparent);
}
.hero-slide-caption {
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.92rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}
.hero-carousel-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.hero-carousel-btn {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    border-radius: 999px !important;
    background: rgba(15, 23, 42, 0.35) !important;
    color: #fff !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    min-width: 38px !important;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: background 0.15s ease, transform 0.15s ease;
}
.hero-carousel-btn:hover {
    background: rgba(194, 65, 12, 0.85) !important;
    transform: none !important;
}
.hero-carousel-dots {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.hero-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: none;
    padding: 0;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}
.hero-carousel-dot.is-active {
    width: 22px;
    background: #fdba74;
}
.project-card .fleet-brand-badge {
    display: none;
    margin-bottom: 0.35rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.eyebrow {
    display: inline-block;
    margin: 0 0 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #fdba74;
}
.hero h1 {
    margin: 0 0 1rem;
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
}
.hero-sub {
    margin: 0 0 1.75rem;
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: rgba(255, 255, 255, 0.88);
    max-width: 56ch;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.35rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 10px 24px rgba(194, 65, 12, 0.35);
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(6px);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.2); }

/* Sections */
.section {
    padding: 5rem 0;
}
.section-head {
    max-width: 640px;
    margin-bottom: 2.5rem;
}
.section-head-light .eyebrow { color: #fdba74; }
.section-head-light h2 { color: #fff; }
.section-head h2,
.about-copy h2,
.contact-copy h2 {
    margin: 0;
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    letter-spacing: -0.02em;
    line-height: 1.15;
}
.section-sub {
    margin: 0.75rem 0 0;
    color: var(--muted);
    max-width: 58ch;
}

/* About */
.about { background: var(--surface); }
.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
    align-items: center;
}
.about-copy p {
    color: var(--muted);
    margin: 0 0 1rem;
}
.check-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
    display: grid;
    gap: 0.65rem;
}
.check-list li {
    position: relative;
    padding-left: 1.6rem;
    font-weight: 500;
}
.check-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.45rem;
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-light);
}
.about-visual img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center;
    border-radius: calc(var(--radius) + 4px);
    box-shadow: var(--shadow);
    image-rendering: auto;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 3.5rem;
}
.stat-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1rem;
    text-align: center;
}
.stat-card strong {
    display: block;
    font-size: 1.75rem;
    color: var(--accent);
    line-height: 1.1;
}
.stat-card span {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: var(--muted);
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
.service-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.service-card--has-image {
    padding: 0;
    overflow: hidden;
}
.service-card-image {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}
.service-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    image-rendering: auto;
}
.service-card-body {
    padding: 1.5rem;
}
.service-card--has-image .service-card-body {
    padding: 1.25rem 1.5rem 1.5rem;
}
.service-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
.service-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--accent-light);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.service-icon svg { width: 22px; height: 22px; }
.service-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
}
.service-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

/* Process */
.process { background: var(--surface); }
.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
.process-step {
    position: relative;
    padding: 1.5rem;
    border-radius: var(--radius);
    background: var(--bg);
    border: 1px solid var(--border);
}
.process-step-num {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--accent);
}
.process-step h3 {
    margin: 0.5rem 0;
    font-size: 1.02rem;
}
.process-step p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

/* Projects */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
.project-card {
    position: relative;
    border-radius: calc(var(--radius) + 2px);
    overflow: hidden;
    min-height: 280px;
    box-shadow: var(--shadow);
}
.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    min-height: 280px;
    image-rendering: auto;
}
.project-card-body {
    position: absolute;
    inset: auto 0 0 0;
    padding: 1.25rem 1.35rem 1.35rem;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.88), transparent);
    color: #fff;
}
.project-card-body h3 { margin: 0 0 0.35rem; font-size: 1.1rem; }
.project-card-body p { margin: 0; font-size: 0.9rem; color: rgba(255,255,255,0.85); }

/* Testimonials */
.testimonials {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #fff;
}
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
.testimonial-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 1.5rem;
}
.testimonial-card blockquote {
    margin: 0 0 1rem;
    font-size: 1.02rem;
    line-height: 1.55;
}
.testimonial-card cite {
    display: block;
    font-style: normal;
    font-weight: 600;
}
.testimonial-card span {
    display: block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.65);
    margin-top: 0.15rem;
}

/* Contact */
.contact { background: var(--surface); }
.contact-grid {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 2.5rem;
    align-items: start;
}
.contact-meta {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
    display: grid;
    gap: 0.85rem;
}
.contact-meta li {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    color: var(--muted);
}
.contact-meta strong {
    display: block;
    color: var(--ink);
    font-size: 0.88rem;
}
.contact-note {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.contact-form {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 2px);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.88rem;
    font-weight: 600;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--ink);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.12);
}
.form-honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
    height: 0;
    overflow: hidden;
}
.form-status {
    min-height: 1.25rem;
    margin: 0.75rem 0 0;
    font-size: 0.9rem;
}
.form-status.is-success { color: #15803d; }
.form-status.is-error { color: #b91c1c; }

/* Footer */
.site-footer {
    background: #0f172a;
    color: rgba(255, 255, 255, 0.75);
    padding: 2rem 0;
}
.footer-inner {
    display: grid;
    gap: 1rem;
}
.footer-brand strong { color: #fff; font-size: 1.05rem; }
.footer-brand p { margin: 0.35rem 0 0; font-size: 0.9rem; }
.footer-links a {
    color: #fdba74;
    font-weight: 600;
}
.footer-copy {
    margin: 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .services-grid,
    .process-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .nav-toggle { display: inline-flex; }
    .site-nav {
        position: fixed;
        inset: var(--header-h) 0 auto 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(12px);
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        transform: translateY(-120%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.25s ease, opacity 0.25s ease;
    }
    .site-nav.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    .nav-link {
        color: var(--ink) !important;
        border-radius: var(--radius-sm);
    }
    .nav-link-portal {
        background: var(--accent) !important;
        color: #fff !important;
        text-align: center;
    }
    .about-grid,
    .contact-grid,
    .projects-grid,
    .testimonials-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .section { padding: 3.5rem 0; }
    .hero-carousel-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .hero-content { padding-bottom: 8.5rem; }
}
