/* ============================================================
   TaskRoute — layout.css
   base + components + header + responsive
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
    --color-primary:       #7C3AED;
    --color-primary-dark:  #5B21B6;
    --color-primary-light: #A78BFA;
    --color-primary-pale:  #F5F3FF;

    --color-bg:            #F9FAFB;
    --color-bg-white:      #ffffff;
    --color-bg-tint:       #F5F3FF;
    --color-text:          #111827;
    --color-text-muted:    #4B5563;
    --color-text-light:    #6B7280;
    --color-border:        #E5E7EB;
    --color-success:       #15803d;

    --grad-hero:    linear-gradient(135deg, #4C1D95 0%, #5B21B6 35%, #6D28D9 65%, #7C3AED 100%);
    --grad-section: linear-gradient(to right, #6D28D9 0%, #7C3AED 60%, #8B5CF6 100%);

    --font-headline: 'Poppins', sans-serif;
    --font-body:     'Inter', sans-serif;

    --radius-sm:   6px;
    --radius-md:   14px;
    --radius-lg:   24px;
    --radius-xl:   32px;
    --radius-pill: 100px;

    --shadow-sm:        0 2px 8px rgba(0,0,0,.06);
    --shadow-md:        0 6px 24px rgba(0,0,0,.08);
    --shadow-lg:        0 16px 56px rgba(0,0,0,.1);
    --shadow-card:      0 2px 16px rgba(0,0,0,.06);
    --shadow-violet:    0 8px 32px rgba(109,40,217,.28);
    --shadow-violet-lg: 0 16px 48px rgba(109,40,217,.38);

    --max-width:       1160px;
    --nav-height:      70px;
    --announce-height: 40px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }
body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg-white);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

/* ---------- Layout ---------- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 32px;
}
section { padding: 96px 0; }
main { overflow-x: hidden; }

/* ---------- Section Labels & Headings ---------- */
.section-label {
    display: inline-block;
    font-family: var(--font-headline);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 14px;
}
.section-title {
    font-family: var(--font-headline);
    font-size: clamp(2rem, 3.5vw, 2.9rem);
    font-weight: 800;
    line-height: 1.18;
    color: var(--color-text);
    margin-bottom: 18px;
    letter-spacing: -.02em;
}
.section-subtitle {
    font-size: 1.08rem;
    color: var(--color-text-muted);
    max-width: 580px;
    line-height: 1.78;
}
.text-center { text-align: center; }
.text-center .section-subtitle { margin: 0 auto; }

