/* ---------- Fonts (self-hosted, SIL Open Font Licence — see /fonts) ---------- */

@font-face {
  font-family: "Libre Baskerville";
  src: url("/fonts/libre-baskerville-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Libre Baskerville";
  src: url("/fonts/libre-baskerville-italic-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-italic-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/ibm-plex-mono-600-latin.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- Colours and basics ---------- */

:root {
  --pink: #e18694;
  --pink-on-white: #d46a7d; /* slightly deeper pink so large text on white stays readable */
  --ink: #111111;
  --white: #ffffff;
  --serif: "Libre Baskerville", Baskerville, "Baskerville Old Face", Georgia, serif;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", Consolas, "SF Mono", monospace;
}

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

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

body {
  margin: 0;
  background: var(--pink);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1em;
}

a {
  color: inherit;
  text-underline-offset: 0.15em;
}

:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

hr {
  height: 1px;
  margin: 0;
  border: 0;
  background: currentColor;
}

/* ---------- Homepage ---------- */

.home-panel {
  padding: 39px 0 168px;
  background: var(--ink);
  color: var(--white);
  border-radius: 0 0 clamp(40px, 7vw, 100px) clamp(40px, 7vw, 100px);
}

.home-col {
  width: min(389px, 100% - 48px);
  margin: 0 auto;
}

.home-card {
  margin: 0 -7px;
  padding: 7px 7px 22px;
  background: var(--white);
}

.home-card img {
  width: 100%;
  aspect-ratio: 389 / 579;
  object-fit: cover;
  object-position: 58.5% 64%;
}

.home-intro {
  margin-top: 11px;
  color: var(--pink-on-white);
  font-size: 1.63rem;
  line-height: 1.17;
}

.home-sections {
  margin-top: 40px;
}

.home-sections details + details {
  border-top: 1px solid var(--white);
}

.home-sections summary {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 0;
  cursor: pointer;
  list-style: none;
}

.home-sections summary::-webkit-details-marker {
  display: none;
}

.home-sections summary::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  margin: 0 3px 4px 3px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s;
}

.home-sections details[open] summary::before {
  margin-bottom: -2px;
  transform: rotate(-135deg);
}

.home-sections h2 {
  font-size: 1.105rem;
  line-height: 1.2;
}

.home-section-body {
  padding-bottom: 30px;
  line-height: 1.45;
}

.home-section-body ul {
  margin: 0 0 1em;
  padding-left: 1.1em;
}

.home-section-body li + li {
  margin-top: 0.4em;
}

.home-section-body p:last-child,
.home-section-body ul:last-child {
  margin-bottom: 0;
}

.home-section-body a {
  color: var(--pink);
  text-decoration-color: rgb(225 134 148 / 0.45);
}

.home-section-body a:hover {
  text-decoration-color: currentColor;
}

.home-strip {
  width: 100%;
  height: 26px;
  margin-top: 120px;
  object-fit: cover;
}

.home-coffee {
  margin: 48px 0 0;
  font-family: var(--serif);
  font-size: 1.105rem;
  font-style: italic;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.home-col > hr {
  margin-top: 19px;
  background: #808080;
}

body.home {
  background: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  .home-sections summary::before {
    transition: none;
  }
}

/* ---------- Article pages ---------- */

.article {
  padding: 112px 24px 0;
  font-size: 1.0625rem;
  line-height: 1.65;
  text-wrap: pretty;
}

.return-home {
  padding: 5rem 24px 4rem;
  text-align: center;
}

.return-home,
.article-meta {
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.01em;
}

.article-meta strong {
  font-weight: inherit;
}

.home-link {
  display: inline-block;
  color: var(--white);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.article-meta .home-link {
  margin-top: 0.5rem;
}

.article-col {
  max-width: 589px;
  margin: 0 auto;
}

.article-title {
  font-size: clamp(2.6rem, 6vw, 4.15rem);
  line-height: 1.06;
}

.article-title--bold {
  font-size: clamp(2rem, 4.5vw, 2.89rem);
  font-weight: 700;
  line-height: 1.11;
}

.article-meta {
  margin: 11px 0 0;
}

.article hr {
  margin: 1.2rem 0 1.5rem;
}

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

.article-figure {
  max-width: 789px;
  margin: 2.6rem auto 3rem;
}

.article-figure img {
  width: 100%;
  aspect-ratio: 789 / 468;
  object-fit: cover;
}

.article-lead-image {
  width: 100%;
  margin: 4rem 0 11px;
  aspect-ratio: 589 / 358;
  object-fit: cover;
  border-radius: 10px;
}

.article-body {
  margin-top: 3rem;
}

.article-note {
  margin-top: 3rem;
}

/* Loving Vegas: alternating text and photo columns */

.vegas {
  max-width: 1189px;
  margin: 0 auto;
}

.vegas-part {
  display: grid;
  grid-template-columns: minmax(0, 589fr) minmax(0, 539fr);
  column-gap: 61px;
  align-items: center;
}

.vegas-part--first {
  grid-template-areas:
    ".     title"
    "media meta"
    "media text";
  align-items: start;
}

.vegas-part--first .article-title {
  grid-area: title;
  margin-bottom: 70px;
}

.vegas-part--first .article-meta {
  grid-area: meta;
  margin: 0 0 3rem;
}

.vegas-part--first .vegas-media {
  grid-area: media;
}

.vegas-part--first .vegas-text {
  grid-area: text;
}

.vegas-part--text-left .vegas-text {
  order: -1;
}

.vegas-part--text-left {
  grid-template-columns: minmax(0, 539fr) minmax(0, 589fr);
}

.vegas-part--solo {
  display: block;
}

.vegas-part--solo .vegas-text {
  max-width: 539px;
}

.vegas-part--centre .vegas-text {
  max-width: 589px;
  margin: 0 auto;
}

.vegas hr {
  margin: 3rem 0;
}

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

.vegas-media {
  display: grid;
  gap: 11px;
}

.vegas-media img {
  width: 100%;
  object-fit: cover;
}

.vegas-stack {
  gap: 4rem;
}

.vegas-grid {
  grid-template-columns: 1fr 1fr;
}

.vegas-row {
  grid-template-columns: repeat(4, 1fr);
  margin: 3rem 0;
}

.vegas-wide {
  max-width: 989px;
  margin: 3rem auto;
}

.vegas-media .vegas-inset {
  width: 90%;
  margin: 0 0 4rem auto;
}

.r-tall { aspect-ratio: 539 / 837; }
.r-land { aspect-ratio: 3 / 2; }
.r-port { aspect-ratio: 2 / 3; }
.r-grid { aspect-ratio: 289 / 468; }
.r-row { aspect-ratio: 289 / 432; }
.r-sq { aspect-ratio: 289 / 395; }
.r-wide { aspect-ratio: 989 / 690; }

@media (max-width: 760px) {
  .vegas-part,
  .vegas-part--first,
  .vegas-part--text-left {
    display: block;
  }

  .vegas-part--first .article-title {
    margin-bottom: 0;
  }

  .vegas-part--first .article-meta {
    margin: 11px 0 2rem;
  }

  .vegas-text {
    margin-top: 2rem;
  }

  .vegas-part--first .vegas-text {
    margin-top: 0;
  }

  .vegas-media {
    margin-top: 2rem;
  }

  .vegas-stack {
    gap: 11px;
  }

  .vegas-media .vegas-inset {
    width: 100%;
    margin-bottom: 11px;
  }

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

/* ---------- Small screens ---------- */

@media (max-width: 600px) {
  .article {
    padding-top: 56px;
  }

  .return-home {
    padding: 4rem 24px 3rem;
  }

  .article-lead-image {
    margin-top: 2rem;
  }

  .home-panel {
    padding-bottom: 120px;
  }

  .home-strip {
    margin-top: 80px;
  }
}

/* ---------- 404 ---------- */

.not-found {
  padding: 20vh 24px 10vh;
  text-align: center;
}

.not-found p {
  margin-top: 1.5rem;
}
