/* =========================
   PUBLIC HOME - DESIGN TOKENS
   Mirrors the tokens in wwwroot/css/site.css / _AuthLayout.cshtml
========================= */

:root {
    --pub-navy-dark: #0f2942;
    --pub-navy-mid:  #1a4a7a;
    --pub-blue:      #1a6ac8;
    --pub-blue-dark: #1a5fb4;
    --pub-text:      #0f172a;
    --pub-text-muted:#64748b;
    --pub-border:    #e2e8f0;
    --pub-surface:   #ffffff;
    --pub-bg:        #f1f5f9;
}

section {
    padding: 4.5rem 0;
}

h2 {
    font-weight: 700;
    letter-spacing: -0.3px;
    color: var(--pub-text);
}

.section-subhead {
    color: var(--pub-text-muted);
    font-size: 1.05rem;
    max-width: 640px;
    margin: 0.5rem auto 0;
}

.btn-primary-gradient {
    background: linear-gradient(135deg, var(--pub-blue-dark) 0%, var(--pub-blue) 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0.65rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(26, 106, 200, 0.3);
    transition: opacity .15s, transform .1s, box-shadow .15s;
}

.btn-primary-gradient:hover {
    opacity: .93;
    box-shadow: 0 4px 14px rgba(26, 106, 200, 0.4);
    transform: translateY(-1px);
    color: #fff;
}

/* =========================
   HEADER / NAV
========================= */

.public-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--pub-border);
}

.public-navbar {
    padding: 0.75rem 0;
}

.public-navbar .nav-link {
    color: var(--pub-text);
    font-weight: 500;
}

.public-navbar .nav-link:hover {
    color: var(--pub-blue);
}

/* =========================
   HERO
========================= */

.hero-section {
    background: linear-gradient(160deg, var(--pub-navy-dark) 0%, var(--pub-navy-mid) 60%, #1e6aad 100%);
    color: #fff;
    padding: 5rem 0;
}

.hero-headline {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 1rem;
}

.hero-subhead {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.82);
    max-width: 560px;
}

.hero-highlights {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.hero-highlights li {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
}

.hero-highlights i {
    color: #5bbfff;
    margin-right: 0.5rem;
}

.hero-visual {
    position: relative;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-visual-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: .35;
    pointer-events: none;
}

.hero-visual-glow-1 { width: 260px; height: 260px; background: #5bbfff; top: -20px; left: 10%; }
.hero-visual-glow-2 { width: 220px; height: 220px; background: #7c3aed; bottom: -30px; right: 8%; }

.hero-route-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    aspect-ratio: 400 / 220;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 1.25rem;
    backdrop-filter: blur(6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.hero-route-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-route-path {
    fill: none;
    stroke: #5bbfff;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 10 10;
    opacity: .8;
}

@media (prefers-reduced-motion: no-preference) {
    .hero-route-path { animation: heroRouteFlow 2.4s linear infinite; }
}

@keyframes heroRouteFlow {
    to { stroke-dashoffset: -40; }
}

.hero-route-pin {
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #5bbfff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

.hero-route-pin-start { left: 4%; top: 76%; }
.hero-route-pin-end   { right: 4%; top: 20%; }

@media (prefers-reduced-motion: no-preference) {
    .hero-route-pin { animation: heroPinPulse 2.4s ease-out infinite; }
}

@keyframes heroPinPulse {
    0%   { box-shadow: 0 0 0 0 rgba(91, 191, 255, 0.55); }
    70%  { box-shadow: 0 0 0 10px rgba(91, 191, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(91, 191, 255, 0); }
}

.hero-route-truck {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pub-blue), #7c3aed);
    color: #fff;
    font-size: 1.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    transform: translate(-50%, -50%);
}

@media (prefers-reduced-motion: no-preference) {
    .hero-route-truck { animation: heroTruckFloat 3s ease-in-out infinite; }
}

@keyframes heroTruckFloat {
    0%, 100% { transform: translate(-50%, -50%) translateY(0); }
    50%      { transform: translate(-50%, -50%) translateY(-8px); }
}

.hero-chip {
    position: absolute;
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem .75rem;
    font-size: .78rem;
    font-weight: 600;
    color: #fff;
    background: rgba(15, 41, 66, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    backdrop-filter: blur(4px);
    white-space: nowrap;
}

.hero-chip i { color: #5bbfff; }

.hero-chip-1 { top: 10%; left: 6%; }
.hero-chip-2 { bottom: 14%; right: 8%; }
.hero-chip-3 { bottom: 8%; left: 30%; }

@media (prefers-reduced-motion: no-preference) {
    .hero-chip-1 { animation: heroChipFloat 4s ease-in-out infinite; }
    .hero-chip-2 { animation: heroChipFloat 4s ease-in-out infinite 1.3s; }
    .hero-chip-3 { animation: heroChipFloat 4s ease-in-out infinite 2.6s; }
}

@keyframes heroChipFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-6px); }
}

.btn-outline-light {
    border-width: 2px;
    font-weight: 600;
}

/* =========================
   SHOWCASE SECTIONS (shared)
========================= */

.showcase-section {
    background: var(--pub-bg);
}

.showcase-section-alt {
    background: var(--pub-surface);
}

.showcase-caption {
    font-style: italic;
}

/* =========================
   DASHBOARD SHOWCASE (slideshow)
========================= */

.showcase-frame {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(15, 41, 66, 0.25);
    border: 1px solid var(--pub-border);
    background: var(--pub-surface);
    max-height: 640px;
}

.dashboard-slideshow {
    aspect-ratio: 16 / 6;
}

.slideshow-strip {
    position: relative;
    width: 100%;
    height: 100%;
}

.slideshow-strip .slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slideshow-strip .slide.active {
    opacity: 1;
    z-index: 1;
}

.slideshow-strip .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (prefers-reduced-motion: no-preference) {
    .slideshow-strip .slide img.kb {
        animation: slideshowKenBurns 8s ease-in-out infinite alternate;
    }
}

@keyframes slideshowKenBurns {
    0%   { transform: scale(1); }
    100% { transform: scale(1.08); }
}

.slideshow-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: .9rem;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: .4rem;
}

.slideshow-dots .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: rgba(255, 255, 255, .55);
    box-shadow: 0 0 0 1px rgba(0,0,0,.15);
    cursor: pointer;
}

.slideshow-dots .dot.active {
    background: #fff;
}

/* =========================
   TRACKING SHOWCASE
========================= */

.tracking-map-frame {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(15, 41, 66, 0.18);
    border: 1px solid var(--pub-border);
}

#publicTrackingMap {
    height: 420px;
    width: 100%;
}

.public-tracking-marker {
    width: 34px;
    height: 34px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: var(--pub-blue);
    color: #fff;
    font-size: 1.15rem;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(15, 41, 66, .45), 0 0 0 3px #fff;
}

.public-tracking-marker i {
    line-height: 1;
}

.tracking-status-card {
    background: var(--pub-surface);
    border: 1px solid var(--pub-border);
    border-radius: 1rem;
    padding: 1.25rem;
    height: 100%;
}

.tracking-status-row {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .6rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.tracking-status-row:last-of-type { border-bottom: none; }

.device-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-top: .35rem;
    flex-shrink: 0;
}

.device-online {
    background-color: #198754;
    box-shadow: 0 0 0 rgba(25, 135, 84, 0.5);
}

@media (prefers-reduced-motion: no-preference) {
    .device-online { animation: pulseDot 2s infinite; }
}

@keyframes pulseDot {
    0%   { box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.5); }
    70%  { box-shadow: 0 0 0 8px rgba(25, 135, 84, 0); }
    100% { box-shadow: 0 0 0 0 rgba(25, 135, 84, 0); }
}