/* ---------- Scroll Reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .6s cubic-bezier(.4,0,.2,1), transform .6s cubic-bezier(.4,0,.2,1);
}
.reveal.delay-1 { transition-delay: .12s; }
.reveal.delay-2 { transition-delay: .24s; }
.reveal.delay-3 { transition-delay: .36s; }
.reveal.visible  { opacity: 1; transform: none; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 36px;
    font-family: var(--font-headline);
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all .22s cubic-bezier(.4,0,.2,1);
    text-decoration: none;
    white-space: nowrap;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}
.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.12);
    opacity: 0;
    transition: opacity .15s;
}
.btn:hover::before { opacity: 1; }
.btn:hover  { transform: translateY(-3px); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: var(--grad-section) padding-box, var(--grad-section) border-box;
    color: #fff;
    box-shadow: var(--shadow-violet);
}
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0; left: -130%;
    width: 55%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
    transform: skewX(-15deg);
    animation: shimmer 4s infinite;
}
@keyframes shimmer { 0% { left: -130%; } 60%, 100% { left: 160%; } }
.btn-primary:hover { box-shadow: var(--shadow-violet-lg); }

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary); color: #fff; }

.btn-white {
    background: #fff;
    color: var(--color-primary);
    box-shadow: var(--shadow-md);
    font-weight: 700;
}
.btn-white:hover { box-shadow: var(--shadow-lg); }

.btn-lg { padding: 18px 48px; font-size: .88rem; }
.btn-sm { padding: 10px 24px; font-size: .75rem; }

/* ---------- Announcement Bar ---------- */
.announce-bar {
    background: linear-gradient(90deg, #4C1D95 0%, #7C3AED 50%, #4C1D95 100%);
    background-size: 200% 100%;
    animation: announce-move 6s linear infinite;
    height: var(--announce-height);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 101;
    overflow: hidden;
}
@keyframes announce-move {
    0%   { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}
.announce-bar .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}
.announce-bar p {
    font-size: .78rem;
    font-weight: 500;
    color: rgba(255,255,255,.9);
    letter-spacing: .02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.announce-bar a {
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    text-decoration: underline;
    white-space: nowrap;
    flex-shrink: 0;
}
.announce-chip {
    background: rgba(255,255,255,.2);
    border-radius: var(--radius-pill);
    padding: 2px 10px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #fff;
    flex-shrink: 0;
    font-family: var(--font-headline);
}

/* ---------- Marquee Strip ---------- */
.marquee-strip {
    background: var(--color-primary-pale);
    padding: 14px 0;
    overflow: hidden;
    position: relative;
    border-top: 1px solid rgba(109,40,217,.1);
    border-bottom: 1px solid rgba(109,40,217,.1);
}
.marquee-strip::before,
.marquee-strip::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 80px;
    z-index: 2;
}
.marquee-strip::before { left: 0;  background: linear-gradient(90deg,  var(--color-primary-pale), transparent); }
.marquee-strip::after  { right: 0; background: linear-gradient(270deg, var(--color-primary-pale), transparent); }

.marquee-track {
    display: flex;
    align-items: center;
    white-space: nowrap;
    animation: marquee-run 34s linear infinite;
    width: max-content;
}
.marquee-track:hover { animation-play-state: paused; }
@keyframes marquee-run { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.marquee-item {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 0 28px;
    font-family: var(--font-headline);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--color-primary);
}
.marquee-sep {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--color-primary-light);
    flex-shrink: 0;
}

/* ---------- Header / Navigation ---------- */
.site-header {
    position: sticky;
    top: var(--announce-height);
    z-index: 100;
    border-bottom: 1px solid rgba(0,0,0,.06);
    height: var(--nav-height);
}
.site-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(20px);
    z-index: -1;
    pointer-events: none;
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 36px;
    height: var(--nav-height);
}
.logo-link { flex-shrink: 0; line-height: 0; }
.logo-img   { height: 34px; width: auto; }

.main-nav { flex: 1; }
.nav-list  { display: flex; gap: 4px; align-items: center; }
.nav-list a {
    padding: 8px 16px;
    font-size: .85rem;
    font-weight: 600;
    font-family: var(--font-headline);
    color: var(--color-text-muted);
    border-radius: var(--radius-pill);
    transition: background .15s, color .15s;
    letter-spacing: .01em;
}
.nav-list a:hover { background: var(--color-bg); color: var(--color-text); text-decoration: none; }
.nav-cta { flex-shrink: 0; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
}
.nav-toggle span {
    display: block;
    width: 22px; height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform .22s cubic-bezier(.4,0,.2,1), opacity .22s;
}
.nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Inner Pages ---------- */
.page-hero {
    background: var(--grad-hero);
    padding: 64px 0;
    position: relative; overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute; top: -80px; right: -40px;
    width: 300px; height: 300px;
    border: 48px solid rgba(255,255,255,.07);
    border-radius: 50%;
    pointer-events: none;
}
.page-hero h1 {
    font-family: var(--font-headline);
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: -.02em;
    position: relative;
}
.page-hero p { color: rgba(255,255,255,.6); margin-top: 10px; font-size: .93rem; position: relative; }
.page-content { padding: 72px 0 104px; }
.prose { max-width: 760px; }
.prose h2 {
    font-family: var(--font-headline);
    font-size: 1.4rem; font-weight: 700;
    color: var(--color-text);
    margin: 48px 0 14px;
    letter-spacing: -.02em;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-family: var(--font-headline); font-size: 1.05rem; font-weight: 700; color: var(--color-text); margin: 28px 0 10px; }
