/* =========================================================================
   The Voyage Press — 1930s screen-printed travel poster.
   Flat colour, hard edges, thin cream rules. No gradients, no shadows.
   Mobile-first; breakpoints at 480px and 768px.
   ========================================================================= */

:root {
  --navy: #16294a;
  --cream: #f0dcb0;
  --teal: #1f6b72;
  --terracotta: #c4562f;
  --mustard: #e0a02e;

  --rule: 1px solid var(--cream);
  --rule-faint: 1px solid rgba(240, 220, 176, 0.28);

  --heading: 'Bebas Neue', 'Arial Narrow', sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --gutter: 1.25rem;
  --section-y: 3.5rem;
  --measure: 640px;
}

/* ------------------------------- reset -------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2 {
  font-family: var(--heading);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1;
  margin: 0;
}

p {
  margin: 0 0 1.15rem;
}

a {
  color: inherit;
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ------------------------------ helpers ------------------------------- */

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--mustard);
  color: var(--navy);
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  left: 0;
}

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

.section-title {
  font-size: clamp(2rem, 7vw, 3rem);
  margin-bottom: 1rem;
}

.section-lead {
  max-width: var(--measure);
  margin-bottom: 2.5rem;
}

/* ------------------------------ buttons ------------------------------- */

.btn {
  display: inline-block;
  font-family: var(--heading);
  font-size: 1.375rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.7rem 2rem;
  border: 2px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.18s linear, color 0.18s linear;
}

.btn--terracotta {
  background: var(--terracotta);
  color: var(--cream);
}

.btn--terracotta:hover,
.btn--terracotta:focus-visible {
  background: var(--mustard);
  color: var(--navy);
}

.btn--navy {
  background: var(--navy);
  color: var(--cream);
  font-size: 1.125rem;
  padding: 0.7rem 1.5rem;
}

.btn--navy:hover,
.btn--navy:focus-visible {
  background: var(--teal);
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* -------------------------------- hero -------------------------------- */

.hero {
  min-height: 100vh;
  background: var(--navy);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--section-y) var(--gutter);
  border-bottom: var(--rule);
}

@supports (min-height: 100svh) {
  .hero {
    min-height: 100svh;
  }
}

.hero__inner {
  max-width: var(--measure);
}

.monogram {
  width: 112px;
  height: 112px;
  margin: 0 auto 2rem;
  border: 2px solid var(--cream);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.monogram__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Shown only if /img/logo.png is missing — see main.js */
.monogram__fallback {
  display: none;
  font-family: var(--heading);
  font-size: 2.75rem;
  letter-spacing: 0.08em;
  color: var(--cream);
}

.monogram--fallback .monogram__img {
  display: none;
}

.monogram--fallback .monogram__fallback {
  display: block;
}

.hero__title {
  font-size: clamp(3rem, 14vw, 6rem);
  margin-bottom: 1rem;
}

.hero__tagline {
  font-size: 1.0625rem;
  max-width: 30ch;
  margin: 0 auto 2.5rem;
  color: var(--cream);
}

/* ------------------------------ gallery ------------------------------- */

.gallery {
  background: var(--cream);
  color: var(--navy);
  padding: var(--section-y) 0;
}

.poster-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.poster-card-item {
  display: flex;
}

.poster-card {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.poster-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease-out;
}

.poster-card__link:hover,
.poster-card__link:focus-visible {
  transform: scale(1.02);
}

/* The Etsy mockups are square on a white ground, so the card gives them a
   white mat and a navy keyline rather than cropping them to portrait. */
.poster-card__frame {
  aspect-ratio: 1 / 1;
  background: #ffffff;
  border: 1px solid var(--navy);
  border-radius: 2px;
  overflow: hidden;
}

.poster-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Flat placeholder shown when a poster file is missing — see main.js */
.poster-card__frame--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--teal);
}

.poster-card__frame--placeholder .poster-card__img {
  display: none;
}

.poster-card__frame--placeholder::after {
  content: attr(data-initials);
  font-family: var(--heading);
  font-size: 2.5rem;
  letter-spacing: 0.08em;
  color: var(--cream);
}

