/* TravelBFF blog — matches travelbff.org (Inter Tight, night canvas, hairline cards). */

:root {
  --canvas: #f4f4f5;
  --canvas-pure: #ffffff;
  --surface: #ececee;
  --ink: #0a0a0a;
  --ink-soft: #52525b;
  --muted: #a1a1aa;
  --line: #e4e4e7;
  --primary: #0a0a0a;
  --primary-strong: #0a0a0a;
  --primary-soft: #f4f4f5;
  --night: #050505;
  --night-soft: #a1a1aa;
  --tb-sans: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --tb-max: 90rem;
}

html.dark {
  --canvas: #050505;
  --canvas-pure: #0a0a0a;
  --surface: #0a0a0a;
  --ink: #fafafa;
  --ink-soft: #a1a1aa;
  --muted: #71717a;
  --line: rgb(255 255 255 / 0.08);
  --primary: #fafafa;
  --primary-strong: #fafafa;
  --primary-soft: rgb(255 255 255 / 0.06);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body.tbff {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--tb-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.tbff a { color: var(--ink); text-decoration: none; }
img { max-width: 100%; }
::selection { background: #d4d4d8; color: #0a0a0a; }
html.dark ::selection { background: #27272a; color: #fafafa; }
a:focus-visible, button:focus-visible {
  outline: 1px solid var(--ink);
  outline-offset: 3px;
}

.display {
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.08;
}
.eyebrow {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--muted);
}

.tb-wrap {
  width: 100%;
  max-width: var(--tb-max);
  margin: 0 auto;
  padding: 0 1.25rem;
}
@media (min-width: 640px) { .tb-wrap { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .tb-wrap { padding: 0 2.5rem; } }

/* Header */
.tb-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--canvas) 70%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.tb-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 3.5rem;
}
.tb-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  text-decoration: none;
}
.tb-mark {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--canvas);
}
.tb-mark svg { display: block; }
.tb-word {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.tb-nav { display: none; align-items: center; gap: 1.75rem; }
.tb-nav a {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
}
.tb-nav a:hover,
.tb-nav a.is-active { color: var(--ink); }
.tb-actions { display: flex; align-items: center; gap: 0.5rem; }
.tb-theme {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.tb-theme:hover { background: var(--canvas-pure); }
.tb-theme .tb-sun { display: none; }
html:not(.dark) .tb-theme .tb-moon { display: none; }
html:not(.dark) .tb-theme .tb-sun { display: block; }
.tb-btn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.5rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--canvas) !important;
  font-size: 13px;
  font-weight: 500;
}
@media (min-width: 640px) { .tb-btn { display: inline-flex; } }
.tb-btn:hover { opacity: 0.9; }
.tb-btn-ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink) !important;
}
.tb-btn-ghost:hover { background: var(--canvas-pure); }
.tb-btn-ghost-ink {
  display: inline-flex;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink) !important;
  margin-left: 0.5rem;
}
.tb-burger {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.tb-burger span {
  display: block;
  width: 16px;
  height: 1.6px;
  margin: 2.5px auto;
  background: currentColor;
  border-radius: 2px;
}
.tb-burger.is-open span:nth-child(1) { transform: translateY(4.1px) rotate(45deg); }
.tb-burger.is-open span:nth-child(2) { opacity: 0; }
.tb-burger.is-open span:nth-child(3) { transform: translateY(-4.1px) rotate(-45deg); }
.tb-mobile {
  border-top: 1px solid var(--line);
  background: var(--canvas);
  padding: 0.75rem 1.25rem 1.1rem;
}
.tb-mobile nav { display: flex; flex-direction: column; gap: 0.15rem; }
.tb-mobile a {
  border-radius: 0.75rem;
  padding: 0.75rem 0.5rem;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}
.tb-mobile a:hover { background: var(--canvas-pure); }
@media (min-width: 1024px) {
  .tb-nav { display: flex; }
  .tb-burger { display: none; }
  .tb-mobile { display: none !important; }
}

/* Hero / feed */
.tb-hero-inner { padding: 3.5rem 0 2.5rem; }
.tb-eyebrow {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}
.tb-hero-title {
  margin: 0.75rem 0 0;
  max-width: 16ch;
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.04;
  color: var(--ink);
}
.tb-hero-lede {
  margin: 1.15rem 0 0;
  max-width: 36rem;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.tb-crumbs { font-size: 13px; color: var(--ink-soft); margin-bottom: 1.25rem; }
.tb-crumbs a { color: var(--ink-soft); }
.tb-crumbs a:hover { color: var(--ink); text-decoration: underline; }
.tb-sep { opacity: 0.45; }
.tb-art-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; font-size: 14px; color: var(--muted); }
.tb-art-meta > * + *::before { content: "·"; margin-right: 0.5rem; opacity: 0.6; }

.tb-feed { padding: 0 0 5rem; }
.tb-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .tb-cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .tb-cards { grid-template-columns: 1fr 1fr 1fr; } }
.tb-cards-3 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .tb-cards-3 { grid-template-columns: 1fr 1fr 1fr; } }