.prose p  { margin-bottom: 16px; line-height: 1.78; color: var(--color-text-muted); }
.prose address { font-style: normal; line-height: 1.8; color: var(--color-text-muted); }
.prose ul { margin: 12px 0 16px 20px; list-style: disc; color: var(--color-text-muted); }
.prose ul li { margin-bottom: 7px; }
.prose a { color: var(--color-primary); text-decoration: underline; }
.prose .placeholder-note {
    display: block;
    background: #fff8e6; border: 1px dashed #f0b429;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: .82rem; color: #7a5000;
    margin: 6px 0 14px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
    .origin-inner  { grid-template-columns: 1fr; gap: 48px; }
    .steps-grid    { grid-template-columns: 1fr; }
    .trust-grid    { grid-template-columns: repeat(2, 1fr); }
    .pricing-grid  { grid-template-columns: 1fr; }
    .footer-inner  { grid-template-columns: 1fr; gap: 40px; }
    .footer-links  { grid-template-columns: repeat(2, 1fr); }
    .stats-grid    { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 700px) {
    :root { --announce-height: 36px; }
    section { padding: 72px 0; }
    .container { padding: 0 20px; }
    .section-stats { padding: 56px 20px; }
    .pricing-card-body { overflow-x: auto; }
    .pricing-table { min-width: 100%; }
    .pricing-table td { font-size: .82rem; }
    .pricing-price .amount { font-size: 2.4rem; }
    .pricing-price .unit { font-size: .78rem; }

    .nav-toggle { display: flex; }
    .nav-cta    { display: none; }

    .main-nav {
        position: fixed;
        top: calc(var(--announce-height) + var(--nav-height));
        left: 0; right: 0; bottom: 0;
        background: var(--color-bg-white);
        padding: 32px 24px;
        transform: translateX(100%);
        visibility: hidden;
        transition: transform .28s cubic-bezier(.4,0,.2,1), visibility 0s linear .28s;
        z-index: 99;
        border-top: 1px solid var(--color-border);
        overflow-y: auto;
    }
    .main-nav.nav-open {
        transform: translateX(0);
        visibility: visible;
        transition: transform .28s cubic-bezier(.4,0,.2,1), visibility 0s linear 0s;
    }
    .nav-list { flex-direction: column; align-items: flex-start; gap: 4px; }
    .nav-list li { width: 100%; }
    .nav-list a  { display: block; padding: 15px 16px; font-size: 1.1rem; border-radius: var(--radius-md); }
    .nav-mobile-cta { display: block; margin-top: 24px; width: 100%; text-align: center; }

    .announce-bar p { font-size: .7rem; }
    .announce-chip  { display: none; }

    .hero { padding: 56px 0 110px; }
    .hero-title { font-size: 2.2rem; }
    .hero-subtitle { font-size: .97rem; }
    .hero-ctas { flex-direction: column; align-items: center; }
    .hero-ctas .btn { width: 100%; justify-content: center; }

    .marquee-item { padding: 0 18px; font-size: .72rem; }

    .stats-grid { grid-template-columns: 1fr; }
    .stat-item  { border-right: none; border-bottom: 1px solid var(--color-border); }
    .stat-item:last-child { border-bottom: none; }
    .section-stats { padding: 56px 0; }

    .features-grid { grid-template-columns: 1fr 1fr; }
    .trust-grid    { grid-template-columns: 1fr; }
    .footer-links  { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 1.9rem; }
    .features-grid { grid-template-columns: 1fr; }
    .hero-trust-chips { gap: 14px; }
    .stats-grid { grid-template-columns: 1fr; }
}