.poster-card__title {
  font-family: var(--heading);
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0.85rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--navy);
}

.poster-card__country {
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0.15rem 0 0;
}

.poster-card__buy {
  margin-top: 0.75rem;
  align-self: flex-start;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--terracotta);
  border-bottom: 1px solid var(--terracotta);
  padding-bottom: 2px;
}

.poster-card__buy:hover,
.poster-card__buy:focus-visible {
  color: var(--navy);
  border-bottom-color: var(--navy);
}

/* ------------------------------- story -------------------------------- */

.story {
  background: var(--navy);
  color: var(--cream);
  padding: var(--section-y) var(--gutter);
  border-top: var(--rule);
  border-bottom: var(--rule);
}

.story__inner {
  max-width: var(--measure);
  margin: 0 auto;
  text-align: center;
}

.story .section-title {
  margin-bottom: 2rem;
}

.story p {
  text-align: left;
}

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

/* ----------------------------- newsletter ----------------------------- */

.newsletter {
  background: var(--cream);
  color: var(--navy);
  padding: var(--section-y) var(--gutter);
}

.newsletter__inner {
  max-width: var(--measure);
  margin: 0 auto;
  text-align: center;
}

.newsletter .section-lead {
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
}

.subscribe {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.subscribe__input {
  font-family: var(--body);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  color: var(--navy);
  background: var(--cream);
  border: 2px solid var(--navy);
  border-radius: 2px;
  width: 100%;
}

.subscribe__input::placeholder {
  color: rgba(22, 41, 74, 0.5);
}

.subscribe__message {
  min-height: 1.5rem;
  margin: 1rem 0 0;
  font-size: 0.9375rem;
  font-weight: 500;
}

.subscribe__message--ok {
  color: var(--teal);
}

.subscribe__message--error {
  color: var(--terracotta);
}

/* ------------------------------- footer ------------------------------- */

.footer {
  background: var(--navy);
  color: var(--cream);
  padding: 2.5rem 0;
  border-top: var(--rule);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.footer__brand {
  font-family: var(--heading);
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer__links a {
  color: var(--cream);
  text-decoration: none;
  border-bottom: var(--rule-faint);
  padding-bottom: 2px;
}

.footer__links a:hover,
.footer__links a:focus-visible {
  color: var(--mustard);
  border-bottom-color: var(--mustard);
}

.footer__copy {
  font-size: 0.8125rem;
  color: rgba(240, 220, 176, 0.7);
  margin: 0;
  padding-top: 1rem;
  border-top: var(--rule-faint);
  width: 100%;
  max-width: 320px;
}

/* ============================ breakpoints ============================= */

@media (min-width: 480px) {
  :root {
    --gutter: 1.75rem;
    --section-y: 4.5rem;
  }

  .poster-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .subscribe {
    flex-direction: row;
  }

  .subscribe .btn--navy {
    flex-shrink: 0;
  }

  .footer__links {
    flex-direction: row;
    gap: 1.75rem;
  }
}

@media (min-width: 768px) {
  :root {
    --gutter: 2.5rem;
    --section-y: 6rem;
  }

  body {
    font-size: 1.0625rem;
  }

  .poster-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }

  .monogram {
    width: 128px;
    height: 128px;
  }
}

/* ============================== top nav =============================== */

.topnav {
  background: var(--navy);
  color: var(--cream);
  border-bottom: var(--rule-faint);
  position: relative;
  z-index: 10;
}

.topnav__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.topnav__brand {
  font-family: var(--heading);
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cream);
}

.topnav__links {
  display: flex;
  gap: 1.25rem;
}

.topnav__links a {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cream);
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.topnav__links a:hover,
.topnav__links a:focus-visible,
.topnav__links a[aria-current='page'] {
  color: var(--mustard);
  border-bottom-color: var(--mustard);
}

/* The hero already fills the viewport; the nav sits above it, so trim the
   hero so the two together do not overflow the first screen. */
.hero {
  min-height: calc(100vh - 84px);
}

@supports (min-height: 100svh) {
  .hero {
    min-height: calc(100svh - 84px);
  }
}

/* =========================== generic pages ============================ */

.page {
  background: var(--cream);
  color: var(--navy);
  padding: var(--section-y) 0;
}

.page--narrow {
  max-width: var(--measure);
}

.page__title {
  font-family: var(--heading);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1;
  font-size: clamp(2.25rem, 8vw, 3.5rem);
  margin: 0 0 1rem;
}

.page__lead {
  max-width: var(--measure);
  margin-bottom: 3rem;
}

.breadcrumb {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--teal);
  text-decoration: none;
  border-bottom: 1px solid rgba(31, 107, 114, 0.4);
}

