/* New design (Monsoon Terrace) for every article, page, category, tag, archive, search and map page.
   Loaded after home2.css, which gives the header, footer, buttons and section heads. Layout only: colours, fonts,
   sizes and radii are tokens in theme.css (:root and the .v2 block). */
.v2-inner { background: var(--cream); }
.lede { font-size: var(--fs-lede); color: var(--ink-soft); max-width: 62ch; }
.leaf { width: 40%; height: 40%; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.ph-none { display: grid; place-items: center; width: 100%; height: 100%; background: var(--photo-placeholder); color: var(--moss); }
.wave--white { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: var(--wave-h); fill: var(--cream); z-index: 2; }

/* pills and stickers */
.pills { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: var(--sp-4) 0; }
.pill { display: inline-block; padding: var(--sp-1) var(--sp-4); border-radius: var(--radius-pill); background: var(--sand); color: var(--bark); font: var(--fw-semibold) var(--fs-s)/1.6 var(--font-b); border: 2px solid transparent; transition: background .2s, transform .3s var(--bounce); }
.pill:hover { background: var(--lime); color: var(--forest); transform: translateY(-2px) rotate(-2deg); }
.pill--tag { background: var(--turq-pale); color: var(--bamboo-dark); }
.sticker { display: inline-block; align-self: flex-start; padding: 3px var(--sp-3); border-radius: var(--radius-pill); background: var(--lime); color: var(--forest); font: var(--fw-bold) var(--fs-label)/1.4 var(--font-b); letter-spacing: var(--ls-label); text-transform: uppercase; transform: rotate(var(--tilt)); }
.sticker--clay { background: var(--clay); color: var(--white); }
.sticker--sky { background: var(--turq); color: var(--white); }

/* cards and grids */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: var(--sp-9) var(--gap); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.grid--archive { gap: var(--sp-9) var(--gap); }
.card { display: flex; flex-direction: column; gap: var(--sp-3); color: var(--ink); }
.card-ph { display: block; aspect-ratio: 4 / 3; border-radius: var(--r-lg); overflow: hidden; background: var(--photo-placeholder); border: 4px solid var(--white); box-shadow: 6px 6px 0 var(--card-shade); transition: transform .4s var(--bounce), box-shadow .3s; }
.card-ph img { width: 100%; height: 100%; object-fit: cover; }
.card:hover .card-ph { transform: translate(-3px, -3px) rotate(-1deg); box-shadow: 10px 10px 0 var(--card-shade); }
.card:hover .card-ph img { transform: scale(1.05); }
.card-body { display: flex; flex-direction: column; gap: var(--sp-2); }
.card-t { font: var(--fw-h) var(--fs-h4)/1.2 var(--font-h); color: var(--head); }
.card:hover .card-t { color: var(--clay-deep); }
.card-x { color: var(--ink-soft); font-size: var(--fs-s); }
.card--wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: var(--sp-8); }
.card--wide .card-ph { aspect-ratio: 16 / 10; }
.card--wide .card-t { font-size: var(--fs-h2); line-height: 1.08; }
.card--wide .card-x { font-size: var(--fs-lede); }

/* article header: big photo, or plain on pages without one (and on map pages) */
.ahero { position: relative; min-height: var(--ahero-h); display: flex; align-items: flex-end; color: var(--on-photo); overflow: hidden; background: var(--forest); }
.ahero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--ahero-focus); }
.ahero-veil { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, var(--veil) 100%); }
.ahero-copy { position: relative; z-index: 1; padding-top: var(--sp-10); padding-bottom: var(--sp-9); }
.ahero h1 { color: var(--white); font-size: var(--fs-h1); max-width: 20ch; margin: var(--sp-3) 0; }
.ahero .crumbs, .ahero .crumbs a, .ahero .meta, .ahero .meta a { color: var(--green-ink); }
.ahead { padding-top: var(--sp-9); padding-bottom: var(--sp-6); }
.ahead h1 { font-size: var(--fs-h1); margin: var(--sp-3) 0; max-width: 22ch; }
.ahead.center { padding-bottom: var(--sp-10); }
.ahead.center h1 { margin-inline: auto; }
.ahead.center .lede { margin: var(--sp-4) auto var(--sp-6); }
.crumbs { font-size: var(--fs-s); margin-bottom: var(--sp-3); color: var(--ink-soft); }
.crumbs a { color: var(--ink-soft); }
.crumbs a:hover { text-decoration: underline; }
.meta { font-size: var(--fs-s); color: var(--ink-soft); margin: 0; }
.meta a:hover { text-decoration: underline; }

