/* ==========================================================
   Corfu Local — single post template
   Palette pulled from the coast: limestone, Ionian teal,
   the shallows, kumquat, olive.
   ========================================================== */

:root {
  --limestone: #edefea;
  --paper: #f8f9f5;
  --ink: #14262b;
  --ink-soft: #4b5c5f;
  --ionian: #0a6e7c;
  --shallows: #7fe0dc;
  --kumquat: #e8822a;
  --olive: #5b6b3a;
  --rule: rgba(20, 38, 43, 0.14);

  --f-display: "Public Sans", "Helvetica Neue", Arial, sans-serif;
  --f-display-track: -.02em;
  --f-body: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --f-code: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --mast-h: 64px;
  --bar: var(--wp-admin--admin-bar--height, 0px);
  --measure: 680px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html:has(body.clp) { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar) + var(--mast-h) + 24px); }
body.clp {
  margin: 0;
  background: var(--limestone);
  color: var(--ink);
  font: 400 1.0625rem/1.7 var(--f-body);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.clp img { display: block; max-width: 100%; height: auto; }
.clp a { color: var(--ionian); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.clp a:hover { text-decoration-thickness: 2px; }
.clp button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--kumquat); outline-offset: 3px; border-radius: 4px; }

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

/* ---------- Masthead ---------- */
.masthead {
  position: fixed; inset: var(--bar) 0 auto; z-index: 40;
  height: var(--mast-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  color: #fff;
  transition: background .4s var(--ease), color .4s var(--ease), box-shadow .4s;
}
.clp .masthead a { color: inherit; }
.masthead[data-state="solid"] {
  background: color-mix(in srgb, var(--limestone) 88%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--rule);
}
.brand {
  font: 600 1.3rem/1 var(--f-display); letter-spacing: var(--f-display-track);
  color: inherit; text-decoration: none; letter-spacing: .01em;
}
.masthead__nav ul { display: flex; gap: clamp(1rem, 2.5vw, 2rem); list-style: none; margin: 0; padding: 0; }
.clp .masthead__nav a {
  color: inherit; text-decoration: none;
  font: 500 .78rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase;
  padding: .5rem 0; position: relative;
}
.masthead__nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.masthead__nav a:hover::after { transform: scaleX(1); }
/* Logo, menu with dropdowns, button */
.brand--logo { display: flex; align-items: center; }
.brand--logo img { height: 44px; width: auto; border-radius: 8px; box-shadow: 0 2px 12px rgba(10, 24, 28, .25); }
.masthead[data-state="solid"] .brand--logo img { box-shadow: 0 0 0 1px var(--rule); }
.masthead__menu { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); }
.masthead__nav li { position: relative; }
.masthead__nav .menu-item-has-children > a { padding-right: 1rem; }
.masthead__nav .menu-item-has-children > a::before {
  content: ""; position: absolute; right: 0; top: 50%; width: 6px; height: 6px; margin-top: -5px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg);
}
.masthead__nav .sub-menu {
  position: absolute; top: 100%; left: -1rem; min-width: 220px;
  display: block !important; list-style: none; margin: 0; padding: .5rem;
  background: var(--paper); color: var(--ink); border-radius: 12px;
  box-shadow: 0 1px 0 var(--rule), 0 24px 48px -20px rgba(20, 38, 43, .45);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .2s, transform .2s var(--ease), visibility .2s;
}
.masthead__nav li:hover > .sub-menu, .masthead__nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.clp .masthead__nav .sub-menu a { display: block; padding: .6rem .75rem; border-radius: 8px; text-shadow: none; }
.clp .masthead__nav .sub-menu a::after { display: none; }
.clp .masthead__nav .ast-menu-toggle, .clp .masthead__nav .dropdown-menu-toggle { display: none; }
.clp .masthead__nav .sub-menu a:hover { background: var(--limestone); }
.clp .masthead .masthead__button {
  padding: .65rem 1.1rem; border-radius: 999px; text-decoration: none;
  background: var(--kumquat); color: var(--ink);
  font: 500 .74rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase;
  transition: background .2s, transform .2s;
}
.clp .masthead .masthead__button:hover { background: var(--shallows); transform: translateY(-1px); }
.masthead__toggle { display: none; }

