/* SciLens Racing - same design language as the SciLensLab app */
@font-face { font-family: "Russo One"; src: url("../fonts/RussoOne-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/Poppins-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/Poppins-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/Poppins-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("../fonts/Poppins-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --bg: #08090c; --card: #0e1015; --card-line: #1f232b; --inner: #12141a; --inner-line: #262a32;
  --text: #f4f4f5; --soft: #c9ccd2; --muted: #8b9099; --dim: #555b64;
  --accent: #ff6a13; --accent-2: #ffb03b; --accent-soft: #34170a; --accent-line: #7a3410;
  --blue: #3d9bff; --track: #22252c;
  --radius: 22px; --radius-s: 14px;
  --max: 1240px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Poppins", system-ui, sans-serif;
       font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------------------------------------------------------------- header */
.top { position: sticky; top: 0; z-index: 50; background: rgba(8, 9, 12, .82); backdrop-filter: blur(14px);
       border-bottom: 1px solid var(--card-line); }
.top .wrap { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: "Russo One"; font-size: 26px; letter-spacing: .3px; }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.brand b { color: var(--accent); font-weight: 400; }
.nav { display: flex; gap: 6px; margin-left: 8px; }
.nav a { padding: 9px 16px; border-radius: 12px; color: var(--soft); font-weight: 500; font-size: 15px; position: relative; white-space: nowrap; }
.nav a:hover { color: var(--text); background: var(--inner); }
.nav a.on { color: var(--accent); background: #15171d; }
.nav a.on::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--accent); }
.top .spacer { flex: 1; }
.tagline { font-size: 11px; letter-spacing: 3.5px; color: var(--soft); font-weight: 500; display: flex; align-items: center; gap: 16px; white-space: nowrap; }
.brand, .btn { white-space: nowrap; }
.brand { flex-shrink: 0; margin-right: 12px; }
.rank > *, .lrow > *, .vs-row > *, .bar > * { min-width: 0; }
.rank .who span { overflow-wrap: anywhere; }
.page-title h1 { overflow-wrap: break-word; }
@media (max-width: 1560px) { .tagline { display: none; } }
.tagline::after { content: ""; width: 56px; height: 2px; background: var(--accent); }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border-radius: var(--radius-s);
       font-weight: 600; font-size: 15px; border: 1px solid var(--inner-line); background: var(--inner); transition: .15s; }
.btn:hover { background: #191c23; transform: translateY(-1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #0b0b0d; }
.btn.primary:hover { background: #ff7f33; }
.btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; background: none; border: 0; padding: 8px; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; min-height: 560px; display: flex; align-items: flex-end; overflow: hidden; }
.hero .art { position: absolute; inset: 0; background: url("../img/hero.png") center bottom / cover no-repeat;
             image-rendering: pixelated; }
.hero .art { z-index: 0; }
.hero .wrap { z-index: 1; }
.hero .art .hero-canvas { z-index: 0; }
.hero .art::after { z-index: 1; }
.hero .art::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(8,9,12,.9) 0%, rgba(8,9,12,.62) 30%, rgba(8,9,12,.1) 52%, transparent 65%),
              linear-gradient(180deg, var(--bg) 0%, rgba(8,9,12,.25) 22%, transparent 45%, transparent 88%, var(--bg) 100%); }
.hero .art { background-position: 75% bottom; }
/* classic framing: scene fills the hero, the car sits under the text -> stronger shade so the copy stays readable */
.hero-classic .art::after {
  background: linear-gradient(90deg, rgba(8,9,12,.88) 0%, rgba(8,9,12,.66) 34%, rgba(8,9,12,.18) 62%, transparent 80%),
              linear-gradient(180deg, var(--bg) 0%, rgba(8,9,12,.4) 28%, rgba(8,9,12,.12) 60%, var(--bg) 100%); }
