:root {
  --color-primary: #29231f;
  --color-accent: #b65f2d;
  --color-accent-dark: #8d4320;
  --color-background: #f6f0e9;
  --color-surface: #fffdf9;
  --color-surface-alt: #ece1d4;
  --color-text: #241f1b;
  --color-muted: #6b625b;
  --color-border: #d9cdc1;
  --shadow-card: 0 18px 50px rgba(57, 39, 26, 0.1);
  --radius-lg: 24px;
  --radius-md: 16px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--color-text);
  background: var(--color-background);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

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

button {
  font: inherit;
}

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

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 12px 16px;
  color: #fff;
  background: var(--color-primary);
  border-radius: 10px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(calc(100% - 32px), var(--container));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  background: rgba(246, 240, 233, 0.92);
  border-bottom: 1px solid rgba(217, 205, 193, 0.8);
  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 750;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 30px;
  height: 30px;
  background: var(--color-accent);
  border-radius: 8px 8px 15px 8px;
}

nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  color: var(--color-muted);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  transition: color 180ms ease, background-color 180ms ease;
}

nav a:hover {
  color: var(--color-text);
  background: var(--color-surface-alt);
}

.hero {
  padding: 72px 0 86px;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(460px, 1.18fr);
  align-items: center;
  gap: clamp(40px, 6vw, 86px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--color-accent-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.05;
  letter-spacing: -0.045em;
}

h1 {
  max-width: 650px;
  margin-bottom: 24px;
  font-size: clamp(52px, 7.5vw, 96px);
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(38px, 5vw, 64px);
}

h3 {
  margin-bottom: 0;
  font-size: clamp(26px, 3vw, 38px);
}

.hero-text {
  max-width: 580px;
  margin: 0 0 32px;
  color: var(--color-muted);
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.6;
}

.button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.button:active {
  transform: scale(0.98);
}

.button-primary {
  color: #fff;
  background: var(--color-primary);
}

.button-primary:hover {
  background: var(--color-accent-dark);
}

.button-secondary {
  color: var(--color-text);
  background: transparent;
  border-color: var(--color-text);
}

.button-secondary:hover {
  color: #fff;
  background: var(--color-text);
}

.hero-collage {
  position: relative;
  min-height: 610px;
}

.hero-image {
  position: absolute;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.hero-image-main {
  inset: 0 auto auto 0;
  width: 66%;
  aspect-ratio: 3 / 4;
}

.hero-image-accent {
  right: 0;
  bottom: 6%;
  width: 56%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #fff;
  border: 8px solid var(--color-background);
}

.catalog {
  padding: 82px 0 110px;
  scroll-margin-top: 90px;
}

.section-heading {
  max-width: 680px;
  margin-bottom: 32px;
}

.product-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.product-card {
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.product-image-wrap {
  display: block;
  aspect-ratio: 16 / 12;
  overflow: hidden;
  background: #dfd5cb;
}

.product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

.product-image-wrap:hover img {
  transform: scale(1.025);
}

.dresser-cover {
  background: #fff;
}

.dresser-cover img {
  object-fit: cover;
}

.product-card-body {
  padding: clamp(22px, 3vw, 34px);
}

.product-kind {
  margin: 0 0 8px;
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 650;
}

.price,
.gallery-price {
  font-variant-numeric: tabular-nums;
}

.price {
  margin: 28px 0 22px;
  color: var(--color-accent-dark);
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
}

.price span {
  font-size: 0.7em;
}

.text-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--color-text);
  font-weight: 750;
  text-underline-offset: 5px;
}

.text-link svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform 180ms ease;
}

.text-link:hover svg {
  transform: translateX(4px);
}

.gallery-section {
  padding: 100px 0;
  background: var(--color-primary);
  color: #fff;
  scroll-margin-top: 72px;
}

.gallery-section-alt {
  color: var(--color-text);
  background: var(--color-surface-alt);
}

