/* ==========================================================
   NearMeCab - Home hero & booking form
   ========================================================== */
@property --nmc-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

.nmc-hero {
    --nmc-red: #ff1a1a;
    --nmc-red-dark: #e00e0e;
    --nmc-orange: #ff6a3d;
    --nmc-ink: #0f1115;
    --nmc-muted: #6b6f76;
    --nmc-line: #e7e4dd;
    --nmc-soft: #f8f6f1;

    position: relative;
    overflow: hidden;
    padding: 165px 0 100px;
    background: var(--nmc-soft);
    font-family: 'Sora', sans-serif;
}

/* faint dot grid */
.nmc-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(15, 17, 21, .08) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(to bottom, #000 0%, transparent 80%);
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 80%);
    pointer-events: none;
}

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

/* Phones: intro -> form -> extras. Desktop: text left, form right. */
.nmc-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "intro" "form" "extras";
    row-gap: 8px;
}
.nmc-intro  { grid-area: intro; min-width: 0; }
.nmc-form-col { grid-area: form; min-width: 0; scroll-margin-top: 16px; }
.nmc-extras { grid-area: extras; min-width: 0; }

@media (min-width: 992px) {
    .nmc-hero-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 470px);
        grid-template-rows: auto 1fr;
        grid-template-areas: "intro form" "extras form";
        column-gap: 6%;
    }
    .nmc-form-col { align-self: center; }
}

/* ---------- Drifting background blobs ---------- */
.nmc-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
    animation: nmc-drift 16s ease-in-out infinite alternate;
}
.nmc-blob-1 {
    width: 520px; height: 520px;
    top: -160px; right: -120px;
    background: rgba(255, 26, 26, .22);
}
.nmc-blob-2 {
    width: 380px; height: 380px;
    bottom: -120px; left: -100px;
    background: rgba(255, 106, 61, .18);
    animation-duration: 20s;
    animation-direction: alternate-reverse;
}
.nmc-blob-3 {
    width: 300px; height: 300px;
    top: 35%; left: 42%;
    background: rgba(255, 196, 0, .14);
    animation-duration: 24s;
}

/* ---------- Entrance animation ---------- */
.nmc-reveal {
    animation: nmc-up .9s cubic-bezier(.2, .7, .2, 1) both;
    animation-delay: var(--d, 0s);
}
.nmc-reveal-right { animation-name: nmc-in-right; }

/* ---------- Left column ---------- */
.nmc-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 16px 7px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .85);
    border: 1px solid var(--nmc-line);
    color: var(--nmc-ink);
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 4px 14px rgba(15, 17, 21, .06);
    backdrop-filter: blur(6px);
}

.nmc-live {
    position: relative;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #16a34a;
}
.nmc-live::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #16a34a;
    animation: nmc-ping 1.6s cubic-bezier(0, 0, .2, 1) infinite;
}

.nmc-title {
    margin: 20px 0 18px;
    font-family: 'Epilogue', sans-serif;
    font-weight: 700;
    font-size: clamp(2.2rem, 4.4vw, 3.6rem);
    line-height: 1.1;
    letter-spacing: -.02em;
    color: var(--nmc-ink);
}