/* article text */
.prose { width: min(var(--article), 100% - 32px); margin: 0 auto; padding: var(--sp-9) 0 var(--sp-8); font: var(--fs-prose)/var(--lh-prose) var(--f-prose); color: var(--ink); }
.prose::after { content: ""; display: table; clear: both; }
.prose a { color: var(--moss); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { color: var(--clay); }
.prose ul { list-style: disc; padding-left: 1.4em; margin: 0 0 1em; }
.prose ol { padding-left: 1.4em; }
.prose ul li::marker { color: var(--leaf); }
.prose h2, .prose h3, .prose h4 { margin: var(--sp-8) 0 var(--sp-4); }
.prose h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.prose h3 { font-size: var(--fs-h3); }
.prose h4 { font: var(--fw-h) var(--fs-h4)/1.2 var(--font-h); color: var(--head); }
.prose img { border-radius: var(--r-md); }
.prose .pic { float: right; clear: right; width: var(--float-width); max-width: var(--nat, 100%); margin: var(--sp-2) 0 var(--sp-5) var(--sp-7); }
.prose .pic img, .prose .pics img { display: block; width: 100%; height: auto; margin: 0; }
.prose .pic figcaption { text-align: left; }
.prose .pics { clear: both; display: grid; grid-template-columns: repeat(auto-fit, minmax(var(--pic-row-min), 1fr)); gap: var(--gap); margin: var(--sp-7) 0; align-items: start; }
.prose .pics .pic { float: none; width: auto; max-width: none; margin: 0; }
.prose .alignright, .prose .wp-caption.alignright { float: right; width: var(--float-width); margin: var(--sp-2) 0 var(--sp-5) var(--sp-6); }
.prose .alignleft, .prose .wp-caption.alignleft { float: left; width: var(--float-width); margin: var(--sp-2) var(--sp-6) var(--sp-5) 0; }
.prose .aligncenter, .prose .alignnone { margin: var(--sp-6) auto; }
.prose .aligncenter { display: block; }
.prose a > img.alignright, .prose a > img.alignleft { width: 100%; }
.prose p > a:only-child:has(> img.alignright) { float: right; width: var(--float-width); margin: var(--sp-2) 0 var(--sp-5) var(--sp-6); }
.prose p > a:only-child:has(> img.alignleft) { float: left; width: var(--float-width); margin: var(--sp-2) var(--sp-6) var(--sp-5) 0; }
.prose a:has(> img.alignright) > img, .prose a:has(> img.alignleft) > img { float: none; width: 100%; margin: 0; }
.prose .wp-caption { max-width: 100%; width: auto !important; }
.prose .wp-caption img { width: 100%; }
.prose .wp-caption-text, .prose figcaption { font: var(--fs-caption)/var(--lh-snug) var(--font-b); color: var(--ink-soft); margin: var(--sp-2) 0 0; text-align: center; }
.ed-note { margin: 0 0 var(--sp-7); padding: var(--sp-5) var(--sp-6); background: var(--turq-pale); color: var(--bamboo-dark); border-radius: var(--r-md); font: var(--fs-b)/1.6 var(--font-b); }
.ed-note a { color: var(--bamboo-dark); }
.ed-note p { margin: 0; }
.ed-note p + p { margin-top: var(--sp-3); }
.ed-note--end { clear: both; margin: var(--sp-8) 0 0; }
.prose blockquote { margin: var(--sp-7) 0; padding: var(--sp-5) var(--sp-7); border-left: 4px solid var(--leaf); background: var(--sand); border-radius: 0 var(--r-md) var(--r-md) 0; font-style: italic; }
.embed { position: relative; margin: var(--sp-7) 0; clear: both; }
.embed iframe { width: 100%; border: 0; border-radius: var(--r-md); display: block; }
.embed-video iframe { aspect-ratio: 16 / 9; height: auto; }
.embed-doc iframe { min-height: 520px; background: var(--white); border: var(--border); }
.table-wrap { overflow-x: auto; margin: var(--sp-6) 0; clear: both; }
.prose table { border-collapse: collapse; width: 100%; font: var(--fs-s)/var(--lh-snug) var(--font-b); }
.prose th, .prose td { padding: var(--sp-3); border-bottom: var(--border); text-align: left; }
.prose thead th { background: var(--sand); color: var(--forest); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(46%, 200px), 1fr)); gap: var(--sp-4); margin: var(--sp-7) 0; clear: both; }
.gallery figure { margin: 0; }
.gallery img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.gallery figcaption { text-align: left; }
.filed { clear: both; display: flex; flex-wrap: wrap; gap: var(--sp-2); padding-top: var(--sp-7); margin-top: var(--sp-7); border-top: var(--border); font-family: var(--font-b); }
.related { padding-top: var(--sp-6); }

/* map pages: the map full width at the top, tap to open it full screen with zoom */
.bigmap { margin: 0 auto var(--sp-4); position: relative; }
.bigmap > a { display: block; border-radius: var(--r-lg); overflow: hidden; border: 6px solid var(--white); box-shadow: 8px 8px 0 var(--card-shade); background: var(--white); cursor: zoom-in; }
.bigmap img { width: 100%; height: auto; }
.bigmap-btn { position: absolute; right: 18px; bottom: 18px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: var(--btn); color: var(--on-btn); font-weight: 700; box-shadow: var(--shadow-soft); transition: transform .3s var(--bounce); }
.bigmap > a:hover .bigmap-btn { transform: scale(1.06); }