.hero .wrap { position: relative; padding-top: 120px; padding-bottom: 64px; width: 100%; }
.kicker { font-size: 12px; letter-spacing: 3px; color: var(--accent); font-weight: 600; text-transform: uppercase; }
.hero h1 { font-family: "Russo One"; font-weight: 400; font-size: clamp(42px, 7vw, 88px); line-height: 1.02; margin: 14px 0 18px; }
.hero h1 b { color: var(--accent); font-weight: 400; }
.hero p { max-width: 620px; color: var(--soft); font-size: 18px; margin: 0 0 30px; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.stats { display: flex; gap: 40px; margin-top: 46px; flex-wrap: wrap; }
.stats div { font-size: 13px; color: var(--muted); }
.stats strong { display: block; font-family: "Russo One"; font-weight: 400; font-size: 32px; color: var(--text); line-height: 1.1; }

/* ---------------------------------------------------------------- sections + cards */
section { padding: 64px 0; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.head h2 { font-family: "Russo One"; font-weight: 400; font-size: clamp(28px, 4vw, 44px); margin: 6px 0 0; line-height: 1.1; }
.head p { color: var(--muted); margin: 6px 0 0; max-width: 640px; }
.head .more { color: var(--accent); font-weight: 600; font-size: 15px; }
.card { background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius); }
.page-title { padding: 56px 0 8px; }
.page-title h1 { font-family: "Russo One"; font-weight: 400; font-size: clamp(36px, 6vw, 64px); margin: 8px 0 10px; line-height: 1.05; }
.page-title p { color: var(--soft); max-width: 720px; margin: 0; font-size: 17px; }
.crumb { color: var(--muted); font-size: 14px; }
.crumb a:hover { color: var(--accent); }

/* ---------------------------------------------------------------- ranking */
.seg { display: inline-flex; background: var(--inner); border: 1px solid var(--inner-line); border-radius: 16px; padding: 5px; gap: 4px; }
.seg button { border: 0; background: none; padding: 10px 18px; border-radius: 12px; font-weight: 600; font-size: 14px;
              color: var(--soft); letter-spacing: .5px; }
.seg button.on { background: var(--accent); color: #0b0b0d; }
.seg button:not(.on):hover { color: var(--text); background: #1a1d24; }
.rank-list { display: flex; flex-direction: column; gap: 10px; }
.rank { display: grid; grid-template-columns: 76px minmax(220px, 1.3fr) minmax(260px, 2fr) 110px; align-items: center; gap: 22px;
        padding: 18px 24px; background: var(--card); border: 1px solid var(--card-line); border-radius: 18px;
        transition: .15s; position: relative; overflow: hidden; }
.rank:hover { border-color: var(--accent-line); transform: translateX(3px); }
.rank.first { border-color: var(--accent-line); box-shadow: 0 0 0 1px rgba(255,106,19,.15), 0 12px 50px -20px rgba(255,106,19,.45); }
.rank.first::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--accent); }
.rank .pos { font-family: "Russo One"; font-size: 40px; color: var(--dim); text-align: center; line-height: 1; }
.rank.first .pos { color: var(--accent); }
.rank .who small { display: block; font-size: 12px; letter-spacing: 2.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.rank .who strong { display: block; font-size: 21px; font-weight: 600; line-height: 1.25; }
.rank .who span { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; }
.bars { display: flex; flex-direction: column; gap: 9px; }
.bar { display: grid; grid-template-columns: 116px 1fr 44px; align-items: center; gap: 12px; font-size: 12px; color: var(--muted);
       letter-spacing: 1px; font-weight: 600; }
.bar .tr { height: 8px; border-radius: 8px; background: var(--track); overflow: hidden; }
.bar .tr i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #7a3410, var(--accent) 70%, var(--accent-2));
             width: 0; transition: width .7s cubic-bezier(.2,.8,.2,1); }
.bar.dim .tr i { background: #3a3e48; }
.bar b { color: var(--text); font-size: 14px; text-align: right; }
.bar.dim b { color: var(--soft); font-weight: 500; }
.rank .score { text-align: right; }
.rank .score strong { display: block; font-family: "Russo One"; font-size: 42px; font-weight: 400; line-height: 1; color: var(--accent); }
.rank .score span { font-size: 12px; color: var(--muted); }
.badge { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 1.5px; padding: 3px 9px; border-radius: 999px;
         border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent); vertical-align: middle; }
.badge.grey { border-color: var(--inner-line); background: var(--inner); color: var(--soft); }
.legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 28px; }
.legend .card { padding: 22px; }
.legend h3 { margin: 0 0 6px; font-size: 16px; }
.legend p { margin: 0; color: var(--muted); font-size: 14px; }

/* podium on the home page */
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pod { padding: 26px; display: flex; flex-direction: column; gap: 14px; transition: .15s; }
.pod:hover { border-color: var(--accent-line); transform: translateY(-3px); }
.pod .n { font-family: "Russo One"; font-size: 15px; color: var(--muted); }
.pod.first .n { color: var(--accent); }
.pod h3 { margin: 0; font-size: 22px; line-height: 1.25; }
.pod h3 small { display: block; font-size: 12px; letter-spacing: 2.5px; color: var(--muted); font-weight: 600; }
.pod .big { font-family: "Russo One"; font-size: 54px; line-height: 1; color: var(--accent); }
.pod .big small { font-family: "Poppins"; font-size: 13px; color: var(--muted); margin-left: 6px; }

/* ---------------------------------------------------------------- wheel detail */
.detail-top { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: stretch; }
.score-card { padding: 30px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
              background: radial-gradient(120% 120% at 100% 0%, rgba(255,106,19,.18), transparent 60%), var(--card); }
