:root {
  --brand-50: #fff3ef;
  --brand-100: #ffe4db;
  --brand-200: #ffc5b5;
  --brand-500: #d73719;
  --brand-600: #c03116;
  --brand-700: #a92b14;
  --brand-950: #2b140f;
  --ink: #020d26;
  --text: #334155;
  --text-strong: #020d26;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --surface: #ffffff;
  --surface-muted: #fffaf8;
  --mist: #f7f6f3;
  --footer: #1a1f25;
  --footer-rgb: 26, 31, 37;
  --footer-text: #cbd5e1;
  --footer-link: #ffffff;
  --hero-text: #ffffff;
  --hero-text-muted: #e2e8f0;
  --page-background-start: #ffffff;
  --page-background-end: #fff4ee;
  --header-surface: #ffffff;
  --surface-rgb: 255, 255, 255;
  --surface-muted-rgb: 255, 250, 248;
  --header-surface-rgb: 255, 255, 255;
  --page-background-start-rgb: 255, 255, 255;
  --page-background-end-rgb: 255, 244, 238;
  --page-accent-rgb: 215, 55, 25;
  --grid-rgb: 2, 13, 38;
  --hero-start-rgb: 255, 255, 255;
  --hero-end-rgb: 255, 244, 239;
  --banner-overlay-rgb: 2, 13, 38;
  --banner-panel-rgb: 2, 13, 38;
  --glass-rgb: 255, 255, 255;
  --shadow-rgb: 2, 13, 38;
}

html {
  scroll-behavior: smooth;
}

.page-shell {
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(var(--page-accent-rgb), 0.12), transparent 30%),
    radial-gradient(circle at 8% 22%, rgba(var(--grid-rgb), 0.06), transparent 26%),
    linear-gradient(180deg, var(--page-background-start) 0%, var(--page-background-end) 100%);
}

.page-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(var(--grid-rgb), 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--grid-rgb), 0.05) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.2), transparent 72%);
}

.page-shell header {
  border-color: var(--border) !important;
  background: rgba(var(--header-surface-rgb), 0.9) !important;
  box-shadow: 0 16px 36px rgba(var(--shadow-rgb), 0.08);
}

.page-shell [data-mobile-menu] {
  border-color: var(--border) !important;
  background: rgba(var(--surface-muted-rgb), 0.98) !important;
}

.page-shell .bg-white,
.page-shell [class~="bg-white/90"] {
  background-color: rgba(var(--surface-rgb), 0.96) !important;
}

.page-shell main > section.bg-white {
  background-color: rgba(var(--surface-rgb), 0.98) !important;
}

.page-shell .bg-mist,
.page-shell .bg-slate-50,
.page-shell .bg-slate-100 {
  background-color: var(--mist) !important;
}

.page-shell .bg-brand-50 {
  background-color: var(--brand-50) !important;
}

.page-shell .text-ink,
.page-shell .text-slate-700 {
  color: var(--text-strong) !important;
}

.page-shell .text-slate-600,
.page-shell .text-slate-500,
.page-shell .text-slate-400,
.page-shell .text-slate-300 {
  color: var(--text-muted) !important;
}

.page-shell .border-slate-200,
.page-shell .border-slate-300,
.page-shell .border-brand-100,
.page-shell .border-slate-700,
.page-shell [class~="border-slate-200/80"] {
  border-color: var(--border) !important;
}

.page-shell input,
.page-shell select,
.page-shell textarea {
  border-color: var(--border);
  background-color: rgba(var(--surface-rgb), 0.98);
  color: var(--text-strong);
}

.page-shell input::placeholder,
.page-shell textarea::placeholder {
  color: var(--text-muted);
}

.page-shell input:focus,
.page-shell select:focus,
.page-shell textarea:focus {
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px rgba(var(--page-accent-rgb), 0.16);
}

