:root {
  --bg: #0b0c0f;
  --surface: #14161b;
  --surface-2: #1c1f26;
  --line: #2a2e37;
  --text: #f3f4f6;
  --muted: #a3a9b4;
  --accent: #f2b544;
  --accent-ink: #1b1405;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.preview-bar {
  position: sticky; top: 0; z-index: 30;
  padding: 10px 16px; background: #3b2f12; color: #ffe4a8; font-size: 14px; text-align: center;
}
.preview-bar a { margin-left: 10px; color: #fff; font-weight: 600; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(78vh, 760px); display: flex; align-items: flex-end; overflow: hidden; background: #000; }
.hero-empty { min-height: 0; padding-top: 64px; background: linear-gradient(180deg, #171a21, var(--bg)); }
.hero-media { position: absolute; inset: 0; display: block; cursor: zoom-in; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(5,6,8,.55) 65%, rgba(11,12,15,.97) 100%);
  pointer-events: none;
}
.hero-text {
  position: relative; z-index: 1; width: 100%; max-width: 1240px; margin: 0 auto;
  padding: 120px clamp(16px, 4vw, 40px) clamp(20px, 4vw, 44px);
  pointer-events: none;
}
.hero-text > * { pointer-events: auto; }
.hero h1 {
  margin: 0; font-size: clamp(30px, 5.4vw, 60px); line-height: 1.05; letter-spacing: -.02em; font-weight: 750;
  text-shadow: 0 2px 24px rgba(0,0,0,.45); text-wrap: balance;
}
.subtitle { margin: 10px 0 0; font-size: clamp(16px, 2vw, 20px); color: #d6d9df; max-width: 52ch; text-shadow: 0 1px 12px rgba(0,0,0,.5); }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 16px; }
.price {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: clamp(18px, 2.4vw, 24px);
  letter-spacing: -.01em;
}
.counts { color: #d6d9df; font-size: 15px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 999px; border: 1px solid rgba(255,255,255,.22); background: rgba(20,22,27,.62);
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; cursor: pointer;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: background .15s, border-color .15s, transform .15s;
}
.btn:hover { background: rgba(40,44,54,.8); border-color: rgba(255,255,255,.35); }
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--text); color: #0b0c0f; border-color: transparent; }
.btn-primary:hover { background: #fff; }
.btn-small { min-height: 36px; padding: 0 14px; font-size: 14px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Info ---------- */
main { max-width: 1240px; margin: 0 auto; padding: 0 clamp(12px, 3vw, 40px); }
.info {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: clamp(20px, 4vw, 48px);
  padding: clamp(24px, 4vw, 40px) 0 8px;
}
.info:has(> .side:only-child), .info:has(> .description:only-child) { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
.description { font-size: 17px; color: #dfe2e7; }
.description p { margin: 0 0 1em; }
.description p:last-child { margin-bottom: 0; }
.side { display: flex; flex-direction: column; gap: 16px; }
.specs {
  margin: 0; padding: 6px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
}
.specs > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.specs > div:last-child { border-bottom: 0; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; text-align: right; font-weight: 600; }
.specs dt:empty { display: none; }
.specs dt:empty + dd { text-align: left; font-weight: 500; }
.contact { padding: 16px 18px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }
.contact h2 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.contact p { margin: 0 0 .5em; font-size: 17px; }
.contact p:last-child { margin: 0; }
.contact a { font-weight: 700; text-decoration: none; }
.contact a:hover { text-decoration: underline; }

/* ---------- Media grid ---------- */
.media { padding: clamp(20px, 3vw, 36px) 0 40px; }
.media-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; min-height: 36px; }
.tabs { display: flex; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.tab {
  border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; cursor: pointer;
  color: var(--muted); font-weight: 600; font-size: 14px;
}
.tab[aria-selected="true"] { background: var(--surface-2); color: var(--text); }
.tab span { opacity: .7; font-weight: 500; margin-left: 4px; }
.slideshow-start { margin-left: auto; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.grid .tile img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.grid.justified { display: block; }
.row { display: flex; margin-bottom: var(--gap, 6px); gap: var(--gap, 6px); }
.tile {
  position: relative; display: block; overflow: hidden; border-radius: 6px; background: var(--surface); color: #fff;
  cursor: zoom-in; -webkit-tap-highlight-color: transparent;
}
.grid.justified .tile img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; transition: transform .35s ease, opacity .3s; }
.grid.justified .tile img.loading { opacity: 0; }
.tile:hover img { transform: scale(1.025); }
.tile .badge {
  position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px 3px 7px; border-radius: 999px; background: rgba(0,0,0,.62); color: #fff; font-size: 12.5px; font-weight: 600;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); pointer-events: none;
}
.tile .badge svg { width: 13px; height: 13px; }
.tile .play {
  position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%;
  background: rgba(0,0,0,.5); border: 2px solid rgba(255,255,255,.85); display: grid; place-items: center; pointer-events: none;
}
.tile .play svg { width: 22px; height: 22px; margin-left: 3px; }
.empty { color: var(--muted); padding: 40px 0; text-align: center; }

.foot { max-width: 1240px; margin: 0 auto; padding: 24px clamp(12px, 3vw, 40px) 40px; color: #5d636e; font-size: 13px; }

/* ---------- Home ---------- */
.home { padding: clamp(32px, 6vw, 72px) clamp(16px, 4vw, 40px); }
.home h1 { margin: 0 0 24px; font-size: clamp(28px, 4vw, 44px); letter-spacing: -.02em; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.card { display: block; color: inherit; text-decoration: none; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.card-img { aspect-ratio: 3 / 2; background: var(--surface-2); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-text { padding: 14px 16px 16px; }
.card h2 { margin: 0; font-size: 18px; }
.card p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

/* ---------- Lightbox ---------- */
html.lb-open, html.lb-open body { overflow: hidden; }
.lb {
  position: fixed; inset: 0; z-index: 100; background: #000; color: #fff;
  display: flex; flex-direction: column; user-select: none; -webkit-user-select: none;
  opacity: 0; transition: opacity .18s ease;
}
.lb.show { opacity: 1; }
.lb-stage { position: relative; flex: 1; overflow: hidden; touch-action: none; }
.lb-track { position: absolute; inset: 0; will-change: transform; }
.lb-slide { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lb-slide img {
  max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
  transform-origin: center center; will-change: transform; -webkit-user-drag: none; user-select: none;
}
.lb-slide video { max-width: 100%; max-height: 100%; background: #000; touch-action: manipulation; outline: none; }
.lb-slide .spinner {
  position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; margin: -18px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.2); border-top-color: #fff; animation: spin .8s linear infinite; pointer-events: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

.lb-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) 8px max(14px, env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(0,0,0,.65), rgba(0,0,0,0)); transition: opacity .2s;
}
.lb-count { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; opacity: .92; white-space: nowrap; }
.lb-actions { display: flex; align-items: center; gap: 2px; }
.lb-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: transparent; color: #fff; cursor: pointer; text-decoration: none; transition: background .15s;
}
.lb-btn:hover { background: rgba(255,255,255,.14); }
.lb-btn svg { width: 22px; height: 22px; }
.lb-btn.on { background: rgba(255,255,255,.2); }
.lb-btn.text { width: auto; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.lb-nav {
  position: absolute; top: 50%; z-index: 3; width: 56px; height: 56px; margin-top: -28px; border: 0; border-radius: 50%;
  background: rgba(20,20,20,.45); color: #fff; cursor: pointer; display: grid; place-items: center; transition: background .15s, opacity .2s;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.lb-nav:hover { background: rgba(60,60,60,.7); }
.lb-nav svg { width: 28px; height: 28px; }
.lb-prev { left: max(12px, env(safe-area-inset-left)); }
.lb-next { right: max(12px, env(safe-area-inset-right)); }
.lb-nav:disabled { opacity: 0; pointer-events: none; }
.lb-bottom { position: relative; z-index: 3; background: #000; transition: opacity .2s; padding-bottom: env(safe-area-inset-bottom); }
.lb-caption { padding: 8px 16px 0; font-size: 14.5px; color: #e6e8eb; text-align: center; min-height: 0; }
.lb-caption:empty { display: none; }
.lb-strip {
  display: flex; gap: 4px; overflow-x: auto; padding: 8px max(8px, env(safe-area-inset-left)); scrollbar-width: none;
  scroll-behavior: smooth;
}
.lb-strip::-webkit-scrollbar { display: none; }
.lb-thumb {
  position: relative; flex: none; height: 56px; padding: 0; border: 0; border-radius: 4px; overflow: hidden; cursor: pointer;
  background: #1a1a1a; opacity: .5; transition: opacity .15s, outline-color .15s; outline: 2px solid transparent; outline-offset: -2px;
}
.lb-thumb img { height: 100%; width: 100%; object-fit: cover; }
.lb-thumb:hover { opacity: .85; }
.lb-thumb.current { opacity: 1; outline-color: #fff; }
.lb-thumb .mini-play { position: absolute; right: 3px; bottom: 3px; width: 14px; height: 14px; color: #fff; filter: drop-shadow(0 0 2px #000); }
.lb.chrome-hidden .lb-top, .lb.chrome-hidden .lb-nav, .lb.chrome-hidden .lb-bottom { opacity: 0; pointer-events: none; }
.lb.no-strip .lb-strip { display: none; }
.lb-missing { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 10px 16px; border-radius: 10px; background: rgba(40,40,40,.9); font-size: 15px; text-align: center; max-width: 80%; }
.lb-toast {
  position: absolute; left: 50%; bottom: 110px; z-index: 5; transform: translateX(-50%); padding: 8px 14px; border-radius: 999px;
  background: rgba(30,30,30,.92); font-size: 14px; pointer-events: none; opacity: 0; transition: opacity .2s;
}
.lb-toast.show { opacity: 1; }

@media (max-width: 760px) {
  .info { grid-template-columns: minmax(0, 1fr); }
  .hero { min-height: 72vh; }
  .hero-text { padding-top: 90px; }
  .lb-nav { display: none; }
  .lb.is-video .lb-nav { display: grid; width: 44px; height: 44px; margin-top: -22px; top: 40%; }
  .lb-thumb { height: 48px; }
  .lb-btn.hide-sm { display: none; }
  .description { font-size: 16px; }
}
@media (hover: none) {
  .tile:hover img { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
