/* SANAD home page: night road, one gold light. Linked straight from the template,
   not through an Odoo asset bundle, like the business portal.

   Motion is opt-in at the bottom of this file and only ever decorates: with the
   whole motion block removed the page is complete and static. Only transform and
   opacity move on a loop, so a mid-range phone can keep it on the compositor. */
:root {
    --home-bg: #0c0c0d;
    --home-surface: #161618;
    --home-line: #2e2e32;
    --home-gold: #d4af37;
    --home-gold-hi: #f0cf65;
    --home-ink: #f4f1e8;
    --home-muted: #a8a396;
    --home-radius: 12px;
    --home-gutter: clamp(16px, 5vw, 72px);
    --home-road: clamp(92px, 19vh, 190px);
    --home-truck: clamp(168px, 17vw, 260px);
    --home-expo: cubic-bezier(.16, 1, .3, 1);
    color-scheme: dark;
    scrollbar-color: #5c4d1e var(--home-bg);
    scrollbar-width: thin;
}

html, body { margin: 0; background: var(--home-bg); }
::selection { background: var(--home-gold); color: var(--home-bg); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--home-bg); }
::-webkit-scrollbar-thumb { background: #5c4d1e; border: 2px solid var(--home-bg); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--home-gold); }

.home {
    color: var(--home-ink);
    font-family: "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    text-align: start;
    overflow-x: hidden;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}
.home *, .home *::before, .home *::after { box-sizing: border-box; }
.home :where(h1, h2, p) { margin: 0; }
.home img { display: block; }
.home :where(a) { color: inherit; }
.home a:focus-visible {
    outline: 2px solid var(--home-gold-hi);
    outline-offset: 3px;
    border-radius: 6px;
}
.home-defs { position: absolute; }

/* ---------- Top bar ---------- */
.home-top {
    position: absolute;
    inset: 0 0 auto;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 12px var(--home-gutter);
}
.home-brand {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    min-height: 44px;
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--home-gold);
}
.home-top-nav { display: flex; gap: clamp(.9rem, 3vw, 2rem); }
.home-top-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-weight: 500;
    font-size: .95rem;
    color: var(--home-muted);
    text-decoration: none;
    transition: color .2s;
}
.home-top-nav a:hover { color: var(--home-gold-hi); }

/* ---------- Hero: the road runs along the bottom of the first viewport ---------- */
.home-hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    background: radial-gradient(70% 62% at 22% 74%, rgba(212, 175, 55, .13), transparent 72%);
}
.home-hero-in {
    position: relative;
    z-index: 1;
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: end;
    gap: 2rem;
    padding: 96px var(--home-gutter) var(--home-road);
}
.home-copy { align-self: center; padding-bottom: clamp(1rem, 4vh, 3rem); }
.home h1 {
    font-size: clamp(2.6rem, min(7vw, 11vh), 6rem);
    font-weight: 500;
    line-height: 1.12;
}
.home h1 strong { display: block; font-weight: 800; color: var(--home-gold); }
.home-lead {
    margin-top: 1rem;
    max-width: 34em;
    font-size: clamp(1.1rem, 1.6vw, 1.4rem);
    line-height: 1.6;
}
.home-customer {
    margin-top: clamp(1.25rem, 4vh, 2.5rem);
    padding-top: clamp(1rem, 3vh, 1.75rem);
    max-width: 36rem;
    border-top: 1px solid var(--home-line);
}
.home-customer h2 { font-size: 1.3rem; font-weight: 700; line-height: 1.4; }
.home-customer p { margin-top: .2rem; color: var(--home-muted); max-width: 34em; }

/* ---------- Buttons ---------- */
.home-actions { display: flex; flex-wrap: wrap; gap: .625rem; margin-top: 1.1rem; }
.home-btn {
    --btn-fg: var(--home-ink);
    --btn-bg: transparent;
    --btn-line: #57504a;
    flex: 1 1 148px;
    max-width: 260px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    min-height: 54px;
    padding: .4rem .85rem;
    border: 1px solid var(--btn-line);
    border-radius: var(--home-radius);
    background: var(--btn-bg);
    color: var(--btn-fg);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--home-expo);
}
.home-btn svg { width: 22px; height: 22px; flex: none; }
.home-btn:hover { --btn-line: var(--home-gold); --btn-fg: var(--home-gold-hi); transform: translateY(-2px); }
.home-btn:active { transform: translateY(0) scale(.98); }
/* The visitor's own store is the gold one; home.js swaps it on Android. */
.home-btn-solid, .home-store-ios, .is-android .home-store-android {
    --btn-fg: var(--home-bg);
    --btn-bg: var(--home-gold);
    --btn-line: var(--home-gold);
}
.home-btn-solid:hover, .home-store-ios:hover, .is-android .home-store-android:hover {
    --btn-fg: var(--home-bg);
    --btn-bg: var(--home-gold-hi);
    --btn-line: var(--home-gold-hi);
}
.is-android .home-store-ios {
    --btn-fg: var(--home-ink);
    --btn-bg: transparent;
    --btn-line: #57504a;
}
.is-android .home-store-ios:hover { --btn-fg: var(--home-gold-hi); --btn-bg: transparent; --btn-line: var(--home-gold); }