.score-card .num { font-family: "Russo One"; font-size: 96px; line-height: .95; color: var(--accent); }
.score-card .lbl { letter-spacing: 3px; font-size: 12px; font-weight: 600; color: var(--soft); }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 20px; }
.tile { padding: 20px; }
.tile small { display: block; color: var(--muted); font-size: 12px; letter-spacing: 1.5px; font-weight: 600; text-transform: uppercase; }
.tile strong { display: block; font-family: "Russo One"; font-weight: 400; font-size: 30px; margin-top: 4px; }
.tile span { font-size: 12px; color: var(--muted); }
.verdict { padding: 30px; font-size: 19px; color: var(--soft); line-height: 1.6; position: relative; }
.verdict::before { content: "“"; font-family: "Russo One"; position: absolute; top: -6px; left: 22px; font-size: 80px; color: var(--accent); opacity: .35; }
.verdict p { margin: 18px 0 0; }
.verdict .meta { margin-top: 18px; font-size: 13px; color: var(--muted); }
.ladder { padding: 26px 30px; }
.lrow { display: grid; grid-template-columns: 34px 230px 1fr 60px; gap: 14px; align-items: center; padding: 9px 0; border-bottom: 1px solid #161920; }
.lrow:last-child { border-bottom: 0; }
.lrow .no { font-family: "Russo One"; color: var(--dim); }
.lrow .nm { font-weight: 600; font-size: 15px; line-height: 1.25; }
.lrow .nm span { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.lrow .tr { height: 10px; border-radius: 10px; background: var(--track); position: relative; overflow: hidden; }
.lrow .tr i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 10px; width: 0;
              background: linear-gradient(90deg, #7a3410, var(--accent) 70%, var(--accent-2)); transition: width .8s cubic-bezier(.2,.8,.2,1); }
.lrow b { text-align: right; font-size: 15px; }
.lscale { display: grid; grid-template-columns: 34px 230px 1fr 60px; gap: 14px; font-size: 11px; color: var(--dim); letter-spacing: 1px; margin-bottom: 6px; }
.lscale div:nth-child(3) { display: flex; justify-content: space-between; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.shot { padding: 10px; cursor: zoom-in; transition: .15s; }
.shot:hover { border-color: var(--accent-line); }
.shot img { border-radius: 12px; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; width: 100%; background: #0b0c10; }
.shot div { padding: 10px 6px 4px; font-weight: 600; font-size: 14px; display: flex; justify-content: space-between; }
.shot div span { color: var(--muted); font-weight: 400; }
.configs { display: grid; gap: 10px; }
.cfg { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; gap: 16px; transition: .15s; }
.cfg:hover { border-color: var(--accent-line); }
.cfg strong { font-family: "Russo One"; font-weight: 400; font-size: 26px; color: var(--accent); }
.cfg.cur { border-color: var(--accent-line); background: #13110f; }

/* ---------------------------------------------------------------- lab tests */
.tests { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.test { padding: 0; overflow: hidden; display: flex; flex-direction: column; transition: .15s; }
.test:hover { border-color: var(--accent-line); transform: translateY(-3px); }
.test .thumb { aspect-ratio: 16 / 9; background: #0b0c10 left 4% top 0% / 190% auto no-repeat; border-bottom: 1px solid var(--card-line); position: relative; }
.test .thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, var(--card)); }
.test .thumb.empty { background: radial-gradient(80% 120% at 50% 110%, rgba(255,106,19,.35), transparent 60%), #0c0d11;
                     display: flex; align-items: center; justify-content: center; font-family: "Russo One"; color: var(--accent); font-size: 40px; }
.test .body { padding: 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.test h3 { margin: 0; font-size: 20px; line-height: 1.3; }
.test p { margin: 0; color: var(--muted); font-size: 14px; }
.test .date { margin-top: auto; padding-top: 8px; font-size: 12px; color: var(--dim); }
.test.soon { opacity: .55; pointer-events: none; }
.article { max-width: 860px; }
.article p { font-size: 18px; color: var(--soft); }
.vs-table { display: grid; gap: 8px; margin: 26px 0; }
.vs-row { display: grid; grid-template-columns: 14px 1fr 90px 90px 90px; gap: 14px; align-items: center; padding: 14px 20px; }
.vs-row .dot { width: 12px; height: 12px; border-radius: 50%; }
.vs-row b { font-family: "Russo One"; font-weight: 400; font-size: 22px; text-align: right; }
.vs-row small { display: block; text-align: right; font-size: 11px; color: var(--muted); letter-spacing: 1px; }
.vs-head { padding: 0 20px; font-size: 11px; letter-spacing: 1.5px; color: var(--muted); font-weight: 600; }

/* ---------------------------------------------------------------- videos */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--inner-line); background: var(--inner); padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--soft); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #0b0b0d; font-weight: 600; }
.chip:not(.on):hover { color: var(--text); border-color: #3a3f4a; }
.vgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.video { cursor: pointer; display: flex; flex-direction: column; gap: 12px; }
.video .th { position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 9; background: #0b0c10;
             border: 1px solid var(--card-line); }
.video .th img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.video:hover .th img { transform: scale(1.04); }
.video .th::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.55)); }
.play { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; z-index: 2;
        background: rgba(255,106,19,.92); display: flex; align-items: center; justify-content: center; transition: .2s;
        box-shadow: 0 10px 40px rgba(255,106,19,.45); }
.play::before { content: ""; border-left: 20px solid #0b0b0d; border-top: 12px solid transparent; border-bottom: 12px solid transparent; margin-left: 5px; }
.video:hover .play { transform: scale(1.1); }
.video h3 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.35; }
.video .meta { font-size: 12px; color: var(--muted); letter-spacing: .5px; }
.shorts { display: grid; grid-auto-flow: column; grid-auto-columns: 210px; gap: 14px; overflow-x: auto; padding-bottom: 14px;
          scroll-snap-type: x mandatory; scrollbar-color: #2a2d34 transparent; }
.shorts .video { scroll-snap-align: start; }
.shorts .th { aspect-ratio: 9 / 16; }
.shorts .play { width: 48px; height: 48px; margin: -24px 0 0 -24px; }
.shorts .play::before { border-left-width: 15px; border-top-width: 9px; border-bottom-width: 9px; }
.shorts h3 { font-size: 14px; }
.yt-note { font-size: 12px; color: var(--dim); margin-top: 14px; }

/* ---------------------------------------------------------------- about */
.method { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.method .card { padding: 26px; }
.method .ic { font-family: "Russo One"; font-size: 36px; color: var(--accent); line-height: 1; }
.method h3 { margin: 14px 0 6px; font-size: 18px; }
.method p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---------------------------------------------------------------- overlay (images + video) */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(4,5,7,.94); display: none; align-items: center; justify-content: center; padding: 70px 24px 30px; }
.overlay.on { display: flex; }
.overlay img { max-height: 100%; max-width: 100%; border-radius: 12px; }
.overlay .frame { width: min(1200px, 100%); aspect-ratio: 16 / 9; }
.overlay .frame.short { width: auto; height: min(88vh, 900px); aspect-ratio: 9 / 16; }
.overlay iframe { width: 100%; height: 100%; border: 0; border-radius: 14px; }
.overlay .ctl { position: absolute; top: 16px; right: 16px; display: flex; gap: 8px; }
.overlay .ctl button { width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--inner-line); background: var(--inner); font-size: 20px; }
.overlay .ctl button:hover { border-color: var(--accent); }
.overlay .cap { position: absolute; top: 24px; left: 24px; font-weight: 600; color: var(--soft); }

/* ---------------------------------------------------------------- footer */
footer { border-top: 1px solid var(--card-line); margin-top: 40px; padding: 40px 0; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
footer nav { display: flex; gap: 20px; }
footer a:hover { color: var(--accent); }

.reveal { opacity: 0; transform: translateY(14px); animation: in .55s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes in { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .reveal { animation: none; opacity: 1; transform: none; } }
.static .reveal { animation: none; opacity: 1; transform: none; }
.static .bar .tr i, .static .lrow .tr i { transition: none; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .rank { grid-template-columns: 56px 1fr 96px; }
  .rank .bars { grid-column: 1 / -1; order: 4; }
  .tagline { display: none; }
  .tests, .vgrid, .gallery, .method { grid-template-columns: repeat(2, 1fr); }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .detail-top { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; background: var(--bg);
         border-bottom: 1px solid var(--card-line); padding: 12px 16px; }
  .nav.open { display: flex; }
  .menu-btn { display: block; margin-left: auto; }
  .top .btn { display: none; }
  .hero { min-height: 480px; }
  .hero .wrap { padding-top: 90px; padding-bottom: 330px; }      /* the animated car gets its own space below the text */
  .stats { gap: 22px 30px; margin-top: 32px; }
  .stats strong { font-size: 26px; }
  .podium, .legend, .tests, .vgrid, .gallery, .method { grid-template-columns: 1fr; }
  .rank { padding: 16px; gap: 14px; }
  .rank .pos { font-size: 30px; }
  .rank .score strong { font-size: 34px; }
  .bar { grid-template-columns: 96px 1fr 38px; }
  .lrow, .lscale { grid-template-columns: 26px 1fr 50px; }
  .lrow .tr, .lscale div:nth-child(3) { grid-column: 1 / -1; order: 4; }
  .vs-row { grid-template-columns: 12px 1fr 64px 64px 64px; padding: 12px 14px; gap: 8px; }
  .seg button { padding: 9px 12px; font-size: 13px; }
  .score-card .num { font-size: 72px; }
}
