/* =============================================================================
   ShutterProp Media - theme.css
   Race-day timing sheet: warm asphalt neutrals, one hi-vis orange, condensed
   display type, monospace for numbers. Square corners, hairlines, no gradients.
   Loaded after the Tailwind CDN (see theme-head.php), so rules here use
   `html body` + !important where they must beat generated utilities.
   ============================================================================= */

:root {
    --bg:        #0b0b0a;
    --surface:   #131312;
    --surface-2: #1c1c1a;
    --line:      #2b2a27;
    --line-2:    #3d3c38;
    --text:      #ecebe6;
    --muted:     #97948b;
    --faint:     #74716a;
    --accent:    #ff5a1f;
    --accent-hi: #ff7c3d;
    --on-accent: #0b0b0a;
    --ok:        #8fdca7;

    --f-display: 'Barlow Condensed', 'Barlow', sans-serif;
    --f-body:    'Barlow', system-ui, sans-serif;
    --f-mono:    'IBM Plex Mono', ui-monospace, Consolas, monospace;
}

html { color-scheme: dark; }
html body {
    background: var(--bg) !important;
    color: var(--text);
    font-family: var(--f-body);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--on-accent); }

/* Slim scrollbars */
* { scrollbar-width: thin; scrollbar-color: var(--line-2) var(--bg); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line-2); }
::-webkit-scrollbar-thumb:hover { background: var(--faint); }

/* ---- Type ------------------------------------------------------------------ */
html body h1, html body h2, html body h3, html body .font-display {
    font-family: var(--f-display);
    text-transform: uppercase;
    letter-spacing: .02em;
    line-height: 1.05;
}
html body .font-mono, html body code, html body kbd {
    font-family: var(--f-mono);
    font-feature-settings: "zero" 1;
}
html body .font-extrabold, html body .font-bold { font-weight: 700; }

/* Small mono labels ("FOLDERS", "VIDEOS FOR SALE", etc.) */
html body h3.uppercase, html body label.uppercase, html body p.uppercase,
html body .sp-label {
    font-family: var(--f-mono);
    font-size: .70rem;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--faint);
}
html body .sp-label::before {
    content: ""; display: inline-block; width: .5rem; height: .5rem;
    background: var(--accent); margin-right: .6rem; vertical-align: .05em;
}

/* ---- Shape: square everything, flat, no glow --------------------------------- */
html body [class*="rounded"] { border-radius: 2px; }
html body div.rounded-full, html body span.rounded-full.w-2, html body span.rounded-full.h-2 { border-radius: 9999px; }
html body .shadow, html body [class*="shadow-"], html body .drop-shadow-lg { box-shadow: none !important; filter: none; }
html body .card-hover { transition: border-color .12s ease, background-color .12s ease; transform: none !important; box-shadow: none !important; }
html body .card-hover:hover { border-color: var(--accent) !important; background-color: var(--surface-2) !important; }
html body [class*="bg-gradient-to"]:not(.sp-keep-gradient) { background-image: none !important; }

/* Surfaces + hairlines */
html body .bg-gray-900, html body .bg-gray-950 { background-color: var(--surface) !important; }
html body .bg-gray-800 { background-color: var(--surface-2) !important; }
html body .border-gray-700, html body .border-gray-600 { border-color: var(--line-2) !important; }
html body .border-gray-800 { border-color: var(--line) !important; }

/* ---- Buttons -------------------------------------------------------------------
   Anything filled with the accent (bg-indigo/purple/yellow-600) becomes a flat
   orange block with dark condensed uppercase type. */
