/* ============================================
   Places Not For Moral Men — book website
   Matched to Figma: Desktop (1238px) + Mobile (390px) frames
   ============================================ */

:root {
  --color-bg: #101211;
  --color-title: #b53f00;
  --color-byline: #161e20;
  --color-accent: #ff9359;
  --color-body: #ffffff;
  --color-quote: rgba(255, 255, 255, 0.6);
  --color-footer: #a3a3a3;
  --color-divider: rgba(255, 255, 255, 0.5);
  --color-btn-text: #1e1e1e;
  --color-btn-outline-text: #f5f5f5;

  --font-display: 'Faculty Glyphic', serif;
  --font-body: 'Crimson Pro', serif;
  --font-ui: 'Instrument Sans', sans-serif;
  --font-top-bar: 'Inter', sans-serif;

  --radius-btn: 8px;
  --max-content: 682px;
  /* 30px logo + 24px top/bottom padding */
  --top-bar-height: 78px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--color-bg);
  background-image: url('../images/mountains-bg.jpg');
  /* Never narrower than 1440px (keeps the mobile crop), but grows with
     wider viewports so the image always reaches both edges */
  background-size: max(1440px, 100%) auto;
  /* Starts below the top bar so the hero keeps its place on the mountains */
  background-position: center var(--top-bar-height);
  background-repeat: no-repeat;
  color: var(--color-body);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

/* Visible keyboard focus state everywhere (not specified in Figma; added per build rules) */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* ---------- Top bar ---------- */

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--top-bar-height);
  padding: 24px;
  background: #000000;
}

.top-bar-home {
  display: block;
}

.top-bar-logo {
  width: 30px;
  height: 30px;
}

.top-bar-link {
  font-family: var(--font-top-bar);
  font-weight: 400;
  font-size: 12px;
  line-height: normal;
  color: #ffffff;
  text-decoration: underline;
}

/* ---------- Layout shell ---------- */

.site-header {
  position: relative;
  padding: 94px 24px 73px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 44px;
}

.hero-feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 41px;
  width: 100%;
}

/* Only shown at desktop, between the hero and the synopsis */
.hero-divider {
  display: none;
}

.hero-cover {
  width: 260px;
  flex-shrink: 0;
  /* Balances the cover's drop shadow so it reads as visually
     centered while stacked under the title. box-sizing is
     overridden to content-box so this padding adds extra space
     to the right rather than shrinking the cover image. */
  box-sizing: content-box;
  padding-right: 100px;
}

.hero-cover img {
  width: 100%;
  height: auto;
}

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  text-transform: uppercase;
  width: 100%;
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--color-title);
  opacity: 0.75;
  font-size: clamp(39px, 14px + 5.2vw, 79px);
  line-height: 1.1;
}

/* Hidden on mobile so "Places Not For Moral Men" wraps naturally;
   shown at desktop to force the break after "For". */
.desktop-break {
  display: none;
}

.hero-byline {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--color-byline);
  font-size: 22px;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px;
}

.page-body {
  display: flex;
  flex-direction: column;
  gap: 50px;
  width: 100%;
  max-width: var(--max-content);
  padding-bottom: 73px;
}

.divider {
  border: none;
  border-top: 1px solid var(--color-divider);
  width: 100%;
  margin: 0;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius-btn);
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s ease;
}

.btn:hover {
  opacity: 0.85;
}

.btn-primary {
  background: var(--color-accent);
  color: var(--color-btn-text);
}

.btn-outline {
  background: transparent;
  border: 1px solid #ffffff;
  color: var(--color-btn-outline-text);
}

.cta-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.cta-row .btn {
  width: 100%;
  font-weight: 600;
}

.cta-row .btn-primary {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 2px 6px 2px rgba(0, 0, 0, 0.15);
}

/* ---------- Synopsis ---------- */

.synopsis {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.synopsis p {
  margin: 0 0 1em;
}

.synopsis p:last-child {
  margin-bottom: 0;
}

/* ---------- Where to buy ---------- */

.buy-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 50px;
  width: 100%;
}

.section-heading {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  color: var(--color-accent);
  font-size: 41px;
  text-align: center;
}

.buy-columns {
  display: flex;
  gap: 50px;
  width: 100%;
  max-width: 480px;
}

.buy-column {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.buy-column h3 {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 300;
  font-style: italic;
  font-size: 24px;
  text-align: center;
}

.buy-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  width: 100%;
}

.buy-links .btn {
  width: 166px;
}

/* ---------- Read it first ---------- */

.read-first {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  width: 100%;
  text-align: center;
}

.read-first p {
  margin: 0;
}

.read-first .btn {
  margin-top: 0;
}

.read-first-note {
  margin: 0;
  font-style: italic;
  font-size: 15px;
  color: var(--color-footer);
}

/* ---------- Quote ---------- */

.quote-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 100px;
  width: 100%;
}

.quote-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  padding-bottom: 30px;
  width: 100%;
}

.quote-mark {
  width: 35px;
  height: 26px;
}

blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 23px;
  color: var(--color-quote);
  text-align: center;
  line-height: 1.5;
}

blockquote p {
  margin: 0 0 1em;
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* ---------- Footer ---------- */

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 60px 24px;
  width: 100%;
  max-width: var(--max-content);
  margin: 0 auto;
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 12px;
  line-height: 1.8;
  color: var(--color-footer);
}

.footer-mark {
  width: 14px;
  height: 14px;
}

/* ============================================
   Breakpoints: Figma only designed 390px (mobile) and
   1238px (desktop) frames — no tablet frame exists.
   Hero title/byline use clamp() for fluid, unbroken
   scaling across every width. Padding and the CTA row
   switch to the wider desktop spacing at 768px, but the
   hero image+title are kept stacked (mobile layout) until
   1024px: at narrower tablet widths there isn't enough
   column width next to the book cover for the title to
   wrap cleanly in a side-by-side layout.
   ============================================ */
@media (min-width: 768px) {
  .top-bar {
    padding: 24px 60px;
  }

  .site-header {
    padding: 156px 101px 73px;
  }

  main {
    padding: 0 101px;
  }

  .cta-row {
    flex-direction: row;
    justify-content: center;
    width: auto;
  }

  .cta-row .btn {
    width: auto;
  }

  .site-footer {
    padding: 60px 101px;
  }
}

@media (min-width: 1024px) {
  .site-header {
    padding: 106px 41px 50px;
    gap: 59px;
  }

  .hero-title {
    color: #cd4700;
    /* 129px in the 1238px Figma frame, scaling down to fit narrower desktops */
    font-size: min(10.4vw, 129px);
    line-height: 0.99;
  }

  .hero-byline {
    font-size: 20px;
    letter-spacing: 1.6px;
  }

  .desktop-break {
    display: block;
  }

  /* Book on the left, buttons stacked to its right, aligned to the
     same 682px column as the page body below */
  .hero-feature {
    flex-direction: row;
    gap: 50px;
    max-width: var(--max-content);
  }

  /* Crops the left side of the cover's drop shadow, as in Figma */
  .hero-cover {
    width: 259px;
    height: 289px;
    box-sizing: border-box;
    padding-right: 0;
  }

  .hero-cover img {
    height: 100%;
    object-fit: cover;
    object-position: right center;
  }

  .cta-row {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .hero-divider {
    display: block;
  }
}