/* rotating words */
.nmc-rotator {
    display: grid;
}
.nmc-rotator span {
    grid-area: 1 / 1;
    opacity: 0;
    background: linear-gradient(90deg, var(--nmc-red), var(--nmc-orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: .9em;
    animation: nmc-word 12s cubic-bezier(.6, 0, .3, 1) infinite;
}
.nmc-rotator span:nth-child(2) { animation-delay: 3s; }
.nmc-rotator span:nth-child(3) { animation-delay: 6s; }
.nmc-rotator span:nth-child(4) { animation-delay: 9s; }

.nmc-lead {
    max-width: 500px;
    margin-bottom: 26px;
    font-size: 17px;
    line-height: 1.65;
    color: var(--nmc-muted);
}

.nmc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 26px;
}
.nmc-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border: 1.5px solid rgba(255, 26, 26, .25);
    border-radius: 999px;
    background: #fff;
    color: var(--nmc-ink);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px -4px rgba(255, 26, 26, .2);
    transition: transform .2s, background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.nmc-tag i { color: var(--nmc-red); transition: color .2s; }
.nmc-tag .nmc-tag-arrow { font-size: 12px; }
.nmc-tag:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, var(--nmc-red), var(--nmc-orange));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 10px 20px -8px rgba(255, 26, 26, .6);
}
.nmc-tag:hover i { color: #fff; }

.nmc-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin: 0 0 28px;
    padding: 0;
}
.nmc-points li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--nmc-ink);
}
.nmc-points i {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    color: var(--nmc-red);
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(255, 26, 26, .15);
    transition: transform .25s, background .25s, color .25s;
}
.nmc-points li:hover i {
    transform: translateY(-3px) rotate(-8deg);
    background: var(--nmc-red);
    color: #fff;
}

.nmc-riders {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    color: var(--nmc-muted);
    line-height: 1.5;
}
.nmc-riders ul { display: flex; margin: 0; padding: 0; }
.nmc-riders li + li { margin-left: -12px; }
.nmc-riders img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 3px solid #fff;
    object-fit: cover;
    box-shadow: 0 2px 6px rgba(15, 17, 21, .12);
    transition: transform .25s;
}
.nmc-riders li:hover img { transform: translateY(-4px); }
.nmc-riders a {
    color: var(--nmc-ink);
    font-weight: 600;
    text-decoration: none;
}
.nmc-riders a:hover { color: var(--nmc-red); }

/* ---------- Illustration with floating chips ---------- */
.nmc-visual {
    position: relative;
    max-width: 540px;
    margin-top: 30px;
    padding: 20px 30px 0;
}
.nmc-disc {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 330px;
    height: 330px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 26, 26, .2), rgba(255, 106, 61, .08));
}
.nmc-ring {
    position: absolute;
    left: 50%;
    bottom: -25px;
    width: 380px;
    height: 380px;
    margin-left: -190px;
    border-radius: 50%;
    border: 2px dashed rgba(255, 26, 26, .3);
    animation: nmc-spin 40s linear infinite;
}
.nmc-visual-img {
    position: relative;
    filter: drop-shadow(0 24px 30px rgba(15, 17, 21, .15));
    animation: nmc-bob 6s ease-in-out infinite;
}

.nmc-chip {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 10px 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(8px);
    box-shadow: 0 14px 34px -10px rgba(15, 17, 21, .28);
    animation: nmc-bob 5s ease-in-out infinite;
}
.nmc-chip strong {
    display: block;
    font-size: 13px;
    color: var(--nmc-ink);
    line-height: 1.3;
}
.nmc-chip small {
    display: block;
    font-size: 11px;
    color: var(--nmc-muted);
}
.nmc-chip-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 26, 26, .12);
    color: var(--nmc-red);
    font-size: 17px;
}
.nmc-chip-green { background: #dcfce7; color: #16a34a; }
.nmc-chip-1 { top: 18%; left: -20px; }
.nmc-chip-2 { bottom: 14%; right: -10px; animation-delay: -2.5s; }

/* ---------- Animated road strip ---------- */
.nmc-road {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    height: 10px;
    background: #1b1d22;
}
.nmc-road span {
    position: absolute;
    left: 0;
    right: 0;
    top: 4px;
    height: 2px;
    background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .85) 0 30px, transparent 30px 60px);
    animation: nmc-road 1s linear infinite;
}

