/* ==========================================================================
   KCSP – styles
   Colours and fonts live in :root so they can be swapped in one place
   once the final brand palette / typography arrives.
   ========================================================================== */

:root {
  /* Brand colours (placeholders until final palette) */
  --primary:   #CD6645;
  --secondary: #CDDEDD;
  --white:     #F7F7ED;
  --ink:       #2E3B3A;   /* nav link text – easy to change */

  /* Typography */
  --font-display: "DM Serif Display", Georgia, serif;
  --font-body:    "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Layout */
  --header-h: 76px;
  --gutter:   clamp(1.25rem, 4vw, 3rem);      /* banner + contact bar */
  --page-gutter: clamp(1.5rem, 7vw, 6rem);   /* page content side margins */
  --ease:     cubic-bezier(.4, 0, .2, 1);
  --fade-dur: .45s;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Header / banner ---------- */

/* ---------- Top contact bar + banner (both stay pinned while scrolling) ---------- */

.site-top {
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow .3s var(--ease), transform .45s var(--ease);
}

/* Once the page scrolls, the whole pinned block reads as one bar */
.site-top.is-stuck { box-shadow: 0 2px 18px rgba(46, 59, 58, .12); }
.site-top.is-stuck .topbar { background: var(--secondary); }

/* Scrolled: tighten the contact row and banner so the joined bar is more compact */
.site-top.is-stuck { --header-h: 62px; }
.site-top.is-stuck .topbar { min-height: 30px; padding-top: .5rem; padding-bottom: 0; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .15rem clamp(1rem, 3vw, 2.5rem);
  min-height: 36px;
  padding: .3rem var(--gutter);
  background: var(--white);
  font-size: .85rem;
  transition: background-color .3s var(--ease), min-height .3s var(--ease), padding .3s var(--ease);
}

.topbar__item {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: var(--ink);
  text-decoration: none;
}

.topbar__item:hover { color: var(--primary); }

.topbar__icon {
  width: 15px;
  height: 15px;
  color: var(--primary);
  flex: none;
}

.site-header {
  position: relative;
  height: var(--header-h);
  transition: height .3s var(--ease);
  background: var(--secondary);
}

.site-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: .55rem var(--gutter);
  background: var(--white);
  color: var(--ink);
  text-align: center;
  font-size: .95rem;
  font-weight: 500;
  border-bottom: 2px solid var(--primary);
  box-shadow: 0 3px 10px rgba(46, 59, 58, .08);
}

.site-banner::before,
.site-banner::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--primary);
}

.site-header__inner {
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* ---------- Contact details moving into the banner (wide screens only) ----------
   Scrolling down: the thin bar slides away and the phone / email slide down into the banner.
   On screens narrower than 1400px there is no room, so the thin bar simply stays put. */

.header-contact { display: none; }

@media (min-width: 1400px) {
  .site-top.is-collapsed { transform: translateY(calc(-1 * var(--topbar-h, 36px))); }

  .site-top.is-collapsed .topbar {
    visibility: hidden;                       /* not tabbable once it has slid away */
    transition: background-color .3s var(--ease), visibility 0s .45s;
  }

  .header-contact {
    display: grid;
    grid-template-columns: 0fr;
    visibility: hidden;
    transition: grid-template-columns .45s var(--ease), visibility 0s .45s;
  }

  .header-contact__inner {
    min-width: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2vw, 1.75rem);
    white-space: nowrap;
    font-size: .9rem;
  }

  .header-contact .topbar__item {
    transform: translateY(-140%);
    opacity: 0;
    transition: transform .45s var(--ease), opacity .45s var(--ease);
  }

  .site-header.is-collapsed .header-contact {
    grid-template-columns: 1fr;
    visibility: visible;
    transition: grid-template-columns .45s var(--ease), visibility 0s;
  }

  .site-header.is-collapsed .header-contact .topbar__item {
    transform: none;
    opacity: 1;
  }
}

/* ---------- Brand text + KCSP animation ---------- */

.brand-lockup {
  display: flex;
  align-items: center;
  gap: clamp(.75rem, 1.5vw, 1.1rem);
}

