/* ==========================================================================
   Home page (front-page.php)
   Brand colors come from CSS variables set on <main class="tsh">:
   --ts-main, --ts-secondary, --ts-text (on main color), --ts-ink (on white),
   --ts-accent (decorations on white), --ts-on-secondary (text on the button)
   ========================================================================== */

.tsh {
    --ts-radius: 20px;
    --ts-shadow: 0 18px 50px -24px rgba(15, 23, 42, .35);
    --ts-soft: color-mix(in srgb, var(--ts-accent) 12%, #fff);
    color: var(--ts-ink);
    overflow-x: clip;
}

/* ---------- Hero ---------- */

.tsh .tsh-hero {
    position: relative;
    background: var(--ts-main);
    color: var(--ts-text);
    padding: 40px 48px 72px;
    border-bottom-left-radius: 100px;
    border-bottom-right-radius: 100px;
    isolation: isolate;
}

.tsh .tsh-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 255, 255, .35) 0 2px, transparent 3px) 0 0 / 38px 38px;
    opacity: .5;
    z-index: -1;
    mask-image: linear-gradient(to bottom, #000, transparent 85%);
    -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%);
}

.tsh-hero__grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    margin: 0 auto;
    text-align: center;
}

.tsh-hero__content {
    width: 100%;
}

.tsh-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .6);
    color: #1E1E1E;
    font-size: 13px;
    font-weight: 500;
    backdrop-filter: blur(6px);
}

.tsh-badge__dot {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22A06B;
}

.tsh-badge__dot::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid #22A06B;
    animation: tsh-ping 1.8s ease-out infinite;
}

.tsh .tsh-hello {
    margin: 22px 0 4px;
    font-size: 20px;
    font-weight: 500;
    color: var(--ts-text);
}

.tsh .tsh-title {
    margin: 0 0 28px;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.6rem, 1.1rem + 1.7vw, 2.6rem);
    line-height: 1.18;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ts-text);
    max-width: 24em;
    margin-left: auto;
    margin-right: auto;
}

/* Form */

.tsh .tsh-form {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px;
    background: #fff;
    border-radius: 18px;
    box-shadow: var(--ts-shadow);
    transition: box-shadow .25s ease, transform .25s ease;
}

.tsh .tsh-form:focus-within {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--ts-accent) 35%, transparent), var(--ts-shadow);
    transform: translateY(-2px);
}

.tsh-form__field {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 12px;
    color: #6B6B6B;
}

.tsh-form__icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.tsh .tsh-form #tracking-number {
    flex: 1;
    width: 100%;
    min-width: 0;
    height: 52px;
    padding: 0;
    margin: 0;
    border: 0 !important;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    outline: none;
    font-family: inherit;
    font-size: 16px;
    color: #1E1E1E;
    letter-spacing: .02em;
}

.tsh .tsh-form #tracking-number::placeholder {
    color: #8A8A8A;
    letter-spacing: 0;
}

.tsh .tsh-form #track-number {
    position: relative;
    overflow: hidden;
    flex: 0 0 auto;
    width: auto;
    height: 52px;
    padding: 0 24px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 12px;
    background: var(--ts-secondary);
    color: var(--ts-on-secondary);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.tsh .tsh-form #track-number svg {
    width: 18px;
    height: 18px;
    transition: transform .25s ease;
}

.tsh .tsh-form #track-number:hover svg,
.tsh .tsh-form #track-number:focus-visible svg {
    transform: translateX(4px);
}

.tsh .tsh-form #track-number::after {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent);
    transform: skewX(-20deg);
    animation: tsh-shine 4.5s ease-in-out 1.5s infinite;
}

.tsh .tsh-hint {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    margin: 16px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--ts-text);
    opacity: .85;
}

.tsh .tsh-hint svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ---------- Illustration ---------- */

.tsh-hero__visual {
    position: relative;
    width: 100%;
    max-width: 580px;
    margin: 0 auto;
}