/* ---------- Booking card ---------- */
.nmc-card {
    position: relative;
    padding: 32px;
    border: 2px solid transparent;
    border-radius: 24px;
    background:
        linear-gradient(#fff, #fff) padding-box,
        conic-gradient(from var(--nmc-angle), rgba(255, 26, 26, .08) 0%, var(--nmc-red) 12%, rgba(255, 106, 61, .6) 20%, rgba(255, 26, 26, .08) 32%, rgba(255, 26, 26, .08) 100%) border-box;
    box-shadow:
        0 1px 2px rgba(15, 17, 21, .04),
        0 30px 70px -18px rgba(255, 26, 26, .28),
        0 24px 50px -16px rgba(15, 17, 21, .18);
    animation: nmc-border 6s linear infinite;
}

.nmc-card-head h2 {
    margin: 0 0 6px;
    font-family: 'Epilogue', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--nmc-ink);
}
.nmc-card-head p {
    margin: 0 0 22px;
    font-size: 14px;
    color: var(--nmc-muted);
}

.nmc-alert {
    margin-bottom: 16px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #fff1f1;
    color: #b42318;
    font-size: 14px;
}

/* trip type switch with sliding pill */
.nmc-tabs {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 5px;
    margin-bottom: 22px;
    background: #f3f1ec;
    border-radius: 14px;
}
.nmc-glider {
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 5px;
    width: calc((100% - 18px) / 3);
    border-radius: 10px;
    background: linear-gradient(135deg, var(--nmc-red), var(--nmc-orange));
    box-shadow: 0 8px 18px -6px rgba(255, 26, 26, .6);
    transition: transform .45s cubic-bezier(.5, 1.5, .5, 1);
}
.nmc-tabs[data-active="1"] .nmc-glider { transform: translateX(calc(100% + 4px)); }
.nmc-tabs[data-active="2"] .nmc-glider { transform: translateX(calc(200% + 8px)); }

