/* Travel with Chance travel guides.
   The same cozy night-sky theme as www.travelwithchance.com: the tokens, buttons, header and
   footer match the main site's src/styles/global.css, so keep the two in step.
   Every text color is at WCAG AA contrast or better. */

/* ── Fonts: served from this site, not from Google ── */
@font-face {
  font-family: 'Fraunces Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/fraunces-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Fraunces Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/fraunces-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/inter-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(../fonts/inter-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  color-scheme: dark;

  /* Palette: a calm night sky (same values as the main site). */
  --paper: #0d1322;
  --paper-deep: #121a2d;
  --card: #172038;
  --ink: #ede7dc;
  --ink-soft: #b5aea3;
  --line: #29344f;
  --sage: #8cc6ba;
  --sage-deep: #a9d8ce;
  --sage-mist: #1a3236;
  --on-accent: #0d1322;
  --amber: #f0b45e;
  --amber-soft: #2b2416;
  --amber-line: #5a4628;
  --clay: #f2a585;
  --focus: #a9d8ce;

  /* Type */
  --serif: 'Fraunces Variable', Georgia, 'Times New Roman', serif;
  --sans: 'Inter Variable', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Shape */
  --radius: 14px;
  --radius-lg: 24px;
  --shadow: 0 1px 2px rgb(0 0 0 / 20%), 0 8px 24px rgb(0 0 0 / 25%);
  --shadow-lift: 0 2px 4px rgb(0 0 0 / 25%), 0 16px 40px rgb(0 0 0 / 35%);
  --max: 1120px;
  --max-text: 720px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 90px; /* keep in-article links clear of the sticky header */
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

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

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 560;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.1rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

a {
  color: var(--sage-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--ink); }

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

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.narrow {
  width: min(100% - 2.5rem, var(--max-text));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--card);
  padding: 0.6rem 1rem;
  border-radius: 10px;
  z-index: 100;
}
.skip-link:focus { top: 1rem; color: var(--card); }

.eyebrow {
  display: inline-block;
  font: 600 0.8125rem/1 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 0.9rem;
}
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }
.lede { font-size: 1.15rem; color: var(--ink-soft); }

/* ── Buttons ─────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font: 600 1rem/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn-primary { background: var(--sage); color: var(--on-accent); }
.btn-primary:hover { background: var(--sage-deep); color: var(--on-accent); box-shadow: var(--shadow); }
.btn-quiet { background: transparent; color: var(--sage-deep); border-color: var(--line); }
.btn-quiet:hover { border-color: var(--sage); color: var(--sage-deep); background: var(--card); }
.btn-lg { min-height: 56px; padding: 0.9rem 1.8rem; font-size: 1.0625rem; }

/* ── Header ──────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgb(13 19 34 / 82%);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font: 600 1.2rem/1 var(--serif);
  color: var(--ink);
  text-decoration: none;
}
.brand img { width: 34px; height: 34px; }
.brand-sub { font: 500 0.95rem/1 var(--sans); color: var(--ink-soft); }
.nav { display: flex; align-items: center; gap: 0.25rem; }
.nav a:not(.btn) {
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.975rem;
}
.nav a:not(.btn):hover,
.nav a[aria-current='page'] { background: var(--paper-deep); }
.nav .btn { margin-left: 0.5rem; min-height: 42px; padding: 0.5rem 1.1rem; }
.menu-toggle { display: none; }

@media (max-width: 820px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 44px;
    padding: 0.4rem 0.9rem;
    border: 1.5px solid var(--line);
    border-radius: 999px;
    background: var(--card);
    color: var(--ink);
    font: 600 0.95rem var(--sans);
    cursor: pointer;
  }
  .nav {
    display: none;
    position: absolute;
    inset: 72px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem 1.5rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 0.8rem 1rem; }
  .nav .btn { margin: 0.5rem 0 0; }
}
@media (max-width: 420px) {
  .brand-sub { display: none; }
}

/* ── Night-sky page header ───────────────── */
.sky-head {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(3.5rem, 8vw, 5.5rem) clamp(2.5rem, 6vw, 4rem);
  border-bottom: 1px solid var(--line);
}
.sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(55rem 22rem at 50% 125%, rgb(240 180 94 / 12%), transparent 70%),
    radial-gradient(40rem 26rem at 88% -10%, rgb(110 120 210 / 18%), transparent 70%),
    linear-gradient(180deg, #050814 0%, #0a1026 60%, #121a33 100%);
}
.sky svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.twinkle { animation: twinkle ease-in-out infinite alternate; }
@keyframes twinkle {
  from { opacity: 0.15; }
  to { opacity: 1; }
}
.sky-head h1 { max-width: 22ch; }
.sky-head .lede { max-width: 60ch; margin-bottom: 0; }
.post-meta { color: var(--ink-soft); font-size: 0.975rem; margin: 0; }
.post-meta span + span::before { content: '·'; margin-inline: 0.55rem; }

/* ── Category filter ─────────────────────── */
.topics { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 1.75rem 0 0; }
.topics a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0.4rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: rgb(23 32 56 / 70%);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}
.topics a:hover { border-color: var(--sage); }
.topics a[aria-current='page'] { background: var(--sage-mist); border-color: var(--sage); color: var(--sage-deep); }
.topics .count { color: var(--ink-soft); margin-left: 0.4rem; font-weight: 400; }

