/* Globetrote 24/7 — house stylesheet */
:root {
  --ground: #E7EEF2;
  --ink: #1F2E35;
  --accent: #7B2230;
  --accent-dark: #5E1A25;
  --accent-wash: #F5E9EB;
  --card: #FFFFFF;
  --muted: #5A6B74;
  --line: #C9D6DD;
  --serif: 'Spectral', Georgia, 'Times New Roman', serif;
  --sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: .6rem 1rem;
  border-radius: 0 0 8px 0;
  z-index: 50;
}
.skip:focus { left: 0; }

/* ---------- Masthead ---------- */

.masthead {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(123, 34, 48, .06);
  border-top: 4px solid var(--accent);
}

.masthead-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding-top: .9rem;
  padding-bottom: .9rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 42px;
  height: 42px;
  color: var(--accent);
  flex: none;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }

.brand-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--accent);
  letter-spacing: .01em;
}

.brand-tag {
  font-size: .8rem;
  color: var(--muted);
  font-style: italic;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .9rem;
}

.site-nav a {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  padding: .35rem 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover { color: var(--accent); }

.site-nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- Shared ---------- */

main.wrap { padding-top: 1.75rem; padding-bottom: 2.5rem; }

.kicker {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .5rem;
}
.kicker a { color: inherit; text-decoration: none; }
.kicker a:hover { text-decoration: underline; }

.dek {
  font-size: 1.05rem;
  color: var(--muted);
  margin: .35rem 0 0;
}

.read-link {
  display: inline-block;
  margin-top: .75rem;
  font-weight: 700;
  font-size: .88rem;
  color: var(--accent);
}

.section-title,
.section-hero h1 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
}

/* ---------- Page grid with ad rail ---------- */

.page-grid,
.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.rail { min-width: 0; }

.rail-sticky {
  position: sticky;
  top: 1rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

@media (min-width: 1024px) {
  .page-grid, .article-grid { grid-template-columns: minmax(0, 1fr) 316px; }
}

/* ---------- Ads ---------- */

.ad {
  margin: 0;
  text-align: center;
}

.ad-label {
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #7E9099;
  margin: 0 0 .35rem;
}

.ad-frame {
  display: inline-block;
  background:
    linear-gradient(135deg, rgba(255,255,255,.55) 0%, rgba(255,255,255,0) 45%),
    #D5DFE6;
  border: 1px solid #B9C8D1;
  border-radius: 4px;
}

.ad[data-slot="728x90"] .ad-frame { width: 728px; height: 90px; max-width: 100%; }
.ad[data-slot="468x60"] .ad-frame { width: 468px; height: 60px; max-width: 100%; }
.ad[data-slot="300x250"] .ad-frame { width: 300px; height: 250px; }
.ad[data-slot="300x600"] .ad-frame { width: 300px; height: 600px; }
.ad[data-slot="160x600"] .ad-frame { width: 160px; height: 600px; }
.ad[data-slot="320x50"] .ad-frame { width: 320px; height: 50px; }

/* Show each unit only where its whole box, plus surrounding padding, fits. */
@media (max-width: 799px) { .ad[data-slot="728x90"] { display: none; } }
@media (max-width: 519px) { .ad[data-slot="468x60"] { display: none; } }
@media (max-width: 359px) { .ad[data-slot="300x250"] { display: none; } }
@media (max-width: 1023px) { .page-grid .ad[data-slot="300x600"], .article-grid .ad[data-slot="300x600"] { display: none; } }
@media (min-width: 640px) { .mobile-strip { display: none; } }

.article-main-ad { margin: 1.75rem 0; }

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
}

.hero-lead {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .15s ease, transform .15s ease;
}
.hero-lead:hover {
  box-shadow: 0 10px 26px rgba(31, 46, 53, .14);
  transform: translateY(-2px);
}

.hero-media { max-height: 430px; overflow: hidden; }
.hero-media img { width: 100%; display: block; }

.hero-text { padding: 1.4rem 1.5rem 1.6rem; }

.hero-text h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  line-height: 1.2;
  margin: 0;
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-mini {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .15s ease, transform .15s ease;
}
.hero-mini:hover {
  box-shadow: 0 8px 20px rgba(31, 46, 53, .13);
  transform: translateY(-2px);
}

.hero-mini-media { height: 100%; }
.hero-mini-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.hero-mini-text { padding: .9rem 1rem .9rem 0; }
.hero-mini-text h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.3;
  margin: 0;
}

/* ---------- Sections & cards ---------- */