/* Placeholder circle – swap for the logo when it's ready */
.logo-placeholder {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
}

.brand {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.2vw, 1.75rem);
  line-height: 1.35; /* leaves room for descenders (g, y) inside the overflow clip */
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: baseline;
}

.brand__word { display: inline-flex; align-items: baseline; }

/* Collapsible letters: grid 1fr -> 0fr animates width smoothly */
.brand__fade {
  display: inline-grid;
  grid-template-columns: 1fr;
  transition: grid-template-columns var(--fade-dur) var(--ease),
              opacity var(--fade-dur) var(--ease);
  opacity: 1;
}

.brand__fade > span {
  min-width: 0;
  overflow: hidden;
  white-space: pre;
}

.site-header.is-collapsed .brand__fade {
  grid-template-columns: 0fr;
  opacity: 0;
}

/* ---------- Navigation ---------- */

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2.25rem);
}

.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(.9rem, 2vw, 2rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__list a {
  position: relative;
  padding: .4rem 0;
  font-size: .98rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.nav__list a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}

.nav__list a:hover::after,
.nav__list a[aria-current="page"]::after { transform: scaleX(1); }

.pill {
  display: inline-block;
  padding: .7rem 1.5rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--white);
  font-size: .98rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}

.pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(205, 102, 69, .35);
}

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Mobile menu ---------- */

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  position: relative;
}

.menu-toggle span {
  position: absolute;
  left: 10px; right: 10px;
  height: 2px;
  background: var(--primary);
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.menu-toggle span:nth-child(1) { top: 17px; }
.menu-toggle span:nth-child(2) { top: 25px; }

.menu-toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

@media (max-width: 900px) {
  .menu-toggle { display: block; }

  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
    padding: 1.5rem var(--gutter) 2rem;
    background: var(--secondary);
    box-shadow: 0 12px 18px rgba(46, 59, 58, .12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  }

  .nav.is-open { opacity: 1; visibility: visible; transform: none; }

  .nav__list { flex-direction: column; align-items: flex-start; gap: 1.1rem; }
  .nav__list a { font-size: 1.15rem; padding: .4rem 0 .5rem; }
  .pill { text-align: center; }
}

/* ---------- Page spaces ---------- */

.space {
  padding: clamp(2rem, 4vw, 3rem) var(--page-gutter) clamp(3.5rem, 7vw, 5.5rem);
}

/* Temporary: keeps empty spaces full-height so the page can scroll. Remove once they have content. */
.space--placeholder { min-height: 100vh; }

.container { max-width: 1200px; margin: 0 auto; }

.space--white     { background: var(--white); }
.space--primary   { background: var(--primary); }
.space--secondary { background: var(--secondary); }

/* ---------- Text pages ---------- */


.prose { max-width: 760px; }

.prose h1, .prose h2, .prose h3 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--primary);
  line-height: 1.15;
  margin: 0 0 1.25rem;
}

.prose h1, .prose h2 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
.prose h3 { font-size: clamp(1.4rem, 2.6vw, 1.85rem); margin-bottom: 1rem; }
.prose h2.spaced { margin-top: 3rem; }   /* gap before a second heading within the same space */

.prose p {
  margin: 0 0 1.25rem;
  font-size: clamp(1.02rem, 1.4vw, 1.15rem);
  line-height: 1.7;
}

.prose p a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.prose p a:hover { text-decoration-thickness: 2px; }

/* Shared page width; paragraphs keep a comfortable reading length */
.prose--wide { max-width: 1100px; }
.prose--wide p { max-width: 760px; }
.prose--wide.prose--full p,
.prose--wide.prose--full .checklist { max-width: none; } /* text runs the full page width */