/* ── Post list ───────────────────────────── */
.posts { padding-block: clamp(2.5rem, 6vw, 4rem) clamp(3.5rem, 8vw, 6rem); }
.post-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
}
.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.post-card:hover,
.post-card:focus-within { border-color: var(--sage); box-shadow: var(--shadow-lift); }
.post-card-media { aspect-ratio: 16 / 9; background: var(--paper-deep); }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card-body { display: flex; flex-direction: column; gap: 0.6rem; padding: 1.4rem 1.5rem 1.6rem; flex: 1; }
.post-card-meta { margin: 0; font-size: 0.875rem; color: var(--ink-soft); }
.post-card-meta .cat { color: var(--clay); font-weight: 600; }
.post-card h2 { font-size: 1.3rem; margin: 0; }
.post-card h2 a { color: var(--ink); text-decoration: none; }
/* The whole card is clickable through the title link. */
.post-card h2 a::after { content: ''; position: absolute; inset: 0; border-radius: var(--radius-lg); }
.post-card h2 a:focus-visible { outline: none; }
.post-card:has(h2 a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }
.post-card p { margin: 0; color: var(--ink-soft); font-size: 0.975rem; }

/* The newest post gets a wide card on larger screens. */
@media (min-width: 900px) {
  .post-grid > li.featured { grid-column: 1 / -1; }
  .featured .post-card { flex-direction: row; }
  .featured .post-card-media { flex: 0 0 55%; aspect-ratio: auto; min-height: 320px; }
  .featured .post-card-body { justify-content: center; padding: 2rem 2.25rem; }
  .featured .post-card h2 { font-size: 1.75rem; }
  .featured .post-card p { font-size: 1.0625rem; }
}

.empty { text-align: center; color: var(--ink-soft); padding-block: 4rem; }

/* ── Article ─────────────────────────────── */
.article-body { padding-block: clamp(2.5rem, 6vw, 3.5rem) clamp(3.5rem, 8vw, 6rem); }

.summary-card {
  margin: 0 0 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--amber-soft);
  border: 1px solid var(--amber-line);
  border-radius: var(--radius);
}
.summary-card p { margin: 0; }
.summary-card .label {
  font: 600 0.8125rem/1 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.6rem;
}

.prose { font-size: 1.0938rem; line-height: 1.75; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin-top: 2.2em; font-size: 1.75rem; }
.prose h3 { margin-top: 1.8em; font-size: 1.3rem; }
.prose h4 { margin-top: 1.6em; font-size: 1.1rem; }
.prose ul,
.prose ol { padding-left: 1.4rem; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--sage); }
.prose strong { color: #fff6ea; font-weight: 650; }
.prose img {
  display: block;
  margin: 2rem auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.prose hr {
  border: 0;
  height: 1px;
  margin: 2.5rem 0;
  background: linear-gradient(90deg, transparent, var(--line) 20%, var(--line) 80%, transparent);
}
.prose blockquote {
  margin: 1.75rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--sage);
  background: var(--paper-deep);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink);
}
.prose blockquote > :last-child { margin-bottom: 0; }
.prose code {
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: var(--paper-deep);
  border: 1px solid var(--line);
}
.prose pre { overflow-x: auto; padding: 1rem; border-radius: var(--radius); background: var(--paper-deep); border: 1px solid var(--line); }
.prose pre code { padding: 0; border: 0; background: none; }

/* Tables scroll sideways on small screens rather than squeezing the text. */
.prose table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-size: 0.95rem;
  line-height: 1.5;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.prose th,
.prose td { padding: 0.7rem 0.9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.prose th { background: var(--card); font-weight: 600; white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }
.prose tbody tr:nth-child(even) { background: rgb(23 32 56 / 45%); }

/* ── Plan-a-trip call to action ──────────── */
.cta {
  margin-top: 3.5rem;
  padding: clamp(1.75rem, 4vw, 2.5rem);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.cta h2 { font-size: 1.6rem; }
.cta p { color: var(--ink-soft); }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }

/* ── More guides ─────────────────────────── */
.related { margin-top: 3.5rem; }
.related h2 { font-size: 1.4rem; }
.related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; }
.related a {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-deep);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  transition: border-color 0.2s;
}
.related a:hover { border-color: var(--sage); }
.related a span { font-weight: 400; font-size: 0.9rem; color: var(--ink-soft); }

.back-link { display: inline-block; margin-top: 2.5rem; }

/* ── 404 ─────────────────────────────────── */
.not-found-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

/* ── Footer ──────────────────────────────── */
.site-footer { background: #080c17; color: #e9e1d6; padding-block: 3.5rem 2rem; font-size: 0.95rem; }
.site-footer a { color: #f1e8dc; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 2fr 1fr 1fr; }
.footer-grid h2 { font: 600 0.8rem/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; color: #cbbfae; margin-bottom: 1rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.footer-brand { font: 600 1.3rem var(--serif); color: #fff; margin-bottom: 0.6rem; }
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(255 255 255 / 12%);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  color: #cbbfae;
}
.fora-badge { background: #fff; border-radius: 10px; padding: 0.5rem 0.75rem; display: inline-flex; }
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; }
}
