/* Opened Fountain Press. Mobile-first styles, publisher layout. */
:root {
  --burgundy: #5C1620;
  --evergreen: #16342C;
  --wine: #2A121C;
  --gold: #C49A56;
  --cream: #F7F0E1;
  --cream-deep: #EEE3CB;
  --paper: #FFFCF5;
  --muted: #5d4d52;
  --rule: #d9c9a8;
  --head: "Playfair Display", Georgia, "Times New Roman", serif;
  --body: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 3px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--wine); font: 400 1rem/1.7 var(--body); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 6.5vw, 3rem); }
h2 { font-size: clamp(1.35rem, 4vw, 1.75rem); }
p { margin: 0 0 1em; }
a { color: var(--burgundy); text-underline-offset: .18em; }
a:hover { color: var(--evergreen); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--wine); color: var(--cream); padding: 10px 14px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.eyebrow { font: 600 .75rem/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.eyebrow-dark { color: var(--burgundy); }
.prose { max-width: 680px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; font: 600 .9rem/1.2 var(--body); letter-spacing: .03em; padding: 12px 22px; min-height: 46px; border-radius: var(--r); border: 2px solid var(--burgundy); background: var(--burgundy); color: var(--cream); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--wine); border-color: var(--wine); color: var(--cream); }
.btn-lg { min-height: 52px; padding: 14px 28px; font-size: 1rem; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--wine); }
.btn-gold:hover { background: var(--cream); border-color: var(--cream); color: var(--wine); }
.btn-outline { background: transparent; border-color: var(--cream); color: var(--cream); }
.btn-outline:hover { background: var(--cream); color: var(--evergreen); border-color: var(--cream); }

/* Announcement bar */
.announce { background: var(--wine); color: var(--cream); text-align: center; font-size: .82rem; font-weight: 500; letter-spacing: .03em; }
.announce a { display: block; padding: 9px 0; color: var(--cream); text-decoration: none; }
.announce a:hover { text-decoration: underline; color: var(--cream); }

/* Masthead */
.site-header { background: var(--paper); border-bottom: 1px solid var(--rule); }
.masthead { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 8px; min-height: 70px; }
.brand { display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; color: var(--wine); }
.brand .logo { width: 30px; }
.brand-name { font: 700 1.1rem/1 var(--head); }
.brand-name span { margin-left: .3em; }
.menu-toggle { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; padding: 0; }
.js .menu-toggle { display: block; }
.bars, .bars::before, .bars::after { display: block; width: 22px; height: 2px; background: var(--wine); margin: 0 auto; position: relative; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -7px; } .bars::after { top: 7px; }
.shop-link { font-size: .82rem; font-weight: 600; color: var(--burgundy); text-decoration: none; border: 1px solid var(--burgundy); border-radius: var(--r); padding: 7px 10px; }
.shop-link:hover { background: var(--burgundy); color: var(--cream); }
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 12px 0; color: var(--wine); text-decoration: none; font-weight: 500; font-size: .95rem; border-bottom: 1px solid var(--cream-deep); }
.site-nav a[aria-current="page"] { color: var(--burgundy); font-weight: 600; }
.js .site-nav { display: none; }
.js .site-nav.open { display: block; border-top: 1px solid var(--rule); }

/* Feature (one title spotlight) */
.feature { background: var(--evergreen); color: var(--cream); padding: 40px 0 48px; }
.feature-inner { display: grid; gap: 28px; justify-items: center; text-align: center; }
.feature-cover img { width: 200px; box-shadow: 0 18px 40px rgba(0,0,0,.35); border-radius: 2px; }
.feature-text { max-width: 560px; }
.feature h1 { margin-bottom: .2em; }
.feature-author { font-weight: 600; color: var(--cream); opacity: .9; margin-bottom: 1.2em; }
.feature-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 24px 0 0; }