/* Team member: photo on the left, text on the right */
.team-member {
  display: grid;
  grid-template-columns: minmax(200px, 300px) 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

.prose .team-member__name {
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.team-member__photo {
  background: var(--secondary);
  border-radius: 12px;
  padding: 0.75rem;
}

.team-member__photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.team-member__text { max-width: 720px; }

@media (max-width: 700px) {
  .team-member { grid-template-columns: 1fr; }
  .team-member__photo { width: min(260px, 70%); }
}

/* Our Story: text runs the full width of the space (photos to be added later) */
.story__text p:last-child { margin-bottom: 0; }

/* Our Ethos / Services: items in a responsive grid */
.ethos, .item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem clamp(1.5rem, 4vw, 3.5rem);
  margin-top: 2.5rem;
}

.ethos__item h3, .item-grid__item h3 { margin-bottom: .6rem; }
.ethos__item p, .item-grid__item p { margin: 0; }
.item-grid { margin-bottom: 2.5rem; }
.item-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }

/* Flip cards: heading on the front, paragraph on the back */
.flip-card {
  perspective: 1000px;
  aspect-ratio: 1.7;
  container-type: inline-size;
  outline-offset: 4px;
}

.flip-card__inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform .7s var(--ease);
  transform-style: preserve-3d;
}

.flip-card__face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4cqw;
  border-radius: 16px;
  text-align: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.flip-card__front {
  background: var(--secondary);
  flex-direction: column;
  gap: 3cqw;
}

/* Icon placeholder circle – swap for the real icon when ready */
.flip-card__icon {
  flex: none;
  width: 16cqw;
  height: 16cqw;
  border-radius: 50%;
  background: var(--primary);
}

/* Real icons replace the placeholder circle */
.flip-card__icon--img {
  border-radius: 0;
  background: none;
  object-fit: contain;
}
.flip-card__back  { background: var(--primary); transform: rotateY(180deg); padding: 3cqw 3.5cqw; overflow: hidden; }

.flip-card .flip-card__front h3 {
  margin: 0;
  font-size: 6.2cqw;
  /* every title gets a two-line block, text centred inside it, so all cards line up */
  min-height: 2.3em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prose .flip-card__back p { margin: 0; color: var(--white); font-size: var(--fit-size, 4.5cqw); line-height: 1.4; }

.flip-card:focus-visible .flip-card__inner,
.flip-card.is-flipped .flip-card__inner { transform: rotateY(180deg); }

@media (hover: hover) {
  .flip-card:hover .flip-card__inner { transform: rotateY(180deg); }
}


/* Cards with no back text don't flip */
.flip-card--static:hover .flip-card__inner,
.flip-card--static.is-flipped .flip-card__inner { transform: none; }

.space--primary .prose .checklist li { color: var(--white); }
.space--primary .prose .checklist li::before { background: var(--white); }

.space--primary .prose h1,
.space--primary .prose h2,
.space--primary .prose h3,
.space--primary .prose p { color: var(--white); }

/* ---------- Hero (video placeholder with darkened overlay and heading) ---------- */

.space--hero {
  --this: var(--white);          /* used by the wave's ripple colour */
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(460px, 78vh, 760px);
  background: var(--ink);        /* placeholder until the video is added */
  overflow: hidden;              /* keeps the video inside the hero */
  padding-top: clamp(3rem, 6vw, 5rem);
}

.hero__media,
.hero__overlay { position: absolute; inset: 0; }

.hero__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Darkens the video so the heading stays readable */
.hero__overlay { background: linear-gradient(90deg, rgba(20, 30, 30, .65), rgba(20, 30, 30, .3)); }

.hero__content { position: relative; width: 100%; }

.hero__content h1 {
  margin: 0;
  max-width: 14ch;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 5rem);
  line-height: 1.05;
  color: var(--white);
}

@media (prefers-reduced-motion: reduce) {
  .hero__video { display: none; }   /* shows the plain dark background instead */
}

/* Text on the left, map on the right (map stretches to match the list height) */
.split {
  max-width: 1100px;
  display: grid;
  grid-template-columns: minmax(240px, .8fr) 1.2fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: stretch;
  margin-top: 1.5rem;
}

.split__map {
  position: relative;      /* the map fills this box but doesn't add to its height */
  border-radius: 16px;
  overflow: hidden;
  background: var(--white);
}

