:root {
  color-scheme: light;
  --paper: #f8f1e3;
  --ink: #233b31;
  --red: #a32537;
  --rule: #baa996;
  --sans: 'DM Sans', system-ui, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; }
button[hidden] { display: none; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 5px; }
.wrap { width: min(100% - 96px, 1248px); margin-inline: auto; }
.star { color: var(--red); font-family: Georgia, serif; }

.masthead { min-height: 69px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.signature { display: inline-flex; gap: 10px; align-items: center; font-weight: 700; font-size: .88rem; text-decoration: none; }
.signature .star { font-size: 1.5rem; line-height: 1; }
.season { font-size: .76rem; font-weight: 700; letter-spacing: .19em; text-transform: uppercase; }

.hero { border-block: 1px solid var(--rule); }
.hero-inner { display: grid; grid-template-columns: 1.02fr 1fr; }
.hero-copy { display: grid; align-content: center; justify-items: start; padding: 40px 28px 48px 0; }
.hero h1 { color: var(--red); font: 400 clamp(5rem, 9.1vw, 8.9rem)/.77 var(--serif); letter-spacing: -.05em; }
.hero h1 em { font-weight: 400; }
.hero-art { min-height: clamp(350px, 39vw, 535px); background: #142f24 url('julegaver.jpg') center / cover no-repeat; }
.button { display: inline-flex; gap: 20px; align-items: center; justify-content: center; min-height: 45px; padding: 10px 15px; cursor: pointer; font-size: .85rem; font-weight: 700; text-decoration: none; border: 1px solid currentColor; }
.hero-link { margin-top: 34px; color: var(--paper); background: var(--red); border-color: var(--red); }
.hero-link:hover { background: #7f1d2b; border-color: #7f1d2b; }

.catalog { padding-block: clamp(48px, 6vw, 90px); scroll-margin-top: 20px; }
.catalog-head { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin-bottom: 24px; }
.catalog-head h2 { font: 400 clamp(2.85rem, 5.2vw, 5rem)/.95 var(--serif); letter-spacing: -.032em; }
.copy-button { flex: 0 0 auto; color: var(--ink); background: transparent; }
.copy-button:hover { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.wishlist { --gap: 19px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); padding: 0; margin: 0; list-style: none; }
.card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--rule); }
.card-art { position: relative; overflow: hidden; aspect-ratio: 1; background: var(--tile-color); }
.tile { position: absolute; width: 100%; aspect-ratio: 1; top: 50%; transform: translateY(-50%); background: url('onsker.jpg') var(--pos) / 300% 200% no-repeat; }
.tile-1 { --tile-color: #aaba96; --pos: 0% 0%; }
.tile-2 { --tile-color: #cb775c; --pos: 50% 0%; }
.tile-3 { --tile-color: #adc5c9; --pos: 100% 0%; }
.tile-4 { --tile-color: #c97d72; --pos: 0% 100%; }
.tile-5 { --tile-color: #46654c; --pos: 50% 100%; }
.tile-6 { --tile-color: #d5a454; --pos: 100% 100%; }
.tile-7 { --tile-color: #91b5c1; }
.tile-7 .tile { background: url('klipklapper.jpg') center / cover no-repeat; }
.card-copy { padding: 15px 17px 19px; border-top: 1px solid var(--rule); }
.card h3 { font: 400 clamp(1.75rem, 2.6vw, 2.42rem)/1.01 var(--serif); letter-spacing: -.012em; }
.card p { color: #4c5b4e; font-size: .82rem; font-weight: 600; margin-top: 6px; }
.card-last { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, calc((100% - var(--gap) * 2) / 3)) 1fr; }
.card-last .card-art { aspect-ratio: 1.35; }
.card-last .card-copy { border-top: 0; border-left: 1px solid var(--rule); display: grid; align-items: center; padding-inline: clamp(17px, 4.5vw, 65px); }
.card-last h3 { font-size: clamp(2rem, 5vw, 4.35rem); }

.footer { border-top: 1px solid var(--rule); padding-block: 21px 31px; display: flex; justify-content: space-between; gap: 15px; align-items: center; }
.footer p { color: var(--red); font: italic 400 1.75rem/1 var(--serif); }
.footer .star { font-size: 1rem; padding-right: 4px; }
.footer a { font-size: .85rem; font-weight: 700; text-underline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 930px) {
  .wrap { width: calc(100% - 56px); }
  .hero h1 { font-size: clamp(4.5rem, 11.2vw, 6.6rem); }
  .wishlist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-last { grid-template-columns: minmax(0, calc((100% - var(--gap)) / 2)) 1fr; }
}

@media (max-width: 590px) {
  .wrap { width: calc(100% - 36px); }
  .masthead { min-height: 54px; }
  .season { font-size: .65rem; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-copy { padding: 37px 0 30px; }
  .hero h1 { font-size: clamp(3.6rem, 15.8vw, 6.1rem); }
  .hero-link { margin-top: 24px; }
  .hero-art { min-height: 0; aspect-ratio: 1.48; }
  .catalog-head { margin-bottom: 18px; }
  .catalog-head h2 { font-size: clamp(2.4rem, 9.8vw, 3.7rem); }
  .copy-button { gap: 6px; padding-inline: 9px; font-size: .76rem; }
  .wishlist { --gap: 12px; }
  .card-copy { padding: 11px 10px 13px; }
  .card h3 { font-size: clamp(1.48rem, 6vw, 2.15rem); }
  .card p { font-size: .74rem; }
  .card-last .card-art { aspect-ratio: 1.22; }
}

@media (max-width: 330px) {
  .catalog-head { align-items: flex-start; flex-direction: column; }
  .wishlist { grid-template-columns: 1fr; }
  .card-last { display: flex; }
  .card-last .card-copy { border-left: 0; border-top: 1px solid var(--rule); }
}

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

@media print {
  .hero-art, .card-art, .button, .footer a { display: none; }
  .wrap { width: 100%; }
  .hero-inner { display: block; }
  .hero-copy { padding: 20px 0; }
  .hero h1 { font-size: 3rem; line-height: .9; }
  .hero h1 br { display: none; }
  .hero h1 em::before { content: ' '; white-space: pre; }
  .catalog { padding-block: 24px; }
  .wishlist { display: block; }
  .card, .card-last { display: block; border: 0; break-inside: avoid; }
  .card .card-copy { padding: 7px 0; border: 0; }
  .card h3 { font-size: 1.65rem; }
}