.hero-panel {
  background:
    linear-gradient(135deg, rgba(var(--hero-start-rgb), 0.94), rgba(var(--hero-end-rgb), 0.92)),
    url("/assets/images/hero-pattern.jpg");
  background-size: cover;
  background-position: center;
}

.home-image-banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--surface);
}

.home-image-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(var(--banner-overlay-rgb), 0.18), rgba(var(--banner-overlay-rgb), 0.46));
  pointer-events: none;
}

.home-banner-slides {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.home-banner-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.03);
  transition: opacity 900ms ease, transform 7000ms ease;
}

.home-banner-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.home-image-banner::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 44%;
  background: linear-gradient(180deg, rgba(var(--banner-overlay-rgb), 0), rgba(var(--banner-overlay-rgb), 0.82));
  pointer-events: none;
}

.page-title-banner {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--footer);
}

.page-title-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(var(--banner-overlay-rgb), 0.9), rgba(var(--banner-overlay-rgb), 0.66) 52%, rgba(var(--banner-overlay-rgb), 0.3)),
    linear-gradient(180deg, rgba(var(--banner-overlay-rgb), 0.22), rgba(var(--banner-overlay-rgb), 0.76));
  pointer-events: none;
}

.home-banner-content {
  border: 1px solid rgba(var(--surface-rgb), 0.24);
  border-radius: 1.5rem;
  background:
    linear-gradient(135deg, rgba(var(--banner-panel-rgb), 0.82), rgba(var(--banner-panel-rgb), 0.58));
  box-shadow: 0 28px 80px rgba(var(--shadow-rgb), 0.28);
  padding: 1.5rem;
  backdrop-filter: blur(6px);
}

.home-banner-content h1,
.page-title-banner h1 {
  color: var(--hero-text);
}

.home-banner-content .text-slate-100,
.page-title-banner .text-slate-100 {
  color: var(--hero-text-muted) !important;
}

.home-banner-dots {
  width: fit-content;
  border-radius: 999px;
  background: rgba(var(--banner-panel-rgb), 0.58);
  padding: 0.75rem;
  backdrop-filter: blur(8px);
}

.home-banner-dot {
  width: 2.5rem;
  height: 0.35rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  transition: background-color 180ms ease, width 180ms ease;
}

.home-banner-dot.is-active {
  width: 4rem;
  background: var(--brand-500);
}

@media (min-width: 1024px) {
  .home-banner-content {
    padding: 2rem;
  }
}

.glass-card {
  border-color: rgba(var(--surface-rgb), 0.28) !important;
  backdrop-filter: blur(12px);
  background: rgba(var(--glass-rgb), 0.78);
}

.shadow-brand {
  box-shadow: 0 30px 80px rgba(var(--shadow-rgb), 0.16);
}

.grid-accent {
  background-image:
    linear-gradient(135deg, rgba(var(--page-accent-rgb), 0.16), transparent 56%),
    linear-gradient(180deg, rgba(var(--surface-rgb), 0.98), rgba(var(--surface-muted-rgb), 0.98));
}

.themed-panel {
  border-color: var(--border);
  background:
    linear-gradient(135deg, rgba(var(--page-accent-rgb), 0.12), transparent 48%),
    rgba(var(--surface-rgb), 0.94);
  color: var(--text);
}

.themed-panel :where(.text-slate-600, .text-slate-500, .text-slate-400, .text-slate-300) {
  color: var(--text-muted);
}

.themed-panel-media {
  border-color: var(--border);
  background: var(--mist);
}

.catalog-filter-panel {
  align-self: start;
}

.catalog-category-list {
  max-height: 30rem;
  overflow-y: auto;
  padding-right: 0.35rem;
}

.catalog-category-list::-webkit-scrollbar {
  width: 0.45rem;
}

.catalog-category-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(var(--page-accent-rgb), 0.42);
}

.catalog-category-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text-muted);
  background: var(--mist);
}

.catalog-category-link:hover,
.catalog-category-link.is-active {
  color: var(--brand-600);
  background: var(--brand-50);
}