.split__map .map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.map__land  { fill: var(--white); }
.map__sea   { fill: var(--secondary); }
.map__coast { fill: none; stroke: var(--primary); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.map__pin   { fill: var(--primary); stroke: var(--white); stroke-width: 2; }
.map__dot   { fill: var(--white); }

.map__label {
  font-family: var(--font-body);
  font-size: 19px;
  font-weight: 600;
  fill: var(--ink);
  stroke: var(--white);
  stroke-width: 5px;
  stroke-linejoin: round;
  paint-order: stroke;
}

.map__credit {
  position: absolute;
  right: .6rem;
  bottom: .4rem;
  font-size: .65rem;
  color: var(--ink);
  opacity: .75;
  background: rgba(247, 247, 237, .8);
  padding: 0 .3rem;
  border-radius: 4px;
}

@media (max-width: 800px) {
  .split { grid-template-columns: 1fr; }
  .split__map { aspect-ratio: 4 / 3; align-self: start; width: 100%; }
}

/* Bullet list */
.prose .checklist {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: grid;
  gap: .9rem;
  max-width: 760px;
}

.prose .checklist li {
  position: relative;
  padding-left: 1.75rem;
  font-size: clamp(1.02rem, 1.4vw, 1.15rem);
  line-height: 1.6;
}

.prose .checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .55em;
  width: .75rem;
  height: .75rem;
  border-radius: 50%;
  background: var(--primary);
}

/* Sub-lists inside a bullet list */
.prose .checklist li > ul {
  list-style: none;
  margin: .6rem 0 .4rem;
  padding: 0;
  display: grid;
  gap: .35rem;
}

.prose .checklist > li:last-child > ul { margin-bottom: 0; }

.prose .checklist li li { padding-left: 1.5rem; font-size: .95em; }

.prose .checklist li li::before {
  top: .6em;
  width: .5rem;
  height: .5rem;
  background: transparent;
  border: 2px solid var(--primary);
}

.space--primary .prose .checklist li li::before { background: transparent; border-color: var(--white); }

/* ---------- Enquiry form ---------- */

.enquiry { max-width: 760px; margin: 2rem auto 0; }
.enquiry__embed { position: relative; width: 100%; height: 2230px; overflow: hidden; }
@media (max-width: 820px) { .enquiry__embed { height: 2400px; } }
@media (max-width: 600px) { .enquiry__embed { height: 2620px; } }
/* Splose content can't be styled from outside, so scale the frame up ~15% to enlarge its text */
.enquiry__embed iframe { width: calc(100% / 1.15) !important; height: calc(100% / 1.15) !important; transform: scale(1.15); transform-origin: top left; }

.form { display: grid; gap: 1.25rem; }

.form__row { display: grid; gap: .4rem; margin: 0; padding: 0; border: 0; min-width: 0; }

.form label, .form legend {
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  padding: 0;
}

.form input[type="text"],
.form input[type="email"],
.form input[type="tel"],
.form textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid #b8c9c8;
  border-radius: 10px;
  padding: .75rem 1rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}

.form textarea { resize: vertical; min-height: 9rem; }

.form input:focus-visible,
.form textarea:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(205, 102, 69, .25);
}

.form__choices { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.form__choices legend { flex-basis: 100%; margin-bottom: .25rem; }

.form .check { display: inline-flex; align-items: center; gap: .6rem; font-weight: 400; cursor: pointer; }
.form .check input { width: 1.15rem; height: 1.15rem; accent-color: var(--primary); }
.form .check a { color: var(--primary); text-underline-offset: 3px; }

.form__submit { justify-self: start; border: 0; cursor: pointer; font-family: inherit; }

.prose .form__note { margin: 0; font-size: 1rem; line-height: 1.45; }

.form__message {
  margin: 0;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  font-weight: 600;
}
.form__message--success { background: var(--secondary); color: var(--ink); }
.form__message--error   { background: #f6dcd3; color: #7a2e17; margin-top: 1rem; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--primary);
  color: var(--white);
  padding: clamp(2rem, 4vw, 3rem) var(--page-gutter) clamp(2rem, 4vw, 3rem);
}

.site-footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.3fr;
  gap: 2rem clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}

.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-footer a:focus-visible { outline-color: var(--white); }

.site-footer__brand { display: flex; align-items: center; gap: .9rem; }
.logo-placeholder--footer { background: var(--white); }
.site-footer__name { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.2; }