.tb-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 18rem;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--canvas-pure);
  border-radius: 1.5rem;
  color: inherit;
  transition: border-color 220ms ease;
}
html.dark .tb-card { background: rgb(255 255 255 / 0.025); }
.tb-card:hover { border-color: rgb(255 255 255 / 0.18); }
html:not(.dark) .tb-card:hover { border-color: #d4d4d8; background: #fff; }
.tb-card-thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
  border-radius: 0;
}
.tb-card-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgb(0 0 0 / 0.92) 0%,
    rgb(0 0 0 / 0.5) 42%,
    rgb(0 0 0 / 0.12) 100%
  );
}
.tb-card-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  margin-top: auto;
  padding: 1.5rem;
}
.tb-card-photo .tb-card-body,
.tb-card-photo .tb-card-title,
.tb-card-photo .tb-card-dek,
.tb-card-photo .tb-card-meta,
.tb-card-photo .tb-cat {
  color: #fff;
}
.tb-card-photo .tb-card-dek,
.tb-card-photo .tb-card-meta,
.tb-card-photo .tb-cat { color: rgb(255 255 255 / 0.68); }
.tb-cat {
  display: inline-block;
  margin-bottom: 0.4rem;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.tb-card-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--ink);
  overflow-wrap: anywhere;
}
@media (min-width: 640px) {
  .tb-card-title { font-size: 1.25rem; }
}
.tb-card-dek {
  margin: 0.5rem 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tb-card-meta { margin: 0.75rem 0 0; font-size: 13px; color: var(--muted); }
.tb-empty-card { min-height: auto; padding: 2rem; }
.tb-empty-card h2 { margin: 0 0 0.5rem; font-size: 1.5rem; font-weight: 500; }
.tb-empty-card p { color: var(--ink-soft); }
.tb-pager {
  display: flex;
  justify-content: space-between;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}
.tb-pager a { color: var(--ink); font-weight: 500; }

/* Article */
.bl-main { flex: 1; min-height: 50vh; }
.tb-article-grid { padding: 0.5rem 0 5rem; max-width: 48rem; }
.tb-hero-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 1.5rem;
  border: 1px solid var(--line);
  margin-bottom: 1.25rem;
}
.tb-updated { font-size: 13px; color: var(--muted); margin: 0 0 1rem; }
.tb-prose-card {
  border: 1px solid var(--line);
  background: var(--canvas-pure);
  border-radius: 1.5rem;
  padding: 1.5rem 1.4rem 1.7rem;
}
html.dark .tb-prose-card { background: rgb(255 255 255 / 0.025); }
@media (min-width: 640px) { .tb-prose-card { padding: 2rem; } }
.tb-share-card {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-top: 0.75rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  background: var(--canvas-pure);
  border-radius: 1.5rem;
  font-size: 14px;
  color: var(--ink-soft);
}
html.dark .tb-share-card { background: rgb(255 255 255 / 0.025); }
.tb-share-card a { font-weight: 500; color: var(--ink); }
.tb-related { margin-top: 2.5rem; }
.tb-related h2 {
  margin: 0 0 1rem;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}

.bl-prose { font-size: 16.5px; line-height: 1.75; color: var(--ink-soft); }
.bl-prose > * + * { margin-top: 1.15em; }
.bl-prose h2 {
  font-size: 1.45rem;
  line-height: 1.2;
  margin-top: 1.7em;
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.bl-prose h3 { font-size: 1.1rem; font-weight: 500; color: var(--ink); margin-top: 1.35em; }
.bl-prose a { color: var(--ink); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.bl-prose ul, .bl-prose ol { padding-inline-start: 1.2em; }
.bl-prose li + li { margin-top: 0.35em; }
.bl-prose img { border-radius: 1rem; }
.bl-prose blockquote {
  margin-inline: 0;
  padding: 0.9rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-style: normal;
}
.bl-prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.86em;
  background: var(--primary-soft);
  padding: 1px 6px;
  border-radius: 5px;
}
.bl-prose pre {
  background: var(--canvas-pure);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem;
  overflow-x: auto;
}
.bl-prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.bl-prose th, .bl-prose td { border: 1px solid var(--line); padding: 8px 12px; }
.bl-prose th { background: var(--primary-soft); color: var(--ink); }

.bl-reactions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.bl-react {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
}
.bl-react:hover { border-color: rgb(255 255 255 / 0.2); }
.bl-react.reacted { border-color: var(--ink); }
.bl-react-count { color: var(--muted); font-variant-numeric: tabular-nums; }

/* Footer */
.tb-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
}
.tb-footer-inner { padding: 4rem 0 0; }
.tb-footer-top {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}
@media (min-width: 1024px) {
  .tb-footer-top { flex-direction: row; justify-content: space-between; align-items: flex-start; }
}
.tb-footer-brand { max-width: 24rem; }
.tb-footer-tag {
  margin: 1rem 0 1.25rem;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.tb-footer .tb-btn {
  display: inline-flex;
}
.tb-footer-cols {
  display: grid;
  flex: 1;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
@media (min-width: 640px) { .tb-footer-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .tb-footer-cols { max-width: 56rem; } }
.tb-footer-h {
  margin: 0 0 0.65rem;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.tb-footer-col { display: flex; flex-direction: column; gap: 0.625rem; }
.tb-footer-col a { color: var(--ink-soft); font-size: 14px; }
.tb-footer-col a:hover { color: var(--ink); }
.tb-footer p { margin: 0; }
.tb-footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  padding-bottom: 0;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
@media (min-width: 640px) {
  .tb-footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .tb-card { transition: none; }
}
