/* ============ Logbook — public theme (light & breezy) ============ */
:root {
    --bg: #f6f8fb;
    --bg-2: #ffffff;
    --panel: #ffffff;
    --panel-2: #eef2f8;
    --line: #e4e9f0;
    --text: #1b2330;
    --muted: #69727f;
    --accent: #e30613;        /* brand red (YouTube play button) */
    --accent-2: #f5b400;      /* road-marking yellow */
    --ok: #16a34a;
    --radius: 16px;
    --maxw: 1180px;
    --shadow-sm: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.08);
    --shadow: 0 6px 14px -6px rgba(16,24,40,.12), 0 18px 36px -16px rgba(16,24,40,.16);
    --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    --display: 'Sora', var(--font);
    --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    background: radial-gradient(1100px 520px at 75% -8%, #e8f1fc 0%, rgba(246,248,251,0) 60%) fixed, var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); line-height: 1.14; letter-spacing: -0.02em; margin: 0 0 .4em; }
h1 { font-size: clamp(2rem, 5vw, 3.3rem); font-weight: 800; }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); font-weight: 700; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.lead { font-size: 1.12rem; color: #424b59; }

.site { min-height: 100vh; display: flex; flex-direction: column; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }

/* ---- nav ---- */
.nav { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; height: 68px; display: flex; align-items: center; gap: 26px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 1.18rem; letter-spacing: -.02em; }
.brand-mark { color: var(--accent); font-size: 1.2rem; }
.brand-logo { border-radius: 50%; object-fit: cover; box-shadow: var(--shadow-sm); }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a { color: var(--muted); font-weight: 500; font-size: .96rem; transition: color .15s; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-social { display: flex; gap: 10px; }
.nav-social a { font-family: var(--mono); font-size: .78rem; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; }
.nav-social a:hover { color: var(--text); border-color: var(--accent); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--display); font-weight: 600; font-size: .98rem; padding: 12px 22px; border-radius: 11px; border: 1px solid transparent; cursor: pointer; transition: transform .12s, box-shadow .15s, background .15s, border-color .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 16px -6px rgba(227,6,19,.55); }
.btn-primary:hover { background: #c40410; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--text); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-block { width: 100%; }

/* ---- hero (light by default) ---- */
.hero { position: relative; padding: clamp(64px, 11vw, 130px) 22px; text-align: center; background: linear-gradient(180deg, #ffffff 0%, rgba(232,241,252,.55) 100%); border-bottom: 1px solid var(--line); }
.hero-inner { max-width: 760px; margin: 0 auto; }
.hero-logo { display: block; width: min(420px, 80%); height: auto; margin: 0 auto 22px; filter: drop-shadow(0 3px 8px rgba(16,24,40,.14)); }
.hero-kicker { color: var(--accent); text-transform: uppercase; letter-spacing: .2em; font-size: .78rem; font-weight: 600; margin: 0 0 16px; }
.hero-h { margin: 0 0 18px; font-size: clamp(1.45rem, 3vw, 2.1rem); font-weight: 700; color: #2a323e; }
.hero-sub { font-size: 1.18rem; color: #4b5462; max-width: 620px; margin: 0 auto 30px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
/* image hero (only when an admin uploads one): dark overlay + light text */
.hero.hero-img { background-size: cover; background-position: center; border-bottom: 0; color: #fff; }
.hero.hero-img .hero-h { color: #fff; }
.hero.hero-img .hero-sub { color: #e8edf4; }
.hero.hero-img .hero-kicker { color: #ffce99; }

/* ---- sections ---- */
.section { max-width: var(--maxw); margin: 0 auto; padding: clamp(48px, 7vw, 84px) 22px; width: 100%; }
.section-alt { background: linear-gradient(180deg, rgba(238,242,248,.5), rgba(238,242,248,.9)); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 30px; }
.section-link { color: var(--accent); font-weight: 600; font-size: .95rem; white-space: nowrap; }
.page-head { max-width: var(--maxw); margin: 0 auto; padding: clamp(44px, 6vw, 76px) 22px 0; }
.page-head-center { text-align: center; padding-bottom: 44px; }

/* ---- card grid ---- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.card-grid-sm { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

/* ---- car cards ---- */
.car-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.car-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.car-card-img { aspect-ratio: 16/10; background: linear-gradient(135deg, #eef2f8, #dde6f2); background-size: cover; background-position: center; position: relative; }
.car-status { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.94); border: 1px solid var(--line); color: #c10010; font-family: var(--mono); font-size: .72rem; padding: 4px 9px; border-radius: 6px; text-transform: uppercase; letter-spacing: .05em; box-shadow: var(--shadow-sm); }
.car-card-body { padding: 18px; }
.car-card-body h3 { margin: 0 0 2px; font-size: 1.25rem; }
.progress { height: 8px; background: var(--panel-2); border-radius: 99px; overflow: hidden; margin: 14px 0 6px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 99px; }
.progress-lg { height: 10px; max-width: 360px; }
.progress-label { font-size: .78rem; color: var(--muted); margin: 0; }

/* ---- feed ---- */
.feed { display: flex; flex-direction: column; gap: 4px; }
.feed-item { display: grid; grid-template-columns: 130px 130px 1fr; gap: 16px; align-items: center; padding: 16px; border-radius: 12px; border: 1px solid transparent; transition: background .15s, border-color .15s, box-shadow .15s; }
.feed-item:hover { background: var(--panel); border-color: var(--line); box-shadow: var(--shadow-sm); }
.feed-date { color: var(--muted); font-size: .82rem; }
.feed-car { color: var(--accent); font-weight: 600; }
.feed-title { font-weight: 500; }

/* ---- sponsors ---- */
.sponsor-strip { display: flex; flex-wrap: wrap; gap: 16px; }
.sponsor-chip { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; height: 80px; min-width: 150px; flex: 1; display: flex; align-items: center; justify-content: center; padding: 14px; box-shadow: var(--shadow-sm); }
.sponsor-chip img { max-height: 48px; width: auto; }
.tier-head { margin: 38px 0 18px; font-size: 1.05rem; color: var(--accent-2); text-transform: uppercase; letter-spacing: .08em; }
.tier-head:first-child { margin-top: 0; }
.sponsor-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-align: center; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.sponsor-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.sponsor-logo { height: 90px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.sponsor-logo img { max-height: 90px; }
.sponsor-name { font-family: var(--display); font-size: 1.3rem; font-weight: 700; color: var(--muted); }
.sponsor-card h3 { margin: 0 0 6px; }
.sponsor-link { color: var(--accent); font-weight: 600; display: inline-block; margin-top: 10px; }

/* ---- raffles ---- */
.raffle-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); }
.raffle-img { aspect-ratio: 16/9; background: linear-gradient(135deg, #f3ede4, #e2e9f4); background-size: cover; background-position: center; position: relative; }
.raffle-status { position: absolute; top: 12px; right: 12px; font-family: var(--mono); font-size: .72rem; padding: 4px 9px; border-radius: 6px; text-transform: uppercase; box-shadow: var(--shadow-sm); }
.raffle-open { background: #e7f7ee; color: var(--ok); border: 1px solid #bce8cd; }
.raffle-upcoming { background: #fff3df; color: var(--accent-2); border: 1px solid #f3d9a8; }
.raffle-closed { background: #eef0f3; color: var(--muted); border: 1px solid var(--line); }
.raffle-body { padding: 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.raffle-body h3 { margin: 0; }
.raffle-prize { color: var(--accent-2); font-weight: 600; margin: 0; }
.raffle-date { font-size: .82rem; color: var(--muted); margin: 4px 0 12px; }
.raffle-body .btn { margin-top: auto; }

/* ---- products ---- */
.product-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.product-img { aspect-ratio: 1/1; background: linear-gradient(135deg, #eef2f8, #dde6f2) center/cover; }
.product-body { padding: 16px; }
.product-body h3 { margin: 0 0 4px; font-size: 1.1rem; }
.price { color: var(--text); font-weight: 600; margin: 8px 0 0; }
.price-lg { font-size: 1.7rem; color: var(--accent); }
.notice { max-width: var(--maxw); margin: 18px auto 0; padding: 12px 18px; background: #fff3df; border: 1px solid #f3d9a8; border-radius: 10px; color: #9a6500; }

/* ---- youtube ---- */
.yt-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 26px; }
.yt-channel { display: flex; align-items: center; gap: 16px; }
.yt-avatar { border-radius: 50%; border: 2px solid var(--line); object-fit: cover; box-shadow: var(--shadow-sm); }
.yt-avatar-lg { width: 84px; height: 84px; margin-bottom: 10px; }
.yt-title { margin: 0; }
.yt-subs { margin: 2px 0 0; color: var(--muted); }
.yt-subs strong { color: var(--text); }
.yt-sub-btn { background: #ff0033; color: #fff; box-shadow: 0 6px 16px -6px rgba(255,0,51,.5); }
.yt-sub-btn:hover { background: #ff1f4d; }
.yt-feature { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.yt-feature-title { margin: 12px 0 2px; font-size: 1.15rem; }
.yt-meta { color: var(--muted); font-size: .8rem; margin: 0; }
.yt-hero { text-align: center; padding: clamp(48px, 8vw, 92px) 22px; background: linear-gradient(180deg,#ffffff,rgba(232,241,252,.6)); border-bottom: 1px solid var(--line); }
.yt-hero.has-img { background-size: cover; background-position: center; color: #fff; border-bottom: 0; }
.yt-hero.has-img .yt-subs { color: #e8edf4; }
.yt-hero.has-img .yt-subs strong { color: #fff; }
.yt-hero-inner { max-width: 720px; margin: 0 auto; }
.video-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.video-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.video-thumb { aspect-ratio: 16/9; background: #dde6f2 center/cover; position: relative; display: flex; align-items: center; justify-content: center; }
.video-play { width: 52px; height: 52px; border-radius: 50%; background: rgba(255,0,51,.92); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; padding-left: 3px; }
.video-card-body { padding: 14px 16px; }
.video-card-body h3 { margin: 0 0 4px; font-size: 1.02rem; line-height: 1.3; }
@media (max-width: 700px) { .yt-feature { grid-template-columns: 1fr; } }

/* ---- car detail ---- */
.car-hero { background: linear-gradient(180deg,#ffffff,rgba(232,241,252,.6)); border-bottom: 1px solid var(--line); padding: clamp(48px, 9vw, 104px) 22px clamp(30px, 5vw, 48px); }
.car-hero.has-img { background-size: cover; background-position: center; color: #fff; border-bottom: 0; }
.car-hero.has-img .car-hero-sub { color: #e8edf4; }
.car-hero-inner { max-width: var(--maxw); margin: 0 auto; }
.car-hero-sub { color: #4b5462; font-size: 1.1rem; margin: 0 0 18px; }
.car-body { max-width: var(--maxw); margin: 0 auto; padding: 50px 22px; display: grid; grid-template-columns: 1fr 320px; gap: 40px; }
.car-main { min-width: 0; }
.video-list { display: flex; flex-direction: column; gap: 16px; margin: 24px 0; }
.video-embed { aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.video-embed iframe { width: 100%; height: 100%; border: 0; }
.video-link { color: var(--accent); font-weight: 600; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 20px 0; }
.gallery-sm { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); margin: 12px 0 0; }
.gallery-item { border-radius: 10px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4/3; box-shadow: var(--shadow-sm); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.timeline-head { margin: 40px 0 24px; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline-item { position: relative; padding: 0 0 30px 34px; }
.timeline-dot { position: absolute; left: 0; top: 5px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--line); }
.timeline-date { color: var(--muted); font-size: .8rem; }
.timeline-content h3 { margin: 4px 0 6px; font-size: 1.2rem; }
.spec-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.spec-card h3 { margin: 0 0 14px; }
.spec { margin: 0; display: flex; flex-direction: column; gap: 0; }
.spec > div { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.spec > div:last-child { border-bottom: 0; }
.spec dt { color: var(--muted); margin: 0; }
.spec dd { margin: 0; text-align: right; font-weight: 500; }

/* ---- product detail ---- */
.product-detail { max-width: var(--maxw); margin: 0 auto; padding: 50px 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 44px; }
.product-hero { aspect-ratio: 1/1; border-radius: var(--radius); background: #eef2f8 center/cover; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.product-hero-empty { background: linear-gradient(135deg, #eef2f8, #dde6f2); }
.product-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; margin-top: 10px; }
.product-thumbs img { aspect-ratio: 1/1; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.buy-form { display: flex; flex-direction: column; gap: 14px; margin: 22px 0; max-width: 320px; }
.buy-field { display: flex; flex-direction: column; gap: 6px; font-size: .9rem; color: var(--muted); }
.buy-field select, .buy-field input { background: #fff; border: 1px solid var(--line); border-radius: 9px; color: var(--text); padding: 11px 13px; font-size: 1rem; }
.buy-note { font-size: .82rem; margin: 0; }
.back-link { color: var(--muted); font-weight: 500; }

/* ---- footer ---- */
.foot { margin-top: auto; border-top: 1px solid var(--line); background: var(--bg-2); }
.foot-inner { max-width: var(--maxw); margin: 0 auto; padding: 50px 22px 30px; display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; }
.foot-brand { display: flex; flex-direction: column; gap: 6px; max-width: 280px; }
.foot-tag { color: var(--muted); font-size: .92rem; margin: 6px 0 0; }
.foot-links, .foot-social { display: flex; flex-direction: column; gap: 10px; }
.foot-links a, .foot-social a { color: var(--muted); font-size: .92rem; }
.foot-links a:hover, .foot-social a:hover { color: var(--text); }
.foot-base { max-width: var(--maxw); margin: 0 auto; padding: 18px 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }

/* ---- responsive ---- */
@media (max-width: 900px) {
    .car-body { grid-template-columns: 1fr; }
    .product-detail { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 760px) {
    .nav-links { position: fixed; inset: 68px 0 auto 0; flex-direction: column; background: #fff; border-bottom: 1px solid var(--line); padding: 18px 22px; gap: 16px; display: none; box-shadow: var(--shadow); }
    .nav-links.open { display: flex; }
    .nav-toggle { display: flex; margin-left: auto; }
    .nav-social { display: none; }
    .feed-item { grid-template-columns: 1fr; gap: 4px; }
}