@media (max-width: 900px) {
  .masthead__toggle {
    display: inline-flex; align-items: center; gap: .6rem;
    background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35); border-radius: 999px;
    padding: .55rem .9rem; cursor: pointer; color: inherit;
    font: 500 .72rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase;
  }
  .masthead[data-state="solid"] .masthead__toggle { background: var(--paper); border-color: var(--rule); }
  .masthead__bars, .masthead__bars::before, .masthead__bars::after {
    display: block; width: 16px; height: 1.5px; background: currentColor; position: relative; transition: transform .3s var(--ease), opacity .2s;
  }
  .masthead__bars::before, .masthead__bars::after { content: ""; position: absolute; left: 0; }
  .masthead__bars::before { top: -5px; }
  .masthead__bars::after { top: 5px; }
  .masthead__toggle[aria-expanded="true"] .masthead__bars { background: transparent; }
  .masthead__toggle[aria-expanded="true"] .masthead__bars::before { transform: translateY(5px) rotate(45deg); }
  .masthead__toggle[aria-expanded="true"] .masthead__bars::after { transform: translateY(-5px) rotate(-45deg); }

  .masthead__menu {
    position: fixed; left: 0; right: 0; top: calc(var(--bar) + var(--mast-h));
    max-height: calc(100vh - var(--bar) - var(--mast-h)); overflow-y: auto;
    flex-direction: column; align-items: stretch; gap: 1rem;
    padding: 1.25rem clamp(1.25rem, 4vw, 3rem) 2rem;
    background: var(--limestone); color: var(--ink);
    box-shadow: 0 30px 40px -30px rgba(20, 38, 43, .5);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s, transform .25s var(--ease), visibility .25s;
  }
  .masthead.is-open .masthead__menu { opacity: 1; visibility: visible; transform: none; }
  .masthead.is-open { background: var(--limestone); color: var(--ink); }
  .masthead__nav ul { flex-direction: column; gap: 0; }
  .clp .masthead__nav a { display: block; padding: .85rem 0; font-size: .85rem; border-bottom: 1px solid var(--rule); }
  .clp .masthead__nav a::after { display: none; }
  .masthead__nav .menu-item-has-children > a::before { display: none; }
  .masthead__nav .sub-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    background: none; box-shadow: none; padding: 0 0 0 1rem; min-width: 0;
  }
  .clp .masthead__nav .sub-menu a { padding: .7rem 0; border-radius: 0; font-size: .8rem; }
  .masthead__menu .masthead__button { align-self: flex-start; }
}
@media (max-width: 480px) { .masthead__toggle-text { display: none; } .brand--logo img { height: 36px; } }

/* ---------- Tide: reading progress ---------- */
.tide {
  --p: 0;
  position: fixed; left: 0; right: 0; top: calc(var(--bar) + var(--mast-h)); z-index: 39;
  height: 14px; pointer-events: none;
  opacity: 0; transform: translateY(-6px);
  transition: opacity .4s, transform .4s var(--ease);
}
.tide.is-on { opacity: 1; transform: none; }
.tide__wave { position: absolute; inset: 0; width: 100%; height: 12px; overflow: visible; }
.tide__wave path {
  fill: none; stroke: var(--ionian); stroke-width: 2.5; vector-effect: non-scaling-stroke;
}
.tide__wave { clip-path: inset(0 calc(100% - var(--p) * 100%) 0 0); }
.tide::before { /* the still water ahead */
  content: ""; position: absolute; left: 0; right: 0; top: 5px; height: 1px; background: var(--rule);
}
.tide__boat {
  position: absolute; top: -13px; width: 28px; height: 22px;
  left: calc(var(--p) * (100% - 28px));
  animation: bob 2.4s ease-in-out infinite;
}
.tide__boat .hull { fill: var(--ink); }
.tide__boat .sail { fill: var(--paper); stroke: var(--ink); stroke-width: 1; }
.tide__boat .sail--jib { fill: var(--kumquat); stroke: none; }
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-2px) rotate(3deg); }
}