.gallery-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
}

.gallery-heading h2 {
  margin: 0;
}

.gallery-section:not(.gallery-section-alt) .eyebrow,
.gallery-section:not(.gallery-section-alt) .gallery-note {
  color: #ccb9a7;
}

.gallery-price {
  margin: 0 0 4px;
  color: #e7a377;
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  white-space: nowrap;
}

.gallery-section-alt .gallery-price {
  color: var(--color-accent-dark);
}

.gallery-note {
  max-width: 580px;
  margin: 20px 0 34px;
  color: var(--color-muted);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.photo-button {
  position: relative;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  background: #8c7868;
  border: 0;
  border-radius: var(--radius-md);
  aspect-ratio: 3 / 4;
  cursor: zoom-in;
}

.dresser-grid .photo-button {
  aspect-ratio: 1;
  background: #fff;
}

.photo-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 240ms ease, opacity 240ms ease;
}

.dresser-grid .photo-button img {
  object-fit: contain;
}

.photo-button:hover img {
  opacity: 0.92;
  transform: scale(1.025);
}

.photo-button.is-hidden {
  display: none;
}

.gallery-toggle {
  margin-top: 28px;
  color: #fff;
  border-color: #fff;
}

.gallery-toggle:hover {
  color: var(--color-primary);
  background: #fff;
}

footer {
  padding: 34px 0;
  color: #e2d9d0;
  background: #171310;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p {
  margin: 0;
  font-weight: 700;
}

.footer-inner a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-underline-offset: 5px;
}

.lightbox {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  color: #fff;
  background: rgba(18, 15, 13, 0.95);
  border: 0;
}

.lightbox::backdrop {
  background: rgba(18, 15, 13, 0.78);
  backdrop-filter: blur(8px);
}

.lightbox-inner {
  position: relative;
  width: 100%;
  min-height: 100%;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  align-items: center;
  gap: 20px;
  padding: 32px;
}

.lightbox figure {
  min-width: 0;
  margin: 0;
  text-align: center;
}

.lightbox figure img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 112px);
  margin-inline: auto;
  object-fit: contain;
  border-radius: 12px;
}

.lightbox figcaption {
  margin-top: 12px;
  color: #d8cdc4;
  font-size: 14px;
}

.icon-button {
  width: 50px;
  height: 50px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 180ms ease;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.icon-button svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.lightbox-close {
  position: absolute;
  z-index: 2;
  top: 22px;
  right: 22px;
}

body:has(.lightbox[open]) {
  overflow: hidden;
}

@media (max-width: 900px) {
  .hero {
    padding-top: 48px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-collage {
    width: min(100%, 640px);
    min-height: 600px;
  }

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

@media (max-width: 680px) {
  .container {
    width: min(calc(100% - 24px), var(--container));
  }

  .header-inner {
    min-height: 64px;
  }

  nav {
    display: none;
  }

  .hero {
    padding: 42px 0 64px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .hero-copy {
    min-width: 0;
  }

  h1 {
    font-size: clamp(48px, 16vw, 70px);
  }

  .hero-collage {
    display: none;
  }

  .catalog {
    padding: 66px 0 80px;
  }

  .product-cards {
    grid-template-columns: 1fr;
  }

  .gallery-section {
    padding: 72px 0;
  }

  .gallery-heading {
    display: block;
  }

  .gallery-price {
    margin-top: 20px;
  }

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

  .lightbox-inner {
    grid-template-columns: 1fr 1fr;
    align-content: center;
    gap: 14px;
    padding: 74px 14px 20px;
  }

  .lightbox figure {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .lightbox figure img {
    max-height: calc(100vh - 190px);
  }

  .lightbox-prev,
  .lightbox-next {
    justify-self: center;
  }

  .lightbox-prev {
    grid-column: 1;
    grid-row: 2;
  }

  .lightbox-next {
    grid-column: 2;
    grid-row: 2;
  }
}

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

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