.breadcrumb a:hover,
.breadcrumb a:focus-visible {
  color: var(--terracotta);
  border-bottom-color: var(--terracotta);
}

.breadcrumb span[aria-hidden='true'] {
  padding: 0 0.4rem;
}

/* ============================== journal =============================== */

.journal-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

.journal-card-item {
  display: flex;
}

.journal-card {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.journal-card__link {
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease-out;
}

.journal-card__link:hover,
.journal-card__link:focus-visible {
  transform: scale(1.02);
}

.journal-card__title {
  font-family: var(--heading);
  font-weight: 400;
  font-size: 1.625rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.05;
  margin: 0.85rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--navy);
}

.journal-card__excerpt {
  margin: 0.6rem 0 0.9rem;
  font-size: 0.9375rem;
}

.journal-card__more {
  align-self: flex-start;
  margin-top: auto;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--terracotta);
  border-bottom: 1px solid var(--terracotta);
  padding-bottom: 2px;
}

.journal-card__more:hover,
.journal-card__more:focus-visible {
  color: var(--navy);
  border-bottom-color: var(--navy);
}

/* ============================== article =============================== */

.article {
  max-width: var(--measure);
  margin: 0 auto;
}

.article__eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.75rem;
}

.article__title {
  font-family: var(--heading);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.02;
  font-size: clamp(2.25rem, 8vw, 3.25rem);
  margin: 0 0 1.25rem;
}

.article__intro {
  font-size: 1.125rem;
  border-left: 3px solid var(--terracotta);
  padding-left: 1.15rem;
  margin-bottom: 2.5rem;
}

.article__figure {
  margin: 0 0 2.5rem;
}

.article__figure img {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--navy);
  border-radius: 2px;
}

.article__figure figcaption {
  font-size: 0.8125rem;
  color: var(--teal);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  border-top: 1px solid rgba(22, 41, 74, 0.25);
}

.article__body h2 {
  font-size: 1.75rem;
  margin: 2.5rem 0 1rem;
}

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

/* ---------------------------- article CTA ----------------------------- */

.cta {
  background: var(--navy);
  color: var(--cream);
  padding: 2rem 1.5rem;
  margin: 3rem 0 0;
  border-radius: 2px;
  text-align: center;
}

.cta__title {
  font-family: var(--heading);
  font-weight: 400;
  font-size: 1.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}

.cta p {
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

/* ------------------------------ related ------------------------------- */

.related {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(22, 41, 74, 0.25);
}

.related .section-title {
  font-size: 1.75rem;
  margin-bottom: 2rem;
}

/* ========================= page breakpoints =========================== */

@media (min-width: 480px) {
  .topnav__inner {
    flex-direction: row;
    justify-content: space-between;
  }

  .journal-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .journal-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }

  .cta {
    padding: 2.5rem;
  }
}

.cta__alt {
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: var(--rule-faint);
  font-size: 0.875rem;
  color: rgba(240, 220, 176, 0.85);
}

.cta__alt a {
  color: var(--mustard);
  text-decoration: none;
  border-bottom: 1px solid var(--mustard);
  padding-bottom: 1px;
}

.cta__alt a:hover,
.cta__alt a:focus-visible {
  color: var(--cream);
  border-bottom-color: var(--cream);
}
