/* Largada — "programa do dia" composition for car project pages */

.lp-skip { position: absolute; left: -999px; top: 8px; z-index: 90; background: var(--lg-lime); color: var(--lg-black); padding: 8px 12px; }
.lp-skip:focus { left: 8px; }
.lp-wrap { position: relative; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 900px) { .lp-wrap { padding: 0 40px; } }
html { scroll-behavior: smooth; scroll-padding-top: 52px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- points bar ---------- */
.lg-points { position: fixed; top: 0; left: 0; right: 0; z-index: 40; display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 16px;
  background: var(--lg-black); border-bottom: 2px solid var(--lg-white); }
@media (min-width: 900px) { .lg-points { left: auto; right: 24px; top: 12px; width: 320px; border: 2px solid var(--lg-white); } }
.lg-points .lg-label { color: var(--lg-mute); }
.lg-points__track { position: relative; flex: 1; height: 10px; background: #000; box-shadow: inset 0 0 0 1px var(--lg-white); }
.lg-points__track i { position: absolute; left: 2px; top: 2px; bottom: 2px; width: 0; background: var(--lg-lime); }
.lg-points__val { color: var(--lg-lime); min-width: 4ch; text-align: right; }

/* ---------- 1 · largada ---------- */
.lp-hero { position: relative; overflow: hidden; padding: 64px 0 0; }
.lp-hero__paint { position: absolute; left: -2vw; top: 30px; font-size: clamp(9rem, 44vw, 30rem); transform: rotate(-3deg); opacity: .18; pointer-events: none; }
.lp-hero__grid { display: grid; gap: 28px; padding-bottom: 56px; }
@media (min-width: 900px) { .lp-hero__grid { grid-template-columns: .9fr 1.1fr; align-items: center; gap: 48px; padding-top: 40px; padding-bottom: 80px; } }
.lp-lights { display: flex; gap: 10px; margin-bottom: 18px; }
.lp-lights i { width: 22px; height: 22px; border-radius: 50%; background: #1a1b1d; box-shadow: inset 0 0 0 2px #444; transition: background .12s, box-shadow .12s; }
.lp-lights i.is-red { background: #E0301E; box-shadow: 0 0 12px rgba(224,48,30,.7); }
.lp-lights.is-go i { background: var(--lg-lime); box-shadow: 0 0 12px rgba(184,227,53,.7); }
.lp-hero__kicker { color: var(--lg-lime); margin: 0 0 8px; }
.lp-hero .lg-title { font-size: clamp(3.5rem, 18vw, 8.5rem); white-space: nowrap; transition: transform .3s cubic-bezier(.7,0,.3,1), opacity .3s; }
.lp-hero .lg-title em { font-style: normal; color: var(--lg-lime); }
.lp-hero .lg-title.is-waiting { transform: translateX(-40px); opacity: 0; }
@media (min-width: 900px) { .lp-hero .lg-title { font-size: clamp(4rem, 8.6vw, 8.5rem); } }
.lp-hero__model { margin: 10px 0 18px; font-weight: 600; color: var(--lg-concrete); }
.lp-hero__stamp { transition: transform .16s; }
.lp-hero__stamp.is-waiting { transform: scale(1.4) rotate(-12deg); opacity: 0; }

.lp-hero__photo { position: relative; margin: 14px 8px 18px; }
.lp-hero__photo > img { display: block; width: 100%; height: auto; border: 3px solid var(--lg-white); box-shadow: 12px 12px 0 var(--lg-black); }
.lp-hero__band { height: 22px; border-top: 2px solid #000; border-bottom: 2px solid #000; background-size: 40px 40px; }
.lp-hero__band.is-sliding { animation: lg-slide .6s steps(4) both; }
@keyframes lg-slide { from { background-position: -40px 0; } to { background-position: 0 0; } }

/* stickers: only on the photo frame edges, never over the car body */
.lg-stickers { position: absolute; inset: 0; pointer-events: none; }
.lg-sticker { position: absolute; display: grid; place-items: center; text-align: center; box-shadow: 0 3px 0 rgba(0,0,0,.35); transition: transform .25s, opacity .25s; }
.lg-sticker.is-waiting { opacity: 0; transform: translateY(-20px) rotate(0deg) !important; }
.lg-sticker--year { top: -18px; left: -10px; width: 64px; height: 64px; border-radius: 50%; background: var(--lg-lime); color: var(--lg-black); font: 400 1.25rem/1 var(--lg-font-title); transform: rotate(-12deg); }
.lg-sticker--name { top: -14px; right: 12%; padding: 5px 12px; background: var(--lg-black); color: var(--lg-white); border: 2px solid var(--lg-white); font: 400 1rem/1 var(--lg-font-title); text-transform: uppercase; transform: rotate(4deg); }
.lg-sticker--shield { bottom: -20px; right: -8px; width: 56px; height: 64px; background: var(--lg-white); color: var(--lg-black); font: 400 1.35rem/1 var(--lg-font-title);
  clip-path: polygon(0 0, 100% 0, 100% 62%, 50% 100%, 0 62%); transform: rotate(8deg); }
.lg-sticker--by { bottom: -14px; left: 10%; padding: 5px 10px; background: var(--lg-barrier); color: var(--lg-black); font: 800 .6875rem/1 var(--lg-font-body); text-transform: uppercase; letter-spacing: .08em; transform: rotate(-3deg); }

/* ---------- body layout ---------- */
.lp-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 32px; padding-bottom: 40px; }
@media (min-width: 900px) { .lp-body { grid-template-columns: 250px minmax(0, 1fr); gap: 48px; align-items: start; padding-top: 56px; } }

.lg-schedule { min-width: 0; background: var(--lg-black); border: 2px solid var(--lg-white); }
@media (min-width: 900px) { .lg-schedule { position: sticky; top: 64px; } }
.lg-schedule__title { margin: 0; padding: 10px 12px; background: var(--lg-white); color: var(--lg-black); }
.lg-schedule ol { list-style: none; margin: 0; padding: 0; }
@media (max-width: 899px) { .lg-schedule ol { display: flex; overflow-x: auto; scrollbar-width: none; } .lg-schedule ol::-webkit-scrollbar { display: none; } .lg-schedule li { flex: none; } }
.lg-schedule a { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; padding: 10px 12px; min-height: 44px; color: var(--lg-white); text-decoration: none; border-top: 1px solid var(--lg-line); }
@media (max-width: 899px) { .lg-schedule a { border-top: 0; border-left: 1px solid var(--lg-line); } }
.lg-schedule .lg-mono { grid-row: span 2; color: var(--lg-mute); align-self: center; }
.lg-schedule b { font: 800 .75rem/1.2 var(--lg-font-body); text-transform: uppercase; letter-spacing: .1em; }
.lg-schedule em { font: 400 1.25rem/1.1 var(--lg-font-title); font-style: normal; text-transform: uppercase; }
.lg-schedule a[aria-current="true"] { background: var(--lg-lime); color: var(--lg-black); }
.lg-schedule a[aria-current="true"] .lg-mono { color: var(--lg-black); }
@media (hover: hover) and (pointer: fine) { .lg-schedule a:not([aria-current]):hover { background: var(--lg-asphalt-2); } }

.lp-events { min-width: 0; }
.lp-sec { position: relative; padding: 24px 0 64px; }
.lp-head { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 26px; }
.lp-head__n { font-size: clamp(4.5rem, 16vw, 7rem); transform: rotate(-3deg); color: rgba(247,247,245,.8); }
.lp-head__k { color: var(--lg-lime); margin: 0 0 4px; }

/* ---------- 3 · placar ---------- */
.lp-score { display: grid; gap: 22px; }
@media (min-width: 1100px) { .lp-score { grid-template-columns: 1.1fr 1fr; align-items: start; } }
.lg-results { width: 100%; border-collapse: collapse; background: var(--lg-white); color: var(--lg-black); border: 2px solid var(--lg-black); }
.lg-results caption { text-align: left; color: var(--lg-mute); padding: 0 0 8px; }
.lg-results th { text-align: left; padding: 8px 12px; background: var(--lg-black); color: var(--lg-white); font: 800 .75rem/1 var(--lg-font-body); text-transform: uppercase; letter-spacing: .1em; }
.lg-results td { padding: 12px; border-top: 1px solid #C9CAC6; }
.lg-results td:first-child { font: 400 1.5rem/1 var(--lg-font-title); width: 3ch; }
.lg-results td:nth-child(2) { font-weight: 800; text-transform: uppercase; font-size: .875rem; letter-spacing: .04em; }
.lg-results td:last-child { font: 400 1.6rem/1 var(--lg-font-title); text-align: right; white-space: nowrap; }
.lg-results td:last-child small { font: 500 .75rem/1 var(--lg-font-mono); margin-left: 4px; }
.lg-results tbody tr:first-child { background: var(--lg-lime); }

.lp-meters { display: grid; gap: 14px; }
.lg-meter { display: grid; gap: 6px; }
.lg-meter__top { display: flex; justify-content: space-between; gap: 12px; }
.lg-meter__bar { position: relative; height: 18px; background: #000; box-shadow: inset 0 0 0 2px var(--lg-white); }
.lg-meter__bar i { position: absolute; left: 3px; top: 3px; bottom: 3px; width: 0; background: var(--lg-lime); transition: width .6s cubic-bezier(.7,0,.3,1); }
.lg-meter__scale { color: var(--lg-mute); }

/* ---------- 4 · vistoria ---------- */
.lp-boxes { display: grid; gap: 18px; }
@media (min-width: 1100px) { .lp-boxes { grid-template-columns: repeat(2, 1fr); align-items: start; } }
.lg-box dl { margin: 0; }
.lg-box__row { display: grid; grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; align-items: start; padding: 10px 12px; border-top: 1px solid var(--lg-line); }
.lg-box__row:first-child { border-top: 0; }
.lg-check { width: 18px; height: 18px; margin-top: 2px; display: grid; place-items: center; background: var(--lg-lime); color: var(--lg-black); font: 800 .75rem/1 var(--lg-font-body); transition: transform .18s; }
.lg-check.is-waiting { transform: scale(.6); background: transparent; box-shadow: inset 0 0 0 2px var(--lg-mute); color: transparent; }
.lg-box__row dt { font: 800 .75rem/1.5 var(--lg-font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--lg-mute); }
.lg-box__row dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
@media (hover: hover) and (pointer: fine) { .lg-box__row:hover { background: var(--lg-lime); color: var(--lg-black); } .lg-box__row:hover dt { color: var(--lg-black); } }
.lp-ok { position: absolute; right: 8px; bottom: 26px; }

/* ---------- 5 · briefing ---------- */
.lp-brief { display: grid; gap: 22px; }
@media (min-width: 1100px) { .lp-brief { grid-template-columns: 1.3fr 1fr; align-items: start; } }
.lp-brief__list { list-style: none; margin: 0; padding: 6px 0; counter-reset: b; }
.lp-brief__list li { counter-increment: b; display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 12px 16px 12px 12px; border-top: 1px solid var(--lg-line); }
.lp-brief__list li:first-child { border-top: 0; }
.lp-brief__list li::before { content: counter(b, decimal-leading-zero); font: 400 1.5rem/1.1 var(--lg-font-title); color: var(--lg-lime); }
.lp-brief__list li:first-child p { font: 600 1.2rem/1.45 var(--lg-font-body); }
.lp-brief__list p { margin: 0; }
.lp-brief__photo { margin: 0; }
.lp-brief__photo img { display: block; width: 100%; height: auto; border: 3px solid var(--lg-white); }
.lp-brief__photo figcaption { color: var(--lg-mute); padding-top: 6px; }

/* ---------- 6 · pódio ---------- */
.lg-podium { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
@media (min-width: 700px) { .lg-podium { grid-template-columns: 1fr 1.3fr 1fr; } }
.lg-plinth { display: grid; gap: 0; padding: 0; border: 0; background: none; color: inherit; cursor: zoom-in; text-align: center; }
.lg-plinth img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border: 3px solid var(--lg-white); transition: border-color .15s; }
.lg-plinth__base { display: grid; place-items: center; background: var(--lg-white); color: var(--lg-black); font: 400 2rem/1 var(--lg-font-title); }
.lg-plinth--1 { grid-column: 1 / -1; }
.lg-plinth--1 .lg-plinth__base { height: 64px; background: var(--lg-lime); }
.lg-plinth--2 .lg-plinth__base { height: 44px; }
.lg-plinth--3 .lg-plinth__base { height: 30px; }
@media (min-width: 700px) {
  .lg-plinth--1 { grid-column: 2; grid-row: 1; }
  .lg-plinth--2 { grid-column: 1; grid-row: 1; }
  .lg-plinth--3 { grid-column: 3; grid-row: 1; }
}
.lg-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
@media (min-width: 700px) { .lg-grid { grid-template-columns: repeat(4, 1fr); } }
.lg-tile { position: relative; padding: 0; border: 0; background: none; cursor: zoom-in; }
.lg-tile img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border: 2px solid var(--lg-white); transition: border-color .15s; }
.lg-tile span { position: absolute; left: 0; top: 0; padding: 4px 8px; background: var(--lg-black); color: var(--lg-white); font: 400 1rem/1 var(--lg-font-title); border-right: 2px solid var(--lg-white); border-bottom: 2px solid var(--lg-white); }
@media (hover: hover) and (pointer: fine) { .lg-tile:hover img, .lg-plinth:hover img { border-color: var(--lg-lime); } .lg-tile:hover span { background: var(--lg-lime); color: var(--lg-black); } }
.lg-tile:active img, .lg-plinth:active img { border-color: var(--lg-lime); }

/* lightbox */
.lg-lb { overscroll-behavior: contain; width: 100vw; height: 100svh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; overflow: hidden; background: var(--lg-asphalt); color: var(--lg-white); }
.lg-lb[open] { display: grid; grid-template-rows: 1fr auto; }
.lg-lb::backdrop { background: rgba(0,0,0,.8); }
.lg-lb__stage { min-height: 0; display: flex; align-items: center; justify-content: center; padding: 16px; overflow: hidden; }
.lg-lb__stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border: 3px solid var(--lg-white); touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.lg-lb__bar { display: flex; justify-content: center; gap: 0; padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }
.lg-lb__btn, .lg-lb__count { min-width: 56px; min-height: 48px; display: grid; place-items: center; background: var(--lg-black); color: var(--lg-white); border: 2px solid var(--lg-white); margin-left: -2px; font: 400 1.1rem/1 var(--lg-font-title); cursor: pointer; }
.lg-lb__count { min-width: 100px; background: var(--lg-lime); color: var(--lg-black); cursor: default; }
@media (hover: hover) and (pointer: fine) { .lg-lb__btn:hover { background: var(--lg-white); color: var(--lg-black); } }

/* ---------- 7 · passe ---------- */
.lp-foot { padding: 24px 0 48px; }
.lg-pass { position: relative; max-width: 620px; margin: 0 auto; background: var(--lg-white); color: var(--lg-black); box-shadow: 10px 10px 0 #000; }
.lg-pass__band { height: 26px; }
.lg-pass__hole { position: absolute; top: 40px; left: 50%; width: 46px; height: 12px; margin-left: -23px; border-radius: 6px; background: var(--lg-asphalt); }
.lg-pass__body { display: grid; gap: 18px; padding: 44px 20px 22px; }
@media (min-width: 600px) { .lg-pass__body { grid-template-columns: 1fr 190px; align-items: center; padding: 48px 28px 26px; } }
.lg-pass__name { margin: 6px 0 4px; font: 400 clamp(2.2rem, 10vw, 3.4rem)/1 var(--lg-font-title); text-transform: uppercase; }
.lg-pass__model { margin: 0 0 10px; font-weight: 600; }
.lg-pass__url { margin: 0; color: #3D5A00; overflow-wrap: anywhere; }
.lg-pass__qr { display: block; width: min(190px, 60vw); height: auto; border: 2px solid var(--lg-black); padding: 6px; background: #fff; }
.lp-credit { text-align: center; margin: 28px 0 0; color: var(--lg-mute); font-size: .9375rem; }
.lp-credit a { color: var(--lg-lime); }

/* ---------- enter ---------- */
.lp-in { transition: opacity .35s, transform .35s cubic-bezier(.7,0,.3,1); }
.lp-in.is-waiting { opacity: 0; transform: translateY(18px); }
