/* ==========================================================================
   Hawk Lane — Animated home
   Extends style.css tokens
   ========================================================================== */

@import url('ha-workflow.css');

:root {
    --ha-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ha-dur-fast: 200ms;
    --ha-dur-ui: 350ms;
    --ha-dur-reveal: 550ms;
    --ha-hero-loop: 14s;
}

body.ha-page {
    padding-bottom: 0;
}

body.ha-page.has-sticky-bar {
    padding-bottom: 4.25rem;
}

#top,
#how-it-works,
#features {
    scroll-margin-top: 5.5rem;
}

body.ha-page .fab-demo {
    display: none;
}

/* Header */
.ha-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(10, 10, 10, 0.94);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
}

.ha-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    min-height: 68px;
}

.ha-nav__logo img {
    height: 40px;
    width: auto;
}

.ha-nav__links {
    display: none;
    gap: 1.25rem;
    align-items: center;
}

.ha-nav__links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
}

.ha-nav__links a:hover {
    color: var(--color-gold);
}

.ha-nav__actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.ha-nav__actions .btn {
    padding: 0.6rem 1.15rem;
    font-size: 0.875rem;
    min-height: 44px;
}

.ha-nav__actions .btn--ghost {
    color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.25);
}

.ha-nav__actions .btn--ghost:hover {
    border-color: var(--color-gold);
    color: var(--color-gold);
}

@media (min-width: 900px) {
    .ha-nav__links { display: flex; }
}

/* Hero */
.ha-hero {
    padding: 7.5rem 0 4.5rem;
    background:
        radial-gradient(ellipse 70% 50% at 20% 0%, rgba(245, 183, 0, 0.14), transparent 55%),
        linear-gradient(180deg, #0a0a0a 0%, #111 45%, #1a1a1a 100%);
    color: rgba(255, 255, 255, 0.88);
}

.ha-hero .btn--ghost {
    color: rgba(255, 255, 255, 0.92);
    border-color: rgba(255, 255, 255, 0.28);
}

.ha-hero .btn--ghost:hover {
    border-color: var(--color-gold);
    color: var(--color-gold);
}

.ha-hero__grid {
    display: grid;
    gap: 2.5rem;
    align-items: center;
}

@media (min-width: 960px) {
    .ha-hero__grid {
        grid-template-columns: 1fr 1.05fr;
        gap: 2rem;
    }
}

.ha-hero__eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: 1rem;
}

.ha-hero h1 {
    color: var(--color-white);
    font-size: clamp(1.85rem, 4.5vw, 3rem);
    margin-bottom: 1rem;
}

.ha-hero__lead {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.72);
    margin-bottom: 1.5rem;
    max-width: 34rem;
}

.ha-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.ha-hero__actions .btn {
    min-height: 48px;
}

.ha-hero__trust {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Business type selector */
.ha-audience {
    padding: 3.5rem 0;
    background: var(--color-bg-alt);
}

.ha-audience__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
    margin: 1.5rem 0 1rem;
}

.ha-pill {
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-full);
    border: 2px solid var(--color-border);
    background: var(--color-white);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text);
    min-height: 44px;
    transition: border-color var(--ha-dur-fast), background var(--ha-dur-fast), color var(--ha-dur-fast);
}

.ha-pill:hover {
    border-color: var(--color-gold);
}

.ha-pill.is-selected {
    border-color: var(--color-gold);
    background: var(--color-gold-soft);
    color: var(--color-gold-deep);
}

.ha-audience__copy {
    text-align: center;
    max-width: 36rem;
    margin: 0 auto;
    color: var(--color-muted);
    font-size: 1rem;
    min-height: 3rem;
    transition: opacity var(--ha-dur-ui);
}

/* Scroll story */
.ha-story {
    padding: 4rem 0;
}

.ha-story__grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 900px) {
    .ha-story__grid {
        grid-template-columns: 280px 1fr;
        gap: 3rem;
        align-items: start;
    }
}

.ha-story__nav {
    position: sticky;
    top: 5.5rem;
}

.ha-story__step {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.85rem 0 0.85rem 1rem;
    border-left: 3px solid var(--color-border);
    margin-bottom: 0.25rem;
    color: var(--color-muted);
    font-size: 0.9rem;
    transition: border-color var(--ha-dur-ui), color var(--ha-dur-ui);
}

.ha-story__step strong {
    display: block;
    color: var(--color-black);
    font-family: var(--font-display);
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
}

.ha-story__step.is-active {
    border-left-color: var(--color-gold);
    color: var(--color-text);
}

.ha-story__panel {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.ha-story__panel img {
    width: 100%;
    height: auto;
    display: block;
}

.ha-story__caption {
    padding: 1.25rem 1.5rem;
}

.ha-story__caption h3 {
    font-size: 1.15rem;
    margin-bottom: 0.35rem;
}

.ha-story__caption p {
    color: var(--color-muted);
    font-size: 0.95rem;
    margin: 0;
}

.ha-story__screen {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-gold-deep);
    margin-bottom: 0.35rem !important;
}