.company-directory-card {
  display: grid;
  gap: 1.25rem;
}

.company-directory-media {
  display: block;
  aspect-ratio: 1 / 1;
}

.company-directory-content {
  min-width: 0;
}

@media (min-width: 768px) {
  .company-directory-card {
    grid-template-columns: 11rem minmax(0, 1fr);
    align-items: start;
    padding: 1.25rem;
  }
}

.classified-detail-hero {
  width: 100%;
}

.classified-detail-hero-grid {
  display: grid;
  width: 100%;
  gap: 20px;
}

.classified-detail-info {
  display: flex;
  min-height: min(600px, calc(100vw - 2rem));
  flex-direction: column;
  justify-content: space-between;
  align-self: start;
}

.classified-detail-title {
  letter-spacing: 0;
}

.classified-detail-info-footer {
  padding-top: 3rem;
}

.classified-detail-gallery {
  min-width: 0;
}

.classified-detail-gallery .classified-scroll-track {
  gap: 20px;
}

.classified-detail-photo {
  flex: 0 0 calc(100vw - 2rem);
  aspect-ratio: 1 / 1;
}

@media (min-width: 1024px) {
  .classified-detail-hero-grid {
    grid-template-columns: minmax(20rem, 25rem) minmax(0, 1fr);
    align-items: start;
  }

  .classified-detail-info {
    min-height: 600px;
    position: sticky;
    top: 6.5rem;
  }

  .classified-detail-photo {
    flex-basis: min(600px, calc((100% - 20px) / 2));
  }
}

.classified-scroll-track {
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.classified-scroll-track::-webkit-scrollbar {
  display: none;
}

.classified-photo-slide,
.classified-scroll-card {
  scroll-snap-align: start;
}

.classified-carousel-button {
  display: inline-flex;
  width: 2.75rem;
  height: 2.75rem;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-strong);
  background: rgba(var(--surface-rgb), 0.96);
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.classified-carousel-button:hover {
  color: var(--brand-600);
  border-color: var(--brand-200);
  background: var(--brand-50);
}

.site-footer {
  color: var(--footer-text);
  border-top: 1px solid rgba(var(--page-accent-rgb), 0.18);
  background:
    linear-gradient(135deg, rgba(var(--page-accent-rgb), 0.24), transparent 42%),
    linear-gradient(180deg, rgba(var(--banner-overlay-rgb), 0.08), transparent 50%),
    linear-gradient(180deg, rgba(var(--footer-rgb), 0.98), rgba(var(--footer-rgb), 1));
}

.footer-title,
.footer-link {
  color: var(--footer-link);
}

.footer-link:hover,
.footer-rich-text a:hover {
  color: var(--brand-200);
}

.footer-rich-text p {
  margin: 0 0 0.75rem;
}

.footer-rich-text p:last-child {
  margin-bottom: 0;
}

.footer-rich-text ul,
.footer-rich-text ol {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
}

.footer-rich-text ul {
  list-style: disc;
}

.footer-rich-text ol {
  list-style: decimal;
}

.footer-rich-text li + li {
  margin-top: 0.35rem;
}

.footer-rich-text a {
  color: var(--footer-link);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  transition: color 180ms ease;
}

.nav-link-active {
  color: var(--brand-500);
}

.menu-open {
  display: block;
}

.page-shell .prose {
  color: var(--text);
}

.page-shell .prose :where(h1, h2, h3, h4, strong) {
  color: var(--text-strong);
}

.page-shell[data-theme="dimension-dark"] {
  color-scheme: dark;
}

.page-shell[data-theme="dimension-dark"] .glass-card {
  background: rgba(var(--glass-rgb), 0.82);
}

.page-shell[data-theme="dimension-dark"] .home-banner-content {
  border-color: rgba(248, 250, 252, 0.12);
}

.page-shell[data-theme="dimension-dark"] .shadow-brand {
  box-shadow: 0 26px 70px rgba(var(--shadow-rgb), 0.38);
}
