/**
 * Sarkson — premium dark theme. Edit variables below for brand tuning.
 */
:root {
  --bg-deep: #0a0a0b;
  --bg-card: #121214;
  --bg-elevated: #18181b;
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --accent-gold: #c9a227;
  --accent-gold-dim: rgba(201, 162, 39, 0.15);
  --accent-green: #2f6b52;
  --accent-electric: #5b8cff;
  --border: rgba(255, 255, 255, 0.12);
  --radius: 14px;
  --font-body: "Inter", system-ui, sans-serif;
  --font-display: "Bebas Neue", Impact, sans-serif;
  --transition: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  /** Sticky header block (navbar + status inset) for home hero overlap */
  --site-header-h: calc(4.25rem + env(safe-area-inset-top, 0px));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[x-cloak] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  /* Avoid horizontal jump when offcanvas hides the scrollbar (Bootstrap adds padding; gutter keeps width stable). */
  scrollbar-gutter: stable;
  /* Stop iOS from inflating text (often reads as a “zoom” on load). */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body.theme-dark {
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

/* Bootstrap .min-vh-100 uses 100vh — reflows when mobile browser chrome toggles (noticeable on long heroes: home, records). */
body.theme-dark.min-vh-100 {
  min-height: 100vh !important;
  min-height: 100svh !important;
}

/* Scroll lock for offcanvas is handled by Bootstrap (ScrollBarHelper). Do not also set overflow on html — it fights scrollbar padding and causes shake on tall hero pages. */

.font-display {
  font-family: var(--font-display);
  letter-spacing: 0.04em;
}

.letter-space-sm {
  letter-spacing: 0.12em;
}

.text-muted-custom {
  color: var(--text-muted) !important;
}

.link-gold {
  color: var(--accent-gold);
  text-decoration: none;
  transition: color var(--transition);
}
.link-gold:hover,
.link-gold:focus-visible {
  color: #e4c04a;
}

.site-header {
  background: rgba(10, 10, 11, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 1030;
  padding-top: env(safe-area-inset-top, 0);
  /* body is d-flex flex-column; default flex-shrink:1 can squash the bar when the viewport height changes (mobile browser chrome). */
  flex-shrink: 0;
}

/* Blur + offcanvas backdrop compositing together causes visible jitter on some devices (home/records heroes). */
body.theme-dark:has(.offcanvas.show) .site-header {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(10, 10, 11, 0.98);
}

/* Mobile: pin header to the viewport. Sticky + d-flex body + changing mobile browser chrome often clips or “shrinks” the bar while scrolling. */
@media (max-width: 991.98px) {
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
  }
  .site-header.sticky-top {
    position: fixed;
  }
  main#main {
    padding-top: var(--site-header-h);
  }
  html {
    scroll-padding-top: var(--site-header-h);
  }
}

.site-header .navbar {
  min-height: 52px;
  flex-shrink: 0;
}

.site-logo {
  display: block;
  object-fit: contain;
}

.site-logo--nav {
  max-height: 36px;
  width: auto;
  height: auto;
}

@media (min-width: 768px) {
  .site-logo--nav {
    max-height: 44px;
  }
}

.site-logo--drawer {
  border-radius: 8px;
  object-fit: cover;
}

.site-logo--footer {
  max-width: 120px;
  height: auto;
}

.btn-menu-toggle {
  padding: 0.35rem 0.5rem;
  line-height: 1;
  border-radius: 10px;
}

.btn-menu-toggle .bi {
  font-size: 1.95rem;
  line-height: 1;
  display: block;
  font-family: "bootstrap-icons" !important;
  font-style: normal !important;
  font-weight: normal !important;
}

.navbar-brand {
  font-size: 1.35rem;
  color: var(--text) !important;
}

.navbar-dark .nav-link {
  color: var(--text-muted) !important;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem !important;
  transition: color var(--transition);
}
.navbar-dark .nav-link:hover,
.navbar-dark .nav-link:focus-visible {
  color: var(--text) !important;
}
.navbar-dark .nav-link.active {
  color: var(--accent-gold) !important;
}

.nav-records {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding-inline: 1rem !important;
  margin-left: 0.25rem;
}
.nav-records:hover,
.nav-records.active {
  border-color: rgba(201, 162, 39, 0.45);
}

/* Hero — use svh so height matches home hero; plain vh jumps when the address bar hides (records + other non-home heroes). */
.hero-full {
  position: relative;
  min-height: min(92vh, 900px);
  min-height: min(92svh, 900px);
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  min-height: 100%;
  background: linear-gradient(120deg, #050506 0%, #0f1218 45%, #0a1a14 100%);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 70% 20%, rgba(201, 162, 39, 0.12), transparent 55%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(47, 107, 82, 0.18), transparent 50%);
  pointer-events: none;
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  min-height: 100%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.hero-bg-image--desktop {
  display: none;
}

@media (min-width: 992px) {
  .hero-bg-image--mobile {
    display: none;
  }

  .hero-bg-image--desktop {
    display: block;
  }
}

/* Default placeholder / subtle treatment */
.hero-full:not(.hero-full--custom-bg) .hero-bg-image {
  opacity: 0.35;
  mix-blend-mode: luminosity;
  background-position: center top;
}

/* Uploaded photography: clearer, natural color */
.hero-full.hero-full--custom-bg .hero-bg-image {
  opacity: 0.72;
  mix-blend-mode: normal;
}

.home-page .hero-full {
  margin-top: calc(-1 * var(--site-header-h));
  padding-top: var(--site-header-h);
  min-height: 100vh;
  /* svh last: stable when mobile UI shows/hides; avoid dvh here (dynamic = reflow) */
  min-height: 100svh;
}

.home-page .hero-inner {
  padding-block: clamp(1.25rem, 4vw, 3rem);
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding-block: 5rem 4rem;
}

.hero-eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--accent-gold);
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(3rem, 10vw, 6.5rem);
  line-height: 0.95;
  margin-bottom: 1rem;
}

.hero-sub {
  max-width: 32rem;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Two-column hero: optional right image (home + records) */
.hero-side-media {
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
}

.btn-gold {
  --bs-btn-color: #0a0a0b;
  --bs-btn-bg: var(--accent-gold);
  --bs-btn-border-color: var(--accent-gold);
  --bs-btn-hover-bg: #ddb92e;
  --bs-btn-hover-border-color: #ddb92e;
  font-weight: 600;
  padding: 0.65rem 1.5rem;
  border-radius: 999px;
}

.btn-outline-light.rounded-pill {
  border-width: 1px;
  font-weight: 600;
  padding: 0.65rem 1.5rem;
}

.section-padding {
  padding-block: clamp(3rem, 8vw, 6rem);
}

.section-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-gold);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.card-sarkson {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.card-sarkson:hover {
  transform: translateY(-4px);
  border-color: rgba(201, 162, 39, 0.25);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.cover-art {
  aspect-ratio: 1;
  background: linear-gradient(145deg, #1a1a1f, #0e0e12);
  position: relative;
}

.cover-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.border-gold {
  border-color: var(--accent-gold) !important;
}

.badge-release {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--accent-gold-dim);
  color: var(--accent-gold);
  border: 1px solid rgba(201, 162, 39, 0.35);
}

.ratio-video {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}

/* Bootstrap 5.3 only ships ratio-1x1, 4x3, 16x9, 21x9 — portrait 4∶5 must set --bs-aspect-ratio (5/4×100%). */
.ratio-4x5 {
  --bs-aspect-ratio: 125%;
}

/* Portrait 3∶4 (about page story column) — 4/3×100%. */
.ratio-3x4 {
  --bs-aspect-ratio: 133.3333333333%;
}

.comeback-strip {
  background: linear-gradient(90deg, rgba(201, 162, 39, 0.08), rgba(47, 107, 82, 0.12));
  border-block: 1px solid var(--border);
}

.records-strip {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.gallery-thumb {
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: transform var(--transition), opacity var(--transition);
}

.gallery-thumb:hover {
  transform: scale(1.02);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4/5;
}

.filter-pill {
  border-radius: 999px;
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  transition: all var(--transition);
}
.filter-pill:hover,
.filter-pill.is-active {
  color: var(--text);
  border-color: var(--accent-gold);
  background: var(--accent-gold-dim);
}

.site-footer {
  background: #050506;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.form-control,
.form-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 0.65rem 1rem;
}
.form-control:focus,
.form-select:focus {
  background: var(--bg-elevated);
  border-color: rgba(201, 162, 39, 0.45);
  color: var(--text);
  box-shadow: 0 0 0 0.2rem rgba(201, 162, 39, 0.15);
}
.form-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #e4e4e7;
}

.theme-dark .form-text {
  color: var(--text-muted) !important;
  opacity: 0.95;
}

/* Dark-theme forms: readable placeholders + stable label color (invalid fields highlight the control, not the whole label). */
body.theme-dark .form-control::placeholder,
body.theme-dark textarea.form-control::placeholder {
  color: rgba(228, 228, 231, 0.58);
  opacity: 1;
}
body.theme-dark .form-control::-webkit-input-placeholder,
body.theme-dark textarea.form-control::-webkit-input-placeholder {
  color: rgba(228, 228, 231, 0.58);
}
body.theme-dark main label.form-label {
  color: #e4e4e7;
}
body.theme-dark main .form-control.is-invalid,
body.theme-dark main .form-select.is-invalid {
  border-color: rgba(220, 53, 69, 0.9);
}
body.theme-dark main .form-check.form-check-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding-left: 0;
  margin-right: 0.75rem;
  vertical-align: middle;
}
body.theme-dark main .form-check-inline .form-check-input {
  float: none;
  margin-left: 0;
  margin-top: 0;
  position: static;
  flex-shrink: 0;
}
body.theme-dark main .form-check-inline .form-check-label {
  padding-left: 0;
  margin-bottom: 0;
  line-height: 1.35;
  color: var(--text-muted);
}
body.theme-dark main .form-check-input {
  accent-color: var(--accent-gold);
  border-color: rgba(255, 255, 255, 0.35);
}

/* Mobile: iOS Safari zooms the page when focusing inputs with computed font-size < 16px; that desyncs fixed header/nav from the visual viewport until zoom is reset. */
@media (max-width: 991.98px) {
  html {
    /* Removes ~300ms delay and double-tap zoom on links/buttons (pinch zoom still works). */
    touch-action: manipulation;
  }
  /* touch-action is not inherited — targets must set it so double-tap zoom does not fire on controls (esp. offcanvas toggles). */
  .offcanvas,
  .offcanvas-backdrop,
  .btn-menu-toggle,
  .bottom-nav__item,
  button[data-bs-toggle="offcanvas"] {
    touch-action: manipulation;
  }
  textarea,
  select,
  .form-control,
  .form-select,
  .form-control-lg,
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="url"],
  input[type="search"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  input[type="time"] {
    font-size: 16px;
  }
}

/* Section dividers: Bootstrap border-opacity-25 is very faint on dark UI */
.theme-dark main .border-secondary.border-opacity-25 {
  border-color: rgba(255, 255, 255, 0.14) !important;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-gold);
  box-shadow: 0 0 0 4px var(--accent-gold-dim);
}

.lightbox-backdrop {
  /* Flex here — not Bootstrap .d-flex (display:flex !important beats Alpine x-show). */
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.92);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: revealUp 0.8s var(--transition) forwards;
}