.ha-story__sections .ha-story-block {
    min-height: 1px;
    padding: 0.5rem 0;
}

/* Feature explorer */
.ha-features {
    padding: 4rem 0;
    background: var(--color-bg-alt);
}

.ha-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.4rem;
    justify-content: safe center;
    margin-bottom: 1.75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 0.25rem;
}

.ha-tab {
    flex: 0 0 auto;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--color-border);
    background: var(--color-white);
    color: var(--color-muted);
    min-height: 40px;
    white-space: nowrap;
    transition: background var(--ha-dur-fast), color var(--ha-dur-fast), border-color var(--ha-dur-fast);
}

.ha-tab.is-active {
    background: var(--gradient-brand);
    color: var(--color-black);
    border-color: transparent;
}

.ha-feature-panel {
    display: grid;
    gap: 1.5rem;
    align-items: center;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    box-shadow: var(--shadow-md);
}

@media (min-width: 768px) {
    .ha-feature-panel {
        grid-template-columns: 1fr 1.1fr;
        padding: 1.5rem;
    }
}

.ha-feature-panel__img {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.ha-feature-panel__img [hidden] {
    display: none !important;
}

.ha-feature-panel__img img {
    width: 100%;
    height: auto;
    opacity: 1;
    transition: opacity var(--ha-dur-ui);
}

.ha-feature-panel__img.is-fading img,
.ha-feature-panel__img.is-fading .ha-feature-gallery {
    opacity: 0;
}

.ha-feature-panel__img--gallery {
    background: linear-gradient(180deg, #f0f0f0 0%, #e8e8e8 100%);
    padding: 1rem;
    border: none;
}

.ha-feature-gallery {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    align-items: flex-end;
    flex-wrap: wrap;
    transition: opacity var(--ha-dur-ui);
}

.ha-feature-phone {
    margin: 0;
    flex: 0 1 120px;
    max-width: 140px;
    border-radius: 18px;
    overflow: hidden;
    border: 3px solid #1a1a1a;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    background: #111;
}

.ha-feature-phone img {
    width: 100%;
    height: auto;
    display: block;
    vertical-align: top;
}

@media (min-width: 768px) {
    .ha-feature-phone {
        flex: 0 1 150px;
        max-width: 170px;
    }
}

.ha-feature-panel ul {
    list-style: none;
    margin-top: 0.75rem;
}

.ha-feature-panel li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.45rem;
    font-size: 0.95rem;
    color: var(--color-muted);
}

.ha-feature-panel li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-gold);
}

/* Map demo */
.ha-map-section {
    padding: 4rem 0;
    background: var(--color-bg-alt);
}

.ha-map-wrap {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 900px) {
    .ha-map-wrap {
        grid-template-columns: 1fr 320px;
        align-items: stretch;
    }
}

.ha-map {
    background: #0f1419;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.75rem;
    min-height: 300px;
    position: relative;
}

.ha-map__leaflet {
    height: 380px;
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    z-index: 0;
    background: #1a2332;
}

@media (max-width: 599px) {
    .ha-map__leaflet {
        height: 300px;
    }
}

.ha-map__leaflet .leaflet-control-zoom a {
    color: #0f1419;
}

.ha-map__leaflet .leaflet-control-attribution {
    font-size: 10px;
    background: rgba(15, 20, 25, 0.85);
    color: rgba(255, 255, 255, 0.55);
}

.ha-map__leaflet .leaflet-control-attribution a {
    color: rgba(245, 183, 0, 0.9);
}

.ha-map-marker {
    background: transparent;
    border: none;
}

.ha-map-marker span {
    display: block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-gold);
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
    transition: transform 0.2s ease, background 0.2s ease;
}

.ha-map-marker--active span {
    width: 16px;
    height: 16px;
    margin: -1px;
    background: #fff;
    border-color: var(--color-gold);
}

.ha-map-truck {
    background: transparent;
    border: none;
}

.ha-map-truck span {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-gold);
    border: 2px solid #fff;
    box-shadow: 0 0 0 4px rgba(245, 183, 0, 0.35);
}

.ha-map-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.ha-map-load {
    text-align: left;
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-white);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    min-height: 44px;
}

.ha-map-load:hover,
.ha-map-load.is-active {
    border-color: rgba(245, 183, 0, 0.55);
    box-shadow: var(--shadow-glow);
}

.ha-map-load__id {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.ha-map-load__status {
    display: inline-block;
    margin-bottom: 0.35rem;
    font-size: 0.65rem;
}

.ha-map-load__lane {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text);
    margin-bottom: 0.2rem;
}

.ha-map-load__meta {
    display: block;
    font-size: 0.75rem;
    color: var(--color-muted);
}