/* ---------- The S, standing at the edge of the road ---------- */
.home-mark {
    position: relative;
    justify-self: center;
    width: calc(min(52vh, 400px) * .755);
}
.home-mark::before {
    content: "";
    position: absolute;
    inset: -30% -55%;
    background: radial-gradient(closest-side, rgba(212, 175, 55, .16), transparent);
}
.home-mark-spin { position: relative; }
.home-mark img { position: relative; width: 100%; height: auto; }
.home-sheen {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    -webkit-mask: url(../img/sanad_mark.png) center / 100% 100% no-repeat;
    mask: url(../img/sanad_mark.png) center / 100% 100% no-repeat;
}
.home-sheen::before {
    content: "";
    position: absolute;
    inset: 0 -40%;
    background: linear-gradient(100deg, transparent 32%, rgba(255, 247, 220, .9) 50%, transparent 68%);
}
.home-mark img.home-mark-echo {
    position: absolute;
    inset: 100% 0 auto;
    transform: scaleY(-1);
    opacity: .3;
    -webkit-mask-image: linear-gradient(to top, #000, transparent 46%);
    mask-image: linear-gradient(to top, #000, transparent 46%);
}

/* ---------- Road ---------- */
.home-scene, .home-lot { overflow: hidden; }
.home-scene {
    position: absolute;
    inset: auto 0 0;
    height: calc(var(--home-road) + 90px);
}
.home-road {
    position: absolute;
    inset: auto 0 0;
    height: var(--home-road);
    background: linear-gradient(#141416, var(--home-bg));
}
.home-road::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: var(--home-gold);
    opacity: .34;
    transform-origin: 100% 50%;
}
.home-road::after {
    content: "";
    position: absolute;
    inset: auto 0 16%;
    height: 3px;
    background: repeating-linear-gradient(to left, rgba(212, 175, 55, .3) 0 54px, transparent 54px 118px);
}

/* ---------- Truck, its light on the asphalt ---------- */
.home-run {
    position: absolute;
    bottom: calc(var(--home-road) * .24);
    inset-inline-start: 22%;
    width: var(--home-truck);
}
.home-bob, .home-rig { position: relative; }
.home-truck {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 400 / 130;
    overflow: visible;
}
.home-beam {
    position: absolute;
    right: 96.5%;
    bottom: -6%;
    width: 150%;
    height: 70%;
    background: linear-gradient(to left, rgba(240, 207, 101, .5), rgba(240, 207, 101, .07) 62%, transparent);
    -webkit-clip-path: polygon(100% 50%, 100% 56%, 0 100%, 0 14%);
    clip-path: polygon(100% 50%, 100% 56%, 0 100%, 0 14%);
}
.home-pool {
    position: absolute;
    left: -115%;
    right: -25%;
    bottom: -32%;
    height: 66%;
    background: radial-gradient(closest-side, rgba(240, 207, 101, .25), transparent);
}
.home-beacon {
    position: absolute;
    left: 21.5%;
    top: 4.5%;
    width: 18%;
    aspect-ratio: 1;
    margin: -9% 0 0 -9%;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(255, 233, 160, .95), rgba(240, 207, 101, .32) 34%, transparent);
}

/* ---------- Drivers ---------- */
.home-fleet {
    position: relative;
    padding-top: clamp(3.5rem, 11vh, 7rem);
    background: radial-gradient(60% 46% at 86% 8%, rgba(212, 175, 55, .1), transparent 72%);
}
.home-fleet-copy { padding-inline: var(--home-gutter); }
.home-fleet h2 {
    font-size: clamp(2.4rem, 6vw, 5rem);
    font-weight: 800;
    line-height: 1.15;
    color: var(--home-gold);
}
.home-fleet-copy p {
    margin-top: .6rem;
    max-width: 30em;
    font-size: clamp(1.1rem, 1.6vw, 1.4rem);
    line-height: 1.6;
}
.home-lot {
    --home-road: clamp(96px, 13vw, 170px);
    position: relative;
    height: calc(var(--home-road) + clamp(110px, 21vw, 300px));
    margin-top: clamp(1rem, 3vh, 2.5rem);
}
.home-rig {
    position: absolute;
    bottom: calc(var(--home-road) * .3);
    left: max(4%, calc(50% - 560px));
    width: clamp(300px, 68vw, 960px);
    will-change: transform;
}
.home-lot .home-beam { width: 60%; }
.home-lot .home-beacon { width: 11%; margin: -5.5% 0 0 -5.5%; }
.home-lot .home-pool { left: -30%; right: 10%; bottom: -22%; height: 46%; }

/* ---------- Close ---------- */
.home-foot {
    padding: clamp(3rem, 9vh, 5.5rem) var(--home-gutter) 1.75rem;
    border-top: 1px solid var(--home-line);
}
.home-tagline {
    max-width: 19em;
    font-size: clamp(1.7rem, 4.2vw, 3.25rem);
    font-weight: 700;
    line-height: 1.3;
    text-wrap: balance;
}
.home-foot-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .15rem clamp(1.1rem, 3vw, 2.25rem);
    margin-top: clamp(2rem, 6vh, 3.5rem);
    padding-top: .9rem;
    border-top: 1px solid var(--home-line);
}
.home-foot-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    text-decoration: none;
    transition: color .2s;
}
.home-foot-nav a:hover { color: var(--home-gold-hi); }
.home-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .25rem 1.5rem;
    margin-top: .5rem;
    font-size: .9rem;
    color: var(--home-muted);
}
.home-legal a { text-underline-offset: 3px; text-decoration-color: var(--home-gold); }
.home-legal a:hover { color: var(--home-gold-hi); }