.nmc-tab {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 11px 8px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--nmc-muted);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: color .3s;
}
.nmc-tab:hover { color: var(--nmc-ink); }
.nmc-tab.active,
.nmc-tab.active:hover { color: #fff; }

/* fields */
.nmc-field { margin-bottom: 16px; }
.nmc-field label {
    display: block;
    margin: 0 0 7px;
    font-size: 13px;
    line-height: 20px;
    font-weight: 600;
    color: var(--nmc-ink);
}

.nmc-input {
    position: relative;
    display: flex;
    align-items: center;
}
.nmc-input input {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 46px;
    border: 1.5px solid var(--nmc-line);
    border-radius: 12px;
    background: #fbfaf8;
    color: var(--nmc-ink);
    font-family: inherit;
    font-size: 15px;
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.nmc-input input::placeholder { color: #a2a5ab; }
.nmc-input input:hover { border-color: #d6d2c8; }
.nmc-input input:focus {
    border-color: var(--nmc-red);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 26, 26, .12);
}
.nmc-input input.is-invalid { border-color: #d92d20; }

.nmc-icon {
    position: absolute;
    left: 17px;
    z-index: 1;
    color: var(--nmc-muted);
    font-size: 16px;
    pointer-events: none;
    transition: color .2s, transform .2s;
}
.nmc-input:focus-within .nmc-icon { color: var(--nmc-red); transform: scale(1.1); }

.nmc-dot-from,
.nmc-dot-to {
    width: 12px;
    height: 12px;
}
.nmc-dot-from {
    border-radius: 50%;
    border: 3px solid #16a34a;
    background: #fff;
    animation: nmc-glow 2s ease-out infinite;
}
.nmc-dot-to {
    border-radius: 3px;
    background: var(--nmc-red);
}

/* dotted route line from pickup to drop-off */
.nmc-route { position: relative; }
.nmc-route::before {
    content: "";
    position: absolute;
    z-index: 2;
    left: 22px;
    top: 60px;
    width: 2px;
    height: 81px;
    background: repeating-linear-gradient(to bottom, #b9b4aa 0 5px, transparent 5px 10px);
    animation: nmc-dash .8s linear infinite;
    pointer-events: none;
}
/* keep the line from running through the label text */
.nmc-route .nmc-field label {
    position: relative;
    z-index: 3;
    display: table;
    padding-right: 6px;
    background: #fff;
}
.nmc-route.is-single::before,
.nmc-route:has(.nmc-error)::before { display: none; }

.nmc-prefix {
    position: absolute;
    left: 16px;
    padding-right: 10px;
    border-right: 1.5px solid var(--nmc-line);
    font-size: 15px;
    font-weight: 600;
    color: var(--nmc-ink);
    pointer-events: none;
}
.nmc-prefix + input { padding-left: 66px; }

.nmc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0 14px;
}
#dropoffDateField { animation: nmc-up .4s ease both; }

.nmc-error {
    margin-top: 6px;
    font-size: 13px;
    color: #d92d20;
}

/* submit with shine sweep */
.nmc-submit {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 56px;
    margin-top: 6px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--nmc-red), var(--nmc-orange));
    background-size: 160% 100%;
    background-position: 0 0;
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 14px 26px -10px rgba(255, 26, 26, .7);
    transition: background-position .4s, transform .15s, box-shadow .25s;
}
.nmc-submit::after {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(110deg, transparent, rgba(255, 255, 255, .45), transparent);
    transform: skewX(-20deg);
    animation: nmc-shine 3.5s ease-in-out infinite;
}
.nmc-submit:hover {
    background-position: 100% 0;
    transform: translateY(-2px);
    box-shadow: 0 18px 32px -10px rgba(255, 26, 26, .75);
}
.nmc-submit:active { transform: translateY(0); }
.nmc-submit i { transition: transform .25s; }
.nmc-submit:hover i { transform: translateX(4px); }

.nmc-help {
    margin: 16px 0 0;
    text-align: center;
    font-size: 13px;
    color: var(--nmc-muted);
}
.nmc-help a {
    color: var(--nmc-ink);
    font-weight: 600;
    text-decoration: none;
}
.nmc-help a:hover { color: var(--nmc-red); }

/* ---------- Keyframes ---------- */
@keyframes nmc-up {
    from { opacity: 0; transform: translateY(26px); }
    to   { opacity: 1; transform: none; }
}
@keyframes nmc-in-right {
    from { opacity: 0; transform: translateX(50px) scale(.97); }
    to   { opacity: 1; transform: none; }
}
@keyframes nmc-word {
    0%   { opacity: 0; transform: translateY(45%); filter: blur(4px); }
    4%   { opacity: 1; transform: none; filter: blur(0); }
    21%  { opacity: 1; transform: none; filter: blur(0); }
    25%  { opacity: 0; transform: translateY(-45%); filter: blur(4px); }
    100% { opacity: 0; }
}
@keyframes nmc-drift {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(40px, 30px) scale(1.08); }
    100% { transform: translate(-30px, 50px) scale(.95); }
}
@keyframes nmc-ping {
    75%, 100% { transform: scale(2.6); opacity: 0; }
}
@keyframes nmc-glow {
    0%   { box-shadow: 0 0 0 0 rgba(22, 163, 74, .45); }
    100% { box-shadow: 0 0 0 9px rgba(22, 163, 74, 0); }
}
@keyframes nmc-bob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}
@keyframes nmc-spin {
    to { transform: rotate(360deg); }
}
@keyframes nmc-border {
    to { --nmc-angle: 360deg; }
}
@keyframes nmc-road {
    to { background-position: -60px 0; }
}
@keyframes nmc-dash {
    to { background-position: 0 10px; }
}
@keyframes nmc-shine {
    0%, 55% { left: -60%; }
    100%    { left: 130%; }
}

/* ---------- Mobile sticky booking bar ---------- */
.nmc-mbar { display: none; }

