/* ==========================================================================
   Beyond Borders With B — site styles
   Edit colors, spacing and type in the :root block below.
   ========================================================================== */

:root {
  /* Colors */
  --ink:        #0b0b0c;   /* near-black, main text & dark sections */
  --ink-soft:   #55565b;   /* secondary text */
  --bg:         #eaeaee;   /* page background (matches the old site) */
  --paper:      #f6f6f8;   /* cards on the grey background */
  --white:      #ffffff;
  --sand:       #b3a08a;   /* warm accent from the logo — used sparingly */
  --line:       rgba(0, 0, 0, 0.14);
  --line-dark:  rgba(255, 255, 255, 0.22);

  /* Type */
  --serif: "Source Serif 4", "Kepler Std", Georgia, "Times New Roman", serif;
  --sans:  "Almarai", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Layout */
  --wide:   1240px;
  --mid:    1040px;
  --narrow: 760px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --section-y: clamp(4rem, 9vw, 8.5rem);
  --radius: 2px;
}

/* --------------------------------------------------------------- reset -- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.075rem);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* ---------------------------------------------------------------- type -- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 1.6rem + 4.2vw, 5rem); }
h2 { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3.25rem); }
h3 { font-size: clamp(1.3rem, 1.1rem + 0.9vw, 1.75rem); font-weight: 400; }
h4 { font-size: 1.1rem; font-weight: 400; }
p  { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 600; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sand);
  margin: 0 0 1.25rem;
  display: block;
}
.lead {
  font-size: clamp(1.15rem, 1rem + 0.7vw, 1.45rem);
  line-height: 1.5;
  color: var(--ink-soft);
}
.dark .lead { color: rgba(255, 255, 255, 0.72); }

/* ------------------------------------------------------------- layout -- */
.wrap   { width: 100%; max-width: var(--wide);   margin-inline: auto; padding-inline: var(--gutter); }
.wrap-m { width: 100%; max-width: var(--mid);    margin-inline: auto; padding-inline: var(--gutter); }
.wrap-n { width: 100%; max-width: var(--narrow); margin-inline: auto; padding-inline: var(--gutter); }

section { padding-block: var(--section-y); position: relative; }
.dark  { background: var(--ink); color: var(--white); }
.dark h1, .dark h2, .dark h3 { color: var(--white); }
.light { background: var(--white); }

.center { text-align: center; }
.center .lead, .center p { margin-inline: auto; }
.center .lead { max-width: 46ch; }

/* --------------------------------------------------------------- links -- */
.textlink {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 3px;
  transition: opacity 0.2s ease;
}
.textlink:hover { opacity: 0.55; }

/* -------------------------------------------------------------- button -- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1;
  padding: 1.15em 2.4em;
  border-radius: 300px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.btn:hover { background: transparent; color: var(--ink); transform: translateY(-1px); }

.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--white); }

.dark .btn { background: var(--white); border-color: var(--white); color: var(--ink); }
.dark .btn:hover { background: transparent; color: var(--white); }
.dark .btn--ghost { background: transparent; color: var(--white); border-color: var(--line-dark); }
.dark .btn--ghost:hover { background: var(--white); color: var(--ink); border-color: var(--white); }

.btn[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.45;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2rem; }
.center .btn-row { justify-content: center; }

/* -------------------------------------------------------------- header -- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.1rem var(--gutter);
  transition: background 0.35s ease, box-shadow 0.35s ease, padding 0.35s ease;
}
/* Over a dark hero: transparent, white text */
.site-header--over { background: transparent; color: var(--white); }
.site-header--over .logo img { filter: invert(1) brightness(1.9); }
/* Scrolled / on light pages: solid */
.site-header--solid {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
  padding-block: 0.7rem;
}
.site-header--solid .logo img { filter: none; }

.logo { display: inline-flex; align-items: center; text-decoration: none; flex: 0 0 auto; }
.logo img { width: auto; height: 52px; transition: height 0.35s ease, filter 0.35s ease; }
.site-header--solid .logo img { height: 42px; }