.ha-map-list .ha-map-card__label {
    margin-top: 0.35rem;
    margin-bottom: 0;
    text-align: center;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-muted);
}

.ha-map__count {
    text-align: center;
    margin-top: 0.65rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.55);
}

.ha-map__count strong {
    color: var(--color-gold);
}

/* Click to enlarge — story & feature screenshots */
.ha-story__panel img.is-zoomable,
.ha-feature-panel__img img.is-zoomable,
.ha-feature-phone img.is-zoomable {
    cursor: zoom-in;
}

.ha-story__panel img.is-zoomable:hover,
.ha-feature-panel__img img.is-zoomable:hover,
.ha-feature-phone img.is-zoomable:hover {
    opacity: 0.92;
}

/* Before / after */
.ha-compare {
    padding: 4rem 0;
    background: var(--color-bg-alt);
}

.ha-compare__grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .ha-compare__grid {
        grid-template-columns: 1fr 1fr;
    }
}

.ha-compare__col {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.ha-compare__col--after {
    border-color: rgba(245, 183, 0, 0.45);
    box-shadow: var(--shadow-glow);
}

.ha-compare__col h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.ha-compare__col li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.55rem;
    font-size: 0.95rem;
    color: var(--color-muted);
}

.ha-compare__col--before li::before {
    content: "✕";
    position: absolute;
    left: 0;
    color: #dc2626;
    font-weight: 700;
}

.ha-compare__col--after li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #16a34a;
    font-weight: 700;
}

/* Trust + CTA */
.ha-trust {
    padding: 3rem 0;
    text-align: center;
}

.ha-trust__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 2rem;
    margin-top: 1.5rem;
}

.ha-trust__item {
    font-size: 0.9rem;
    color: var(--color-muted);
    font-weight: 500;
}

.ha-final-cta {
    padding: 4rem 0;
    text-align: center;
    background: var(--gradient-dark);
    color: rgba(255, 255, 255, 0.85);
}

.ha-final-cta h2 {
    color: var(--color-white);
    margin-bottom: 0.75rem;
}

.ha-final-cta p {
    color: rgba(255, 255, 255, 0.65);
    max-width: 32rem;
    margin: 0 auto 1.5rem;
}

/* Reveal — content always visible; animate in when scrolled into view */
.ha-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity var(--ha-dur-reveal) var(--ha-ease), transform var(--ha-dur-reveal) var(--ha-ease);
}

.ha-js .ha-reveal:not(.is-visible) {
    opacity: 1;
    transform: translateY(12px);
}

.ha-js .ha-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .ha-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Sticky bar */
.ha-sticky {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 150;
    padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

body.ha-page.has-sticky-bar .ha-sticky.is-shown {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.ha-sticky .btn {
    flex: 1;
    max-width: 200px;
    justify-content: center;
    min-height: 44px;
    font-size: 0.85rem;
}

/* Assistant — bottom-left so back-to-top keeps the bottom-right */
.ha-assistant-fab {
    position: fixed;
    bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
    left: 1rem;
    right: auto;
    z-index: 95;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-white);
    color: var(--color-black);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    display: none;
    align-items: center;
    justify-content: center;
}

body.ha-page.has-sticky-bar .ha-assistant-fab.is-shown {
    display: flex;
    bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
}

body.ha-page.has-sticky-bar .to-top.is-visible {
    bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
    z-index: 100;
}

/* Homepage: keep back-to-top on the right (style.css moves it left on mobile) */
body.ha-page .to-top {
    left: auto;
    right: 1rem;
}

@media (max-width: 720px) {
    body.ha-page .to-top {
        bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
    }
}

.ha-assistant-fab:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
}

.ha-assistant {
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 1rem;
}

.ha-assistant.is-open {
    display: flex;
}

@media (min-width: 480px) {
    .ha-assistant {
        align-items: center;
    }
}

.ha-assistant__panel {
    background: var(--color-white);
    border-radius: var(--radius-xl);
    max-width: 400px;
    width: 100%;
    max-height: 85vh;
    overflow: auto;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
}

.ha-assistant__panel h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.ha-assistant__step p {
    color: var(--color-muted);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.ha-assistant__choices {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ha-assistant__choices button {
    text-align: left;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    font-size: 0.9rem;
    min-height: 44px;
}

.ha-assistant__choices button:hover {
    border-color: var(--color-gold);
}

.ha-assistant__close {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--color-muted);
    text-decoration: underline;
}

.ha-assistant__dismiss {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--color-muted);
    cursor: pointer;
    user-select: none;
}

.ha-assistant__dismiss input {
    width: 1rem;
    height: 1rem;
    margin: 0;
    cursor: pointer;
    accent-color: var(--color-gold);
}

.ha-review-banner {
    background: var(--color-gold);
    color: var(--color-black);
    text-align: center;
    padding: 0.45rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.ha-review-banner a {
    color: var(--color-black);
    text-decoration: underline;
}