/* ---------- Hero / feature image ---------- */
.hero {
  position: relative;
  min-height: max(600px, calc(100svh - var(--bar)));
  display: grid; align-items: end;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  padding-top: calc(var(--mast-h) + 2.5rem); /* long titles grow the hero instead of sliding under the header */
}
.hero__media {
  position: absolute; inset: -6% 0 0; margin: 0; z-index: -2;
  transform: translate3d(0, var(--shift, 0px), 0);
  will-change: transform;
}
.hero__media img, .clp .hero__media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%;
  animation: settle 2.4s var(--ease) both;
}
@keyframes settle { from { transform: scale(1.12); filter: saturate(.6) brightness(.8); } }
.hero__shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to bottom, rgba(10, 24, 28, .55), transparent 22%),
    linear-gradient(to top, rgba(10, 24, 28, .88) 0%, rgba(10, 24, 28, .45) 38%, transparent 70%);
  opacity: var(--shade, 1);
}
.hero__text {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 3rem) clamp(7rem, 14vh, 10rem);
  text-shadow: 0 1px 18px rgba(10, 24, 28, .45);
}
.hero__place {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem;
  margin: 0 0 1.25rem;
  font-style: italic; font-size: 1.05rem;
  animation: rise .9s .5s var(--ease) both;
}
.hero__coords {
  font: 500 .72rem/1 var(--f-mono); font-style: normal; letter-spacing: .14em;
  padding-left: 1rem; border-left: 2px solid var(--kumquat);
}
.hero__title {
  margin: 0;
  font: 600 clamp(2.7rem, 7.4vw, 6.6rem)/.98 var(--f-display); letter-spacing: -.03em;
  letter-spacing: -.015em;
  text-wrap: balance;
}
.hero__title--long { font-size: clamp(2.2rem, 5vw, 4.6rem); }
.hero__title--xlong { font-size: clamp(1.9rem, 3.5vw, 3.4rem); line-height: 1.04; max-width: 26ch; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero__title--split .line:last-child { padding-left: .9em; color: var(--shallows); }
.hero__title .line > span { display: inline-block; animation: lift 1.1s var(--ease) both; }
.hero__title .line:nth-child(1) > span { animation-delay: .65s; }
.hero__title .line:nth-child(2) > span { animation-delay: .8s; }
.hero__title .line:nth-child(3) > span { animation-delay: .95s; }
@keyframes lift { from { transform: translateY(105%); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

.hero__dek {
  max-width: 36rem; margin: 1.75rem 0 2rem;
  font-size: clamp(1.05rem, 1.6vw, 1.28rem); line-height: 1.55;
  color: rgba(255, 255, 255, .9);
  animation: rise .9s 1.05s var(--ease) both;
}
.byline {
  display: flex; align-items: center; gap: .85rem;
  animation: rise .9s 1.2s var(--ease) both;
}
.byline__avatar, .author__photo {
  display: grid; place-items: center; flex: none;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--kumquat); color: var(--ink);
  object-fit: cover;
  border: 2px solid rgba(255,255,255,.6);
}
.byline__name { display: block; font-weight: 650; font-size: 1rem; }
.byline__meta { display: block; font: .74rem/1.6 var(--f-mono); letter-spacing: .06em; opacity: .8; }

.hero__cue {
  position: absolute; right: clamp(1.25rem, 5vw, 3rem); bottom: clamp(6.5rem, 13vh, 9rem);
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  color: #fff; text-decoration: none;
  font: 500 .68rem/1 var(--f-mono); letter-spacing: .2em; text-transform: uppercase;
  animation: rise .9s 1.5s var(--ease) both;
}
.hero__cue svg { width: 16px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; animation: nudge 2s 2.5s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(6px); } }
@media (max-width: 720px) { .hero__cue { display: none; } }

.hero__edge {
  position: absolute; left: 0; right: 0; bottom: -1px; z-index: 1;
  width: 100%; height: clamp(40px, 7vw, 90px);
}
.edge--back { fill: var(--shallows); opacity: .55; animation: sway 9s ease-in-out infinite alternate; transform-origin: center; }
.edge--front { fill: var(--limestone); }
@keyframes sway { from { transform: translateX(-2%); } to { transform: translateX(2%); } }

.hero__credit {
  position: absolute; right: clamp(1.25rem, 4vw, 3rem); bottom: clamp(48px, 8vw, 96px); z-index: 2;
  margin: 0; font: .62rem/1 var(--f-mono); letter-spacing: .05em; color: rgba(255,255,255,.65);
}
.clp .hero__credit a { color: inherit; }

/* ---------- Trip card ---------- */
.tripcard {
  position: relative; z-index: 3;
  width: min(1080px, calc(100% - 2.5rem));
  margin: -1.5rem auto 0;
  background: var(--paper);
  border-radius: 14px;
  box-shadow: 0 1px 0 var(--rule), 0 24px 48px -28px rgba(20, 38, 43, .35);
}
.tripcard dl {
  margin: 0; display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr);
}
.tripcard dl > div { padding: 1.25rem 1.5rem; }
.tripcard dl > div + div { border-left: 1px solid var(--rule); }
.tripcard dt {
  font: 500 .66rem/1.2 var(--f-mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--olive); margin-bottom: .4rem;
}
.tripcard dd { margin: 0; font-size: .98rem; line-height: 1.4; }
@media (max-width: 860px) {
  .tripcard dl { grid-template-columns: 1fr 1fr; }
  .tripcard dl > div:nth-child(3) { border-left: 0; }
  .tripcard dl > div:nth-child(n+3) { border-top: 1px solid var(--rule); }
}