.nav { margin-left: auto; display: flex; align-items: center; gap: clamp(1rem, 2vw, 2.1rem); }
.nav a {
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: inherit;
  position: relative;
  padding-block: 0.35rem;
  white-space: nowrap;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

.nav .btn {
  padding: 0.85em 1.9em;
  font-size: 0.78rem;
  /* `.nav a { color: inherit }` outranks `.btn`, so without this the button
     inherits the header's text color — black on a black button once the
     header goes solid. */
  color: var(--white);
}
.nav .btn:hover { color: var(--ink); }
.nav .btn::after { display: none; }
.site-header--over .nav .btn {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.7);
  color: var(--white);
}
.site-header--over .nav .btn:hover { background: var(--white); color: var(--ink); border-color: var(--white); }

/* Mobile nav */
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  position: relative;
  width: 24px; height: 1px;
  background: currentColor;
  transition: background 0.2s ease;
}
.nav-toggle span::before, .nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 24px; height: 1px;
  background: currentColor;
  transition: transform 0.28s ease;
}
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after  { top:  7px; }
body.nav-open .nav-toggle span { background: transparent; }
body.nav-open .nav-toggle span::before { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span::after  { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 1.6rem;
    background: var(--ink);
    color: var(--white);
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  body.nav-open { overflow: hidden; }
  body.nav-open .nav { opacity: 1; visibility: visible; }
  .nav a { font-family: var(--serif); font-size: 1.9rem; letter-spacing: 0; }
  .nav .btn { font-family: var(--sans); font-size: 0.85rem; margin-top: 0.5rem; background: var(--white); color: var(--ink); border-color: var(--white); }
  .site-header { z-index: 200; }
  .nav-toggle { position: relative; z-index: 210; }
  body.nav-open .site-header { color: var(--white); background: transparent; box-shadow: none; }
  body.nav-open .logo img { filter: invert(1) brightness(1.9); }
}

/* ---------------------------------------------------------------- hero -- */
.hero {
  position: relative;
  min-height: min(94vh, 900px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  background: var(--ink);
  overflow: hidden;
  padding-block: 8rem 5rem;
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.3) 40%, rgba(0,0,0,0.62) 100%);
}
.hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--mid);
  padding-inline: var(--gutter);
}
.hero h1 { margin-bottom: 0.35em; max-width: 18ch; margin-inline: auto; }
.hero .lead { color: rgba(255, 255, 255, 0.85); max-width: 44ch; margin-inline: auto; }
.hero .btn-row { justify-content: center; margin-top: 2.5rem; }
.hero .btn { background: var(--white); border-color: var(--white); color: var(--ink); }
.hero .btn:hover { background: transparent; color: var(--white); }
.hero .btn--ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.6); }
.hero .btn--ghost:hover { background: var(--white); color: var(--ink); }

/* Shorter hero for interior pages */
.hero--page { min-height: min(68vh, 620px); padding-block: 9rem 4rem; }
.hero--page h1 { max-width: 22ch; }

/* --------------------------------------------------------- split block -- */
.split {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.split--reverse .split__media { order: 2; }
.split__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
}
.split__media--wide img { aspect-ratio: 4 / 3; }
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
}

/* -------------------------------------------------------------- cards -- */
.grid {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 3vw, 2.75rem);
  display: flex;
  flex-direction: column;
}
.dark .card {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line-dark);
}
.card__price {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sand);
  margin-bottom: 0.75rem;
}
.card h3 { margin-bottom: 0.75rem; }
.card ul { margin: 0 0 1.5rem; padding-left: 1.1em; }
.card li { margin-bottom: 0.45em; }
.card .btn-row { margin-top: auto; padding-top: 1.5rem; }