/* =========================
   FEATURES
========================= */

.feature-card {
    background: var(--pub-surface);
    border: 1px solid var(--pub-border);
    border-radius: 1rem;
    padding: 1.75rem;
    height: 100%;
    transition: transform .15s, box-shadow .15s;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 26px rgba(15, 41, 66, 0.1);
}

.feature-icon {
    font-size: 1.8rem;
    color: var(--pub-blue);
    margin-bottom: .75rem;
    display: block;
}

.feature-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: .5rem; }
.feature-card p { color: var(--pub-text-muted); margin: 0; font-size: .95rem; }

/* =========================
   WORKFLOW
========================= */

.workflow-section {
    background: var(--pub-bg);
}

.workflow-number {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--pub-blue-dark), var(--pub-blue));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0 auto .75rem;
}

.workflow-step h3 { font-size: 1rem; font-weight: 700; margin-bottom: .35rem; }
.workflow-step p { color: var(--pub-text-muted); font-size: .9rem; margin: 0; }

/* =========================
   CTA
========================= */

.cta-section {
    background: linear-gradient(160deg, var(--pub-navy-dark) 0%, var(--pub-navy-mid) 100%);
    color: #fff;
}

.cta-section h2 { color: #fff; }
.cta-section .section-subhead { color: rgba(255,255,255,.75); }

/* =========================
   CONTACT
========================= */

.contact-info-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
}

.contact-info-list li {
    color: var(--pub-text-muted);
    margin-bottom: .5rem;
}

.contact-info-list i {
    color: var(--pub-blue);
    margin-right: .5rem;
}

.contact-form-card {
    background: var(--pub-surface);
    border: 1px solid var(--pub-border);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(15, 41, 66, 0.06);
}

.contact-form-card .form-label {
    font-size: .82rem;
    font-weight: 600;
    color: #374151;
}

.contact-form-card .form-control,
.contact-form-card .form-select {
    border-color: var(--pub-border);
    background: #f8fafc;
}

.contact-form-card .form-control:focus,
.contact-form-card .form-select:focus {
    border-color: var(--pub-blue);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26,106,200,.12);
}

/* Honeypot: hidden from sighted users AND excluded from tab order,
   but present in the DOM so unsophisticated bots still fill it in. */
.contact-honeypot {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* =========================
   FOOTER
========================= */

.public-footer {
    background: var(--pub-navy-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 2rem 0;
}

.public-footer-logo-wrap {
    background: rgba(255, 255, 255, .93);
    border-radius: 10px;
    padding: 6px 14px;
    display: inline-flex;
    align-items: center;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin-right: 1.25rem;
    font-size: .9rem;
}

.footer-links a:hover {
    color: #fff;
    text-decoration: underline;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 991.98px) {
    section { padding: 3rem 0; }
    .hero-section { padding: 3.5rem 0; text-align: center; }
    .hero-highlights { align-items: center; }
    .hero-visual { min-height: 260px; margin-top: 1rem; }
    .hero-chip { font-size: .72rem; }
    .showcase-frame { max-height: 480px; }
    #publicTrackingMap { height: 320px; }
}

@media (max-width: 575.98px) {
    .showcase-frame { max-height: 380px; }
}