/* ---------- Layout: rail + asymmetric article grid ---------- */
.layout--no-card { padding-top: clamp(4.5rem, 9vw, 7rem) !important; }
.layout {
  display: grid;
  grid-template-columns:
    [full-start] minmax(1.25rem, 1fr)
    [content-start] minmax(0, var(--measure))
    [content-end wide-end] minmax(1.25rem, 1fr)
    [full-end];
  padding-top: clamp(3.5rem, 8vw, 6rem);
}
.rail { display: none; }
.prose {
  grid-column: full;
  display: grid;
  grid-template-columns: subgrid;
}
.prose > * { grid-column: content; }

@media (min-width: 1120px) {
  .layout {
    grid-template-columns:
      [full-start] minmax(2rem, 1fr)
      [rail-start] 190px [rail-end]
      64px
      [content-start] var(--measure) [content-end]
      minmax(0, 260px)
      [wide-end] minmax(2rem, 1fr)
      [full-end];
  }
  .rail { display: block; grid-column: rail; grid-row: 1; }
  .rail__inner { position: sticky; top: calc(var(--bar) + var(--mast-h) + 40px); }
  .prose { grid-column: content-start / full-end; grid-row: 1; }
}

/* ---------- Rail: contents + share ---------- */
.rail__label {
  margin: 0 0 .9rem;
  font: 500 .66rem/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--olive);
}
.toc ol { list-style: none; margin: 0 0 2.5rem; padding: 0; border-left: 1px solid var(--rule); }
.toc a {
  display: block; padding: .45rem 0 .45rem 1rem; margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--ink-soft); text-decoration: none; font-size: .9rem; line-height: 1.35;
  transition: color .25s, border-color .25s;
}
.toc a:hover { color: var(--ink); }
.toc a[aria-current="true"] { color: var(--ink); border-left-color: var(--kumquat); font-weight: 650; }
.share { display: flex; flex-direction: column; gap: .5rem; }
.share .rail__label { margin-bottom: .4rem; }
.share__btn {
  display: inline-flex; align-items: center; gap: .55rem;
  width: fit-content;
  background: transparent; border: 1px solid var(--rule); border-radius: 999px;
  padding: .45rem .9rem; cursor: pointer;
  font: 500 .72rem/1 var(--f-mono); letter-spacing: .08em;
  transition: background .2s, border-color .2s;
}
.share__btn:hover { background: var(--paper); border-color: var(--ink); }
.share__btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.share__btn[hidden] { display: none; }

/* ---------- Prose ---------- */
.prose p { margin: 0 0 1.4em; }
.prose h2 {
  margin: 2.4em 0 .6em;
  font: 600 clamp(1.6rem, 2.6vw, 2.05rem)/1.15 var(--f-display); letter-spacing: var(--f-display-track);
  letter-spacing: -.005em;
  text-wrap: balance;
}
.prose h2::before {
  content: ""; display: block; width: 44px; height: 10px; margin-bottom: 1rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 10'%3E%3Cpath d='M0 5 Q5.5 0 11 5 T22 5 T33 5 T44 5' fill='none' stroke='%23e8822a' stroke-width='2'/%3E%3C/svg%3E") no-repeat;
}
.prose em { font-style: italic; }
.prose > p:first-child { font-size: clamp(1.15rem, 2.4vw, 1.32rem); line-height: 1.6; }
.prose > p:first-child::first-letter {
  float: left;
  font: 600 5.2rem/.8 var(--f-display); letter-spacing: var(--f-display-track);
  padding: .32rem .6rem 0 0;
  color: var(--ionian);
}

/* ---------- Figures ---------- */
.figure { margin: 2.6rem 0 2.8rem; }
.figure--wide { grid-column: content-start / wide-end; }
.figure--bleed { grid-column: full; }
@media (min-width: 1120px) {
  .figure--bleed { grid-column: content-start / full-end; }
  .figure--bleed figcaption { padding-right: 2rem; }
}
.figure__zoom {
  display: block; width: 100%; padding: 0; border: 0; background: none;
  cursor: zoom-in; overflow: hidden; border-radius: 12px; position: relative;
}
.figure--bleed .figure__zoom { border-radius: 0; }
@media (min-width: 1120px) { .figure--bleed .figure__zoom { border-radius: 14px 0 0 14px; } }
.figure__zoom img {
  width: 100%; transition: transform 1.2s var(--ease);
}
.figure--bleed .figure__zoom img { aspect-ratio: 21 / 9; object-fit: cover; }
.figure__zoom:hover img { transform: scale(1.035); }
.figure__zoom::after {
  content: "Enlarge";
  position: absolute; right: 1rem; bottom: 1rem;
  padding: .4rem .7rem; border-radius: 999px;
  background: rgba(20, 38, 43, .7); color: #fff;
  font: 500 .66rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase;
  opacity: 0; transform: translateY(6px); transition: .3s var(--ease);
}
.figure__zoom:hover::after, .figure__zoom:focus-visible::after { opacity: 1; transform: none; }
figcaption {
  margin-top: .8rem; font-size: .88rem; line-height: 1.5; color: var(--ink-soft);
}
.figure--bleed figcaption { padding-inline: 1.25rem; }
@media (min-width: 1120px) { .figure--bleed figcaption { padding-left: 0; max-width: var(--measure); } }
.credit { display: block; margin-top: .25rem; font: .66rem/1.4 var(--f-mono); letter-spacing: .04em; opacity: .75; }

