/* Quirky Shelf — cream paper, Lato, brown rules, teal accents.
   Palette matches the holiday pins (cream / brown rules) plus the
   live site's teal (#006580). */

@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/lato-light.woff2") format("woff2");
}
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/lato-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/lato-bold.woff2") format("woff2");
}

:root {
  --cream: #FAF6ED;
  --rule: #6E5848;
  --brand: #70685D;
  --ink: #2D2824;
  --foot: #5F584E;
  --mat: #E9E0D1;
  --frame: #D2C6B4;
  --teal: #006580;
  --teal-deep: #004E63;
  --muted: #6A6158;
  --panel: #FFFCF7;
  --focus: #006580;
  --font: "Lato", "Helvetica Neue", Arial, sans-serif;
  --max: 72rem;
  --pad: clamp(1.1rem, 4vw, 2.25rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  font-size: 1.05rem;
  line-height: 1.65;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); }
a:hover { color: var(--teal-deep); }
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -3.5rem;
  background: var(--ink);
  color: var(--cream);
  padding: 0.5rem 0.9rem;
  z-index: 20;
  text-decoration: none;
  font-weight: 700;
}
.skip:focus { top: 0.75rem; color: var(--cream); }

.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;
}

/* ----- header ----- */
.site-header {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.75rem var(--pad) 0;
  text-align: center;
}
.shelf-mark {
  display: block;
  width: 58px;
  height: 58px;
  margin: 0 auto 0.85rem;
}
.site-header h1 {
  margin: 0;
  font-weight: 400;
  line-height: 1.2;
}
.site-header .wordmark {
  display: block;
  color: var(--brand);
  font-size: 1.05rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.site-header .tagline {
  display: block;
  margin-top: 0.55rem;
  color: var(--ink);
  font-weight: 300;
  font-size: clamp(1.05rem, 2.4vw, 1.2rem);
  letter-spacing: 0.01em;
  text-transform: none;
}
.header-rule {
  max-width: var(--max);
  margin: 1.35rem auto 0;
  padding: 0 var(--pad);
}
.header-rule span,
.footer-rule span {
  display: block;
  height: 3px;
  background: var(--rule);
}

/* ----- layout ----- */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.75rem var(--pad) 3rem;
}

/* ----- carousel ----- */
.carousel { outline: none; }
.viewport {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--frame);
  min-height: 16rem;
}
.slide {
  display: none;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: stretch;
}
.slide.is-active { display: grid; }
.slide .photo {
  background: #fff;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.slide .photo picture,
.card .photo picture { width: 100%; height: 100%; display: block; }
.slide .photo img {
  width: 100%;
  height: 100%;
}
.photo-contain img { object-fit: contain; padding: 4%; }
.photo-cover img { object-fit: cover; }

.slide .copy {
  padding: 1.4rem 1.25rem 1.6rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.kicker {
  margin: 0 0 0.55rem;
  color: var(--teal);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.slide h2 {
  margin: 0 0 0.85rem;
  color: var(--ink);
  font-weight: 300;
  font-size: clamp(1.55rem, 3.4vw, 2.25rem);
  line-height: 1.25;
}
.hook {
  margin: 0 0 1.25rem;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink);
  max-width: 38em;
}
.btn {
  display: inline-block;
  align-self: flex-start;
  background: var(--teal);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 0.7rem 1.25rem;
  border-radius: 4px;
  line-height: 1.2;
}
.btn:hover { background: var(--teal-deep); color: #fff; }

.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  margin-top: 0.95rem;
}
.ctrl,
.pause-btn,
.dot {
  font-family: var(--font);
  background: transparent;
  color: var(--rule);
  border: 1px solid var(--frame);
  cursor: pointer;
}
.ctrl {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: var(--panel);
}
.ctrl:hover,
.pause-btn:hover { background: var(--mat); }
.dots {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0.25rem;
}
.dot {
  width: 2.5rem;
  min-width: 24px;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  display: grid;
  place-items: center;
}
.dot::after {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 2px;
  border: 1px solid var(--rule);
  background: transparent;
}
.dot.is-active::after {
  background: var(--teal);
  border-color: var(--teal);
}
.pause-btn {
  margin-left: 0.35rem;
  height: 2.75rem;
  padding: 0 0.9rem;
  border-radius: 4px;
  background: var(--panel);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand);
}

@media (max-width: 799px) {
  .controls {
    display: grid;
    grid-template-columns: 2.75rem 1fr 2.75rem;
    grid-template-areas:
      "prev dots next"
      "pause pause pause";
    column-gap: 0.35rem;
    row-gap: 0.45rem;
    justify-items: center;
  }
  .ctrl.prev { grid-area: prev; }
  .dots { grid-area: dots; margin: 0; gap: 0; justify-content: center; width: 100%; }
  .ctrl.next { grid-area: next; }
  .pause-btn { grid-area: pause; margin: 0; }
  .dot { width: 2rem; min-width: 24px; height: 2.75rem; }
}

@media (min-width: 800px) {
  .slide.is-active { grid-template-columns: 1fr 1fr; }
  .slide .photo { aspect-ratio: 1 / 1; }
  .slide .copy { padding: 2.4rem 2.5rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .slide.is-active .photo,
  .slide.is-active .copy {
    animation: qs-fade 0.45s ease;
  }
}
@keyframes qs-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .slide.is-active .photo,
  .slide.is-active .copy { animation: none; }
}

/* ----- all picks ----- */
.all-picks {
  margin-top: 3rem;
}
.all-picks h2 {
  margin: 0 0 1.15rem;
  color: var(--teal);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem 1.25rem;
}
.card a {
  color: inherit;
  text-decoration: none;
  display: block;
  height: 100%;
}
.card .photo {
  aspect-ratio: 1 / 1;
  background: #fff;
  border: 1px solid var(--frame);
  overflow: hidden;
  margin-bottom: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card .photo img {
  width: 100%;
  height: 100%;
}
.card h3 {
  margin: 0 0 0.35rem;
  color: var(--teal-deep);
  font-weight: 400;
  font-size: 1.12rem;
  line-height: 1.3;
}
.card a:hover h3 { text-decoration: underline; }
.card-hook {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

@media (min-width: 600px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 1.75rem 1.5rem; }
}

/* ----- about / pinterest / footer ----- */
.about {
  margin: 3rem 0 0.6rem;
  text-align: center;
  color: var(--ink);
  font-weight: 300;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}
.social {
  margin: 0 0 2.25rem;
  text-align: center;
  font-size: 0.98rem;
}
.social a { font-weight: 700; }

.footer-rule {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--pad);
}
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.15rem var(--pad) 2.5rem;
  text-align: center;
}
.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.noscript-list {
  margin: 0;
  padding-left: 1.2em;
}
.noscript-list a { font-weight: 700; }

/* ----- 404 ----- */
.site-header .wordmark,
.error-page .wordmark {
  display: block;
  color: var(--brand);
  font-size: 1.05rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0;
}
.error-page { text-align: center; }
.error-page h1 {
  margin: 0 0 0.85rem;
  color: var(--ink);
  font-weight: 300;
  font-size: clamp(1.7rem, 3.4vw, 2.2rem);
  line-height: 1.25;
}
.error-page p {
  margin: 0 0 1.25rem;
  max-width: 38em;
  margin-left: auto;
  margin-right: auto;
}
.error-page .btn { margin-top: 0.25rem; }
