/* ==========================================================================
   Motorsport Visuals · Photo store
   Tokens copied from motorsportvisuals.com (src/styles/site.css):
   Night #0A0B0D · Bone #F4F3EF · Teal #00A19B
   Type: Inter (display + text, optical sizing) · JetBrains Mono (labels)
   ========================================================================== */

@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/fonts/inter-latin.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/fonts/inter-latin-ext.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono Variable"; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url(/fonts/jetbrains-mono-latin.woff2) format("woff2-variations"); }

:root {
  --bone: #f4f3ef; --bone-2: #ebeae4; --bone-3: #e1e0d9;
  --night: #0a0b0d; --night-2: #141619; --night-3: #1d2024;
  --teal: #00a19b; --teal-d: #008a85;
  --ink: var(--night); --ink-2: rgba(10, 11, 13, .68); --ink-3: rgba(10, 11, 13, .46);
  --line: rgba(10, 11, 13, .13); --line-2: rgba(10, 11, 13, .24);
  --on-dark-2: rgba(244, 243, 239, .72); --on-dark-3: rgba(244, 243, 239, .5); --line-dark: rgba(244, 243, 239, .14);
  --sans: "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono Variable", ui-monospace, "SF Mono", monospace;
  --g: clamp(16px, 3.2vw, 52px);
  --maxw: 1480px;
  --top-h: 68px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --cut: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  --cut-s: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 140px; }
body { margin: 0; background: var(--bone); color: var(--ink); font: 400 16.5px/1.6 var(--sans); font-optical-sizing: auto; font-style: normal; letter-spacing: -.006em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip; min-height: 100svh; display: flex; flex-direction: column; }
main { flex: 1; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
[hidden] { display: none !important; }
::selection { background: var(--teal); color: var(--bone); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 300; padding: 10px 16px; background: var(--teal); color: var(--bone); font-weight: 600; transition: top .2s; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--g); }
.mono { font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }

/* ── type ── */
.h1, .h2, .h3 { font-family: var(--sans); font-weight: 800; text-transform: uppercase; letter-spacing: -.022em; }
.h1 { font-size: clamp(44px, 7.4vw, 124px); line-height: .9; }
.h2 { font-size: clamp(34px, 5vw, 84px); line-height: .92; }
.h3 { font-size: clamp(22px, 1.9vw, 30px); line-height: 1; letter-spacing: -.015em; }
.h1 em, .h2 em, .h3 em { font-style: normal; color: var(--teal); }
.lead { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.45; letter-spacing: -.015em; }
.body { color: var(--ink-2); max-width: 60ch; }

/* ── broadcast tag ── */
.tag { display: flex; align-items: center; margin-bottom: clamp(22px, 2.6vw, 40px); }
.tag b, .tag span { padding: 7px 11px; font: 600 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.tag b { background: var(--teal); color: var(--bone); }
.tag span { background: var(--night); color: var(--bone); overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tag i { flex: 1; height: 1px; background: var(--line); margin-left: 18px; }

/* ── buttons ── */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px; height: 54px; padding: 0 26px; clip-path: var(--cut);
  font: 700 14px var(--sans); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap;
  background: var(--teal); color: var(--bone); transition: background .35s, color .35s; }
.btn .arr { transition: transform .45s var(--ease); }
.btn:hover { background: var(--night); }
.btn:hover .arr { transform: translateX(5px); }
.btn--ghost { background: transparent; color: var(--night); box-shadow: inset 0 0 0 1.5px var(--night); clip-path: none; }
.btn--ghost:hover { background: var(--night); color: var(--bone); }
.btn--sm { height: 44px; padding: 0 18px; font-size: 13px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.link { display: inline-flex; gap: 8px; font-weight: 600; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat; padding-bottom: 3px; transition: background-size .6s var(--ease), color .3s; }
a:hover .link, .link:hover { background-size: 0 1.5px; background-position: 100% 100%; color: var(--teal); }

/* ── top bar ── */
.top { position: sticky; top: 0; z-index: 60; height: var(--top-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 var(--g);
  background: rgba(244, 243, 239, .9); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); border-bottom: 1px solid var(--line); }
.top-logo { position: relative; width: clamp(150px, 13vw, 190px); flex: none; }
.top-logo .l-light { display: none; }
.top-r { display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); }
.top-link { font-size: 15px; font-weight: 500; position: relative; padding: 6px 0; }
.top-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--teal); transform: scaleX(0); transform-origin: right; transition: transform .6s var(--ease); }
.top-link:hover::after { transform: scaleX(1); transform-origin: left; }
.top-pill { display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 17px; border-radius: 100px; border: 1.5px solid currentColor; font-size: 14px; font-weight: 600; transition: background .4s, color .4s; }
.top-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }
.top-pill:hover { background: var(--night); color: var(--bone); border-color: var(--night); }
@media (max-width: 560px) { .top-link { display: none; } }