@media (max-width: 991.98px) {
    .nmc-mbar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1000;
        display: flex;
        gap: 10px;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, .96);
        backdrop-filter: blur(10px);
        box-shadow: 0 -8px 24px rgba(15, 17, 21, .1);
        transform: translateY(110%);
        transition: transform .35s cubic-bezier(.2, .7, .2, 1);
        font-family: 'Sora', sans-serif;
    }
    .nmc-mbar.is-visible { transform: none; }
    .nmc-mbar a { text-decoration: none; }
    .nmc-mbar-call {
        flex: 0 0 50px;
        display: grid;
        place-items: center;
        height: 50px;
        border-radius: 14px;
        border: 1.5px solid rgba(255, 26, 26, .3);
        color: #ff1a1a;
        font-size: 18px;
    }
    .nmc-mbar-book {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        height: 50px;
        border-radius: 14px;
        background: linear-gradient(135deg, #ff1a1a, #ff6a3d);
        color: #fff;
        font-size: 16px;
        font-weight: 600;
        box-shadow: 0 10px 20px -8px rgba(255, 26, 26, .6);
    }
    .nmc-mbar-book:hover { color: #fff; }

    /* keep the footer and back-to-top button clear of the bar */
    body.nmc-mbar-on { padding-bottom: 72px; }
    body.nmc-mbar-on .back-top { bottom: 90px !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .nmc-hero { padding: 160px 0 70px; }
    .nmc-hero-txt { text-align: center; }
    .nmc-rotator { justify-items: center; }
    .nmc-lead { margin-left: auto; margin-right: auto; }
    .nmc-points, .nmc-riders, .nmc-tags { justify-content: center; }
    .nmc-riders { text-align: left; }
    .nmc-blob-3 { display: none; }
    .nmc-form-col { margin: 6px 0 28px; }
    .nmc-card { max-width: 560px; margin: 0 auto; }

    /* 16px stops iPhones zooming in when a field is tapped */
    .nmc-input input { font-size: 16px; }
}

@media (max-width: 575.98px) {
    .nmc-hero { padding: 140px 0 50px; }
    .nmc-eyebrow { font-size: 12px; padding: 6px 14px 6px 10px; }
    .nmc-title { margin: 16px 0 12px; font-size: 2.1rem; }
    .nmc-lead { font-size: 15px; margin-bottom: 18px; }

    /* service tags: one swipeable row */
    .nmc-tags {
        flex-wrap: nowrap;
        justify-content: flex-start;
        margin: 0 -16px 18px;
        padding: 4px 16px 10px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 24px), transparent 100%);
        -webkit-mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 24px), transparent 100%);
    }
    .nmc-tags::-webkit-scrollbar { display: none; }
    .nmc-tag {
        flex: 0 0 auto;
        scroll-snap-align: start;
        padding: 8px 14px;
        font-size: 13px;
        white-space: nowrap;
    }

    .nmc-card { padding: 22px 16px; border-radius: 20px; }
    .nmc-card-head h2 { font-size: 22px; }
    .nmc-card-head p { margin-bottom: 18px; font-size: 13px; }
    .nmc-tab { font-size: 13px; padding: 11px 4px; gap: 5px; }
    .nmc-tab i { display: none; }
    .nmc-input input { height: 50px; }
    .nmc-route::before { top: 58px; height: 81px; }

    /* trust points: three tidy columns */
    .nmc-points {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        margin-bottom: 22px;
    }
    .nmc-points li {
        flex-direction: column;
        gap: 8px;
        padding: 14px 6px;
        border-radius: 14px;
        background: rgba(255, 255, 255, .75);
        font-size: 12px;
        text-align: center;
        line-height: 1.3;
    }

    .nmc-blob-1 { width: 320px; height: 320px; }
}

/* ---------- Site-wide: never scroll sideways ---------- */
/* the theme's decorative ellipse (.choose-2:after) is 510px wide */
.choose-2,
.choose-3 { overflow: hidden; }
html,
body { overflow-x: clip; }

/* Respect users who turn off motion */
@media (prefers-reduced-motion: reduce) {
    .nmc-hero *,
    .nmc-hero *::before,
    .nmc-hero *::after {
        animation: none !important;
        transition: none !important;
    }
    .nmc-rotator span { opacity: 0; }
    .nmc-rotator span:first-child { opacity: 1; }
}