.tsh-scene {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.tsh-blob {
    fill: #fff;
    opacity: .38;
    transform-origin: 50% 50%;
    transform-box: fill-box;
    animation: tsh-breathe 9s ease-in-out infinite;
}

.tsh-cloud {
    fill: #fff;
    opacity: .9;
}

.tsh-cloud--1 {
    transform: translate(20px, 0);
    animation: tsh-cloud-1 14s ease-in-out infinite;
}

.tsh-cloud--2 {
    transform: translate(-12px, 196px) scale(.6);
    opacity: .75;
    animation: tsh-cloud-2 18s ease-in-out infinite;
}

.tsh-card {
    filter: drop-shadow(0 18px 30px rgba(15, 23, 42, .16));
}

.tsh-map-park rect {
    fill: var(--ts-accent);
    opacity: .09;
}

.tsh-map-road path {
    stroke: var(--ts-ink);
    stroke-opacity: .06;
    stroke-width: 14;
    stroke-linecap: round;
}

.tsh-route {
    stroke: var(--ts-ink);
    stroke-opacity: .28;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 1 12;
}

.tsh-route-progress {
    stroke: var(--ts-accent);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
}

.tsh-fill-accent {
    fill: var(--ts-accent);
}

.tsh-fill-ink {
    fill: var(--ts-ink);
}

.tsh-ripple {
    opacity: .35;
    transform-box: fill-box;
    transform-origin: center;
    animation: tsh-ripple 2.4s ease-out infinite;
}

.tsh-ripple--2 {
    animation-delay: 1.2s;
}

.tsh-parcel__box {
    animation: tsh-bob 1.2s ease-in-out infinite;
}

.tsh-road rect {
    fill: var(--ts-text);
    opacity: .12;
}

.tsh-road__line {
    stroke: #fff;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-dasharray: 14 14;
    opacity: .8;
    animation: tsh-road 1s linear infinite;
}

.tsh-van {
    animation: tsh-drive 11s linear infinite;
}

.tsh-van__body {
    animation: tsh-bob 0.5s ease-in-out infinite;
}

.tsh-van__speed path {
    stroke: var(--ts-text);
    stroke-opacity: .45;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 10 8;
    animation: tsh-road .6s linear infinite;
}

.tsh-wheel > * {
    transform-box: fill-box;
    transform-origin: center;
}

.tsh-wheel path {
    animation: tsh-spin .5s linear infinite;
}

.tsh-sparkles circle {
    fill: #fff;
    transform-box: fill-box;
    transform-origin: center;
    animation: tsh-twinkle 3s ease-in-out infinite;
}

.tsh-sparkles circle:nth-child(2) { animation-delay: .8s; }
.tsh-sparkles circle:nth-child(3) { animation-delay: 1.6s; }
.tsh-sparkles circle:nth-child(4) { animation-delay: 2.2s; }

/* Status chips over the illustration */

.tsh-chip {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px 7px 7px;
    border-radius: 999px;
    background: #fff;
    color: #1E1E1E;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 12px 30px -12px rgba(15, 23, 42, .35);
    animation: tsh-pop .6s cubic-bezier(.2, .9, .3, 1.3) both, tsh-float 5s ease-in-out infinite;
}

.tsh-chip__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--ts-soft);
    color: var(--ts-accent);
}

.tsh-chip__icon svg {
    width: 16px;
    height: 16px;
}

.tsh-chip__icon--done {
    background: #22A06B;
    color: #fff;
}

.tsh-chip--1 {
    left: -4%;
    top: 72%;
    animation-delay: .5s, .5s;
}

.tsh-chip--2 {
    right: -3%;
    top: 44%;
    animation-delay: .8s, 1.6s;
}

.tsh-chip--3 {
    right: 4%;
    top: 0;
    animation-delay: 1.1s, 2.6s;
}

/* ---------- Sections ---------- */

.tsh-section {
    max-width: 1180px;
    padding: 72px 24px 0;
}

.tsh-section__head {
    text-align: center;
    margin-bottom: 36px;
}

.tsh .tsh-section__title {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.35rem, 1.1rem + .9vw, 1.9rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ts-ink);
}

/* How it works */

.tsh-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.tsh-step {
    position: relative;
    padding: 28px 24px 26px;
    border-radius: var(--ts-radius);
    background: #fff;
    border: 1px solid color-mix(in srgb, var(--ts-ink) 9%, transparent);
    transition: transform .3s ease, box-shadow .3s ease;
}

.tsh-step:hover {
    transform: translateY(-4px);
    box-shadow: var(--ts-shadow);
}