.draft { background: var(--night); color: var(--bone); text-align: center; padding: 10px var(--g); }

/* ── home ── */
.hero-s { padding-top: clamp(40px, 7vw, 110px); padding-bottom: clamp(32px, 4vw, 64px); }
.hero-s-lead { max-width: 34ch; margin-top: clamp(18px, 2vw, 30px); color: var(--ink-2); }
.ev-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: clamp(14px, 1.6vw, 24px); padding-bottom: clamp(60px, 8vw, 120px); }
.ev-card { display: flex; flex-direction: column; background: #fff; clip-path: var(--cut); transition: transform .6s var(--ease); animation: rise .9s var(--ease) both; animation-delay: calc(var(--i) * 70ms); }
.ev-card:hover { transform: translateY(-4px); }
.ev-card-img { aspect-ratio: 3 / 2; overflow: hidden; background: var(--night-3); }
.ev-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.ev-card:hover .ev-card-img img { transform: scale(1.04); }
.ev-card-blank { width: 100%; height: 100%; background: repeating-linear-gradient(135deg, var(--night-2) 0 18px, var(--night-3) 18px 36px); }
.ev-card-body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.ev-card-series { color: var(--teal); }
.ev-card-meta { color: var(--ink-3); }
.ev-card-cta { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; align-items: baseline; }
.ev-card-cta .mono { color: var(--ink-3); }
.empty { color: var(--ink-2); padding: 30px 0 80px; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }

/* ── event hero ── */
.ev-hero { padding-top: clamp(34px, 5vw, 80px); padding-bottom: clamp(26px, 3vw, 44px); }
.ev-title { max-width: 16ch; }
.ev-meta { margin-top: 18px; color: var(--ink-2); line-height: 1.9; }
.ev-meta span { color: var(--teal); margin: 0 4px; }
.ev-intro { margin-top: 16px; }
.ev-prices { display: flex; flex-wrap: wrap; gap: 0; margin-top: clamp(22px, 2.4vw, 34px); border-top: 1px solid var(--line); }
.ev-prices li { flex: 1 1 180px; padding: 14px 18px 4px 0; display: flex; flex-direction: column; gap: 4px; }
.ev-prices li + li { padding-left: 18px; border-left: 1px solid var(--line); }
.ev-prices .mono { color: var(--ink-3); }
.ev-prices strong { font-size: clamp(22px, 2vw, 30px); font-weight: 800; text-transform: uppercase; letter-spacing: -.01em; }
@media (max-width: 560px) { .ev-prices li + li { padding-left: 0; border-left: 0; } .ev-prices li { flex-basis: 100%; padding-bottom: 10px; border-bottom: 1px solid var(--line); } }

/* ── filters ── */
.filters { position: sticky; top: var(--top-h); z-index: 40; background: rgba(244, 243, 239, .94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-block: 1px solid var(--line); }
.filters-in { display: flex; align-items: center; gap: 14px; padding-block: 10px; }
.find { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--line-2); flex: none; }
.find .mono { color: var(--teal); }
.find input { width: 9.5em; border: 0; outline: 0; background: transparent; font: 600 16px var(--sans); color: var(--ink); }
.find:focus-within { box-shadow: inset 0 0 0 2px var(--teal); }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 2px 0; mask-image: linear-gradient(90deg, #000 92%, transparent); }
.chips::-webkit-scrollbar { display: none; }
@media (min-width: 1100px) { .chips { mask-image: none; flex-wrap: wrap; } }
.chip { flex: none; height: 38px; padding: 0 13px; font: 700 15px var(--sans); letter-spacing: .02em; background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); transition: background .25s, color .25s, box-shadow .25s; }
.chip span { font: 500 10.5px var(--mono); color: var(--ink-3); margin-left: 4px; }
.chip:hover { box-shadow: inset 0 0 0 1.5px var(--night); }
.chip.on { background: var(--night); color: var(--bone); box-shadow: none; }
.chip.on span { color: var(--teal); }
@media (max-width: 640px) { .filters-in { flex-direction: column; align-items: stretch; gap: 8px; } .find input { width: 100%; } .find { width: 100%; } }

/* ── gallery grid (justified rows; --r = width/height) ── */
.gal { padding-top: 14px; padding-bottom: 140px; }
.grid { --rh: clamp(130px, 18vw, 250px); display: flex; flex-wrap: wrap; gap: 6px; }
.grid::after { content: ""; flex-grow: 1e4; }
.tile { position: relative; flex: var(--r) 1 calc(var(--rh) * var(--r)); max-width: calc(var(--rh) * var(--r) * 1.8); background: var(--bone-3); overflow: hidden; }
.tile-open { display: block; }
.tile img { width: 100%; height: auto; aspect-ratio: var(--r); object-fit: cover; transition: transform .8s var(--ease), opacity .3s; }
.tile:hover img { transform: scale(1.025); }
.tile figcaption { position: absolute; left: 8px; bottom: 8px; padding: 4px 7px; background: rgba(10, 11, 13, .72); color: var(--bone); font-size: 10.5px; pointer-events: none; }
.pick { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; display: grid; place-items: center; background: rgba(10, 11, 13, .35); box-shadow: inset 0 0 0 1.5px rgba(244, 243, 239, .85); clip-path: var(--cut-s); transition: background .25s, box-shadow .25s; }
.pick svg { width: 20px; height: 20px; fill: none; stroke: var(--bone); stroke-width: 2.6; opacity: 0; transition: opacity .2s; }
.pick:hover svg { opacity: .5; }
.tile.sel .pick { background: var(--teal); box-shadow: none; }
.tile.sel .pick svg { opacity: 1; }
.tile.sel::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 3px var(--teal); pointer-events: none; }
.tile.sel img { opacity: .88; }
.gal-empty { color: var(--ink-2); padding: 20px 0; }
@media (max-width: 640px) { .grid { gap: 4px; } .pick { top: 6px; right: 6px; width: 38px; height: 38px; } }