.figure--split { grid-column: content-start / wide-end; }
@media (min-width: 760px) {
  .figure--split { display: grid; grid-template-columns: 3fr 2fr; gap: 1.75rem; align-items: end; }
  .figure--split figcaption { margin: 0; padding-bottom: .5rem; font-size: .95rem; }
}
.figure--split strong { display: block; color: var(--ink); font-size: 1.05rem; margin-bottom: .3rem; }

/* ---------- Pull quote ---------- */
.pull {
  grid-column: content-start / wide-end;
  margin: 2.5rem 0 3rem; padding: 0;
}
.pull p {
  margin: 0;
  font: 600 clamp(2rem, 4.6vw, 3.4rem)/1.05 var(--f-display); letter-spacing: var(--f-display-track);
  color: var(--ionian);
  text-wrap: balance;
}
.pull p::before { content: "“"; color: var(--kumquat); margin-right: .05em; }
.pull p::after { content: "”"; color: var(--kumquat); }

/* ---------- Local tip ---------- */
.tip {
  margin: .5rem 0 2.5rem;
  padding: 1.4rem 1.6rem 1.5rem;
  border-radius: 14px;
  background: color-mix(in srgb, var(--shallows) 24%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--ionian) 22%, transparent);
}
.tip p { margin: 0; font-size: 1.02rem; }
.tip .tip__label {
  display: inline-flex; align-items: center; gap: .5rem; margin-bottom: .6rem;
  font: 500 .68rem/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ionian);
}
.tip .tip__label::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--kumquat);
}

/* ---------- Cove explorer ---------- */
.coves {
  grid-column: content-start / wide-end;
  margin: 1.5rem 0 3rem;
  border-radius: 16px; overflow: hidden;
  background: var(--paper);
  box-shadow: 0 1px 0 var(--rule), 0 30px 60px -40px rgba(20, 38, 43, .5);
}
.coves__map { position: relative; }
.coves__coast { display: block; width: 100%; height: auto; }
.coves__land { fill: #66763f; stroke: #eadfc4; stroke-width: 4; paint-order: stroke; }
.coves__waves path { fill: none; stroke: rgba(255,255,255,.45); stroke-width: 1.2; }
.coves__pins { position: absolute; inset: 0; }
.pin {
  position: absolute; left: var(--x); top: var(--y);
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  background: none; border: 0; padding: .4rem; cursor: pointer; color: #fff;
}
.pin__dot {
  position: relative;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 3px rgba(20, 38, 43, .25);
  transition: transform .3s var(--ease), background .3s;
}
.pin:hover .pin__dot { transform: scale(1.25); }
.pin[aria-selected="true"] .pin__dot { background: var(--kumquat); transform: scale(1.3); }
.pin[aria-selected="true"] .pin__dot::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid var(--kumquat);
  animation: ripple 1.8s ease-out infinite;
}
@keyframes ripple { from { transform: scale(.6); opacity: 1; } to { transform: scale(2); opacity: 0; } }
.pin__label {
  font: 500 .64rem/1.1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 1px 6px rgba(10, 30, 35, .7);
}
@media (max-width: 680px) { .pin__label { display: none; } }

.coves__panel { padding: 1.5rem 1.75rem 1.75rem; min-height: 13rem; }
.coves__panel.is-swapping > * { animation: rise .45s var(--ease) both; }
.coves__kind {
  margin: 0 0 .3rem !important;
  font: 500 .66rem/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--olive);
}
.prose .coves__name { margin: 0 0 .5rem; font: 600 1.5rem/1.15 var(--f-display); letter-spacing: var(--f-display-track); }
.coves__body { margin: 0 0 1rem; font-size: 1rem; max-width: 52ch; }
.coves__body p { margin: 0 0 .6em !important; }
.coves__panel[hidden] { display: none; }
.coves__tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.coves__tags li {
  padding: .35rem .7rem; border-radius: 999px;
  border: 1px solid var(--rule);
  font: 500 .68rem/1 var(--f-mono); letter-spacing: .06em;
}