.tsh-step__num {
    position: absolute;
    top: 18px;
    right: 22px;
    font-size: 44px;
    font-weight: 700;
    line-height: 1;
    color: var(--ts-accent);
    opacity: .14;
}

.tsh-step__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 18px;
    border-radius: 16px;
    background: var(--ts-soft);
    color: var(--ts-accent);
}

.tsh-step__icon svg {
    width: 26px;
    height: 26px;
}

.tsh .tsh-step h3 {
    margin: 0 0 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: var(--ts-ink);
}

.tsh .tsh-step p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: color-mix(in srgb, var(--ts-ink) 72%, #fff);
}

/* ---------- Entrance / reveal animations ---------- */

.tsh-anim-up {
    animation: tsh-up .8s cubic-bezier(.2, .8, .2, 1) both;
    animation-delay: var(--d, 0s);
}

.tsh-js .tsh-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1);
    transition-delay: var(--d, 0s);
}

.tsh-js .tsh-reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* ---------- Keyframes ---------- */

@keyframes tsh-up {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: none; }
}

@keyframes tsh-ping {
    0% { transform: scale(.6); opacity: .9; }
    100% { transform: scale(1.8); opacity: 0; }
}

@keyframes tsh-shine {
    0%, 70% { left: -60%; }
    100% { left: 130%; }
}

@keyframes tsh-breathe {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.04) rotate(3deg); }
}

@keyframes tsh-cloud-1 {
    0%, 100% { transform: translate(20px, 0); }
    50% { transform: translate(60px, 6px); }
}

@keyframes tsh-cloud-2 {
    0%, 100% { transform: translate(-12px, 196px) scale(.6); }
    50% { transform: translate(-34px, 190px) scale(.6); }
}

@keyframes tsh-ripple {
    0% { transform: scale(1); opacity: .45; }
    100% { transform: scale(3.2); opacity: 0; }
}

@keyframes tsh-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2.5px); }
}

@keyframes tsh-road {
    to { stroke-dashoffset: -28; }
}

@keyframes tsh-drive {
    0% { transform: translateX(-150px); }
    100% { transform: translateX(640px); }
}

@keyframes tsh-spin {
    to { transform: rotate(360deg); }
}

@keyframes tsh-twinkle {
    0%, 100% { opacity: .25; transform: scale(.7); }
    50% { opacity: 1; transform: scale(1.2); }
}

@keyframes tsh-pop {
    from { opacity: 0; transform: scale(.6) translateY(10px); }
    to { opacity: 1; transform: none; }
}

@keyframes tsh-float {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -8px; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1023px) {
    .tsh .tsh-hero {
        padding: 32px 28px 64px;
        border-bottom-left-radius: 64px;
        border-bottom-right-radius: 64px;
    }

    .tsh-hero__grid {
        gap: 32px;
    }

    .tsh-hero__visual {
        max-width: 480px;
    }
}

@media (max-width: 767px) {
    .tsh-steps {
        grid-template-columns: 1fr;
    }

    .tsh-section {
        padding: 56px 16px 0;
    }
}

@media (max-width: 639px) {
    .tsh .tsh-hero {
        padding: 24px 16px 48px;
        border-bottom-left-radius: 40px;
        border-bottom-right-radius: 40px;
    }

    .tsh .tsh-form {
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
    }

    .tsh-form__field {
        padding: 0 8px;
    }

    .tsh .tsh-form #track-number {
        width: 100%;
        justify-content: center;
    }

    .tsh-chip {
        font-size: 11px;
        padding: 5px 10px 5px 5px;
    }

    .tsh-chip__icon {
        width: 22px;
        height: 22px;
    }

    .tsh-chip--1 {
        left: 0;
    }

    .tsh-chip--2 {
        right: 0;
    }
}

@media (min-width: 1278px) {
    .tsh-section {
        padding-left: 0;
        padding-right: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tsh *,
    .tsh *::before,
    .tsh *::after {
        animation: none !important;
        transition: none !important;
    }

    .tsh-js .tsh-reveal {
        opacity: 1;
        transform: none;
    }
}

.tsh-paused *,
.tsh-paused *::before,
.tsh-paused *::after {
    animation-play-state: paused !important;
}
