/* ═══════════════════════════════════════════════
   Design System v2 — White-label Theming
   ═══════════════════════════════════════════════ */

:root {
    --brand-primary: #febd69;
    --brand-primary-text: #fff;
    --brand-accent: #f08804;
    --brand-navbar-bg: #0f172a;
    --brand-navbar-text: #fff;
    --brand-body-bg: #f8fafc;
    --brand-link: #f08804;
    --brand-btn-primary-bg: #f08804;
    --brand-btn-primary-border: #d97706;
    --brand-progress-bar: #22c55e;

    /* Design tokens */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px -1px rgba(0,0,0,0.06), 0 2px 6px -2px rgba(0,0,0,0.04);
    --shadow-lg: 0 12px 32px -4px rgba(0,0,0,0.08), 0 4px 8px -4px rgba(0,0,0,0.03);
    --shadow-xl: 0 24px 56px -8px rgba(0,0,0,0.12);

    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --color-text-primary: #0f172a;
    --color-text-secondary: #475569;
    --color-text-muted: #94a3b8;
    --color-border: #e2e8f0;
    --color-surface: #fff;
    --color-surface-alt: #f8fafc;
}

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; }

html {
    font-size: 15px;
    position: relative;
    min-height: 100%;
    scroll-behavior: smooth;
}
@media (min-width: 768px) { html { font-size: 16px; } }

body {
    font-family: var(--font-body);
    background-color: var(--brand-body-bg);
    color: var(--color-text-primary);
    padding-top: 72px;
    padding-bottom: 0;
    margin: 0;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--brand-accent);
    text-decoration: none;
    transition: var(--transition-fast);
}
a:hover { color: var(--brand-link); text-decoration: none; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--color-text-primary);
    line-height: 1.25;
    letter-spacing: -0.02em;
}

p { color: var(--color-text-secondary); }

::selection {
    background: var(--brand-accent);
    color: #fff;
}

/* ─── Navbar ─── */
.navbar {
    background: var(--brand-navbar-bg) !important;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    padding: 0 1rem;
    height: 72px;
    box-shadow: 0 1px 0 rgba(255,255,255,0.06);
    transition: var(--transition);
    border: none;
    z-index: 1050;
}

.navbar > .container {
    height: 100%;
    display: flex;
    align-items: center;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.03em;
    padding-left: 44px;
    background-size: 32px;
    background-position: left center;
    white-space: nowrap;
    color: #fff !important;
}

.navbar .nav-link {
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.45rem 0.9rem !important;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    color: rgba(255,255,255,0.65) !important;
    letter-spacing: 0.005em;
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,0.08);
}

.navbar .form-control {
    border-radius: var(--radius-full);
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: #fff;
    padding: 0.42rem 1rem;
    font-size: 0.85rem;
    width: 220px;
    transition: var(--transition);
}
.navbar .form-control::placeholder { color: rgba(255,255,255,0.35); }
.navbar .form-control:focus {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.25);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.06);
    outline: none;
    width: 260px;
}

.navbar .btn-outline-light {
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.42rem 1.1rem;
    border-width: 1.5px;
    border-color: rgba(255,255,255,0.2);
}
.navbar .btn-outline-light:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.3);
}

.navbar-toggler { border: none; padding: 0.4rem; }
.navbar-toggler:focus { box-shadow: none; }

/* ─── Buttons ─── */
.btn {
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 0.55rem 1.4rem;
    transition: var(--transition);
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-primary {
    color: var(--brand-primary-text);
    background: var(--brand-btn-primary-bg);
    border-color: var(--brand-btn-primary-border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.1);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.1);
    filter: brightness(1.06);
    color: var(--brand-primary-text);
    background: var(--brand-btn-primary-bg);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    background: var(--color-surface);
    border: 1.5px solid var(--color-border);
    color: var(--color-text-secondary);
    box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
    background: var(--color-surface-alt);
    color: var(--color-text-primary);
    border-color: #cbd5e1;
}

.btn-outline-light {
    background: transparent;
    border: 1.5px solid rgba(255,255,255,0.3);
    color: #fff;
}
.btn-outline-light:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-color: rgba(255,255,255,0.5);
}

.btn-lg {
    padding: 0.7rem 1.8rem;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
}

.btn-sm {
    padding: 0.35rem 0.9rem;
    font-size: 0.8rem;
}

/* ─── Cards ─── */
.card, .modern-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
    background: var(--color-surface);
}

/* ─── Hero Section ─── */
.hero-section {
    background: var(--brand-navbar-bg);
    color: #fff;
    padding: 6rem 0 5rem;
    margin: -72px 0 0 0;
    padding-top: calc(72px + 5rem);
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse 80% 60% at 70% 20%, rgba(240,136,4,0.12) 0%, transparent 60%),
        radial-gradient(ellipse 50% 80% at 10% 70%, rgba(254,189,105,0.06) 0%, transparent 50%);
}
.hero-section::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0; right: 0;
    height: 64px;
    background: var(--brand-body-bg);
    clip-path: ellipse(55% 100% at 50% 100%);
}
.hero-section .container { position: relative; z-index: 1; }
.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #fff;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}
@media (max-width: 768px) { .hero-section h1 { font-size: 2.2rem; } }
.hero-section .lead {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.7);
    max-width: 560px;
    line-height: 1.8;
}
.hero-section .btn-primary {
    background: var(--brand-accent);
    box-shadow: 0 4px 16px rgba(240,136,4,0.3);
}
.hero-section .btn-primary:hover {
    box-shadow: 0 6px 24px rgba(240,136,4,0.4);
}