html body .bg-indigo-600, html body .bg-purple-600, html body .bg-yellow-600,
html body .bg-green-600 {
    color: var(--on-accent) !important;
    font-family: var(--f-display);
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: .95rem;
    line-height: 1.1;
    border-radius: 2px;
}
html body .bg-indigo-600:hover, html body .bg-purple-600:hover, html body .bg-yellow-600:hover,
html body .hover\:bg-indigo-500:hover, html body .hover\:bg-purple-500:hover, html body .hover\:bg-yellow-500:hover {
    background-color: var(--accent-hi) !important;
    color: var(--on-accent) !important;
}
html body .bg-green-600:hover, html body .hover\:bg-green-500:hover { background-color: #a9e7bb !important; color: var(--on-accent) !important; }
html body button:focus-visible, html body a:focus-visible, html body input:focus-visible,
html body select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Secondary (ghost) buttons */
html body .bg-gray-700 { background-color: var(--surface-2) !important; border: 1px solid var(--line-2); }
html body .bg-gray-700:hover, html body .hover\:bg-gray-600:hover { background-color: var(--line) !important; }

/* ---- Forms -------------------------------------------------------------------- */
html body input[type=text], html body input[type=email], html body input[type=password],
html body input[type=search], html body input[type=number], html body input[type=tel],
html body select, html body textarea {
    background: var(--bg) !important;
    border: 1px solid var(--line-2) !important;
    border-radius: 2px !important;
    color: var(--text);
    font-family: var(--f-body);
}
html body input::placeholder, html body textarea::placeholder { color: var(--faint); }
html body input:focus, html body select:focus, html body textarea:focus {
    border-color: var(--accent) !important;
    box-shadow: none !important;
}
html body input[type=checkbox] { accent-color: var(--accent); }

/* ---- Colour overrides for text accents ------------------------------------------ */
html body .text-indigo-300, html body .text-indigo-400, html body .text-purple-300,
html body .text-purple-400 { color: var(--accent-hi); }
html body .text-gray-100, html body .text-gray-200 { color: var(--text); }
html body .text-gray-400 { color: var(--muted); }
html body .text-gray-500, html body .text-gray-600 { color: var(--faint); }

/* ---- Range sliders (trim) -------------------------------------------------------- */
html body input[type=range].trim-range {
    -webkit-appearance: none; appearance: none;
    height: 4px; border-radius: 0; background: var(--line-2); cursor: pointer; outline: none;
}
html body input[type=range].trim-range::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 14px; height: 22px; border-radius: 0;
    background: var(--accent); border: 0; cursor: grab;
}
html body input[type=range].trim-range::-moz-range-thumb {
    width: 14px; height: 22px; border-radius: 0; background: var(--accent); border: 0; cursor: grab;
}
html body input[type=range].trim-range.end-range::-webkit-slider-thumb { background: var(--text); }
html body input[type=range].trim-range.end-range::-moz-range-thumb { background: var(--text); }

/* ---- Price badge ------------------------------------------------------------------ */
html body .price-badge {
    background: var(--accent) !important; color: var(--on-accent) !important;
    border-radius: 2px !important; padding: 2px 10px;
    font-family: var(--f-mono); font-weight: 600; font-size: .9rem;
}

/* ===========================================================================
   COMPONENTS
   =========================================================================== */
.sp-wrap { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 768px) { .sp-wrap { padding: 0 2rem; } }