/* Browse row */
.browse { background: var(--paper); border-bottom: 1px solid var(--rule); }
.browse-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.browse-list { list-style: none; margin: 0; padding: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.browse-list li { flex: 0 0 auto; scroll-snap-align: start; }
.browse-list a { display: block; padding: 16px 20px 14px 0; margin-right: 4px; text-decoration: none; color: var(--wine); }
.browse-list span { display: block; font: 700 1.05rem/1.2 var(--head); }
.browse-list small { display: block; font-size: .75rem; color: var(--muted); letter-spacing: .04em; }
.browse-list a:hover span { color: var(--burgundy); text-decoration: underline; text-decoration-color: var(--gold); }

/* Shelves */
.shelf { padding: 40px 0; }
.shelf-alt { background: var(--cream-deep); }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--rule); padding-bottom: 10px; margin-bottom: 22px; }
.shelf-head h2 { margin: 0; }
.view-all { font-size: .85rem; font-weight: 600; white-space: nowrap; }
.shelf-row { list-style: none; margin: 0; padding: 0 0 8px; display: grid; grid-auto-flow: column; grid-auto-columns: 148px; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; }
.shelf-row .tile { scroll-snap-align: start; }

/* Tile */
.tile a { display: block; color: inherit; text-decoration: none; }
.tile-cover { display: block; background: var(--cream-deep); }
.tile-cover img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: 0 6px 16px rgba(42,18,28,.18); border-radius: 2px; transition: transform .2s; }
.tile a:hover .tile-cover img { transform: translateY(-3px); }
.tile-flag { display: block; margin-top: 12px; font-size: .68rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.tile-title { display: block; font: 700 1rem/1.3 var(--head); margin-top: 4px; }
.tile a:hover .tile-title { text-decoration: underline; text-decoration-color: var(--gold); }
.tile-author { display: block; font-size: .85rem; color: var(--muted); margin-top: 2px; }
.tile-type { display: block; font-size: .75rem; color: var(--muted); }
.flag-live { color: var(--evergreen); }
.flag-coming-soon { color: var(--burgundy); }

/* Promos */
.promos { padding: 40px 0; }
.promo-grid { display: grid; gap: 16px; }
.promo { padding: 32px 24px; border-radius: var(--r); color: var(--cream); }
.promo h2 { color: var(--cream); }
.promo p { max-width: 40ch; }
.promo .btn { margin-top: 8px; }
.promo-green { background: var(--evergreen); }
.promo-burgundy { background: var(--burgundy); }

/* Author spotlight */
.spotlight { padding: 48px 0; text-align: center; }
.spotlight-inner { max-width: 640px; border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold); padding-top: 32px; padding-bottom: 24px; }
.spotlight .eyebrow { color: var(--burgundy); }
.home-verse { padding: 8px 0 56px; }

/* Verse */
.verse { margin: 0; text-align: center; }
.verse blockquote { margin: 0; }
.verse p { font: 700 clamp(1.1rem, 3.5vw, 1.45rem)/1.55 var(--head); max-width: 42ch; margin: 0 auto; }
.verse figcaption { margin-top: 14px; font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.verse figcaption::before { content: ""; display: block; width: 44px; height: 1px; background: var(--gold); margin: 0 auto 14px; }

/* Page heads and crumbs */
.page-head { padding: 36px 0 20px; border-bottom: 1px solid var(--rule); margin-bottom: 28px; }
.page-head p { color: var(--muted); max-width: 60ch; margin: 0; }
.crumbs { font-size: .82rem; color: var(--muted); padding: 18px 0; }
.crumbs a { color: var(--muted); }

/* Catalog */
.catalog { display: grid; gap: 20px; padding-bottom: 56px; }
.facets { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.facets fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.facets legend { font: 600 .72rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--burgundy); margin-bottom: 8px; width: 100%; }
.facets label { display: flex; align-items: center; gap: 6px; font-size: .92rem; min-height: 36px; cursor: pointer; }
.facets input { accent-color: var(--burgundy); width: 18px; height: 18px; }
.results-count { font-size: .85rem; color: var(--muted); border-bottom: 1px solid var(--rule); padding-bottom: 10px; }
.tile-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 18px; }