/* ─── Feature Cards ─── */
.feature-card {
    text-align: center;
    padding: 2.5rem 1.5rem 2rem;
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    position: relative;
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0; left: 50%; transform: translateX(-50%);
    width: 60px; height: 3px;
    border-radius: 0 0 4px 4px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
    opacity: 0;
    transition: var(--transition);
}
.feature-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: transparent;
}
.feature-card:hover::before { opacity: 1; }

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 1.2rem;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
    color: #fff;
    box-shadow: 0 4px 12px rgba(240,136,4,0.2);
}

.feature-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.7rem;
    color: var(--color-text-primary);
}
.feature-card p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.65;
    margin: 0;
}

/* ─── Section Spacing ─── */
.section-padding { padding: 5rem 0; }

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
}
.section-subtitle {
    text-align: center;
    color: var(--color-text-muted);
    font-size: 1rem;
    margin-bottom: 3.5rem;
}

/* ─── Footer ─── */
.site-footer {
    background: var(--brand-navbar-bg);
    color: rgba(255,255,255,0.6);
    padding: 4rem 0 1.5rem;
    margin-top: 0;
    font-size: 0.875rem;
    position: relative;
}
.site-footer::before {
    content: '';
    position: absolute;
    top: -2px; left: 0; right: 0;
    height: 64px;
    background: var(--brand-body-bg);
    clip-path: ellipse(55% 100% at 50% 0%);
}
.site-footer h5 {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1.2rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.site-footer a { color: rgba(255,255,255,0.5); }
.site-footer a:hover { color: #fff; }
.site-footer .footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 3rem;
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.35);
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links li i { width: 16px; opacity: 0.4; }

/* ─── CTA Section ─── */
.cta-section {
    background: var(--brand-navbar-bg);
    border-radius: var(--radius-xl);
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse 60% 80% at 80% 20%, rgba(240,136,4,0.15) 0%, transparent 60%),
        radial-gradient(ellipse 40% 60% at 10% 80%, rgba(254,189,105,0.08) 0%, transparent 50%);
}
.cta-section > * { position: relative; z-index: 1; }
.cta-section h3 { color: #fff; font-size: 1.8rem; font-weight: 800; letter-spacing: -0.02em; }
.cta-section p { color: rgba(255,255,255,0.6); max-width: 480px; margin: 0 auto 1.5rem; }

/* ─── Tracking Page ─── */
.tracking-hero {
    background: var(--brand-navbar-bg);
    color: #fff;
    padding: 2.5rem 0;
    margin: -72px 0 2rem 0;
    padding-top: calc(72px + 2.5rem);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.tracking-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse 60% 80% at 60% 30%, rgba(240,136,4,0.1) 0%, transparent 60%);
}
.tracking-hero::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0; right: 0;
    height: 40px;
    background: var(--brand-body-bg);
    clip-path: ellipse(55% 100% at 50% 100%);
}
.tracking-hero .container { position: relative; z-index: 1; }
.tracking-hero h1 { color: #fff; font-size: 1.5rem; font-weight: 700; }

.tracking-status-card {
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.tracking-progress-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: var(--radius-full);
    margin: 1.5rem 0;
    overflow: hidden;
    position: relative;
}
.tracking-progress-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--brand-accent), var(--brand-progress-bar));
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.tracking-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}
.tracking-step {
    text-align: center;
    flex: 1;
    font-size: 0.72rem;
    color: var(--color-text-muted);
    font-weight: 600;
    letter-spacing: 0.02em;
}
.tracking-step.active { color: var(--brand-accent); }
.tracking-step.done { color: var(--brand-progress-bar); }
.tracking-step .step-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #e2e8f0;
    margin: 0 auto 6px;
    position: relative;
    z-index: 1;
    transition: var(--transition);
}
.tracking-step.active .step-dot {
    background: var(--brand-accent);
    box-shadow: 0 0 0 4px rgba(240,136,4,0.15);
}
.tracking-step.done .step-dot { background: var(--brand-progress-bar); }