.home-section { margin-bottom: 2.75rem; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 3px solid var(--accent);
  padding-top: .8rem;
  margin-bottom: 1.15rem;
}

.section-title {
  font-size: 1.4rem;
  margin: 0;
}

.section-blurb {
  margin: .2rem 0 0;
  color: var(--muted);
  font-size: .92rem;
  max-width: 60ch;
}

.section-link {
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.section-link:hover { text-decoration: underline; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 1.25rem;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .15s ease, transform .15s ease;
}
.card:hover {
  box-shadow: 0 8px 22px rgba(31, 46, 53, .13);
  transform: translateY(-2px);
}

.card-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-body { padding: 1rem 1.1rem 1.25rem; }

.card-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.08rem;
  line-height: 1.3;
  margin: 0 0 .45rem;
  color: var(--ink);
}

.card-dek {
  font-size: .88rem;
  color: var(--muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Section page ---------- */

.section-hero { margin-bottom: 1.5rem; }
.section-hero h1 {
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  margin: 0;
}

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

.article-head { max-width: 60rem; }

.article-head h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.85rem, 3.6vw, 2.55rem);
  line-height: 1.18;
  margin: 0 0 .4rem;
}

.article-head .dek { max-width: 52rem; }

.source-note {
  font-size: .85rem;
  color: var(--muted);
  margin: .8rem 0 0;
}

.article > .ad { margin: 1.6rem auto; }

.cover {
  margin: 1.4rem 0 1.8rem;
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
}
.cover img { width: 100%; display: block; }

figure { margin: 0; }

figcaption {
  padding: .55rem .9rem;
  font-size: .78rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.credit { color: #85959D; }

.toc {
  background: var(--accent-wash);
  border: 1px solid #E4CDD1;
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
}

.toc-title {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .55rem;
}

.toc ol {
  margin: 0;
  padding-left: 1.15rem;
  columns: 2;
  column-gap: 2rem;
}

.toc li { margin: .25rem 0; break-inside: avoid; }

.toc a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: .92rem;
}
.toc a:hover { color: var(--accent); text-decoration: underline; }

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 0 0 1.6rem;
  padding: 0;
}

.tag {
  font-size: .74rem;
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--accent-wash);
  border: 1px solid #E4CDD1;
  border-radius: 999px;
  padding: .22rem .7rem;
}

.unit { margin-bottom: 2rem; }

.unit h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.42rem;
  line-height: 1.28;
  margin: 0 0 .7rem;
  color: var(--accent-dark);
  scroll-margin-top: 1rem;
}

.unit p { margin: 0 0 .95rem; }

.inline-figure {
  margin: 1.6rem 0 2rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.inline-figure img { display: block; margin: 0 auto; }

.article-body > .ad { margin: 2rem auto; }

/* ---------- Article footer nav ---------- */

.article-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .9rem;
  margin-top: 2.25rem;
}

@media (min-width: 760px) {
  .article-foot { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .foot-top { grid-column: 1 / -1; justify-self: center; }
}

.foot-link {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: .85rem 1rem;
  text-decoration: none;
  color: inherit;
}
.foot-link:hover { box-shadow: 0 6px 16px rgba(31, 46, 53, .12); }

.foot-label {
  display: block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .2rem;
}

.foot-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.3;
  color: var(--accent-dark);
}

.foot-top {
  text-align: center;
  border-left: 1px solid var(--line);
  font-weight: 700;
  font-size: .88rem;
  color: var(--accent);
}

/* ---------- Mobile strip & colophon ---------- */

.mobile-strip { margin-top: 1rem; }
.mobile-strip .ad { padding-bottom: .75rem; }

.colophon {
  background: var(--accent-dark);
  color: #EAD9DC;
  margin-top: 1rem;
}

.colophon-in {
  display: grid;
  gap: 1.25rem;
  padding-top: 1.9rem;
  padding-bottom: 1.9rem;
}

@media (min-width: 820px) {
  .colophon-in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

.colophon .brand-name {
  color: #fff;
  font-size: 1.25rem;
  margin: 0;
}

.colophon .brand-tag {
  color: #D9B9BF;
  margin: .15rem 0 0;
}

.colophon-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.2rem;
  align-content: start;
}

.colophon-nav a {
  color: #F2E3E6;
  text-decoration: none;
  font-size: .9rem;
  font-weight: 600;
}
.colophon-nav a:hover { color: #fff; text-decoration: underline; }

.fineprint {
  grid-column: 1 / -1;
  font-size: .8rem;
  color: #CDA6AD;
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, .18);
  padding-top: 1rem;
}