/* Product */
.product { display: grid; gap: 28px; padding-bottom: 32px; }
.product-cover img { width: 100%; max-width: 300px; margin: 0 auto; box-shadow: 0 16px 36px rgba(42,18,28,.25); border-radius: 2px; }
.product-author { font-size: 1.05rem; margin-bottom: .6em; }
.status-line { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.buy { margin: 20px 0 28px; }
.buy-soon { background: var(--paper); border: 1px solid var(--rule); border-left: 3px solid var(--gold); padding: 18px 20px; margin: 20px 0 28px; border-radius: var(--r); }
.buy-soon p { margin-bottom: 12px; }
h2.sub { font: 600 .78rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--burgundy); border-bottom: 1px solid var(--rule); padding-bottom: 8px; margin: 28px 0 12px; }
.details { display: grid; grid-template-columns: 8rem 1fr; gap: 8px 12px; margin: 0; font-size: .95rem; }
.details dt { color: var(--muted); }
.details dd { margin: 0; }
.about-author { background: var(--paper); border: 1px solid var(--rule); padding: 24px; border-radius: var(--r); margin-bottom: 32px; }
.product-signup { padding: 28px 24px; margin-bottom: 48px; background: var(--evergreen); color: var(--cream); border-radius: var(--r); }
.product-signup h2 { color: var(--cream); }

/* Authors */
.author-grid { list-style: none; margin: 0 0 56px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 20px; }
.author-grid a { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 28px 20px; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r); text-decoration: none; color: inherit; height: 100%; }
.author-grid a:hover .author-name { text-decoration: underline; text-decoration-color: var(--gold); }
.author-grid img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; }
.initials { display: flex; align-items: center; justify-content: center; width: 120px; height: 120px; border-radius: 50%; background: var(--evergreen); color: var(--cream); font: 700 2.2rem var(--head); border: 3px solid var(--gold); }
.initials-lg { width: 180px; height: 180px; font-size: 3.2rem; }
.author-name { display: block; font: 700 1.2rem/1.3 var(--head); margin-top: 16px; }
.author-sum { display: block; font-size: .9rem; color: var(--muted); margin-top: 4px; }
.author-page { display: grid; gap: 24px; padding-bottom: 48px; justify-items: start; }
.link-list { list-style: none; margin: 0; padding: 0; }
.link-list li { margin: .35em 0; }
.link-list a { font-weight: 600; }

/* Resources */
.resource-list { list-style: none; margin: 0 0 56px; padding: 0; }
.resource-list li { display: grid; gap: 12px; padding: 22px 0; border-bottom: 1px solid var(--rule); }
.resource-list h2 { font-size: 1.25rem; }
.resource-list p { margin: 0; color: var(--muted); }

