:root {
  --bg: #a47a56;
  --bg-alt: #876246;
  --text: #17120e;
  --muted: #3f3227;
  --brand: #7a3d21;
  --brand-soft: #d8b18f;
  --card: rgba(255, 255, 255, 0.72);
  --line: rgba(31, 35, 32, 0.15);
  --shadow: 0 18px 42px rgba(48, 39, 31, 0.17);
  --radius: 18px;
  --wood-texture-opacity: 0.34;
  --wood-tint-opacity: 0.28;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("/images/walnut-wood-texture.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: var(--wood-texture-opacity);
  pointer-events: none;
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(
    rgba(230, 213, 193, var(--wood-tint-opacity)),
    rgba(230, 213, 193, var(--wood-tint-opacity))
  );
  pointer-events: none;
  z-index: -1;
}

h1,
h2,
h3 {
  line-height: 1.1;
  margin: 0;
}

h1,
h2 {
  font-family: "Instrument Serif", serif;
  letter-spacing: 0.01em;
}

p {
  margin: 0;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
  background: rgba(244, 240, 232, 0.84);
  border-bottom: 1px solid var(--line);
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.header-link {
  padding-inline: 0.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--text);
}

.brand strong {
  display: block;
  font-size: 0.98rem;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 0.77rem;
}

.brand-mark {
  width: 34px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 45deg, #b56f4b, #e5c9aa, #7a3d21);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.55);
}

.hero {
  padding: 5.5rem 0 3.2rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: end;
}

.eyebrow {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--brand);
  font-weight: 700;
}

h1 {
  margin-top: 0.8rem;
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  max-width: 16ch;
}

.lead {
  margin-top: 1.15rem;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.02rem;
}

.hero-cta {
  margin-top: 1.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.button-solid,
.button-outline,
.button-text {
  text-decoration: none;
  transition: transform 200ms ease, box-shadow 200ms ease, background 200ms ease;
}

.button-solid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.8rem 1.25rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #8f4826, #6f351d);
  box-shadow: var(--shadow);
  text-align: center;
}

.button-solid:hover {
  transform: translateY(-1px);
}

.button-outline {
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 999px;
  padding: 0.62rem 0.92rem;
  font-weight: 700;
  font-size: 0.9rem;
  text-align: center;
}

.button-outline:hover {
  background: rgba(255, 255, 255, 0.65);
}

.button-text {
  color: var(--brand);
  font-weight: 700;
  padding: 0.8rem 0.35rem;
  text-align: center;
}

.hero-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem;
  background: var(--card);
  box-shadow: var(--shadow);
}

.hero-card h2 {
  font-size: 1.5rem;
}

.hero-card ul {
  margin: 1rem 0 0;
  padding: 0 0 0 1rem;
  color: var(--muted);
  display: grid;
  gap: 0.45rem;
}

.section {
  padding: 4rem 0;
}

.section-heading {
  max-width: 72ch;
}

.section-heading h2 {
  margin-top: 0.65rem;
  font-size: clamp(1.7rem, 4.2vw, 3rem);
}

.section-heading p:last-child {
  color: var(--muted);
  margin-top: 0.9rem;
}

.filters {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.filter-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  min-height: 40px;
  background: rgba(255, 255, 255, 0.58);
  cursor: pointer;
  font-weight: 600;
}

.filter-chip.active {
  border-color: transparent;
  background: var(--text);
  color: #fff;
}

.catalog-grid {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.catalog-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: translateY(12px);
  opacity: 0;
  animation: rise 480ms ease forwards;
}

.catalog-card:nth-child(2) {
  animation-delay: 80ms;
}

.catalog-card:nth-child(3) {
  animation-delay: 120ms;
}

.catalog-card:nth-child(4) {
  animation-delay: 160ms;
}

.catalog-card:nth-child(5) {
  animation-delay: 200ms;
}

.catalog-card:nth-child(6) {
  animation-delay: 240ms;
}

.catalog-media {
  margin: 0;
  aspect-ratio: 4 / 3;
  background: #d7c4ad;
  position: relative;
  overflow: hidden;
}

.catalog-media::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 12px;
  pointer-events: none;
}

.catalog-media-fallback {
  background: linear-gradient(135deg, rgba(192, 146, 108, 0.34), rgba(132, 93, 65, 0.28));
}

.catalog-main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.catalog-thumbs {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 0.42rem;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.catalog-thumb {
  flex: 0 0 60px;
  width: 60px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  overflow: hidden;
  padding: 0;
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
}

.catalog-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.catalog-thumb.active {
  border-color: #6f351d;
  box-shadow: 0 0 0 1px rgba(111, 53, 29, 0.45);
}

.catalog-card-content {
  padding: 1rem;
  display: grid;
  gap: 0.5rem;
}

.catalog-card h3 {
  font-size: 1.05rem;
}

.catalog-link {
  color: inherit;
  text-decoration: none;
}

.catalog-link:hover {
  text-decoration: underline;
}

.catalog-card p {
  color: var(--muted);
  font-size: 0.93rem;
}

.catalog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.catalog-meta span {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.58rem;
  font-size: 0.77rem;
  color: #3d463f;
}

.catalog-details-link {
  margin-top: 0.15rem;
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

.catalog-details-link:hover {
  text-decoration: underline;
}

.section-alt {
  background: linear-gradient(180deg, rgba(231, 220, 201, 0.4), rgba(231, 220, 201, 0.8));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.process-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  align-items: start;
}

.process-grid ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1rem;
}

.process-grid li {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
}

.process-grid h3 {
  font-size: 1.05rem;
}

.process-grid p {
  margin-top: 0.45rem;
  color: var(--muted);
}

.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(216, 177, 143, 0.24));
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
}