/* ---------- Gallery ---------- */
.gallery {
  grid-column: content-start / wide-end;
  display: grid; gap: .75rem;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: clamp(140px, 18vw, 230px);
  margin: .5rem 0 .75rem;
}
.gallery__item {
  padding: 0; border: 0; background: var(--ink); overflow: hidden; border-radius: 10px; cursor: zoom-in;
}
.gallery__item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1s var(--ease), opacity .4s;
}
.gallery__item:hover img { transform: scale(1.06); opacity: .9; }
.gallery__item--tall { grid-row: span 2; }
.gallery__item--wide { grid-column: span 2; }
@media (max-width: 600px) {
  .gallery { grid-template-columns: 1fr 1fr; }
  .gallery__item--tall { grid-row: span 1; grid-column: span 2; }
}
.gallery__credits { font: .66rem/1.5 var(--f-mono); color: var(--ink-soft); }

/* ---------- Post footer ---------- */
.post-foot { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--rule); }
.tags { list-style: none; margin: 0 0 2rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.clp .tags a {
  display: inline-block; padding: .45rem .85rem; border-radius: 999px;
  background: var(--paper); border: 1px solid var(--rule);
  color: var(--ink); text-decoration: none;
  font: 500 .72rem/1 var(--f-mono); letter-spacing: .06em;
  transition: background .2s, color .2s;
}
.clp .tags a:hover { background: var(--ionian); color: #fff; border-color: var(--ionian); }
.author { display: flex; gap: 1rem; align-items: flex-start; }
.author__photo { width: 56px; height: 56px; font-size: .9rem; }
.author__name { margin: 0 0 .2rem !important; font-weight: 650; }
.author__bio { margin: 0 !important; font-size: .98rem; color: var(--ink-soft); }

/* ---------- Related ---------- */
.related {
  width: min(1180px, calc(100% - 2.5rem));
  margin: clamp(4rem, 10vw, 7rem) auto 0;
}
.related h2 { margin: 0 0 1.5rem; font: 600 clamp(1.6rem, 2.6vw, 2.05rem)/1.15 var(--f-display); letter-spacing: var(--f-display-track); }
.related__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
@media (max-width: 860px) { .related__grid { grid-template-columns: 1fr; } }
.clp .card {
  position: relative; display: block; overflow: hidden;
  border-radius: 14px; aspect-ratio: 4 / 5; color: #fff; text-decoration: none;
  background: var(--ink);
}
@media (max-width: 860px) { .card { aspect-ratio: 16 / 10; } }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10, 24, 28, .85), transparent 60%);
}
.card__text { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 1.4rem; transition: transform .5s var(--ease); }
.card__kind {
  margin: 0 0 .5rem; font: 500 .64rem/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--shallows);
}
.card h3 { margin: 0; font: 600 1.3rem/1.2 var(--f-display); letter-spacing: var(--f-display-track); }
.card:hover img { transform: scale(1.07); }
.card:hover .card__text { transform: translateY(-6px); }

/* ---------- Site footer ---------- */
.site-foot {
  margin-top: clamp(4rem, 10vw, 7rem);
  padding: 3rem clamp(1.25rem, 4vw, 3rem);
  background: var(--ink); color: var(--limestone);
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 1rem;
}
.site-foot p { margin: 0; font-size: .92rem; opacity: .75; }

/* ---------- Lightbox ---------- */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: rgba(10, 22, 26, .94); color: #fff;
}
.lightbox[open] { display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; animation: fade .3s ease; }
.lightbox::backdrop { background: transparent; }
@keyframes fade { from { opacity: 0; } }
.lightbox figure { margin: 0; display: grid; justify-items: center; gap: .9rem; }
.lightbox img {
  max-width: min(1500px, 100%); max-height: 82vh; object-fit: contain; border-radius: 6px;
  animation: zoomin .4s var(--ease);
}
@keyframes zoomin { from { transform: scale(.96); opacity: 0; } }
.lightbox figcaption { color: rgba(255,255,255,.75); font-size: .9rem; text-align: center; max-width: 60ch; margin: 0; }
.lightbox__close, .lightbox__nav {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); color: #fff;
  width: 48px; height: 48px; border-radius: 50%; cursor: pointer; font-size: 1.4rem; line-height: 1;
  display: grid; place-items: center; justify-self: center;
  transition: background .2s;
}
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255,255,255,.2); }
.lightbox__close { position: absolute; top: 1.25rem; right: 1.25rem; font-size: 1rem; }
@media (max-width: 640px) {
  .lightbox[open] { grid-template-columns: 1fr; }
  .lightbox__nav { position: absolute; bottom: 1.5rem; }
  .lightbox__nav--prev { left: calc(50% - 60px); }
  .lightbox__nav--next { right: calc(50% - 60px); }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; z-index: 60;
  transform: translate(-50%, 150%);
  background: var(--ink); color: #fff;
  padding: .75rem 1.2rem; border-radius: 999px;
  font: 500 .78rem/1 var(--f-mono); letter-spacing: .06em;
  opacity: 0; visibility: hidden;
  transition: transform .4s var(--ease), opacity .3s, visibility .4s;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; visibility: visible; }