/* Timeline */
.tracking-timeline { position: relative; padding-left: 2rem; }
.tracking-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: var(--color-border);
}
.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
    padding-left: 1.2rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
    content: '';
    position: absolute;
    left: -2rem;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #cbd5e1;
    border: 2px solid var(--color-surface);
    box-shadow: 0 0 0 2px var(--color-border);
}
.timeline-item:first-child::before {
    background: var(--brand-progress-bar);
    box-shadow: 0 0 0 2px var(--brand-progress-bar), 0 0 0 5px rgba(34,197,94,0.15);
    width: 12px; height: 12px;
    left: calc(-2rem - 1px);
    top: 5px;
}
.timeline-item .time {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.timeline-item .message { font-weight: 600; color: var(--color-text-primary); font-size: 0.9rem; }
.timeline-item .location { font-size: 0.8rem; color: var(--color-text-muted); }
.timeline-date {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.5rem 0 0.3rem;
    margin-left: -0.5rem;
}

.postcode-card {
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
}
.postcode-card input[type="text"] {
    border-radius: var(--radius-full);
    border: 2px solid #86efac;
    padding: 0.5rem 1rem;
    text-align: center;
    max-width: 200px;
    font-weight: 600;
    text-transform: uppercase;
}
.postcode-card .btn-verify {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    border: none;
    border-radius: var(--radius-full);
    padding: 0.5rem 1.5rem;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}
.postcode-card .btn-verify:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34,197,94,0.3);
}

/* ─── Contact Page ─── */
.contact-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    padding: 2.5rem;
}
.contact-card .form-control {
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--color-border);
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    max-width: none;
    transition: var(--transition-fast);
    background: var(--color-surface);
}
.contact-card .form-control:focus {
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 3px rgba(240,136,4,0.1);
}
.contact-card textarea.form-control {
    min-height: 120px;
    resize: vertical;
    max-width: none;
}
.contact-card label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.3rem;
}
.contact-info-card {
    background: var(--brand-navbar-bg);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    height: 100%;
    position: relative;
    overflow: hidden;
}
.contact-info-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse 80% 60% at 90% 10%, rgba(240,136,4,0.12) 0%, transparent 60%);
}
.contact-info-card > * { position: relative; z-index: 1; }
.contact-info-card h4 { color: #fff; margin-bottom: 1.5rem; }
.contact-info-item { margin-bottom: 1.2rem; display: flex; gap: 0.8rem; align-items: flex-start; }
.contact-info-item i { font-size: 1rem; margin-top: 3px; opacity: 0.5; }
.contact-info-item a { color: rgba(255,255,255,0.75); }
.contact-info-item a:hover { color: #fff; }

/* ─── About Page ─── */
.about-section {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--color-border);
}
.about-section:last-of-type { border-bottom: none; }
.about-section h4 {
    font-size: 1.05rem;
    color: var(--brand-accent);
    margin-bottom: 0.4rem;
}
.about-section p { margin: 0; }

/* ─── Privacy Page ─── */
.privacy-content h2 {
    font-size: 1.2rem;
    margin-top: 2.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-border);
    color: var(--color-text-primary);
}
.privacy-content ul { padding-left: 1.2rem; }
.privacy-content li {
    margin-bottom: 0.3rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}
.privacy-content p { line-height: 1.8; }

/* ─── Error / Not Found ─── */
.tracking-not-found {
    text-align: center;
    padding: 3rem 1rem;
}
.tracking-not-found .icon {
    font-size: 3.5rem;
    color: #e2e8f0;
    margin-bottom: 1.5rem;
}
.tracking-not-found h2 { font-size: 1.4rem; margin-bottom: 0.8rem; }
.tracking-not-found .reasons { text-align: left; max-width: 460px; margin: 1.5rem auto; }

/* ─── Body Content ─── */
.body-content { padding: 0 15px; }

/* ─── Form Elements ─── */
input, select, textarea { max-width: none; }
.form-control:focus {
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 3px rgba(240,136,4,0.1);
}
.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

/* ─── Logo ─── */
.logo {
    background-image: url("/images/ouologistics_logo.png");
    background-size: contain;
    background-repeat: no-repeat;
}
.logo-left { padding-left: 44px; }

/* ─── Alert Overrides ─── */
.alert {
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
}
.alert-success { background: #f0fdf4; color: #166534; }
.alert-danger { background: #fef2f2; color: #991b1b; }

/* ─── Animations ─── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-in {
    animation: fadeInUp 0.6s ease-out both;
}
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }

/* ─── Responsive ─── */
@media (max-width: 575px) {
    .hero-section { padding: 3.5rem 0 3rem; padding-top: calc(72px + 2.5rem); }
    .hero-section h1 { font-size: 1.8rem; }
    .hero-section::after, .site-footer::before { display: none; }
    .section-padding { padding: 3rem 0; }
    .feature-card { padding: 1.5rem 1rem; }
    .contact-card { padding: 1.5rem; }
    .contact-info-card { padding: 1.5rem; }
    .tracking-status-card { padding: 1.2rem; }
    .cta-section { padding: 2.5rem 1.5rem; border-radius: var(--radius-lg); }
    .tracking-steps { font-size: 0.65rem; }
    .navbar .form-control { width: 100%; }
    .navbar .form-control:focus { width: 100%; }
}
@media (max-width: 991px) {
    .navbar .collapse { padding: 1rem 0; }
    .navbar .form-control { width: 100%; }
    .navbar .form-control:focus { width: 100%; }
}
