/* Counterpane — CSS Custom Properties (all overridable via Fresco) */
:root {
  --bg-image: none;
  --bg-image-blend: normal;
  --border-image: none;
  --modal-image: none;
  --modal-image-blend: normal;
  --ornament-image: none;
  --ornament-image-blend: normal;
  --primary-color: #2c3e50;
  --accent-color: #8b6f47;
  --page-bg: #f5f0e8;
  --text-color: #1a1a1a;
  --heading-font: 'Playfair Display', Georgia, serif;
  --body-font: 'Lato', system-ui, sans-serif;
  --h1-size: 52px;
  --body-size: 16px;
  --hero-width: 720px;
  --border-width: 22px;
  --particle-count: 18;
  --cta-display: inline-block;
}

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

html, body {
  height: 100%;
}

html {
    border: 15px solid #153d59;
    border-image: none 10 10 10 10 repeat;
    background-color: #f5f0e8;
}

body {
  background-color: #f5f0e8;
  color: #1a1a1a;
  font-family: 'Raleway', sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

/* ── Window Border ─────────────────────────────────────────────────────── */
.border-frame {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  border: 15px solid #153d59;
}

/* ── Site Menu ─────────────────────────────────────────────────────────── */
/* The site menu is provided by the shared menu system (ADR 019); its markup and
   styling live in templates/_shared/menus/. No template-local nav CSS here. */

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  height: 100vh;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: calc(15px + 40px) calc(15px + 24px);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/130_large.jpg');
  background-size: cover;
  background-position: center;
  mix-blend-mode: normal;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.32);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  /* Full width up to the cap: as a centered flex item this box would
     otherwise shrink-wrap its text, making text-align invisible on the
     editable heading/subtitle. */
  width: 100%;
  max-width: 701px;
}

.hero-content h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 75px;
  color: #fff;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 18px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.4);
}

.hero-content p {
  font-size: calc(17px * 1.2);
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 32px;
}

.hero-cta {
  display: none;
  padding: 14px 32px;
  background: #847865;
  color: #fff;
  font-family: 'Raleway', sans-serif;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 3px;
  letter-spacing: 0.04em;
  transition: opacity 0.2s;
}
.hero-cta:hover { opacity: 0.85; }

/* ── Main Content ──────────────────────────────────────────────────────── */
.site-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 64px calc(15px + 40px);
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: calc(75px * 0.56);
  color: #153d59;
  margin-bottom: 28px;
  font-weight: 700;
}

.body-content {
  font-size: 17px;
  line-height: 1.75;
  color: #1a1a1a;
  max-width: 660px;
}

.body-content p + p {
  margin-top: 1.2em;
}

.body-content h2 { font-family: 'Cormorant Garamond', serif; font-size: calc(75px * 0.45); color: #153d59; margin: 1.6em 0 0.5em; line-height: 1.25; }
.body-content h3 { font-family: 'Cormorant Garamond', serif; font-size: calc(75px * 0.34); color: #153d59; margin: 1.4em 0 0.4em; line-height: 1.3; }
.body-content p { margin: 0 0 1.2em; }

/* ── Gallery Grid ──────────────────────────────────────────────────────── */
.gallery-section {
  padding: 48px calc(15px + 40px) 80px;
}

.gallery-grid {
  columns: 3 240px;
  column-gap: 16px;
}

.gallery-grid-item {
  break-inside: avoid;
  margin-bottom: 16px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.gallery-grid-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-grid-item:hover img {
  transform: scale(1.03);
}

.gallery-grid-caption {
  padding: 8px 10px 12px;
  font-size: calc(17px * 0.8);
  color: rgba(0, 0, 0, 0.55);
  line-height: 1.4;
}

.gallery-grid-desc {
  display: block;
  margin-top: 2px;
  font-size: calc(17px * 0.75);
  color: rgba(0, 0, 0, 0.45);
}

/* ── News Feed (dynamic pages, TEC-57) ─────────────────────────────────── */
.news-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 calc(15px + 40px) 64px;
}

.bsky-feed {
  max-width: 660px;
}

.bsky-post {
  padding: 24px 28px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-left: 3px solid #847865;
  border-radius: 2px;
}

.bsky-post__meta {
  display: flex;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 10px;
  font-size: calc(17px * 0.85);
  color: rgba(0, 0, 0, 0.45);
}

.bsky-post__handle {
  font-weight: 600;
  color: #153d59;
}

.bsky-post__text {
  font-size: 17px;
  line-height: 1.7;
  color: #1a1a1a;
}

.bsky-post__text a {
  color: #847865;
}

.bsky-post__link {
  display: inline-block;
  margin-top: 12px;
  font-size: calc(17px * 0.85);
  color: #847865;
  text-decoration: none;
}
.bsky-post__link:hover { text-decoration: underline; }

.bsky-feed--empty p {
  color: rgba(0, 0, 0, 0.45);
  font-style: italic;
}

.news-fetched {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.38);
}

/* ── Ornament ──────────────────────────────────────────────────────────── */
.ornament {
  position: fixed;
  top: 20px;
  right: 20px;
  background-image: url('../images/168_large.png');
  background-size: contain;
  background-repeat: no-repeat;
  mix-blend-mode: overlay;
  width: 100px;
  height: 100px;
  z-index:1000;
}

/* ── Ornament Modal ────────────────────────────────────────────────────── */
.ornament.is-interactive { cursor: pointer; }
.ornament.is-interactive:hover { filter: brightness(1.1); }

.ornament-modal {
  position: fixed;
  top: 130px;                /* anchored under the 20px + 100px ornament */
  right: 20px;
  z-index: 1001;
  display: none;
  width: min(340px, calc(100vw - 40px));
}
.ornament-modal.is-open { display: block; }

.ornament-modal__card {
  background: #f5f0e8;
  color: #1a1a1a;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
  padding: 16px;
  transform-origin: top right;
  animation: ornament-modal-in 0.18s ease-out;
}
@keyframes ornament-modal-in {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: none; }
}

.ornament-modal__close {
  float: right;
  margin: -4px -4px 0 8px;
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: inherit;
  cursor: pointer;
}

.ornament-modal__image {
  background-image: url('../images/219_large.jpg');
  background-size: cover;
  background-position: center;
  mix-blend-mode: normal;
  border-radius: 4px;
  height: 160px;
  margin-bottom: 12px;
}
.ornament-modal__image.is-empty { display: none; }

.ornament-modal__text {
  font-family: 'Raleway', sans-serif;
  font-size: calc(17px * 0.95);
  line-height: 1.6;
}
.ornament-modal__text p + p { margin-top: 0.8em; }

/* ── Particle Canvas ───────────────────────────────────────────────────── */
#particle-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
}

/* ── Footer ────────────────────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 32px calc(15px + 40px) calc(15px + 32px);
  font-size: 12px;
  color: rgba(0,0,0,0.38);
  border-top: 1px solid rgba(0,0,0,0.08);
}

footer a {
  color: #847865;
  text-decoration: none;
}