/* Expertise list */
.expertise { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.expertise li {
  border-top: 1px solid var(--line);
  padding: clamp(1.4rem, 2.5vw, 2rem) 0;
  display: grid;
  grid-template-columns: minmax(180px, 0.4fr) 1fr;
  gap: clamp(1rem, 3vw, 3rem);
  align-items: start;
}
.expertise li:last-child { border-bottom: 1px solid var(--line); }
.dark .expertise li { border-color: var(--line-dark); }
.expertise h3 { margin: 0; font-size: clamp(1.15rem, 1rem + 0.6vw, 1.5rem); }
.expertise p { margin: 0; color: var(--ink-soft); }
.dark .expertise p { color: rgba(255, 255, 255, 0.68); }
@media (max-width: 700px) {
  .expertise li { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* Perks / value list */
/* Hairline grid rather than a black slab: the cells sit on the section
   background and the 1px gaps read as dividing rules. Works on light. */
.perks { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.perks li { background: var(--white); padding: 1.75rem 1.6rem; }
.perks strong { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.15rem; margin-bottom: 0.35rem; }
.perks span { color: var(--ink-soft); font-size: 0.95rem; }
/* Kept so the grid still works if a dark section is ever reintroduced. */
.dark .perks { background: var(--line-dark); border-color: var(--line-dark); }
.dark .perks li { background: var(--ink); }
.dark .perks span { color: rgba(255, 255, 255, 0.65); }
@media (min-width: 700px) { .perks { grid-template-columns: repeat(2, 1fr); column-gap: 1px; } }

/* --------------------------------------------------------- testimonials --
   Card layout mirrors the original: square photo on top, then the name and
   date, then the quote — all centred, three across on a wide screen. */
.tcarousel { --tgap: 20px; position: relative; }
.tcarousel__viewport { overflow: hidden; }
.tcarousel__track {
  display: flex;
  gap: var(--tgap);
  transition: transform 0.55s cubic-bezier(0.4, 0.01, 0.2, 1);
  will-change: transform;
}
.tslide {
  flex: 0 0 100%;
  min-width: 0;
  text-align: center;
  /* Each review is its own card, so three side by side read as three
     separate stories rather than one run-on block of text. */
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0 0 2rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.tslide__media { margin-bottom: 1.75rem; }
.tslide__media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0;
}
.tslide__name,
.tslide blockquote { padding-inline: 1.75rem; }
.tslide blockquote { flex: 1; }
.tslide__name {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.1rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.3;
  margin: 0 0 0.8em;
}
.tslide blockquote {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
}
.tslide blockquote p { margin-bottom: 0.9em; }
.tslide blockquote p:last-child { margin-bottom: 0; }

/* Cards are sized so the next one is always part-visible at the right edge.
   Exactly three across reads as "there are three reviews"; a peek reads as
   "there are more" and invites the swipe. */
@media (min-width: 700px)  { .tslide { flex-basis: calc((100% - var(--tgap)) / 2.25); } }
@media (min-width: 1000px) { .tslide { flex-basis: calc((100% - 2 * var(--tgap)) / 3.25); } }

/* Soft fade at the right edge, reinforcing that the row continues. */
.tcarousel__viewport { position: relative; }
.tcarousel::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 5rem;
  width: clamp(40px, 7vw, 90px);
  background: linear-gradient(to right, transparent, var(--bg));
  pointer-events: none;
}

.tcarousel__nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2.5rem;
  justify-content: center;
}
.tcarousel__btn {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: inherit;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.25s ease, color 0.25s ease, opacity 0.25s ease;
  font-size: 1rem;
  line-height: 1;
}
.tcarousel__btn:hover:not(:disabled) { background: var(--ink); color: var(--white); }
.tcarousel__btn:disabled { opacity: 0.3; cursor: default; }
.dark .tcarousel__btn { border-color: var(--line-dark); }
.dark .tcarousel__btn:hover:not(:disabled) { background: var(--white); color: var(--ink); }
.tcarousel__count {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  min-width: 5.5ch;
  text-align: center;
  opacity: 0.7;
}

/* --------------------------------------------------------------- offers -- */
.offer {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  padding-block: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
}
.offer:last-of-type { border-bottom: 1px solid var(--line); }
.offer__media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.offer h3 { margin-bottom: 0.4em; }
.offer .card__price { color: var(--ink-soft); }
@media (max-width: 780px) { .offer { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- form -- */
.form { display: grid; gap: 1.4rem; margin-top: 2.5rem; }
.form__row { display: grid; gap: 1.4rem; }
@media (min-width: 620px) { .form__row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 0.5rem; }
.field label {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.dark .field label { color: rgba(255, 255, 255, 0.6); }
.field input, .field textarea, .field select {
  font-family: var(--serif);
  font-size: 1rem;
  color: inherit;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 0.7rem 0;
  border-radius: 0;
  width: 100%;
  transition: border-color 0.25s ease;
}
.dark .field input, .dark .field textarea, .dark .field select { border-color: var(--line-dark); }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--sand);
}
.field textarea { resize: vertical; min-height: 130px; }
.field--check { grid-template-columns: auto 1fr; align-items: start; gap: 0.7rem; }
.field--check input { width: auto; }
.field--check label { text-transform: none; letter-spacing: 0; font-size: 0.9rem; font-family: var(--serif); }
.hp { position: absolute; left: -9999px; opacity: 0; }

/* -------------------------------------------------------------- footer -- */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.7);
  padding-block: clamp(3.5rem, 6vw, 5.5rem) 2.5rem;
  font-size: 0.95rem;
}
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { opacity: 0.65; }
.footer__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line-dark);
}
.footer__title {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 1.1rem;
}
.footer__grid ul { list-style: none; margin: 0; padding: 0; }
.footer__grid li { margin-bottom: 0.55rem; }
.footer__logos { display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; margin-top: 1.5rem; }
.footer__logos img { height: 42px; width: auto; filter: invert(1) brightness(1.8); opacity: 0.85; }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.45);
}

