/* =========================================================
   AVENUE BOOKSTORE
   Reading room / shelf index identity
   HTML5 + CSS3 only
   ========================================================= */

:root {
  --library: #263a35;
  --library-deep: #192923;
  --paper: #f4f0e6;
  --charcoal: #1d211f;
  --brick: #b95f43;
  --brick-dark: #974d37;
  --ochre: #c3a66d;
  --sage: #d8ddd6;
  --white: #fffdf8;
  --violet: #665c78;
  --muted: #6b706b;
  --line: rgba(29,33,31,.14);
  --light-line: rgba(255,255,255,.18);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
  --shell: min(1220px, calc(100% - 64px));
  --section-space: 76px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 102px;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--charcoal);
  font-family: var(--sans);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

::selection {
  background: var(--brick);
  color: #fff;
}

:focus-visible {
  outline: 3px solid var(--brick);
  outline-offset: 4px;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.section {
  padding: var(--section-space) 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 999;
  transform: translateY(-170%);
  padding: 10px 14px;
  background: var(--charcoal);
  color: #fff;
  text-decoration: none;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244,240,230,.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-row {
  min-height: 78px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 34px;
  align-items: center;
}

.brand {
  display: inline-grid;
  line-height: .92;
  text-decoration: none;
}

.brand-main {
  color: var(--library);
  font: 700 1.1rem/1 var(--serif);
  letter-spacing: -.035em;
}

.brand-sub {
  margin-top: 6px;
  color: var(--brick);
  font-size: .48rem;
  font-weight: 900;
  letter-spacing: .17em;
}

.desktop-nav {
  display: flex;
  justify-content: center;
  gap: clamp(16px,2vw,28px);
}

.desktop-nav a {
  position: relative;
  color: #60655f;
  font-size: .74rem;
  font-weight: 800;
  text-decoration: none;
}

.desktop-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -7px;
  height: 2px;
  background: var(--brick);
  transition: right .16s ease;
}

.desktop-nav a:hover::after {
  right: 0;
}

.mobile-nav {
  display: none;
}

/* Typography + controls */
.eyebrow {
  margin: 0 0 15px;
  color: var(--brick);
  font-size: .65rem;
  font-weight: 900;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.eyebrow-light {
  color: #e2a28e;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  margin-bottom: 20px;
  font-family: var(--serif);
  font-weight: 700;
  line-height: .98;
  letter-spacing: -.045em;
}

h1 {
  max-width: 980px;
  font-size: clamp(4.2rem,7.8vw,8rem);
}

h2 {
  font-size: clamp(2.4rem,4.3vw,4.45rem);
}

h3 {
  margin-bottom: 8px;
  font-size: 1.15rem;
  line-height: 1.15;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: .69rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform .16s ease, background-color .16s ease, color .16s ease;
}

a.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  background: var(--brick);
  color: #fff;
}

.button-primary:hover {
  background: var(--brick-dark);
}

.button-secondary {
  background: var(--library);
  color: #fff;
}

.button-light {
  background: #fff;
  color: var(--charcoal);
}

.button-outline {
  border-color: var(--charcoal);
  background: transparent;
}

.button-outline:hover {
  background: var(--charcoal);
  color: #fff;
}

.placeholder-control {
  display: inline-flex;
  cursor: default;
  user-select: none;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .77rem;
  font-weight: 900;
  text-underline-offset: 5px;
}

.text-link span {
  transition: transform .16s ease;
}

.text-link:hover span {
  transform: translateX(4px);
}

.text-link-light {
  color: #fff;
}

/* Hero */
.hero {
  padding: 52px 0 66px;
  background:
    linear-gradient(rgba(38,58,53,.025) 1px,transparent 1px),
    linear-gradient(90deg,rgba(38,58,53,.025) 1px,transparent 1px),
    var(--paper);
  background-size: 48px 48px;
}

.hero-masthead {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 68px;
  align-items: end;
}

.hero-masthead > .eyebrow {
  grid-column: 1 / -1;
  margin-bottom: -12px;
}

.hero-masthead h1 {
  margin-bottom: 0;
}

.hero-summary {
  padding-bottom: 12px;
}

.hero-summary > p {
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  margin-top: 24px;
}

.reading-ribbon {
  position: relative;
  min-height: 520px;
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  gap: 12px;
  margin-top: 42px;
  padding-bottom: 70px;
}

.reading-photo {
  min-height: 450px;
  margin: 0;
  overflow: hidden;
}

.reading-photo-wide {
  border-radius: 0 80px 0 0;
}

.location-ticket {
  position: absolute;
  left: 36px;
  bottom: 0;
  width: min(360px,72%);
  display: grid;
  gap: 5px;
  padding: 18px 20px;
  background: var(--library);
  color: #fff;
}

.location-ticket span {
  color: #e2a28e;
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .13em;
}

.location-ticket small {
  color: rgba(255,255,255,.62);
}

/* Books + categories */
.books-section {
  background: var(--white);
}

.books-grid {
  display: grid;
  grid-template-columns: .72fr 1.28fr;
  gap: 70px;
  align-items: start;
}

.books-intro {
  position: sticky;
  top: 118px;
}

.books-intro .lead {
  color: var(--charcoal);
  font: 400 1.17rem/1.6 var(--serif);
}

.books-intro > p:not(.eyebrow):not(.lead) {
  color: var(--muted);
}

.shelf-index {
  border-top: 1px solid var(--line);
}

.shelf-index article {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.shelf-index article > span {
  color: var(--brick);
  font-size: .63rem;
  font-weight: 900;
}

.shelf-index h3 {
  margin-bottom: 5px;
  font-family: var(--serif);
  font-size: 1.42rem;
}

.shelf-index p {
  margin: 0;
  color: var(--muted);
  font-size: .83rem;
}

.shelf-index > .button {
  margin-top: 22px;
}

/* New releases */
.new-release-desk {
  margin-top: 72px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.desk-heading {
  display: grid;
  grid-template-columns: 1fr .6fr;
  gap: 50px;
  align-items: end;
  margin-bottom: 32px;
}

.desk-heading > p {
  color: var(--muted);
}

.book-row {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 16px;
}

.book-placeholder {
  min-width: 0;
}

.book-cover {
  aspect-ratio: 2 / 3;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  box-shadow: 0 14px 24px rgba(29,33,31,.08);
}

.book-cover span,
.book-cover small {
  font-size: .56rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.book-cover strong {
  font: 700 clamp(3rem,5vw,5rem)/1 var(--serif);
}

.cover-brick {
  background: var(--brick);
  color: #fff;
}

.cover-green {
  background: var(--library);
  color: #fff;
}

.cover-violet {
  background: var(--violet);
  color: #fff;
}

.cover-ochre {
  background: var(--ochre);
  color: var(--charcoal);
}

.book-copy {
  padding: 16px 4px 0;
}

.book-copy > span {
  color: var(--brick);
  font-size: .61rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.book-copy p {
  color: var(--muted);
  font-size: .81rem;
}

.book-copy a {
  font-size: .75rem;
  font-weight: 900;
}

/* Recommendations + featured */
.recommendations {
  background: var(--paper);
}

.recommendations-grid {
  display: grid;
  grid-template-columns: .88fr 1.12fr;
  gap: 18px;
}

.picks-panel {
  padding: 34px;
  border: 1px solid var(--line);
  background: var(--white);
}

.picks-panel > p:not(.eyebrow) {
  color: var(--muted);
}

.pick-list {
  margin-top: 28px;
  border-top: 1px solid var(--line);
}

.pick-list article {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.pick-list span {
  color: var(--brick);
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.pick-list h3 {
  margin: 8px 0 4px;
  font-family: var(--serif);
}

.pick-list p {
  margin: 0;
  color: var(--muted);
  font-size: .8rem;
}

.featured-book {
  min-height: 600px;
  display: grid;
  grid-template-columns: .86fr 1.14fr;
  background: var(--violet);
  color: #fff;
}

.featured-cover {
  margin: 38px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  background: var(--ochre);
  color: var(--charcoal);
  box-shadow: 16px 18px 0 rgba(0,0,0,.12);
  transform: rotate(-2deg);
}

.featured-cover span,
.featured-cover small {
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.featured-cover strong {
  font: 700 clamp(2.4rem,4vw,4rem)/.94 var(--serif);
}

.featured-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 34px;
}

.featured-copy .eyebrow {
  color: #d6c6ea;
}

.featured-copy > p:not(.eyebrow) {
  color: rgba(255,255,255,.66);
}

.featured-category {
  font-size: .78rem;
  font-weight: 900;
}

/* Children + preorder */
.children-preorders {
  background: var(--sage);
}

.children-preorders-grid {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 18px;
}

.children-panel,
.preorder-panel {
  padding: 34px;
}

.children-panel {
  border: 1px solid rgba(38,58,53,.14);
  background: rgba(255,255,255,.46);
}

.children-panel > p:not(.eyebrow) {
  color: #59635f;
}

.children-groups {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  margin: 28px 0;
  border-top: 1px solid rgba(38,58,53,.16);
  border-left: 1px solid rgba(38,58,53,.16);
}

.children-groups article {
  min-height: 180px;
  padding: 18px;
  border-right: 1px solid rgba(38,58,53,.16);
  border-bottom: 1px solid rgba(38,58,53,.16);
}

.children-groups span {
  color: var(--brick);
  font-size: .62rem;
  font-weight: 900;
}

.children-groups h3 {
  margin: 26px 0 6px;
  font-family: var(--serif);
}

.children-groups p {
  margin: 0;
  color: #59635f;
  font-size: .79rem;
}

.preorder-panel {
  min-height: 570px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--library);
  color: #fff;
}

.preorder-code {
  margin-bottom: auto;
  color: #e2a28e;
  font-size: .58rem;
  font-weight: 900;
  letter-spacing: .13em;
}

.preorder-panel .eyebrow {
  color: #e2a28e;
}

.preorder-panel > p:not(.eyebrow) {
  color: rgba(255,255,255,.64);
}

.preorder-list {
  margin: 22px 0;
  border-top: 1px solid var(--light-line);
}

.preorder-list article {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--light-line);
}

.preorder-list span {
  color: #e2a28e;
  font-size: .62rem;
  font-weight: 900;
}

.preorder-list h3 {
  margin-bottom: 4px;
}

.preorder-list p {
  margin: 0;
  color: rgba(255,255,255,.6);
  font-size: .78rem;
}

/* Gifts + experience */
.gifts-experience {
  background: var(--white);
}

.gifts-experience-grid {
  display: grid;
  grid-template-columns: .86fr 1.14fr;
  gap: 18px;
}

.gifts-panel {
  padding: 34px;
  border: 1px solid var(--line);
}

.gift-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 28px 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.gift-grid article {
  min-height: 170px;
  padding: 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.gift-grid span {
  color: var(--brick);
  font-size: .62rem;
  font-weight: 900;
}

.gift-grid h3 {
  margin: 26px 0 6px;
  font-family: var(--serif);
}

.gift-grid p {
  margin: 0;
  color: var(--muted);
  font-size: .79rem;
}

.store-experience {
  display: grid;
  grid-template-rows: 1.08fr .92fr;
  background: var(--charcoal);
  color: #fff;
}

.store-experience figure {
  min-height: 0;
  margin: 0;
  overflow: hidden;
}

.store-copy {
  padding: 30px;
}

.store-copy .eyebrow {
  color: #e2a28e;
}

.store-copy > p:not(.eyebrow) {
  color: rgba(255,255,255,.64);
}

/* Why */
.why {
  background: var(--paper);
}

.why-grid {
  display: grid;
  grid-template-columns: .72fr 1.28fr;
  gap: 66px;
}

.why-list {
  border-top: 1px solid var(--line);
}

.why-list article {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.why-list article > span {
  color: var(--brick);
  font-size: .63rem;
  font-weight: 900;
}

.why-list h3 {
  margin-bottom: 4px;
  font-family: var(--serif);
  font-size: 1.3rem;
}

.why-list p {
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
}

/* Visit + newsletter */
.visit-newsletter {
  background: var(--sage);
}

.visit-newsletter-grid {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 18px;
}

.visit-panel,
.newsletter-panel {
  padding: 34px;
}

.visit-panel {
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    linear-gradient(rgba(38,58,53,.05) 1px,transparent 1px),
    linear-gradient(90deg,rgba(38,58,53,.05) 1px,transparent 1px),
    var(--ochre);
  background-size: 40px 40px;
}

.visit-panel address {
  display: grid;
  gap: 4px;
  margin: 24px 0;
  padding-left: 16px;
  border-left: 3px solid var(--brick);
  font-style: normal;
}

.visit-panel address span,
.visit-panel > p:not(.eyebrow) {
  color: #594f3d;
}

.newsletter-panel {
  background: var(--white);
}

.newsletter-panel > p:not(.eyebrow) {
  color: var(--muted);
}

.newsletter-panel label {
  display: block;
  margin-bottom: 7px;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .04em;
}

.newsletter-row {
  display: flex;
}

.newsletter-row input {
  min-width: 0;
  flex: 1;
  min-height: 48px;
  padding: 0 12px;
  border: 1px solid rgba(29,33,31,.22);
  border-right: 0;
  background: #fff;
}

.newsletter-photo {
  height: 220px;
  margin: 28px 0 0;
  overflow: hidden;
}

/* Final CTA */
.final-cta {
  padding: 64px 0;
  background: var(--library);
  color: #fff;
}

.final-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 50px;
  align-items: end;
}

.final-cta h2 {
  color: #fff;
}

.final-cta p:not(.eyebrow) {
  max-width: 680px;
  color: rgba(255,255,255,.64);
}

.final-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

/* Footer */
.site-footer {
  padding: 38px 0 20px;
  background: #101512;
  color: #fff;
}

.footer-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 40px;
  align-items: start;
}

.footer-brand {
  display: grid;
}

.footer-brand .brand-main {
  color: #fff;
}

.footer-brand .brand-sub {
  color: #e2a28e;
}

.footer-brand p {
  margin: 16px 0 0;
  color: rgba(255,255,255,.52);
  font-size: .78rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
}

.footer-nav a {
  color: rgba(255,255,255,.68);
  font-size: .76rem;
  text-decoration: none;
}

.footer-row address {
  display: grid;
  gap: 4px;
  justify-self: end;
  font-style: normal;
  text-align: right;
}

.footer-row address span {
  color: rgba(255,255,255,.56);
  font-size: .8rem;
}

.footer-bottom {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--light-line);
}

.footer-bottom p {
  margin: 0;
  color: rgba(255,255,255,.42);
  font-size: .7rem;
}

/* Responsive */
@media (max-width: 1100px) {
  :root {
    --shell: min(100% - 42px, 1020px);
  }

  .hero-masthead {
    grid-template-columns: 1.08fr .92fr;
  }

  .featured-book {
    grid-template-columns: 1fr;
  }

  .featured-cover {
    min-height: 400px;
  }
}

@media (max-width: 920px) {
  :root {
    --shell: calc(100% - 34px);
    --section-space: 66px;
  }

  .desktop-nav {
    display: none;
  }

  .header-row {
    grid-template-columns: 1fr auto;
  }

  .mobile-nav {
    display: block;
    border-top: 1px solid var(--line);
  }

  .mobile-nav-track {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 22px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .mobile-nav-track::-webkit-scrollbar {
    display: none;
  }

  .mobile-nav a {
    flex: 0 0 auto;
    font-size: .67rem;
    font-weight: 900;
    text-decoration: none;
    text-transform: uppercase;
  }

  .hero-masthead,
  .books-grid,
  .recommendations-grid,
  .children-preorders-grid,
  .gifts-experience-grid,
  .why-grid,
  .visit-newsletter-grid {
    grid-template-columns: 1fr;
  }

  .books-intro {
    position: static;
  }

  .desk-heading {
    grid-template-columns: 1fr;
  }

  .book-row {
    grid-template-columns: 1fr 1fr;
  }

  .footer-row {
    grid-template-columns: 1fr 1fr;
  }

  .footer-row address {
    grid-column: 1 / -1;
    justify-self: start;
    padding-top: 18px;
    border-top: 1px solid var(--light-line);
    text-align: left;
  }
}

@media (max-width: 700px) {
  :root {
    --shell: calc(100% - 26px);
    --section-space: 54px;
  }

  .site-header {
    position: relative;
    backdrop-filter: none;
  }

  .header-row {
    min-height: 72px;
  }

  .header-row .button {
    min-height: 40px;
    padding-inline: 10px;
    font-size: .61rem;
  }

  h1 {
    font-size: clamp(3rem,15vw,4.9rem);
  }

  h2 {
    font-size: clamp(2.2rem,11vw,3.35rem);
  }

  .hero {
    padding-top: 28px;
  }

  .reading-ribbon {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-bottom: 74px;
  }

  .reading-photo {
    min-height: 300px;
  }

  .reading-photo-wide {
    border-radius: 0;
  }

  .location-ticket {
    left: 0;
    width: min(340px,94%);
  }

  .book-row,
  .children-groups,
  .gift-grid {
    grid-template-columns: 1fr;
  }

  .featured-cover {
    min-height: 340px;
    margin: 24px;
  }

  .newsletter-row {
    flex-direction: column;
    gap: 8px;
  }

  .newsletter-row input {
    border-right: 1px solid rgba(29,33,31,.22);
  }

  .newsletter-row .button {
    width: 100%;
  }

  .final-actions {
    align-items: stretch;
  }

  .final-actions .button {
    width: 100%;
  }

  .footer-row {
    grid-template-columns: 1fr;
  }

  .footer-row address {
    grid-column: auto;
  }
}

@media (max-width: 390px) {
  :root {
    --shell: calc(100% - 20px);
  }

  .brand-main {
    font-size: .92rem;
  }

  .brand-sub {
    font-size: .42rem;
  }

  .picks-panel,
  .featured-copy,
  .children-panel,
  .preorder-panel,
  .gifts-panel,
  .store-copy,
  .visit-panel,
  .newsletter-panel {
    padding: 26px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: .01ms !important;
  }
}
