:root {
  color-scheme: dark;
  --bg: #090909;
  --surface: #101010;
  --surface-raised: #151313;
  --line: #2d2927;
  --line-warm: #513029;
  --text: #f1ece3;
  --muted: #ada69d;
  --accent: #a84034;
  --accent-bright: #d46755;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 82% 0%, rgb(75 25 20 / 22%), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header,
main,
.site-footer {
  width: min(100% - 48px, 1440px);
  margin-inline: auto;
}

.site-header {
  min-height: 108px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 10px;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.site-header nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
}

.site-header nav a {
  color: var(--muted);
  font-size: 0.78rem;
  text-decoration: none;
  transition: color 160ms ease;
}

.site-header nav a:hover,
.site-header nav a:focus-visible {
  color: var(--text);
}

.signature {
  justify-self: end;
  color: #c6b6a8;
  font-family: var(--serif);
  font-size: 0.95rem;
  font-style: italic;
}

.catalog-hero {
  min-height: 250px;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  align-items: end;
  gap: clamp(36px, 8vw, 130px);
  padding: 68px 0 58px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 24px;
  color: #c06a5c;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 42px;
  height: 1px;
  background: #8b493f;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 950px;
  margin-bottom: 0;
  font-family: var(--serif);
  font-size: clamp(3.1rem, 6.6vw, 6.6rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 0.94;
}

.hero-copy {
  margin-bottom: 10px;
  padding-left: 28px;
  border-left: 1px solid #744038;
  color: #d7c9bc;
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1.65vw, 1.45rem);
  line-height: 1.55;
}

.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 26px 0 30px;
}

.search-box {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(255 255 255 / 2%);
}

.search-box:focus-within {
  border-color: #815046;
}

.search-box svg {
  width: 18px;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-width: 1.7;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.78rem;
}

.search-box input::placeholder {
  color: #7e7872;
}

.filter-list {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-list::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 17px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.72rem;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.filter-chip:hover,
.filter-chip:focus-visible {
  border-color: #765047;
  color: var(--text);
}

.filter-chip[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.catalog-count {
  margin: 0;
  color: #817b76;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-align: right;
  text-transform: uppercase;
  white-space: nowrap;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 48px 20px;
  padding-bottom: 80px;
}

.catalog-card {
  min-width: 0;
}

.card-image-wrap {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 0.8;
  padding: 0;
  overflow: hidden;
  border: 1px solid #292725;
  background:
    radial-gradient(circle at 50% 42%, #393633, #151514 58%, #0d0d0d 100%);
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.card-image-wrap:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 4px;
}

.card-image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, rgb(0 0 0 / 38%));
  pointer-events: none;
}

.card-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(0.72) contrast(1.04);
  transition:
    transform 420ms ease,
    filter 420ms ease,
    opacity 200ms ease;
}

.catalog-card:hover .card-image {
  transform: scale(1.025);
  filter: saturate(0.9) contrast(1.05);
}

.card-badge {
  position: absolute;
  z-index: 1;
  top: 15px;
  left: 15px;
  padding: 8px 10px;
  border: 1px solid #49433f;
  background: rgb(10 10 10 / 78%);
  color: #d8cfc5;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.card-content {
  padding-top: 18px;
}

.card-category {
  margin-bottom: 8px;
  color: var(--accent-bright);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.card-title {
  min-height: 2.2em;
  margin-bottom: 5px;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 1.9vw, 1.72rem);
  font-weight: 500;
  line-height: 1.1;
}

.card-studio {
  min-height: 1.4em;
  margin-bottom: 17px;
  color: #7f7973;
  font-size: 0.67rem;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line-warm);
}

.details-button,
.budget-button,
.footer-cta,
.primary-cta,
.empty-state button {
  cursor: pointer;
  font-size: 0.66rem;
  font-weight: 750;
  text-decoration: none;
}

.details-button {
  padding: 10px 0;
  border: 0;
  background: transparent;
  color: #ded5cb;
  text-align: left;
}

.details-button span {
  padding-left: 6px;
  color: var(--accent-bright);
}

.budget-button {
  padding: 11px 13px;
  border: 1px solid #6a3831;
  background: transparent;
  color: #d4b4ac;
  transition:
    background 160ms ease,
    color 160ms ease;
}

.budget-button:hover,
.budget-button:focus-visible,
.primary-cta:hover,
.primary-cta:focus-visible {
  background: var(--accent);
  color: #fff;
}