/* ---------------------------------------------------------- ig / strip -- */
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 2px; }
.strip a { display: block; overflow: hidden; }
.strip img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s ease;
}
.strip a:hover img { transform: scale(1.05); opacity: 0.85; }

/* --------------------------------------------------------- animations -- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------- a11y --- */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 300;
  background: var(--ink);
  color: var(--white);
  padding: 0.9rem 1.4rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  text-decoration: none;
}
.skip:focus { left: 0; }
:focus-visible { outline: 2px solid var(--sand); outline-offset: 3px; }
.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;
}

/* ==========================================================================
   BLOG
   Journal index, tag filtering, and article pages.
   ========================================================================== */

/* ------------------------------------------------------- index header --- */
.blog-head { padding: calc(var(--section-y) * 0.75) 0 0; }
.blog-head h1 { font-size: clamp(2.2rem, 1.5rem + 3vw, 4rem); }

/* ------------------------------------------------------------- tags ----- */
.taglist { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.tag {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  text-decoration: none;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.tag:hover { border-color: var(--ink); color: var(--ink); }
.tag[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }

.tagbar { margin: 2.5rem 0 0; }
.tagbar__label {
  font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-soft); display: block; margin-bottom: 0.9rem;
}

/* --------------------------------------------------------- post cards --- */
.postgrid { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); }
.postcard {
  background: var(--paper);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.postcard:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,0.09); }
.postcard__media { aspect-ratio: 3 / 2; overflow: hidden; background: var(--bg); }
.postcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.postcard:hover .postcard__media img { transform: scale(1.04); }
.postcard__body { padding: 1.75rem 1.75rem 2rem; display: flex; flex-direction: column; flex: 1; }
.postcard__meta {
  font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-soft); margin: 0 0 0.9rem;
}
.postcard h2, .postcard h3 { font-size: 1.4rem; margin-bottom: 0.6rem; }
.postcard p { color: var(--ink-soft); margin-bottom: 1.25rem; }
.postcard__more {
  margin-top: auto; font-family: var(--sans); font-size: 0.78rem;
  letter-spacing: 0.14em; text-transform: uppercase;
}
.postcard[hidden] { display: none; }
.postgrid__empty { color: var(--ink-soft); font-style: italic; }

/* ------------------------------------------------------ article page ---- */
.post-hero { padding: calc(var(--section-y) * 0.6) 0 0; }
.post-hero .taglist { margin-bottom: 1.5rem; }
/* Post headlines run long — a full sentence, sometimes two. Scaled well below
   the site h1, which is sized for two or three words, so the lead and the
   opening line are visible without scrolling. */
.post-hero h1 {
  font-size: clamp(1.75rem, 1.15rem + 2.1vw, 2.75rem);
  line-height: 1.15;
  margin-bottom: 0.55em;
}
.post-hero .lead { color: var(--ink-soft); }
.post-meta {
  font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-soft);
  border-top: 1px solid var(--line); padding-top: 1.25rem; margin-top: 2rem;
}
.post-figure { margin: 3rem 0; }
.post-figure img { width: 100%; }
.post-figure figcaption {
  font-family: var(--sans); font-size: 0.78rem; color: var(--ink-soft);
  margin-top: 0.75rem; text-align: center;
}

.post-body { padding-bottom: var(--section-y); }
.post-body > * { max-width: var(--narrow); margin-inline: auto; }
.post-body h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.35rem); margin-top: 2.5em; }
.post-body h3 { font-size: 1.35rem; margin-top: 2em; }
.post-body ul, .post-body ol { padding-left: 1.2em; margin-bottom: 1.6em; }
.post-body li { margin-bottom: 0.6em; }
.post-body strong { font-weight: 600; }
.post-body a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.post-body .post-figure { max-width: var(--mid); }