/* ---------- Scroll reveal (only when JS is running) ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

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

/* ==========================================================
   WordPress block content
   ========================================================== */

/* Width: normal blocks sit in the reading column; wide and full break out */
.prose > .alignwide,
.prose > .wp-block-gallery,
.prose > .wp-block-pullquote,
.prose > .wp-block-media-text,
.prose > .wp-block-columns.alignwide { grid-column: content-start / wide-end; }
.prose > .alignfull { grid-column: full; }
@media (min-width: 1120px) {
  .prose > .alignfull { grid-column: content-start / full-end; }
  .prose > .alignfull:is(.wp-block-image, .wp-block-cover) img { border-radius: 14px 0 0 14px; }
}
.prose > .alignleft, .prose > .alignright { max-width: 45%; }
.prose > .alignleft { float: left; margin: .3rem 1.5rem 1rem 0; }
.prose > .alignright { float: right; margin: .3rem 0 1rem 1.5rem; }
.prose > .aligncenter { margin-inline: auto; }

/* Lists, rules, code, tables */
.prose ul, .prose ol { margin: 0 0 1.4em; padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--kumquat); }
.prose h3 { margin: 2em 0 .5em; font: 600 1.3rem/1.3 var(--f-display); letter-spacing: -.01em; }
.prose hr, .prose .wp-block-separator {
  border: 0; height: 10px; margin: 3rem auto; width: 88px; opacity: 1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 88 10'%3E%3Cpath d='M0 5 Q5.5 0 11 5 T22 5 T33 5 T44 5 T55 5 T66 5 T77 5 T88 5' fill='none' stroke='%23e8822a' stroke-width='2'/%3E%3C/svg%3E") no-repeat;
}
.prose code { font: .9em var(--f-code); background: var(--paper); padding: .1em .35em; border-radius: 4px; }
.prose pre { font: .88rem/1.6 var(--f-code); background: var(--ink); color: var(--limestone); padding: 1.2rem; border-radius: 10px; overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose th, .prose td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--rule); }
.prose th { font: 500 .7rem/1.2 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--olive); }

/* Images */
.prose .wp-block-image { margin: 2.6rem 0 2.8rem; }
.prose .wp-block-image img { border-radius: 12px; width: 100%; height: auto; }
.prose .wp-block-image.alignfull img { border-radius: 0; aspect-ratio: 21 / 9; object-fit: cover; }
.prose figcaption, .prose .wp-element-caption {
  margin-top: .8rem; font-size: .88rem; line-height: 1.5; color: var(--ink-soft); text-align: left;
}
.prose > .alignfull figcaption { padding-inline: 1.25rem; }
@media (min-width: 1120px) { .prose > .alignfull figcaption { padding-left: 0; max-width: var(--measure); } }

/* Zoomable images (added by the script) */
.zoomable { position: relative; display: block; overflow: hidden; border-radius: 12px; cursor: zoom-in; }
.alignfull .zoomable { border-radius: 0; }
@media (min-width: 1120px) { .alignfull .zoomable { border-radius: 14px 0 0 14px; } }
.zoomable img { transition: transform 1.2s var(--ease); border-radius: 0 !important; }
.zoomable:hover img { transform: scale(1.035); }
.zoomable::after {
  content: attr(data-label);
  position: absolute; right: 1rem; bottom: 1rem;
  padding: .4rem .7rem; border-radius: 999px;
  background: rgba(20, 38, 43, .7); color: #fff;
  font: 500 .66rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase;
  opacity: 0; transform: translateY(6px); transition: .3s var(--ease); pointer-events: none;
}
.zoomable:hover::after, .zoomable:focus-visible::after { opacity: 1; transform: none; }