.contact-card .button-solid {
  word-break: break-word;
  max-width: 100%;
}

.contact-card h2 {
  margin-top: 0.5rem;
}

.contact-card p {
  margin-top: 0.6rem;
  color: var(--muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.35rem 0 2rem;
}

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

.site-footer small {
  display: block;
  margin-top: 0.22rem;
  color: var(--muted);
}

.site-footer a {
  color: inherit;
}

.about-intro h1 {
  margin-top: 0.6rem;
}

.about-grid {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.about-projects-note {
  margin-top: 0.8rem;
  color: var(--muted);
}

.about-project-grid {
  margin-top: 1.2rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.about-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow);
}

.about-card h3 {
  font-size: 1.03rem;
}

.about-card p {
  margin-top: 0.5rem;
  color: var(--muted);
}

.about-list-card {
  margin-top: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow);
}

.about-list-card ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  display: grid;
  gap: 0.5rem;
}

.detail-main {
  padding: 3.8rem 0 4rem;
}

.detail-shell {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1.2rem;
}

.detail-gallery-card,
.detail-specs-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.detail-main-image-wrap {
  margin: 0;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(31, 35, 32, 0.08);
}

.detail-main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-thumbs {
  margin-top: 0.7rem;
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.detail-thumb {
  flex: 0 0 74px;
  width: 74px;
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.7);
  padding: 0;
  cursor: pointer;
}

.detail-thumb.active {
  border-color: #6f351d;
  box-shadow: 0 0 0 1px rgba(111, 53, 29, 0.4);
}

.detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-eyebrow {
  margin-top: 0.2rem;
}

.detail-title {
  margin-top: 0.5rem;
  font-size: clamp(1.8rem, 4.4vw, 3rem);
}

.detail-description {
  margin-top: 0.8rem;
  color: var(--muted);
}

.detail-spec-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.detail-spec-list li {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  background: rgba(255, 255, 255, 0.72);
}

.detail-spec-list strong {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5a635c;
}

.detail-spec-list span {
  display: block;
  margin-top: 0.28rem;
}

.detail-back-link {
  margin-top: 1rem;
  display: inline-flex;
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
}

.detail-back-link:hover {
  text-decoration: underline;
}

.project-longform {
  margin-top: 1rem;
  color: var(--muted);
}

.project-highlights {
  margin-top: 1rem;
}

.project-highlights strong {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5a635c;
}

.project-highlights ul {
  margin: 0.5rem 0 0;
  padding-left: 1rem;
  color: var(--muted);
  display: grid;
  gap: 0.4rem;
}

@keyframes rise {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 960px) {
  .hero-grid,
  .process-grid {
    grid-template-columns: 1fr;
  }

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

  .detail-shell {
    grid-template-columns: 1fr;
  }

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

  .about-project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    padding-top: 4.2rem;
  }
}

@media (max-width: 640px) {
  .site-header {
    position: static;
  }

  .header-inner {
    min-height: 66px;
    gap: 0.65rem;
    padding: 0.55rem 0;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .brand strong {
    font-size: 0.88rem;
  }

  .brand small {
    font-size: 0.72rem;
  }

  .header-inner .button-outline {
    padding: 0.5rem 0.72rem;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .section {
    padding: 3.1rem 0;
  }

  .hero {
    padding-top: 2.8rem;
    padding-bottom: 2.3rem;
  }

  h1 {
    font-size: clamp(1.95rem, 10vw, 2.6rem);
  }

  .lead {
    font-size: 0.97rem;
  }

  .hero-cta {
    width: 100%;
    gap: 0.65rem;
  }

  .hero-cta .button-solid,
  .hero-cta .button-text {
    width: 100%;
    justify-content: center;
  }

  .filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
  }

  .filter-chip {
    flex: 0 0 auto;
  }

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

  .catalog-card-content {
    padding: 0.9rem;
  }

  .catalog-media::after {
    inset: 14px;
  }

  .catalog-thumbs {
    left: 10px;
    right: 10px;
    bottom: 10px;
    gap: 0.34rem;
  }

  .catalog-thumb {
    flex: 0 0 52px;
    width: 52px;
    height: 40px;
  }

  .process-grid li {
    padding: 0.9rem;
  }

  .contact-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
  }

  .contact-card .button-solid {
    width: 100%;
  }

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

  .about-project-grid {
    grid-template-columns: 1fr;
  }

  .detail-main {
    padding: 2.6rem 0 3rem;
  }

  .detail-gallery-card,
  .detail-specs-card {
    padding: 0.85rem;
  }

  .detail-thumb {
    flex: 0 0 66px;
    width: 66px;
    height: 50px;
  }
}

@media (max-width: 420px) {
  .container {
    width: min(1120px, 94%);
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }

  .header-inner .button-outline,
  .header-link {
    width: 100%;
  }

  .hero-card,
  .contact-card {
    border-radius: 14px;
  }
}