/* ----------------------------------------------------------- callout ---- */
.callout {
  background: var(--paper);
  border-left: 2px solid var(--sand);
  padding: 1.75rem 2rem;
  margin: 2.5rem auto;
}
.callout p:last-child { margin-bottom: 0; }
.callout__label {
  font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--sand); display: block; margin-bottom: 0.6rem;
}

/* --------------------------------------------------------------- faq ---- */
.faq { margin: 2.5rem auto; }
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 1.25rem 0;
}
.faq summary {
  cursor: pointer;
  font-size: 1.1rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--sans); color: var(--sand); flex: none; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 1rem 0 0; color: var(--ink-soft); }

/* ------------------------------------------------------- end-of-post ---- */
.post-cta {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 2px solid var(--sand);
  padding: clamp(2.5rem, 5vw, 4rem);
  margin: 4rem auto 0;
  text-align: center;
}
.post-cta h2 { margin-top: 0; }
.post-cta p { color: var(--ink-soft); }

.related { border-top: 1px solid var(--line); padding-top: 3rem; margin-top: 4rem; }
.related h2 { font-size: 1.5rem; margin-top: 0; }

/* ------------------------------------------------------------ author ---- */
.author {
  display: flex; gap: 1.5rem; align-items: center;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 2rem 0; margin: 3rem auto;
}
.author img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; flex: none; }
.author p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; }
.author strong { color: var(--ink); display: block; font-size: 1.05rem; margin-bottom: 0.25rem; }

/* ------------------------------------------------------- breadcrumbs ---- */
.crumbs {
  font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: 2rem;
}
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .author { flex-direction: column; align-items: flex-start; text-align: left; }
}

/* ---------------------------------------------------- tables in posts --- */
.post-table {
  overflow-x: auto;
  margin: 2.5rem auto;
  border: 1px solid var(--line);
  background: var(--paper);
}
.post-table table { border-collapse: collapse; width: 100%; min-width: 620px; }
.post-table th, .post-table td {
  text-align: left;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 0.95rem;
}
.post-table th {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 400;
  white-space: nowrap;
}
.post-table tbody tr:last-child td { border-bottom: 0; }
.post-table td strong { font-weight: 600; }
.post-table .yes { color: var(--ink); }
.post-table .no { color: var(--ink-soft); }

/* ---------------------------------------------------- end-of-post opt-in --- */
.optin {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  margin: 3.5rem auto 0;
}
.optin h2 { font-size: clamp(1.4rem, 1.1rem + 1.1vw, 1.9rem); margin-top: 0; }
.optin p { color: var(--ink-soft); }
.optin__list { display: grid; gap: 0.75rem; margin: 1.75rem 0; }
.optin__opt {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  background: var(--white);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.optin__opt:hover { border-color: var(--ink); }
.optin__opt input { margin-top: 0.3rem; flex: none; accent-color: var(--ink); }
.optin__opt span { font-size: 0.97rem; line-height: 1.45; }
.optin .field { margin-bottom: 0; }
.optin__row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: flex-end; }
.optin__row .field { flex: 1 1 260px; }
.optin__note { font-size: 0.85rem; color: var(--ink-soft); margin-top: 1rem; }
@media (min-width: 700px) { .optin__list { grid-template-columns: 1fr 1fr; } }

/* ------------------------------------------------- full-bleed splits --- */
/* The boxed .split reads as a floating rectangle inside a padded band —
   what makes the page feel blocky. .split--bleed runs the image to the
   screen edge and gives the text side real breathing room, the way the
   Squarespace original does. Used on the home page splits. */
.section--bleed { padding-block: 0; }
.split--bleed {
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
}
.split--bleed .split__media { position: relative; min-height: clamp(380px, 46vw, 680px); }
.split--bleed .split__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  border-radius: 0;
}
.split--bleed .split__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(3rem, 7vw, 6.5rem) clamp(1.5rem, 6vw, 6rem);
}
@media (max-width: 820px) {
  .split--bleed { grid-template-columns: 1fr; }
  .split--bleed .split__media { min-height: 300px; }
  .split--bleed .split__body { padding: clamp(2.5rem, 8vw, 4rem) var(--gutter); }
}