.site-footer__nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }

.site-footer__contact { display: grid; gap: .75rem; }
.site-footer__contact a { display: inline-flex; align-items: center; gap: .55rem; }
.site-footer__contact .topbar__icon { color: var(--white); flex: none; }
.site-footer__contact span { min-width: 0; overflow-wrap: anywhere; }   /* long email wraps instead of overflowing on phones */

.site-footer__flags {
  max-width: 1100px;
  margin: clamp(1.5rem, 3vw, 2.25rem) auto 0;
  padding-top: clamp(1.25rem, 2.5vw, 1.75rem);
  border-top: 1px solid rgba(255, 255, 255, .3);
  display: flex;
  gap: .75rem;
}
.site-footer__flags img { height: 28px; width: auto; display: block; }

.site-footer__acknowledgement {
  max-width: 1100px;
  margin: 1rem auto 0;
  font-size: .9rem;
  line-height: 1.6;
}

.site-footer__acknowledgement--inclusive { margin-top: .75rem; }

@media (max-width: 800px) {
  .site-footer__inner { grid-template-columns: 1fr; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .site-top, .brand__fade, .nav, .pill, .nav__list a::after, .flip-card__inner { transition-duration: .01s; }
}

/* ---------- Blog grid + post modal ---------- */

.container--blog { max-width: 1100px; margin-top: 1.5rem; }

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
}

.post-card__open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--secondary);
  font: inherit;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.post-card__open:hover, .post-card__open:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(46, 59, 58, .18);
}

.post-card__img {
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--secondary);
}
.post-card__img img, .post-modal__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card__meta { display: block; padding: 1rem 1.15rem 1.25rem; background: var(--white); }
.post-card__date { display: block; font-size: .85rem; opacity: .7; margin-bottom: .25rem; }
.post-card__title { display: block; font-family: var(--font-display); font-size: 1.35rem; line-height: 1.2; }

.post-modal {
  width: min(720px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: auto;
  background: var(--white);
  color: var(--ink);
}
.post-modal::backdrop { background: rgba(46, 59, 58, .6); }
.post-modal__img { background: var(--secondary); }
.post-modal__img:empty { display: none; }
.post-modal__img img { height: auto; max-height: 50vh; }
.post-modal__body { padding: clamp(1.25rem, 3vw, 2rem); }
.post-modal__date { margin: 0 0 .25rem; font-size: .9rem; opacity: .7; }
.post-modal__title { margin: 0 0 1rem; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.7rem, 3.5vw, 2.3rem); line-height: 1.15; }
.post-modal__body p { margin: 0 0 1.1rem; line-height: 1.7; font-size: 1.05rem; }
.post-modal__close {
  position: sticky;
  top: .6rem;
  float: right;
  margin: .6rem .6rem 0 0;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}

/* Keep the blog buttons' own shapes when focused (the global focus rule sets a 4px radius) */
.post-modal__close:focus-visible { border-radius: 50%; }
.post-card__open:focus-visible   { border-radius: 12px; }

/* Social links list (blog page) */
.social-list { list-style: none; margin: -.5rem 0 0; padding: 0; }
.social-list li {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .6rem;
  font-size: clamp(1.02rem, 1.4vw, 1.15rem);
}
.social__icon { width: 1.3em; height: 1.3em; color: var(--primary); flex: none; }
.social-list a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.social-list a:hover { text-decoration-thickness: 2px; }

/* Small screens: let the full name wrap onto two lines instead of overflowing */
@media (max-width: 600px) {
  .brand-lockup { min-width: 0; flex: 1 1 auto; }
  .brand {
    min-width: 0;
    flex-wrap: wrap;
    white-space: normal;
    font-size: clamp(1rem, 4.6vw, 1.2rem);
    line-height: 1.25;
  }
  .logo-placeholder { width: 40px; height: 40px; }
}

/* Forced line break after "Coast" – small screens only, and not while collapsed to KCSP */
.brand__break { display: none; }
@media (max-width: 600px) {
  .brand__break { display: block; flex-basis: 100%; height: 0; }
  .site-header.is-collapsed .brand__break { display: none; }
}