/* Gallery as a mosaic */
.prose .wp-block-gallery.has-nested-images {
  display: grid !important; gap: .75rem !important;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: clamp(140px, 18vw, 230px);
  grid-auto-flow: dense;
  margin: 1rem 0 2.5rem;
}
.prose .wp-block-gallery.has-nested-images > .wp-block-image {
  width: auto !important; margin: 0 !important; max-width: none; height: 100%;
}
.prose .wp-block-gallery.has-nested-images > .wp-block-image:nth-child(5n+1) { grid-row: span 2; }
.prose .wp-block-gallery.has-nested-images > .wp-block-image:nth-child(5n+4) { grid-column: span 2; }
/* A trailing photo that would sit alone fills the row as a panorama */
.prose .wp-block-gallery.has-nested-images > .wp-block-image:last-child:nth-child(5n) { grid-column: 1 / -1; }
.prose .wp-block-gallery.has-nested-images > .wp-block-image:last-child:nth-child(5n+2) { grid-column: span 2; }
.prose .wp-block-gallery .zoomable,
.prose .wp-block-gallery.has-nested-images > .wp-block-image img { height: 100%; width: 100%; object-fit: cover; border-radius: 10px; }
.prose .wp-block-gallery.has-nested-images figcaption:not(.blocks-gallery-caption) { display: none; }
.prose .wp-block-gallery > .blocks-gallery-caption { grid-column: 1 / -1; font: .66rem/1.5 var(--f-mono); }
@media (max-width: 600px) {
  .prose .wp-block-gallery.has-nested-images { grid-template-columns: 1fr 1fr; }
  .prose .wp-block-gallery.has-nested-images > .wp-block-image:nth-child(5n+1) { grid-row: span 1; grid-column: span 2; }
}

/* Pull quote and quote */
.prose .wp-block-pullquote { margin: 2.5rem 0 3rem; padding: 0; border: 0; text-align: left; }
.prose .wp-block-pullquote blockquote { margin: 0; }
.prose .wp-block-pullquote p {
  margin: 0; font: 600 clamp(2rem, 4.6vw, 3.4rem)/1.05 var(--f-display); letter-spacing: var(--f-display-track); color: var(--ionian); text-wrap: balance;
}
.prose .wp-block-pullquote p::before { content: "“"; color: var(--kumquat); margin-right: .05em; }
.prose .wp-block-pullquote p::after { content: "”"; color: var(--kumquat); }
.prose .wp-block-pullquote cite { display: block; margin-top: 1rem; font: 500 .72rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--olive); }
.prose .wp-block-quote {
  margin: 2rem 0; padding: .2rem 0 .2rem 1.5rem; border-left: 3px solid var(--kumquat);
  font-size: 1.2rem; font-style: italic;
}
.prose .wp-block-quote cite { display: block; font: normal .78rem/1.4 var(--f-mono); color: var(--ink-soft); }

/* "Local tip" block style */
.prose .is-style-clp-tip {
  margin: .5rem 0 2.5rem;
  padding: 1.4rem 1.6rem 1.5rem;
  border-radius: 14px;
  background: color-mix(in srgb, var(--shallows) 24%, var(--paper));
  border: 1px solid color-mix(in srgb, var(--ionian) 22%, transparent);
}
.prose .is-style-clp-tip::before {
  content: "Local tip";
  display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem;
  font: 500 .68rem/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ionian);
}
.prose .is-style-clp-tip > :last-child { margin-bottom: 0; }
.prose .is-style-clp-tip p { font-size: 1.02rem; }

/* Embeds and buttons */
.prose .wp-block-embed { margin: 2.5rem 0; }
.prose .wp-block-embed iframe { width: 100%; border-radius: 12px; }
.prose .wp-block-button__link { background: var(--ionian); color: #fff; border-radius: 999px; padding: .8rem 1.4rem; text-decoration: none; }

/* Page links for multi-page posts */
.page-links { font: 500 .8rem/1 var(--f-mono); margin: 2rem 0; }

/* Comments */
.comments-area { margin-top: 3.5rem; padding-top: 2rem; border-top: 1px solid var(--rule); font-size: 1rem; }
.comments-area h2 { margin-top: 0 !important; font-size: 1.8rem !important; }
.comments-area h2::before { display: none !important; }
.comments-area .wp-block-comment-template { list-style: none; padding: 0; }
.comments-area .wp-block-comment-template li { margin-bottom: 1.5rem; }
.comments-area .wp-block-avatar img { border-radius: 50%; }
.comments-area .wp-block-comment-author-name { font-weight: 650; }
.comments-area .wp-block-comment-date { font: .72rem var(--f-mono); color: var(--ink-soft); }
.comments-area input:not([type=submit]):not([type=checkbox]), .comments-area textarea {
  width: 100%; padding: .7rem .8rem; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); font: inherit;
}
.comments-area input[type=submit] {
  background: var(--ink); color: #fff; border: 0; border-radius: 999px; padding: .75rem 1.4rem; cursor: pointer;
  font: 500 .78rem/1 var(--f-mono); letter-spacing: .08em;
}

/* Theme leftovers that might still load */
body.clp { padding: 0 !important; }
