/* ==========================================================================
   Custom L.E.D. Service — refined dark theme
   Tokens + component layer shared by the HTML and app.js templates.
   Spec: docs/superpowers/specs/2026-10-13-refined-dark-redesign-design.md
   ========================================================================== */

:root {
  --bg: #0B0B0C;
  --surface: #141416;
  --surface-2: #1B1B1E;
  --border: #26262A;
  --border-strong: #3A3A40;
  --text: #EDEDED;
  --text-muted: #9A9AA0;
  --accent: #D7262E;
  --accent-hover: #E23A41;

  --font-display: 'Inter Tight', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-card: 12px;
  --radius-control: 8px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

/* ---------- Base ---------- */
html { background: var(--bg); color-scheme: dark; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@media (min-width: 768px) { body { font-size: 16px; } }
h1, h2, h3, h4, .font-display { font-family: var(--font-display); letter-spacing: -0.015em; }
.font-body { font-family: var(--font-body); }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
body.menu-open { overflow: hidden; }

.skip-link { position: absolute; left: -9999px; top: 12px; z-index: 70; padding: 8px 14px; border-radius: var(--radius-control); background: var(--text); color: var(--bg); font-weight: 600; }
.skip-link:focus { left: 16px; }

/* ---------- Layout ---------- */
.container-site { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 640px) { .container-site { padding-inline: 24px; } }
@media (min-width: 1024px) { .container-site { padding-inline: 32px; } }
.section { padding-block: 64px; }
@media (min-width: 768px) { .section { padding-block: 96px; } }

/* ---------- Type ---------- */
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.h1 { font-family: var(--font-display); font-size: 44px; line-height: 1.05; font-weight: 700; letter-spacing: -0.025em; }
.h2 { font-family: var(--font-display); font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
@media (min-width: 768px) {
  .h1 { font-size: 56px; }
  .h2 { font-size: 36px; }
}
.lede { font-size: 17px; line-height: 1.6; color: var(--text-muted); }

.link { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; transition: text-decoration-color 150ms var(--ease); }
.link:hover { text-decoration-color: var(--text); }
.link-accent { color: var(--accent); font-weight: 600; transition: color 150ms var(--ease); }
.link-accent:hover { color: var(--accent-hover); }

/* ---------- Buttons & chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border: 1px solid transparent; border-radius: var(--radius-control); font-size: 14px; font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer; transition: background-color 150ms var(--ease), border-color 150ms var(--ease), color 150ms var(--ease); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.btn-secondary:hover { border-color: var(--border-strong); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--radius-control); color: var(--text); transition: background-color 150ms var(--ease); }
.icon-btn:hover { background: var(--surface-2); }

.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-muted); font-size: 13px; font-weight: 500; cursor: pointer; transition: color 150ms var(--ease), border-color 150ms var(--ease), background-color 150ms var(--ease); }
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.tag { display: inline-flex; align-items: center; padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); color: var(--text-muted); font-size: 13px; }

/* ---------- Cards & panels ---------- */
.card { position: relative; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); transition: border-color 150ms var(--ease); }
.card:hover { border-color: var(--border-strong); }
.card-media { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-2); padding: 0; border: 0; }
button.card-media { cursor: pointer; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 200ms var(--ease); }
.card:hover .card-media img { transform: scale(1.03); }
.card-body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 16px 18px 18px; }
.card-title { font-family: var(--font-display); font-size: 17px; font-weight: 600; line-height: 1.3; color: var(--text); }
.card-title button { text-align: left; }
.card-title button:hover { text-decoration: underline; text-underline-offset: 3px; }
.card-footer { margin-top: auto; padding-top: 12px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.card-badge { position: absolute; top: 10px; left: 10px; padding: 3px 9px; border-radius: 999px; background: rgba(11, 11, 12, 0.8); color: var(--text); font-size: 12px; font-weight: 600; }
.price { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--accent); }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 20px; }
@media (min-width: 640px) { .panel { padding: 24px; } }
.panel-title { font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--text); }
.icon-tile { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface-2); color: var(--text); }
.quote { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); }
.quote p { color: var(--text); }
.quote-cite { margin-top: 12px; font-size: 14px; color: var(--text-muted); }

/* ---------- Header ---------- */
/* Solid background on purpose: backdrop-filter/transform here would trap the fixed mobile menu. */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--surface); border-bottom: 1px solid var(--border); }
.wordmark { font-family: var(--font-display); font-size: 17px; font-weight: 700; letter-spacing: -0.01em; color: var(--text); white-space: nowrap; }
.nav-link { font-size: 14px; font-weight: 500; color: var(--text-muted); transition: color 150ms var(--ease); }
.nav-link:hover, .nav-link[aria-current="page"], .nav-link[aria-expanded="true"] { color: var(--text); }
.nav-dropdown { position: relative; }
.nav-dropdown-panel { position: absolute; top: calc(100% + 20px); left: 50%; z-index: 50; width: 460px; transform: translateX(-50%); padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45); }
.nav-dropdown-panel::before { content: ''; position: absolute; top: -20px; left: 0; right: 0; height: 20px; }
.nav-dropdown-panel[hidden] { display: none; }
.menu-link { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-inline: -10px; padding: 8px 10px; border-radius: var(--radius-control); font-size: 14px; color: var(--text); transition: background-color 150ms var(--ease); }
.menu-link span { font-size: 13px; color: var(--text-muted); }
.menu-link:hover { background: var(--surface-2); }
.menu-footer-link { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 14px; font-weight: 600; color: var(--text); }
.cart-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius-control); color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; transition: border-color 150ms var(--ease); }
.cart-btn:hover { border-color: var(--border-strong); }
.mobile-menu { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: var(--bg); }
.mobile-menu[hidden] { display: none; }
.menu-list a { display: flex; align-items: center; justify-content: space-between; min-height: 52px; border-bottom: 1px solid var(--border); font-size: 17px; font-weight: 500; color: var(--text); }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg); border-top: 1px solid var(--border); }
.footer-link { font-size: 14px; color: var(--text-muted); transition: color 150ms var(--ease); }
.footer-link:hover { color: var(--text); }