/* ── car bundle offer ── */
.bundle { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; padding: 18px 20px; background: var(--night); color: var(--bone); clip-path: var(--cut); animation: rise .6s var(--ease); }
.bundle .mono { color: var(--on-dark-3); }
.bundle .mono b { color: var(--teal); font-weight: 600; }
.bundle-t { font-size: clamp(18px, 1.6vw, 22px); font-weight: 600; margin-top: 4px; }
.bundle-t strong { color: var(--teal); }
.bundle-t span { color: var(--on-dark-2); font-weight: 400; font-size: .85em; margin-left: 6px; }
.bundle .btn:hover { background: var(--bone); color: var(--night); }

/* ── cart bar ── */
.cart { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; background: var(--night); color: var(--bone); padding-bottom: env(safe-area-inset-bottom); animation: up .5s var(--ease); }
.cart-in { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-block: 12px; }
.cart-in p { display: flex; flex-direction: column; line-height: 1.25; }
.cart-in strong { font-size: 20px; font-weight: 800; text-transform: uppercase; }
.cart-in .mono { color: var(--teal); margin-top: 3px; }
.cart-terms { font-size: 12px; color: var(--on-dark-3); margin-top: 4px; }
.cart-terms a { text-decoration: underline; text-underline-offset: 2px; }
.cart-terms a:hover { color: var(--teal); }
.cart-b { display: flex; gap: 8px; }
.cart .btn--ghost { color: var(--bone); box-shadow: inset 0 0 0 1.5px rgba(244, 243, 239, .4); }
.cart .btn--ghost:hover { background: var(--bone); color: var(--night); }
.cart .btn:not(.btn--ghost):hover { background: var(--bone); color: var(--night); }
@keyframes up { from { transform: translateY(100%); } }
@media (max-width: 480px) { #cart-clear { display: none; } }

/* ── lightbox ── */
.lb { position: fixed; inset: 0; z-index: 200; background: rgba(10, 11, 13, .97); color: var(--bone); display: grid; grid-template: 1fr auto / 64px 1fr 64px; animation: fade .3s; touch-action: pan-y; }
.lb-fig { grid-area: 1 / 2; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 0; padding: 20px 0 8px; gap: 10px; }
.lb-fig img { max-width: 100%; max-height: calc(100svh - 150px); object-fit: contain; user-select: none; -webkit-user-drag: none; }
.lb-fig figcaption { color: var(--on-dark-3); min-height: 1em; }
.lb-x { position: absolute; top: 12px; right: 14px; z-index: 2; width: 46px; height: 46px; font-size: 32px; line-height: 1; border-radius: 50%; border: 1.5px solid rgba(244, 243, 239, .4); }
.lb-x:hover { background: var(--bone); color: var(--night); }
.lb-nav { font-size: 44px; color: var(--on-dark-2); align-self: center; height: 120px; }
.lb-nav:hover { color: var(--teal); }
.lb-prev { grid-area: 1 / 1; } .lb-next { grid-area: 1 / 3; }
.lb-bar { grid-area: 2 / 1 / 3 / 4; display: flex; align-items: center; justify-content: center; gap: 18px; padding: 10px var(--g) calc(18px + env(safe-area-inset-bottom)); }
.lb-count { color: var(--on-dark-3); }
.lb-pick.on { background: var(--bone); color: var(--night); }
.lb .btn:hover { background: var(--bone); color: var(--night); }
@keyframes fade { from { opacity: 0; } }
@media (max-width: 640px) { .lb { grid-template-columns: 0 1fr 0; } .lb-nav { display: none; } }

/* ── message / forms ── */
.msg { padding-top: clamp(50px, 8vw, 120px); padding-bottom: clamp(60px, 9vw, 140px); }
.msg-p { max-width: 36ch; margin: 18px 0 30px; color: var(--ink-2); }
.note { max-width: 52ch; padding: 14px 16px; margin-bottom: 22px; background: #fff; box-shadow: inset 3px 0 0 var(--teal); }
.find-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; max-width: 620px; }
.field { display: flex; flex-direction: column; gap: 7px; flex: 1 1 260px; }
.field .mono { color: var(--ink-3); }
.field input { height: 54px; padding: 0 16px; border: 0; background: #fff; box-shadow: inset 0 0 0 1px var(--line-2); font: 500 17px var(--sans); color: var(--ink); border-radius: 0; }
.field input:focus { outline: 0; box-shadow: inset 0 0 0 2px var(--teal); }

/* ── order / downloads ── */
.dl-all { margin-top: 26px; }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 14px; padding-bottom: 100px; }
.dl-item { display: flex; flex-direction: column; gap: 8px; }
.dl-img { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--bone-3); }
.dl-img img { width: 100%; height: 100%; object-fit: cover; }
.dl-btn { width: 100%; }
.dl-btn.done { background: var(--night); }
.spinner { display: flex; gap: 8px; }
.spinner i { width: 34px; height: 4px; background: var(--teal); animation: pulse 1.2s var(--ease) infinite; }
.spinner i:nth-child(2) { animation-delay: .15s; } .spinner i:nth-child(3) { animation-delay: .3s; }
@keyframes pulse { 50% { opacity: .2; } }

