.hero {
  display: grid;
  align-items: center;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: clamp(400px, 32vw, 440px);
  margin-top: 22px;
  border-radius: 5px;
  background: #60442f;
  color: #fffdf7;
}

.hero-photo {
  position: absolute;
  z-index: -2;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% center;
}

.hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgb(30 21 15 / .81), rgb(30 21 15 / .5) 35%, transparent 73%),
    linear-gradient(0deg, rgb(30 21 15 / .43), transparent 28%);
}

.hero-copy { padding: 56px clamp(26px, 5.15vw, 78px); }

.hero h1 {
  max-width: 10em;
  font: 600 clamp(46px, 5.1vw, 74px)/1.12 var(--serif);
  letter-spacing: .015em;
}

.hero h1 span {
  display: block;
  margin-top: 8px;
  color: #f2dbb8;
}

.hero h1 i {
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  letter-spacing: -.055em;
}

.hero p {
  margin-top: 20px;
  color: #f5ebe0;
  font-size: clamp(14px, 1.18vw, 16px);
}

.hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 19px;
  min-height: 47px;
  margin-top: 28px;
  padding: 9px 17px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: #fff7e9;
  color: #302419;
  font-size: 14px;
  font-weight: 600;
  transition: background .18s ease;
}

.hero-button:focus-visible { outline-color: #fff7e9; }

.down-arrow {
  position: relative;
  width: 9px;
  height: 14px;
}

.down-arrow::before {
  content: "";
  position: absolute;
  inset: 1px 4px 2px;
  background: currentColor;
}

.down-arrow::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 1px;
  width: 7px;
  height: 7px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
}

.hero-caption {
  position: absolute;
  right: 26px;
  bottom: 19px;
  color: #fff8ec;
  font-size: 12px;
  letter-spacing: .04em;
  text-shadow: 0 1px 8px #24180e;
}

.gallery {
  margin-top: 43px;
  scroll-margin-top: 22px;
}

.gallery-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.gallery h2 {
  font: 600 clamp(28px, 3vw, 40px)/1.24 var(--serif);
  letter-spacing: -.025em;
}

.gallery-header p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.js .filters[hidden] {
  display: flex !important;
  visibility: hidden;
}

.filter {
  min-width: 44px;
  min-height: 44px;
  padding: 5px 15px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.filter[aria-pressed="true"] {
  color: #fffaf1;
  border-color: #392f25;
  background: #392f25;
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.style-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: var(--card);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.style-card[id] { scroll-margin-top: 22px; }
html:not(.js) .style-card:target,
.style-card.return-cover { border-color: #9f7452; }

.card-media {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 1.58;
  background-color: #c0ad98;
}

.card-media > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 56%;
  transition: transform .35s cubic-bezier(.2, .65, .25, 1);
}

.badge {
  position: absolute;
  top: 13px;
  left: 13px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 9px;
  color: #fffdf6;
  background: rgb(40 28 19 / .84);
  border: 1px solid rgb(255 253 246 / .38);
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .035em;
}

.card-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 17px 20px 18px;
}

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

.card-body h3 {
  font: 600 clamp(21px, 2vw, 26px)/1.28 var(--serif);
  overflow-wrap: anywhere;
}

.card-body p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.card-arrow {
  display: grid;
  flex: 0 0 39px;
  width: 39px;
  height: 39px;
  place-items: center;
  border: 1px solid var(--rule);
  border-radius: 50%;
  color: var(--accent);
  font: 21px/1 system-ui, sans-serif;
  transition: background .22s ease, color .22s ease, border-color .22s ease;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 47px;
  padding-block: 18px 34px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 13px;
}

.back-top {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

@media (hover: hover) {
  .masthead nav a:hover, .back-top:hover { color: var(--accent); }
  .hero-button:hover { background: #f4dfc1; }
  .filter[aria-pressed="false"]:hover { color: var(--ink); border-color: #b7a18c; }
  .style-card:hover { border-color: #bea78d; box-shadow: 0 9px 24px rgb(52 35 19 / .09); }
  .style-card:hover .card-media > img { transform: scale(1.04); }
  .style-card:hover .card-arrow { color: #fffaf1; background: #4b3b2e; border-color: #4b3b2e; }
}

@media (max-width: 890px) {
  .style-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .hero { min-height: 400px; }
}

@media (max-width: 620px) {
  .hero {
    align-items: end;
    min-height: clamp(308px, 82vw, 360px);
    margin-top: 14px;
  }
  .hero-photo { object-position: 61% center; }
  .hero::before {
    background: linear-gradient(0deg, rgb(27 18 13 / .94), rgb(27 18 13 / .71) 37%, rgb(27 18 13 / .12) 78%);
  }
  .hero-copy { padding: 35px 20px 43px; }
  .hero h1 { font-size: clamp(36px, 9vw, 50px); }
  .hero h1 span { margin-top: 6px; }
  .hero p { max-width: 19em; margin-top: 12px; }
  .hero-button { min-height: 48px; margin-top: 16px; }
  .hero-caption { right: 14px; bottom: 12px; font-size: 11px; }
  .gallery { margin-top: 27px; }
  .gallery-header { display: block; margin-bottom: 15px; }
  .gallery-header p { margin-top: 6px; }
  .filters {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 4px;
    margin-top: 12px;
  }
  .js .filters[hidden] { display: grid !important; }
  .filter { min-width: 0; padding-inline: 1px; }
  .style-grid { gap: 10px; }
  .card-media { aspect-ratio: 1.3; }
  .badge { top: 8px; left: 8px; gap: 5px; padding: 3px 6px; font-size: 10px; }
  .card-body { position: relative; display: block; padding: 10px 9px 11px; }
  .card-body h3 { font-size: clamp(16px, 4.36vw, 20px); }
  .card-body p { margin-top: 4px; padding-inline-end: 25px; font-size: 12px; line-height: 1.45; }
  .card-arrow {
    position: absolute;
    bottom: 9px;
    right: 8px;
    width: 24px;
    height: 24px;
    font-size: 16px;
  }
  .site-footer { margin-top: 31px; padding-bottom: 25px; }
  .back-top { min-height: 44px; }
}

@media (max-width: 300px) {
  .style-grid { grid-template-columns: minmax(0, 1fr); }
}