/* ---------- Before / after slider ---------- */
.ba-slider { position: relative; overflow: hidden; border-radius: var(--radius-card); background: var(--surface-2); cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.ba-slider:has(#ba-range:focus-visible) { outline: 2px solid var(--text); outline-offset: 3px; }
.ba-slider img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba-slider-overlay { position: absolute; top: 0; bottom: 0; left: 0; z-index: 10; width: 50%; overflow: hidden; pointer-events: none; }
.ba-slider-overlay img { position: absolute; top: 0; left: 0; height: 100%; max-width: none; }
.ba-slider-handle { position: absolute; top: 0; bottom: 0; left: 50%; z-index: 20; width: 2px; background: rgba(255, 255, 255, 0.9); transform: translateX(-50%); pointer-events: none; }
.ba-slider-handle::after { content: ''; position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; transform: translate(-50%, -50%); border: 1px solid rgba(255, 255, 255, 0.9); border-radius: 50%; background-color: rgba(11, 11, 12, 0.85); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M8 9l-4 3 4 3m8-6l4 3-4 3'/%3E%3C/svg%3E"); background-position: center; background-repeat: no-repeat; background-size: 18px 18px; }
.ba-tag { position: absolute; bottom: 12px; z-index: 5; padding: 4px 10px; border-radius: 999px; background: rgba(11, 11, 12, 0.75); color: var(--text); font-size: 12px; font-weight: 600; pointer-events: none; }
.ba-tag-left { left: 12px; }
.ba-tag-right { right: 12px; }

/* ---------- Product drawer ---------- */
@keyframes slide-up {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.animate-slide-up { animation: slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.drawer { background: var(--surface); border: 1px solid var(--border); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); }
.drawer-close { background: rgba(11, 11, 12, 0.8); }
.drawer-bar { background: var(--surface); }
@media (max-width: 639px) {
  .drawer-bottom-sheet { position: fixed; left: 0; right: 0; bottom: 0; max-height: 90vh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
}

.accordion-item { border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--bg); transition: border-color 150ms var(--ease); }
.accordion-item.is-open { border-color: var(--border-strong); }
.accordion-trigger { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; font-size: 15px; font-weight: 600; color: var(--text); text-align: left; cursor: pointer; }
.accordion-content { padding: 0 16px 16px; font-size: 14px; color: var(--text); }
.accordion-chevron { font-size: 12px; color: var(--text-muted); transition: transform 200ms var(--ease); }
.accordion-chevron.rotate-180 { transform: rotate(180deg); }

.spec-row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.spec-row:last-child { border-bottom: 0; }
.spec-row dt { color: var(--text-muted); }
.spec-row dd { color: var(--text); font-weight: 500; text-align: right; }
.check-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; }
.check-list i { margin-top: 5px; font-size: 12px; color: var(--text-muted); }
.notice { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface-2); font-size: 14px; color: var(--text); }
.notice-warning { border-color: rgba(245, 158, 11, 0.45); color: #FCD34D; }
.bundle-row { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--bg); }

/* ---------- Shop ---------- */
.filter-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; font-size: 14px; color: var(--text-muted); }
#pagination-controls { user-select: none; }
.pagination-btn, .pagination-pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 40px; min-height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface); color: var(--text); font-size: 14px; font-weight: 500; cursor: pointer; transition: border-color 150ms var(--ease), background-color 150ms var(--ease); }
.pagination-btn:hover:not(:disabled), .pagination-pill:hover:not(.active) { border-color: var(--border-strong); }
.pagination-btn:disabled, .pagination-btn.disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }
.pagination-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pagination-ellipsis { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 40px; color: var(--text-muted); }

/* ---------- Forms ---------- */
.label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 500; color: var(--text); }
.input { width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface-2); color: var(--text); font-size: 16px; transition: border-color 150ms var(--ease); }
.input::placeholder { color: var(--text-muted); }
.input:focus { outline: none; border-color: var(--text-muted); }
.contact-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.contact-row:last-child { border-bottom: 0; }

/* ---------- Legal pages ---------- */
.prose-legal { max-width: 70ch; }
.legal-section { padding-block: 28px; border-top: 1px solid var(--border); }
.legal-h2 { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--text); }
.legal-num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface-2); font-size: 13px; color: var(--text-muted); }
.legal-callout { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface); }

/* ---------- Utilities ---------- */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.snipcart-modal { z-index: 100 !important; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .card:hover .card-media img { transform: none; }
}