/* ── footer ── */
.foot { background: var(--night); color: var(--on-dark-3); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; padding-block: 26px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 18px; }
.foot a:hover { color: var(--teal); }

/* ── toast ── */
.toast { position: fixed; left: 50%; bottom: 96px; z-index: 300; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 13px 18px; background: var(--night); color: var(--bone); box-shadow: inset 3px 0 0 var(--teal); font-size: 15px; animation: rise .4s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
}

/* ── email code ── */
.note--err { box-shadow: inset 3px 0 0 #b3261e; }
.code-form .field input { font: 700 26px var(--mono); letter-spacing: .3em; max-width: 260px; }
.resend-code { margin-top: 14px; }
.resend-code .link { font-size: 15px; }
.code-help { margin-top: 34px; font-size: 15px; }

/* ── legal pages ── */
.legal { max-width: 860px; margin-inline: 0; padding-bottom: clamp(60px, 8vw, 120px); }
.legal-toc { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 22px 0 10px; }
.legal-toc a { color: var(--teal); }
.legal-toc a:hover { color: var(--ink); }
.legal-s { padding-top: 34px; margin-top: 30px; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.legal-s .h3 { margin-bottom: 18px; }
.legal-s h3 { font: 700 18px/1.3 var(--sans); margin: 24px 0 8px; }
.legal-s p, .legal-s li { color: var(--ink-2); max-width: 68ch; }
.legal-s p + p { margin-top: 10px; }
.legal-s ul { list-style: disc; padding-left: 22px; margin: 6px 0 10px; }
.legal-s li + li { margin-top: 3px; }
.legal-s a { color: var(--teal); text-decoration: underline; }
