@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,500;1,600&display=swap');

:root {
  --wine: #621e35;
  --dark: #300f1b;
  --paper: #faf6ee;
  --ink: #301b22;
  --muted: #68545a;
  --line: #dfd0c6;
  --serif: 'Playfair Display', Georgia, serif;
  font: 100%/1.55 'DM Sans', system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 3px solid #b26c44; outline-offset: 4px; }
.shell { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.top { background: #270e16; color: #fff6e7; border-bottom: 1px solid #ffffff26; }
.nav { min-height: 68px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.brand { font: 600 1.24rem var(--serif); text-decoration: none; }
.brand span { color: #e5b387; margin-right: .35rem; }
.brand em { font-weight: 500; }
.hero { color: #fff6e7; background: var(--dark); position: relative; isolation: isolate; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #300f1b 25%, #300f1bbd 45%, #300f1b00 72%), url('/wrapped-book.webp') right 53% / auto 145% no-repeat; }
.hero-inner { min-height: 540px; display: grid; align-content: center; padding-block: 60px; }
.hero-copy { max-width: 510px; }
.eyebrow { margin: 0 0 14px; color: var(--wine); font-size: .875rem; letter-spacing: .15em; font-weight: 700; }
.hero .eyebrow { color: #f0c69f; }
.eyebrow span { margin-right: .25rem; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 600; line-height: 1.12; }
h1 { font-size: clamp(3.75rem, 8.2vw, 7rem); letter-spacing: -.06em; }
h1 em { color: #eabda5; font-weight: 500; }
.hero-copy > p:not(.eyebrow) { max-width: 385px; margin: 25px 0; color: #fae5da; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .72rem 1.2rem; border-radius: 8px; border: 1px solid transparent; font-weight: 700; text-decoration: none; }
.primary { background: #eec6a5; color: #32141c; }
.primary:hover { background: #f6d6bb; }
.outline { color: var(--wine); border-color: #96687a; background: transparent; }
.outline:hover, .filter:hover { background: #f1e5df; }
.discover { padding-block: 58px 76px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
h2 { font-size: clamp(2.1rem, 5vw, 3.2rem); letter-spacing: -.04em; }
.section-heading p { color: var(--muted); margin: .6rem 0 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 0 20px; }
.filter { background: transparent; padding: .45rem .9rem; border: 1px solid var(--line); border-radius: 100px; font-weight: 600; font-size: .875rem; }
.filter[aria-pressed="true"] { background: var(--wine); color: white; border-color: var(--wine); }
.results { color: var(--muted); margin: 0 0 .65rem; font-size: .875rem; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card { background: #fffbf6; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.card-art { height: 114px; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 65%, var(--glow), transparent 72%), var(--tone); color: #fff0d6; }
.card-mark { display: grid; place-items: center; width: 64px; aspect-ratio: 1; border: 1px solid #fff0d67d; border-radius: 50%; outline: 1px solid #fff0d644; outline-offset: 5px; font: 2.1rem Georgia, serif; }
.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; align-items: start; }
.card h3 { font-size: 1.48rem; }
.card p { margin: 10px 0 18px; color: var(--muted); }
.card .button { margin-top: auto; width: 100%; background: #f4e9e1; color: var(--wine); }
.card .button:hover { background: #ead8ce; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.tag { font-size: .875rem; font-weight: 700; color: var(--wine); }
.footer { background: var(--dark); color: #fff6e7; padding-block: 38px; }
.footer p { max-width: 690px; color: #e9d3cb; }
dialog { width: min(520px, calc(100% - 30px)); max-height: calc(100% - 30px); padding: 28px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 15px; }
dialog::backdrop { background: #200b14b5; }
.dialog-top { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.close { background: transparent; border: 1px solid var(--line); border-radius: 100%; width: 38px; height: 38px; font-size: 1.25rem; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 20px; }
.dialog-actions .primary { background: var(--wine); color: white; }
.note { color: var(--muted); font-size: .875rem; }
@media (max-width: 850px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero::before { background-size: auto, auto 120%; background-position: center, 74% 50%; }
}
@media (max-width: 570px) {
  .shell { width: calc(100% - 36px); }
  .hero-inner { min-height: 570px; align-content: end; padding-bottom: 36px; }
  .hero::before { background: linear-gradient(0deg, #300f1b 25%, #300f1b88 62%, transparent), url('/wrapped-book.webp') 70% top / auto 67% no-repeat; }
  h1 { font-size: clamp(3.2rem, 13vw, 4.9rem); }
  .hero-copy > p:not(.eyebrow) { margin-block: 16px 20px; }
  .grid { grid-template-columns: 1fr; }
  .section-heading { align-items: start; flex-direction: column; }
  .discover { padding-block: 44px; }
}