/* ---- Header ----------------------------------------------------------------- */
.sp-header {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 1rem 2rem; padding: 1.25rem 0 1.1rem; border-bottom: 1px solid var(--line);
}
.sp-brand { display: flex; align-items: center; gap: .9rem; text-decoration: none; color: var(--text); }
.sp-brand img { width: 3.25rem; height: 3.25rem; background: #e9e8e3; border-radius: 50%; padding: 2px; flex: none; }
.sp-wordmark {
    font-family: var(--f-display); font-weight: 800; text-transform: uppercase;
    font-size: 2rem; letter-spacing: .03em; line-height: .95; color: var(--text);
}
.sp-wordmark span { font-weight: 600; color: var(--muted); }
.sp-tag {
    font-family: var(--f-mono); font-size: .68rem; letter-spacing: .16em;
    text-transform: uppercase; color: var(--faint); margin-top: .35rem;
}
.sp-wrap > .grid { margin-top: 1.5rem; }
.sp-nav { display: flex; align-items: center; gap: 1.5rem; }
.sp-nav a, .sp-nav button {
    font-family: var(--f-display); font-weight: 700; font-size: 1.05rem; letter-spacing: .1em;
    text-transform: uppercase; color: var(--text); background: none; border: 0; cursor: pointer;
    padding: .35rem 0; border-bottom: 2px solid transparent; text-decoration: none;
}
.sp-nav a:hover, .sp-nav button:hover { border-bottom-color: var(--accent); }
.sp-nav .sp-btn-outline { border: 1px solid var(--line-2); padding: .55rem 1rem; }
.sp-nav .sp-btn-outline:hover { border-color: var(--accent); border-bottom-color: var(--accent); }

/* ---- Bundle ticker ----------------------------------------------------------- */
.sp-ticker {
    display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1.5rem;
    border-bottom: 1px solid var(--line); padding: .6rem 0;
    font-family: var(--f-mono); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.sp-ticker b { color: var(--text); font-weight: 500; }
.sp-ticker em { font-style: normal; color: var(--accent); font-weight: 600; }
.sp-ticker .sp-ticker-note { margin-left: auto; color: var(--faint); text-transform: none; letter-spacing: .02em; }

/* ---- Hero ---------------------------------------------------------------------- */
.sp-hero { position: relative; margin: 1.75rem 0; min-height: 22rem; overflow: hidden; border: 1px solid var(--line); background: #000; }
.sp-hero img.sp-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.9) contrast(1.05); }
.sp-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11,11,10,.88) 0%, rgba(11,11,10,.55) 45%, rgba(11,11,10,.05) 100%); }
.sp-hero-copy { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; min-height: 22rem; padding: 2rem; max-width: 40rem; }
.sp-hero h2 { font-size: clamp(3rem, 8vw, 5.5rem); font-weight: 800; line-height: .88; letter-spacing: .01em; margin: .6rem 0 1rem; }
.sp-hero h2 em { font-style: normal; color: var(--accent); }
.sp-hero p { color: #d8d6cf; max-width: 30rem; }
.sp-hero .sp-label { color: #d8d6cf; }

/* ---- Search ---------------------------------------------------------------------- */
.sp-search { display: flex; border: 1px solid var(--line-2); background: var(--bg); }
.sp-search:focus-within { border-color: var(--accent); }
.sp-search input { flex: 1; border: 0 !important; background: transparent !important; padding: .85rem 1rem; font-size: 1rem; min-width: 0; }
.sp-search input:focus { outline: none; }
.sp-search button {
    background: var(--accent); color: var(--on-accent); border: 0; padding: 0 1.6rem; cursor: pointer;
    font-family: var(--f-display); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: 1rem;
}
.sp-search button:hover { background: var(--accent-hi); }

/* ---- Intro line ------------------------------------------------------------------ */
.sp-intro { border-left: 3px solid var(--accent); padding: .15rem 0 .15rem 1rem; color: var(--muted); max-width: 46rem; font-size: .98rem; }

/* ---- Section heading ("/2026-07-25_Race_Day") ------------------------------------ */
.sp-path { font-family: var(--f-mono); font-size: 1.05rem; color: var(--text); word-break: break-word; }
.sp-path .sp-slash { color: var(--accent); }

/* ---- Folder tiles ------------------------------------------------------------------ */
.sp-folders { display: grid; gap: 1px; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); background: var(--line); border: 1px solid var(--line); }
.sp-folder { position: relative; display: block; background: var(--surface); aspect-ratio: 16 / 10; overflow: hidden; text-decoration: none; }
.sp-folder img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease, filter .35s ease; filter: saturate(.85) brightness(.8); }
.sp-folder:hover img { transform: scale(1.04); filter: saturate(1) brightness(.95); }
.sp-folder::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(11,11,10,.92) 0%, rgba(11,11,10,.1) 60%); }
.sp-folder-name {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: .8rem .9rem;
    font-family: var(--f-display); font-weight: 700; font-size: 1.35rem; line-height: 1.05; letter-spacing: .03em;
    text-transform: uppercase; color: var(--text);
}
.sp-folder-idx { position: absolute; top: .6rem; left: .75rem; z-index: 1; font-family: var(--f-mono); font-size: .7rem; color: #d8d6cf; letter-spacing: .1em; }
.sp-folder:hover .sp-folder-name { color: var(--accent-hi); }
.sp-folder.sp-noimg { display: flex; align-items: flex-end; background: var(--surface-2); }
.sp-folder.sp-noimg::before {
    content: ""; position: absolute; right: -8%; top: 50%; width: 62%; aspect-ratio: 1; transform: translateY(-58%);
    background: url(../images/logo.png) center / contain no-repeat; opacity: .07; filter: grayscale(1) invert(1);
}

/* ---- Results table (clip list) ------------------------------------------------------- */
.sp-results { border-top: 1px solid var(--line-2); }
.sp-row {
    display: grid; grid-template-columns: 2.6rem minmax(0, 1fr) auto auto; align-items: center; gap: 1rem;
    padding: .8rem .25rem; border-bottom: 1px solid var(--line); transition: background-color .1s ease;
}
.sp-row:hover { background: var(--surface); }
.sp-row.sp-incart { box-shadow: inset 3px 0 0 var(--accent); background: var(--surface); }
.sp-row-idx { font-family: var(--f-mono); font-size: .75rem; color: var(--faint); text-align: right; }
.sp-row-name { font-family: var(--f-body); font-weight: 600; font-size: 1.02rem; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-row-sub { font-family: var(--f-mono); font-size: .72rem; color: var(--faint); letter-spacing: .04em; }
.sp-row-price { font-family: var(--f-mono); font-size: .9rem; color: var(--text); white-space: nowrap; }
.sp-row-price small { color: var(--faint); font-size: .68rem; margin-right: .35rem; letter-spacing: .08em; }
.sp-row-price.sp-free { color: var(--ok); }
.sp-act {
    font-family: var(--f-display); font-weight: 700; font-size: .95rem; letter-spacing: .1em; text-transform: uppercase;
    border: 1px solid var(--line-2); background: transparent; color: var(--text); padding: .45rem .95rem; cursor: pointer;
    text-decoration: none; white-space: nowrap; line-height: 1.1;
}
.sp-act:hover { border-color: var(--accent); color: var(--accent-hi); }
/* In long lists the action is outlined and fills on hover, so the page isn't a wall of orange. */
.sp-act.sp-primary { border-color: var(--line-2); }
.sp-row:hover .sp-act.sp-primary, .sp-act.sp-primary:hover, .sp-act.sp-primary:focus-visible {
    background: var(--accent); border-color: var(--accent); color: var(--on-accent);
}
/* Standalone (panels, modals): always solid */
.sp-panel .sp-act.sp-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.sp-panel .sp-act.sp-primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
.sp-act.sp-danger:hover { border-color: #e5675c; color: #f08a80; }
.sp-back { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.sp-back:hover { color: var(--accent-hi); }
@media (max-width: 640px) {
    .sp-row { grid-template-columns: minmax(0,1fr) auto; row-gap: .45rem; }
    .sp-row-idx { display: none; }
    .sp-row-price { grid-column: 1; grid-row: 2; }
    .sp-row .sp-act { grid-column: 2; grid-row: 1 / span 2; }
}

/* ---- Panels (cart, packages) --------------------------------------------------------- */
.sp-panel { border: 1px solid var(--line-2); background: var(--surface); }
.sp-panel-head { display: flex; align-items: baseline; justify-content: space-between; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); }
.sp-panel-head h2, .sp-panel-head h3 { font-size: 1.5rem; margin: 0; }
.sp-panel-head span { font-family: var(--f-mono); font-size: .72rem; color: var(--faint); letter-spacing: .1em; text-transform: uppercase; }
.sp-panel-body { padding: 1.1rem; }

/* Cart line items become a receipt */
html body .sp-cart li { background: transparent !important; border: 0 !important; border-bottom: 1px dashed var(--line-2) !important; border-radius: 0 !important; padding: .7rem 0 !important; }
html body .sp-cart li:last-child { border-bottom: 0 !important; }
html body .sp-cart .sp-cart-tag {
    width: 2.2rem; height: 1.4rem; display: inline-flex; align-items: center; justify-content: center; flex: none;
    border: 1px solid var(--line-2); background: transparent; color: var(--muted);
    font-family: var(--f-mono); font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; border-radius: 0;
}
html body .sp-cart #displayTotal { font-family: var(--f-mono); }

/* ---- Modals -------------------------------------------------------------------------- */
html body #videoModal > div, html body #retrieveModal > div, html body #editorModal > div {
    background: var(--surface) !important; border: 1px solid var(--line-2) !important; border-radius: 2px !important;
}
html body #retrieveModal > div { border-color: var(--line-2) !important; }
html body #modalTitle { font-size: 1.6rem; letter-spacing: .02em; }

/* ---- Footer ----------------------------------------------------------------------------- */
.sp-footer { margin-top: 4.5rem; padding-top: 2rem; border-top: 1px solid var(--line); color: var(--faint); font-size: .9rem; }
.sp-footer h3 { font-size: 1.15rem; color: var(--text); margin-bottom: .6rem; letter-spacing: .06em; }
.sp-footer a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.sp-footer a:hover { color: var(--accent-hi); border-bottom-color: var(--accent); }
.sp-legal { margin-top: 2rem; padding-bottom: 2.5rem; font-family: var(--f-mono); font-size: .7rem; letter-spacing: .06em; color: var(--faint); }

/* Loading overlay */
html body .loading-overlay { background: rgba(11,11,10,.9); font-family: var(--f-display); text-transform: uppercase; letter-spacing: .1em; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