@keyframes revealUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.delay-1 {
  animation-delay: 0.1s;
}
.delay-2 {
  animation-delay: 0.2s;
}
.delay-3 {
  animation-delay: 0.3s;
}

/* Mobile bottom navigation */
.has-bottom-nav-padding {
  padding-bottom: 0;
}
@media (max-width: 991.98px) {
  /*
   * Reserve space for fixed .bottom-nav only (~min-height + vertical padding).
   * Previously 5.65rem + safe-area stacked with footer's py-5 and read as a huge gap under the copyright.
   */
  .has-bottom-nav-padding {
    padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
  }
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 100%;
  z-index: 1040;
  /* Let taps pass through gaps between items to page content (e.g. music play buttons) */
  pointer-events: none;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  gap: 0;
  box-sizing: border-box;
  /* Total bar height stays consistent when the browser shows/hides its bottom UI */
  min-height: calc(3.85rem + env(safe-area-inset-bottom, 0px));
  padding: 0.4rem 0.2rem calc(0.45rem + env(safe-area-inset-bottom, 0px));
  background: rgba(8, 8, 10, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
  isolation: isolate;
}

@media (max-width: 991.98px) {
  .bottom-nav {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(8, 8, 10, 0.98);
  }
}

body.theme-dark:has(.offcanvas.show) .bottom-nav {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(8, 8, 10, 0.99);
}

.bottom-nav__item {
  pointer-events: auto;
  flex: 1 0 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.35rem 0.12rem;
  min-height: 3.15rem;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  border: 0;
  background: transparent;
  transition: color var(--transition), transform var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav__item i {
  font-size: 1.45rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.55);
  transition: color var(--transition);
  font-family: "bootstrap-icons" !important;
  font-style: normal !important;
  font-weight: normal !important;
  speak: none;
}
.bottom-nav__item span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bottom-nav__item.is-active,
.bottom-nav__item.is-active i {
  color: var(--accent-gold);
}
.bottom-nav__item:active {
  transform: scale(0.96);
}
.bottom-nav__btn.is-active {
  color: var(--accent-gold);
}

/* Offcanvas sidebar (mobile) */
.offcanvas-sidebar {
  --bs-offcanvas-width: min(88vw, 320px);
  background: linear-gradient(180deg, #0c0c0f 0%, #08080a 100%) !important;
  border-right: 1px solid var(--border) !important;
}
.sidebar-nav .nav-link {
  color: var(--text-muted);
  font-weight: 500;
}
.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}
.sidebar-nav .nav-link.active {
  color: var(--accent-gold);
  background: var(--accent-gold-dim);
}
.nav-records-off.active {
  border: 1px solid rgba(201, 162, 39, 0.35);
}

.btn-icon {
  opacity: 0.9;
}
.btn-icon:hover {
  opacity: 1;
}

/* Rich text from CMS */
.richtext p:last-child {
  margin-bottom: 0;
}
.richtext p {
  margin-bottom: 0.5rem;
}

@media (max-width: 991.98px) {
  .nav-records {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .card-sarkson:hover {
    transform: none;
  }
}