.empty-state {
  margin: 30px 0 100px;
  padding: 60px 24px;
  border: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.empty-state button {
  margin-top: 10px;
  padding: 12px 18px;
  border: 1px solid var(--line-warm);
  background: transparent;
  color: var(--text);
}

.site-footer {
  min-height: 190px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer p {
  max-width: 520px;
  margin-bottom: 6px;
  font-size: 0.78rem;
  line-height: 1.6;
}

.footer-brand {
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.35rem !important;
}

.footer-cta,
.primary-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid #6a3831;
  color: #dec0b9;
  transition:
    background 160ms ease,
    color 160ms ease;
}

.model-dialog {
  width: min(1180px, calc(100% - 32px));
  max-height: min(880px, calc(100dvh - 32px));
  padding: 0;
  overflow: hidden;
  border: 1px solid #3c3531;
  background: #0c0c0c;
  color: var(--text);
}

.model-dialog::backdrop {
  background: rgb(0 0 0 / 84%);
  backdrop-filter: blur(5px);
}

.dialog-close {
  position: absolute;
  z-index: 4;
  top: 12px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: 1px solid #4a4541;
  border-radius: 50%;
  background: rgb(10 10 10 / 80%);
  color: #fff;
  cursor: pointer;
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1;
}

.dialog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.75fr);
  min-height: 650px;
  max-height: min(880px, calc(100dvh - 32px));
}

.dialog-media {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: #050505;
}

.dialog-main-image {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.dialog-main-image img {
  width: 100%;
  height: 100%;
  max-height: 650px;
  object-fit: contain;
}

.dialog-thumbnails {
  display: flex;
  gap: 8px;
  padding: 12px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
}

.dialog-thumb {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  padding: 0;
  overflow: hidden;
  border: 1px solid #3b3835;
  background: #161616;
  cursor: pointer;
}

.dialog-thumb[aria-current="true"] {
  border-color: var(--accent-bright);
}

.dialog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dialog-content {
  padding: 76px 44px 44px;
  overflow-y: auto;
}

.dialog-content h2 {
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: clamp(2.4rem, 4vw, 4.2rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.98;
}

.dialog-studio {
  margin-bottom: 34px;
  color: #8b837b;
  font-size: 0.78rem;
}

.dialog-description {
  color: #b7afa6;
  font-family: var(--serif);
  font-size: 1.08rem;
  line-height: 1.65;
}

.dialog-facts {
  margin: 28px 0;
  border-top: 1px solid var(--line);
}

.dialog-facts div {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.dialog-facts dt {
  color: #7f7871;
  font-size: 0.67rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dialog-facts dd {
  margin: 0;
  color: #d1c9bf;
  font-size: 0.78rem;
}

.dialog-info-wrap {
  margin-bottom: 28px;
}

.dialog-info-label {
  margin-bottom: 9px;
  color: #8e8780;
  font-size: 0.67rem;
}

.dialog-info-wrap img {
  width: 100%;
  display: block;
  border: 1px solid var(--line);
}

.primary-cta {
  width: 100%;
  min-height: 54px;
}

:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

@media (max-width: 1120px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .site-header nav {
    display: none;
  }

  .catalog-toolbar {
    grid-template-columns: 1fr;
  }

  .filter-list {
    grid-column: auto;
    grid-row: auto;
  }

  .catalog-count {
    text-align: left;
  }

  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .site-header,
  main,
  .site-footer {
    width: min(100% - 28px, 1440px);
  }

  .site-header {
    min-height: 86px;
  }

  .signature {
    display: none;
  }

  .catalog-hero {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 38px;
    padding: 52px 0 42px;
  }

  h1 {
    font-size: clamp(3.25rem, 15vw, 5.6rem);
  }

  .hero-copy {
    max-width: 560px;
  }

  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 42px 14px;
  }

  .dialog-layout {
    display: block;
    overflow-y: auto;
  }

  .dialog-media {
    min-height: 560px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .dialog-content {
    overflow: visible;
  }
}

@media (max-width: 540px) {
  .brand img {
    width: 42px;
    height: 42px;
  }

  .brand span {
    font-size: 0.66rem;
  }

  .catalog-toolbar {
    padding-top: 20px;
  }

  .catalog-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .card-image-wrap {
    aspect-ratio: 0.88;
  }

  .card-title {
    min-height: 0;
    font-size: 1.65rem;
  }

  .site-footer {
    min-height: 240px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
  }

  .dialog-media {
    min-height: 470px;
  }

  .dialog-content {
    padding: 58px 22px 30px;
  }

  .dialog-main-image {
    min-height: 380px;
    padding: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
