
/* Display font for headers and navigation */
@font-face {
    font-family: 'HitchRoute Sans';
    src: url('/assets/hitchroute-sans-webfont.woff') format('woff');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* Body font - Inter from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg: #ffffff;
    --ink: #0b1221; /* deep navy */
    --ink-2: #4b5563; /* secondary text */
    --brand: #0b1d55; /* rich blue */
    --muted: #e5e7eb; /* light border */
    --card: #f9fafb; /* soft card */
    --accent: #0ea5e9; /* sky accent */
    --radius: 18px;
    --shadow: 0 10px 30px rgba(11,29,85,.08);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

/* Improve image rendering on all browsers, especially Windows */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: high-quality;
    -ms-interpolation-mode: bicubic;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    max-width: 100%;
    height: auto;
}
body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    line-height: 1.6;
}

/* Use HitchRoute Sans for all headings and navigation */
h1, h2, h3, h4, h5, h6,
.nav,
.brand,
.menu,
.dropdown-btn {
    font-family: 'HitchRoute Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: -0.02em;
}

.container { width: min(1200px, 92vw); margin-inline: auto; }

/* NAV */
.nav {
    position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(180%) blur(8px);
    background: rgba(255,255,255,0.85); border-bottom: 1px solid var(--muted);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; font-weight: 700; letter-spacing: .2px; }
.brand img { height: 36px; width: auto; }

.menu { display: flex; align-items: center; gap: 18px; }
.menu a { text-decoration: none; color: var(--ink); font-weight: 600; padding: 10px 12px; border-radius: 10px; }
.menu a:not(.btn):hover { background: var(--card); }

.dropdown { position: relative; }
.dropdown-btn { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.dropdown-list { position: absolute; right: 0; top: 100%; min-width: 220px; background: #fff; border: 1px solid var(--muted); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; display: none; margin-top: 4px; }
.dropdown-list::before { content: ''; position: absolute; top: -4px; left: 0; right: 0; height: 4px; }
.dropdown:hover .dropdown-list, .dropdown:focus-within .dropdown-list { display: block; }
.dropdown-list a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; }
.dropdown-list a:hover { background: var(--card); }
.dropdown-list img { width: 22px; height: 22px; }

.btn { appearance: none; border: none; border-radius: 999px; padding: 12px 16px; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-block; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.success { background: #10b981; color: #fff; }
.btn.success:hover { filter: brightness(1.1); }

/* HERO */
.hero { padding: 52px 0 22px; text-align: center; }
.hero h1 { font-size: clamp(28px, 3.6vw, 46px); line-height: 1.08; margin: 0 0 10px; font-weight: 700; }
.hero p { margin: 0 auto; color: var(--ink-2); max-width: 720px; font-size: clamp(15px, 1.6vw, 18px); font-weight: 400; }

/* PRODUCT GRID */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 380px)); gap: 22px; padding: 42px 0 64px; justify-content: center; }
.card { background: #fff; border: 1px solid var(--muted); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; text-decoration: none; color: inherit; display: block; }
.card:hover { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(11,29,85,.12); }
.card-head { display: flex; align-items: center; gap: 14px; padding: 18px 18px 8px; }
.card-head img.logo { width: 42px; height: 42px; object-fit: contain; }
.card-head h2 { margin: 0; font-size: 20px; font-weight: 700; }
.card-body { padding: 0 18px 18px; color: var(--ink-2); font-weight: 400; line-height: 1.5; }
.card-media { padding: 0 18px 18px; }
.card-media img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}
.chip { display: inline-block; background: var(--card); border: 1px solid var(--muted); color: var(--ink); font-weight: 700; padding: 8px 12px; border-radius: 12px; text-decoration: none; }

@media (max-width: 980px) { .card { grid-column: span 6; } }
@media (max-width: 640px) { .card { grid-column: span 12; } .nav-wrap { flex-wrap: wrap; } }

/* PRODUCT PAGE */
.view { display: block; }

.product-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 30px; align-items: center; padding: 34px 0 10px; }
.product-hero img.brandmark { width: 80px; height: 80px; object-fit: contain; }
.product-hero h1 { margin: 0; font-size: clamp(26px, 3vw, 40px); font-weight: 700; }
.product-hero p { color: var(--ink-2); margin-top: 6px; font-weight: 400; line-height: 1.6; }

.gallery { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; margin: 18px 0 4px; }
.gallery .shot { grid-column: span 4; background: var(--card); border: 1px solid var(--muted); border-radius: 14px; overflow: hidden; }
.gallery .shot img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    will-change: transform;
}
@media (max-width: 980px) { .product-hero { grid-template-columns: 1fr; } .gallery .shot { grid-column: span 6; } }
@media (max-width: 640px) { .gallery .shot { grid-column: span 12; } }

.feature-list { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; margin: 16px 0 36px; }
.feature { grid-column: span 4; padding: 18px; background: #fff; border: 1px solid var(--muted); border-radius: 14px; box-shadow: var(--shadow); }
.feature h4 { margin: 0 0 6px; font-weight: 600; }
.feature p { margin: 0; color: var(--ink-2); font-weight: 400; line-height: 1.5; }
@media (max-width: 980px) { .feature { grid-column: span 6; } }
@media (max-width: 640px) { .feature { grid-column: span 12; } }

.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.cta-row a.btn { text-decoration: none; }
.file-note { color: var(--ink-2); font-size: 14px; }

/* LIGHTBOX MODAL */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    padding: 20px;
    cursor: zoom-out;
    animation: fadeIn 0.2s ease;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    cursor: default;
    animation: zoomIn 0.25s ease;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    z-index: 10000;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: background 0.2s ease;
    line-height: 1;
    user-select: none;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Make gallery images clickable */
.gallery .shot {
    cursor: zoom-in;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery .shot:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(11, 29, 85, 0.15);
}

/* FOOTER */
footer { border-top: 1px solid var(--muted); margin-top: 56px; }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 0; font-size: 14px; flex-wrap: wrap; }
.foot a { color: var(--brand); text-decoration: none; font-weight: 700; }