/* archive pages */
.xhero { position: relative; min-height: 460px; display: flex; align-items: flex-end; color: var(--on-photo); overflow: hidden; background: var(--forest); }
.xhero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.xhero-veil { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 20%, var(--veil) 100%); }
.xhero-copy { position: relative; z-index: 3; padding-top: var(--sp-10); padding-bottom: calc(var(--wave-h) + var(--sp-7)); }
.xhero h1 { color: var(--white); font-size: var(--fs-h1); margin: var(--sp-2) 0 var(--sp-4); }
.xhero .hand { color: var(--lime); }
.xhero .lede { color: var(--green-ink); }
.xhero .pill { background: var(--chip-photo-bg); border-color: var(--chip-photo-line); color: var(--white); backdrop-filter: blur(6px); }
.xhero .pill:hover { background: var(--lime); color: var(--forest); }
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--sp-3); margin-top: var(--sp-10); }
.pg-nums { display: flex; gap: var(--sp-1); }
.pager a { min-width: 44px; height: 44px; display: grid; place-items: center; padding: 0 var(--sp-3); border-radius: var(--radius-pill); color: var(--soil); background: var(--white); border: 2px solid var(--sand); font-weight: 700; }
.pager a[aria-current] { background: var(--btn); color: var(--on-btn); border-color: var(--btn); }
.pager a:hover { background: var(--lime); color: var(--forest); }
.pager .pg-step { padding: 0 var(--sp-5); }

/* search */
.search-form { display: flex; gap: var(--sp-3); max-width: 640px; margin-top: var(--sp-5); }
.search-form input { flex: 1; min-width: 0; padding: var(--sp-3) var(--sp-5); border-radius: var(--radius-pill); border: 2px solid var(--sand); background: var(--white); color: var(--ink); font: var(--fs-b) var(--font-b); }
.search-form input:focus { outline: none; border-color: var(--leaf); box-shadow: 0 0 0 4px var(--lime-wash); }
.search-note { color: var(--ink-soft); }

/* photo and map viewer: full screen, zoom with the wheel, pinch, double-tap or the buttons, drag to move */
.lb { position: fixed; inset: 0; z-index: 80; background: var(--lightbox-bg); overflow: hidden; touch-action: none; cursor: grab; }
.lb.is-drag { cursor: grabbing; }
.lb img { position: absolute; left: 50%; top: 50%; max-width: none; max-height: none; border-radius: var(--r-sm); box-shadow: var(--shadow); transform-origin: 0 0; user-select: none; -webkit-user-drag: none; transition: none; }
.lb-bar { position: absolute; top: 16px; right: 16px; display: flex; gap: 10px; z-index: 2; }
.lb-bar button { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--cream); color: var(--forest); font: 700 1.5rem/1 var(--font-b); box-shadow: var(--shadow-soft); transition: transform .3s var(--bounce), background .2s; }
.lb-bar button:hover { background: var(--lime); transform: scale(1.08); }

/* contact page */
.ct { display: grid; grid-template-columns: 1.45fr 1fr 1fr 1fr; gap: var(--gap); }
.ct-card { background: var(--white); border-radius: var(--r-lg); padding: 28px; box-shadow: 6px 6px 0 var(--card-shade); display: flex; flex-direction: column; gap: 10px; }
.ct-card h2 { font-size: var(--fs-h4); }
.ct-card p { margin: 0; color: var(--ink-soft); }
.ct-card .chips { margin-top: auto; padding-top: 8px; }
.ct-big { font: 700 var(--fs-h4)/1.3 var(--font-h); color: var(--head); overflow-wrap: anywhere; }
.ct-big:hover { color: var(--clay-deep); }
.ct-addr { font-style: normal; color: var(--ink-soft); line-height: 1.6; }

@media (max-width: 1100px) { .ct { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) {
  .card--wide { grid-template-columns: 1fr; }
  .prose .pic { float: none; width: auto; margin: var(--sp-6) auto; }
  .prose .alignright, .prose .alignleft, .prose .wp-caption.alignright, .prose .wp-caption.alignleft,
  .prose p > a:only-child:has(> img.alignright), .prose p > a:only-child:has(> img.alignleft) { float: none; width: auto; margin: var(--sp-6) 0; }
}
@media (max-width: 560px) {
  .v2-inner { --ahero-h: 82vh; }
  .search-form { flex-direction: column; }
  .ct { grid-template-columns: 1fr; }
  .bigmap > a { border-width: 4px; box-shadow: 5px 5px 0 var(--card-shade); }
  .bigmap-btn { right: 10px; bottom: 10px; padding: 8px 14px; }
}