/* ---------- Phones: copy and action first, the S on the road beneath ---------- */
@media (max-width: 760px) {
    :root { --home-road: 76px; --home-truck: 150px; }
    .home-hero-in {
        display: flex;
        flex-direction: column;
        gap: .75rem;
        padding-top: 68px;
    }
    .home-copy { flex: 1; padding-bottom: 0; }
    .home-lead { max-width: none; }
    .home-mark {
        flex: none;
        align-self: flex-end;
        margin-inline-end: 10%;
        width: calc(min(22vh, 150px) * .755);
    }
    .home-btn {
        flex-basis: 140px;
        max-width: none;
        gap: .4rem;
        padding-inline: .4rem;
        font-size: .9375rem;
    }
    .home-btn svg { width: 20px; height: 20px; }
    .home-run { inset-inline-start: 8%; bottom: 8px; }
}

/* ---------- Motion: the app's splash, then the truck on its hairline ---------- */
@media (prefers-reduced-motion: no-preference) {
    :root { --home-loop: 12s; --home-start: 1s; }

    .home-mark-lift {
        animation:
            home-lift .96s cubic-bezier(.215, .61, .355, 1) both,
            home-fade .56s ease-in both;
    }
    .home-mark-spin { animation: home-spin .96s var(--home-expo) both; }
    .home-mark-echo { animation: home-echo .7s ease-out .8s backwards; }
    .home-hero .home-road::before { animation: home-draw 1.3s var(--home-expo) both; }
    .home h1 strong { animation: home-lit 1.1s ease-out .3s backwards; }
    .home-copy > * { animation: home-rise .9s var(--home-expo) backwards; }
    .home-lead { animation-delay: .06s; }
    .home-customer { animation-delay: .12s; }

    .home-run {
        inset-inline-start: auto;
        left: 0;
        animation: home-drive var(--home-loop) linear var(--home-start) infinite both;
    }
    .home-bob { animation: home-bob .47s ease-in-out infinite alternate; }
    .home-beacon { animation: home-beacon 1.1s ease-in-out infinite; }
    .home-sheen { opacity: 1; }
    .home-sheen::before { animation: home-sheen var(--home-loop) ease-out var(--home-start) infinite both; }

    /* home.js marks a section off-screen so its loops stop costing battery. */
    .home-off, .home-off * { animation-play-state: paused !important; }
    .home-off *::before { animation-play-state: paused !important; }

    @media (max-width: 760px) {
        :root { --home-loop: 9s; }
    }
}

@keyframes home-lift { from { transform: translateY(34px); } }
@keyframes home-fade { from { opacity: 0; } }
@keyframes home-spin { from { transform: rotate(-151deg) scale(.72); } }
@keyframes home-echo { from { opacity: 0; } }
@keyframes home-draw { from { transform: scaleX(0); } }
@keyframes home-lit { from { color: var(--home-ink); } }
@keyframes home-rise { from { transform: translateY(14px); } }
@keyframes home-drive {
    from { transform: translate3d(calc(100vw + 20px), 0, 0); }
    62%, to { transform: translate3d(-290%, 0, 0); }
}
@keyframes home-bob { to { transform: translateY(-1.5px); } }
@keyframes home-beacon { 50% { opacity: .15; transform: scale(.72); } }
@keyframes home-sheen {
    0%, 30% { transform: translateX(100%); }
    46%, 100% { transform: translateX(-100%); }
}