/* About and contact */
.about-grid, .contact-grid { display: grid; gap: 32px; padding-bottom: 56px; }
.about-verse { background: var(--burgundy); color: var(--cream); padding: 36px 24px; border-radius: var(--r); align-self: start; }
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
input[type="email"], input[type="text"], input:not([type]), textarea { width: 100%; font: 400 1rem var(--body); color: var(--wine); background: var(--paper); border: 1px solid #8a7a73; border-radius: var(--r); padding: 12px 14px; min-height: 48px; }
input:focus, textarea:focus { border-color: var(--evergreen); }
.contact-form { max-width: 560px; }
.contact-form p { margin-bottom: 18px; }
.placeholder-note { font-size: .82rem; font-style: italic; margin: 10px 0 0; }

/* Newsletter band */
.newsletter { background: var(--burgundy); color: var(--cream); padding: 40px 0; border-top: 3px solid var(--gold); }
.newsletter h2 { color: var(--cream); margin-bottom: .3em; }
.newsletter p { margin-bottom: 0; }
.newsletter-inner { display: grid; gap: 20px; align-items: center; }
.signup-form { display: flex; flex-direction: column; gap: 10px; }
.signup-form.on-dark input { border-color: var(--cream); }

/* Footer */
.site-footer { background: var(--wine); color: var(--cream); padding: 44px 0 16px; }
.site-footer a { color: var(--cream); text-decoration: none; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }
.footer-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 24px; }
.footer-brand { grid-column: 1 / -1; }
.footer-brand .logo { width: 48px; margin-bottom: 16px; }
.verse-footer { text-align: left; }
.verse-footer p { font-size: 1rem; margin: 0; max-width: 36ch; }
.verse-footer figcaption::before { margin: 0 0 12px; }
.footer-heading { font: 600 .75rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 0 0 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li a { display: inline-block; padding: 5px 0; font-size: .92rem; }
.copyright { margin-top: 36px; padding-top: 16px; border-top: 1px solid rgba(247,240,225,.18); font-size: .8rem; opacity: .85; }
.copyright p { margin: 0; }

/* Tablet and up */
@media (min-width: 640px) {
  .signup-form { flex-direction: row; }
  .signup-form input { flex: 1; }
  .promo-grid { grid-template-columns: 1fr 1fr; }
  .tile-grid { grid-template-columns: repeat(3, 1fr); }
  .shelf-row { grid-auto-columns: 170px; }
  .resource-list li { grid-template-columns: 1fr auto; align-items: center; }
}

/* Desktop: centered masthead with nav row beneath, like a classic publisher */
@media (min-width: 960px) {
  .masthead { grid-template-columns: 1fr auto 1fr; min-height: 104px; }
  .js .menu-toggle { display: none; }
  .brand { grid-column: 2; flex-direction: column; gap: 6px; }
  .brand .logo { width: 40px; }
  .brand-name { font-size: 1.6rem; letter-spacing: .01em; }
  .shop-link { grid-column: 3; justify-self: end; }
  .site-nav, .js .site-nav { display: block; border-top: 1px solid var(--rule); }
  .site-nav ul { display: flex; justify-content: center; gap: 34px; }
  .site-nav a { border: 0; padding: 14px 0; font-size: .88rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; border-bottom: 2px solid transparent; }
  .site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--gold); color: var(--burgundy); }

  .feature { padding: 72px 0; }
  .feature-inner { grid-template-columns: 300px 1fr; gap: 64px; justify-items: start; text-align: left; align-items: center; }
  .feature-cover img { width: 300px; }
  .feature-actions { justify-content: flex-start; }

  .browse-list { justify-content: space-between; overflow: visible; }
  .browse-list li { flex: 1; border-left: 1px solid var(--rule); }
  .browse-list li:last-child { border-right: 1px solid var(--rule); }
  .browse-list a { padding: 20px 24px; margin: 0; text-align: center; }

  .shelf { padding: 56px 0; }
  .shelf-row { grid-auto-flow: row; grid-template-columns: repeat(6, 1fr); grid-auto-columns: auto; overflow: visible; }

  .catalog { grid-template-columns: 220px 1fr; gap: 40px; }
  .facets { flex-direction: column; gap: 28px; position: sticky; top: 20px; align-self: start; }
  .facets fieldset { flex-direction: column; gap: 2px; }
  .tile-grid { grid-template-columns: repeat(4, 1fr); gap: 36px 24px; }

  .product { grid-template-columns: 340px 1fr; gap: 64px; align-items: start; }
  .product-cover img { max-width: 340px; margin: 0; }

  .author-page { grid-template-columns: 220px 1fr; gap: 48px; }
  .about-grid { grid-template-columns: 1.4fr 1fr; gap: 56px; }
  .contact-grid { grid-template-columns: 1.4fr 1fr; gap: 56px; }
  .newsletter-inner { grid-template-columns: 1fr 1fr; gap: 48px; }

  .footer-cols { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; }
  .footer-brand { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) { .tile-cover img { transition: none; } }
