/* ==========================================================================
   Banjica — u srcu Jelice
   Heritage village site · warm parchment + forest green + wine + gilt
   ========================================================================== */

:root {
  /* Warm parchment palette */
  --bg:           oklch(97% 0.018 85);     /* warm cream */
  --bg-alt:       oklch(94% 0.025 80);     /* deeper parchment */
  --bg-dark:      oklch(22% 0.025 130);    /* deep forest ink */
  --ink:          oklch(22% 0.025 50);     /* deep warm ink */
  --ink-soft:     oklch(38% 0.020 50);
  --ink-muted:    oklch(52% 0.015 60);

  --forest:       oklch(38% 0.055 145);    /* Jelica green */
  --forest-deep:  oklch(28% 0.050 145);
  --wine:         oklch(40% 0.095 25);     /* vinogradi */
  --gilt:         oklch(68% 0.115 75);     /* church gold */
  --gilt-soft:    oklch(78% 0.080 80);

  --border:       oklch(85% 0.020 70);
  --border-strong: oklch(70% 0.030 60);

  /* Type */
  --display: "Marcellus", "Trajan Pro", Georgia, serif;
  --serif:   "Fraunces", Georgia, serif;
  --sans:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Spacing & radius */
  --r:    6px;
  --r-lg: 14px;
  --maxw: 1180px;

  --shadow-sm: 0 1px 2px rgba(40, 30, 15, 0.05), 0 2px 8px rgba(40, 30, 15, 0.04);
  --shadow-md: 0 4px 20px rgba(40, 30, 15, 0.08), 0 1px 3px rgba(40, 30, 15, 0.06);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--wine); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--forest-deep); }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- NAV ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 241, 231, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav__brand img {
  height: 44px;
  width: auto;
}
.nav__links {
  display: flex;
  gap: 28px;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.nav__links a {
  color: var(--ink-soft);
  position: relative;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--wine);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { transform: scaleX(1); }

@media (max-width: 820px) {
  .nav__inner { gap: 12px; }
  .nav__links {
    gap: 18px;
    font-size: 13px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    white-space: nowrap;
    flex: 1;
    padding-bottom: 2px;
  }
  .nav__links::-webkit-scrollbar { display: none; }
  .nav__brand img { height: 36px; }
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  padding: 96px 0 110px;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, oklch(88% 0.06 90 / 0.7), transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 90%, oklch(38% 0.055 145 / 0.10), transparent 70%),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 3px,
      oklch(50% 0.030 60 / 0.025) 3px,
      oklch(50% 0.030 60 / 0.025) 4px
    );
}
.hero__bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, oklch(40% 0.095 25 / 0.06), transparent 40%),
    radial-gradient(circle at 80% 70%, oklch(68% 0.115 75 / 0.08), transparent 40%);
}
.hero__inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
}
.hero__logo {
  width: min(380px, 80%);
  margin: 0 auto 28px;
  filter: drop-shadow(0 4px 18px rgba(40, 30, 15, 0.1));
}
.eyebrow {
  display: block;
  font-family: var(--sans);
  font-size: 12.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--wine);
  margin-bottom: 14px;
  font-weight: 500;
}
.hero__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(54px, 8vw, 96px);
  line-height: 1;
  letter-spacing: 0.01em;
  margin: 0;
  color: var(--ink);
}
.hero__title { display: none; } /* logo carries the title, but keep for SEO */
.hero h1.hero__title { display: block; position: absolute; left: -9999px; }

.hero__tagline {
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 28px);
  color: var(--ink-soft);
  font-style: italic;
  font-weight: 400;
  max-width: 640px;
  margin: 0 auto 56px;
  line-height: 1.5;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0 auto 48px;
  max-width: 760px;
  border-top: 1px solid var(--border);
}
.hero__stats > div {
  padding: 22px 12px;
  border-right: 1px solid var(--border);
  text-align: center;
}
.hero__stats > div:last-child { border-right: none; }
.hero__stats strong {
  display: block;
  font-family: var(--display);
  font-size: 32px;
  font-weight: 400;
  color: var(--forest-deep);
  letter-spacing: 0.005em;
  line-height: 1;
}
.hero__stats span {
  display: block;
  margin-top: 6px;
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

@media (max-width: 720px) {
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
  .hero__stats > div:nth-child(2) { border-right: none; }
  .hero__stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .hero { padding: 64px 0 80px; }
}

.hero__cta {
  display: inline-block;
  padding: 14px 30px;
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--bg);
  background: var(--forest-deep);
  border-radius: 999px;
  transition: all .25s ease;
}
.hero__cta:hover {
  background: var(--wine);
  color: var(--bg);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ---------- SECTION ---------- */
.section {
  padding: 100px 0;
  position: relative;
}
.section--alt {
  background: var(--bg-alt);
}
.section--dark {
  background: var(--bg-dark);
  color: oklch(85% 0.020 70);
}
.section--dark .section__title,
.section--dark p strong,
.section--dark .route strong,
.section--dark .route li { color: oklch(96% 0.018 85); }
.section--dark .route li { border-bottom-color: oklch(38% 0.040 130); }
.section--dark .muted { color: oklch(70% 0.020 70); }

.section__eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--wine);
  margin-bottom: 18px;
  font-weight: 500;
  position: relative;
  padding-left: 22px;
}
.section__eyebrow::before {
  content: "✦";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-55%);
  font-size: 11px;
  line-height: 1;
  color: var(--gilt);
  background: transparent;
  width: auto;
  height: auto;
  letter-spacing: 0;
}
.section__eyebrow--light { color: var(--gilt); }
.section__eyebrow--light::before { color: var(--gilt-soft); }

.section__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.15;
  letter-spacing: 0.005em;
  margin: 0 0 36px;
  max-width: 820px;
  color: var(--ink);
}
.section__title--light { color: oklch(96% 0.018 85); }

.lead {
  font-family: var(--serif);
  font-size: 22px;
  font-style: italic;
  color: var(--ink-soft);
  max-width: 760px;
  margin: 0 0 48px;
  line-height: 1.55;
}

.muted { color: var(--ink-muted); }

/* ---------- TWO COLUMN ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  align-items: start;
}
.two-col--reverse .two-col__text { order: 2; }
.two-col--reverse aside { order: 1; }

.two-col__text p { margin: 0 0 18px; max-width: 60ch; }
.two-col__text p:last-child { margin-bottom: 0; }

@media (max-width: 900px) {
  .two-col { grid-template-columns: 1fr; gap: 36px; }
  .two-col--reverse .two-col__text,
  .two-col--reverse aside { order: 0; }
}

/* ---------- BADGES ---------- */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.badge {
  display: inline-block;
  padding: 6px 14px;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--ink-soft);
  background: oklch(99% 0.010 85);
}

/* ---------- CARD / FACTS ---------- */
.card {
  background: oklch(99% 0.010 85);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}
.card h3 {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 400;
  margin: 0 0 20px;
  color: var(--forest-deep);
  letter-spacing: 0.01em;
}
.card--dark {
  background: oklch(28% 0.030 130);
  border-color: oklch(38% 0.040 130);
  color: oklch(85% 0.020 70);
}
.card--dark h3 { color: var(--gilt); }

.facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
}
.facts > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px dashed var(--border);
  gap: 16px;
}
.facts > div:last-child { border-bottom: none; }
.facts dt {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 500;
}
.facts dd {
  margin: 0;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: 0.005em;
}

/* ---------- TIMELINE ---------- */
.timeline {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-top: 16px;
}
.t-item {
  background: oklch(99% 0.010 85);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 36px 32px;
  position: relative;
  transition: transform .3s ease, box-shadow .3s ease;
}
.t-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.t-year {
  display: inline-block;
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--wine);
  margin-bottom: 14px;
  padding: 4px 14px;
  border: 1px solid var(--wine);
  border-radius: 999px;
  text-transform: uppercase;
}
.t-item h3 {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 400;
  margin: 0 0 14px;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.t-item p { margin: 0; color: var(--ink-soft); }

@media (max-width: 800px) {
  .timeline { grid-template-columns: 1fr; gap: 20px; }
  .t-item { padding: 28px 24px; }
}

/* ---------- GRID ---------- */
.grid { display: grid; gap: 32px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) {
  .grid--2 { grid-template-columns: 1fr; }
  .grid--3 { grid-template-columns: 1fr; }
}

/* ---------- MONASTERY ---------- */
.monastery {
  background: oklch(99% 0.010 85);
  border: 1px solid var(--border);
  border-top: 4px solid var(--wine);
  border-radius: var(--r-lg);
  padding: 40px 36px;
  transition: transform .3s ease, box-shadow .3s ease;
}
.monastery:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.monastery__head { margin-bottom: 20px; }
.seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--gilt);
  color: var(--gilt);
  border-radius: 50%;
  font-size: 20px;
  margin-bottom: 14px;
}
.monastery h3 {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 400;
  margin: 0 0 6px;
  color: var(--forest-deep);
  letter-spacing: 0.01em;
}
.monastery__sub {
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin: 0;
  font-style: italic;
}
.monastery p {
  margin: 14px 0 0;
  color: var(--ink-soft);
}

/* ---------- CALLOUT ---------- */
.callout {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  margin-top: 56px;
  padding: 28px 36px;
  background: oklch(96% 0.030 85);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gilt);
  border-radius: var(--r);
}
.callout__icon {
  color: var(--gilt);
  font-size: 26px;
  font-family: var(--serif);
  line-height: 1.3;
}
.callout p { margin: 0; color: var(--ink-soft); }
.callout strong { color: var(--ink); }

/* ---------- CHECKLIST ---------- */
.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}
.checklist li {
  padding: 12px 0;
  border-bottom: 1px dashed oklch(50% 0.030 70 / 0.4);
  font-family: var(--display);
  font-size: 19px;
  color: oklch(90% 0.020 70);
  letter-spacing: 0.01em;
}
.checklist li:last-child { border-bottom: none; }
.checklist li::before {
  content: "✦";
  color: var(--gilt);
  margin-right: 14px;
}
.checklist em {
  font-style: italic;
  color: var(--gilt-soft);
  font-size: 16px;
}

/* ---------- FEATURE GRID ---------- */
.feature {
  padding: 32px 28px;
  border-top: 1px solid var(--border-strong);
  position: relative;
  transition: border-color .3s ease;
}
.feature:hover { border-top-color: var(--wine); }
.feature__num {
  display: block;
  font-family: var(--serif);
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--wine);
  margin-bottom: 14px;
  font-weight: 500;
}
.feature h3 {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 400;
  margin: 0 0 10px;
  color: var(--forest-deep);
  letter-spacing: 0.01em;
}
.feature p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
}

/* ---------- ROUTE & COMPASS ---------- */
.route {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
}
.route li {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  color: var(--ink-soft);
}
.route li:last-child { border-bottom: none; }
.route strong { color: var(--ink); font-weight: 600; margin-right: 6px; }

.compass {
  list-style: none;
  padding: 0;
  margin: 0;
}
.compass li {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--border);
  font-family: var(--display);
  font-size: 20px;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.compass li:last-child { border-bottom: none; }
.compass li span {
  display: inline-block;
  min-width: 44px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--wine);
  padding: 4px 8px;
  border: 1px solid var(--wine);
  border-radius: 3px;
  text-align: center;
}
.compass em {
  font-style: italic;
  font-size: 15px;
  color: var(--ink-muted);
  font-family: var(--sans);
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--bg-dark);
  color: oklch(78% 0.020 70);
  padding: 56px 0 36px;
  margin-top: 0;
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 18px;
}
.footer__brand img {
  height: 60px;
  filter: invert(1) brightness(0.95) sepia(0.2);
}
.footer__brand p {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  font-style: italic;
  color: var(--gilt-soft);
}
.footer__meta { text-align: right; }
.footer__meta p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
}
.footer__meta .muted { color: oklch(60% 0.020 70); font-size: 12.5px; }

@media (max-width: 720px) {
  .footer__inner { flex-direction: column; text-align: center; }
  .footer__meta { text-align: center; }
}

/* ---------- ACCESSIBILITY ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* visually hidden helper */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Sticky nav offset for anchor scrolling */
html { scroll-padding-top: 88px; }
@media (max-width: 720px) { html { scroll-padding-top: 76px; } }

/* ==========================================================================
   POLISH — SVG icons, active nav, ornaments
   ========================================================================== */

/* Active nav link */
.nav__links a.is-active {
  color: var(--wine);
}
.nav__links a.is-active::after {
  transform: scaleX(1);
}

/* Replace text seal with SVG-friendly version */
.seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--gilt);
  color: var(--gilt);
  border-radius: 50%;
  margin-bottom: 16px;
  background: oklch(98% 0.030 85);
  transition: transform .4s ease, border-color .3s ease;
}
.seal svg {
  width: 26px;
  height: 26px;
}
.monastery:hover .seal {
  transform: scale(1.06) rotate(-3deg);
  border-color: var(--wine);
  color: var(--wine);
}
.seal--inline {
  width: 36px;
  height: 36px;
  margin-bottom: 0;
  margin-right: 10px;
  vertical-align: middle;
  font-size: 16px;
}

/* Feature icon */
.feature__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--wine);
  margin-bottom: 6px;
  transition: transform .3s ease;
}
.feature__icon svg { width: 36px; height: 36px; }
.feature:hover .feature__icon {
  transform: translateY(-2px);
  color: var(--forest);
}
.feature__num {
  display: inline-block;
  margin-left: 6px;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.22em;
  color: var(--ink-muted);
  font-style: italic;
  vertical-align: middle;
}

/* ==========================================================================
   PAGE HEAD (Galerija / Poreklo)
   ========================================================================== */
.page-head {
  padding: 80px 0 40px;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, oklch(94% 0.040 85), transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}
.page-head .section__title {
  margin-bottom: 16px;
}
.page-head .lead {
  margin: 0;
  max-width: 720px;
}
.page-head--article {
  text-align: center;
  padding: 90px 0 50px;
}
.page-head--article .section__eyebrow {
  margin-bottom: 24px;
}
.page-head--article .section__eyebrow::before {
  display: none;
}
.page-head--article .section__eyebrow {
  padding-left: 0;
}

.container--narrow {
  max-width: 1100px;
}

/* ==========================================================================
   ARTICLE (Poreklo)
   ========================================================================== */
.article__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.15;
  letter-spacing: 0.005em;
  margin: 0 0 28px;
  color: var(--ink);
}
.article__title em {
  font-style: italic;
  color: var(--wine);
  font-size: 0.78em;
  font-weight: 400;
}
.article__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-bottom: 12px;
}
.article__meta .dot { color: var(--gilt); }
.article__source {
  font-style: italic;
  font-family: var(--serif);
  color: var(--ink-soft);
  font-size: 16px;
  margin: 0;
}

.article-body {
  padding: 70px 0 90px;
}
.article-body p {
  font-size: 18px;
  line-height: 1.85;
  color: var(--ink-soft);
  margin: 0 0 22px;
}

/* Rod "grid" — CSS columns layout so cards flow naturally with no row gaps */
.rod-grid {
  column-count: 2;
  column-gap: 20px;
  margin: 0 0 40px;
}
.rod-grid .rod {
  break-inside: avoid;
  margin: 0 0 20px;
  display: block;
}
@media (max-width: 760px) {
  .rod-grid { column-count: 1; }
}
.article-body em { color: var(--wine); font-style: italic; }
.article-body strong { color: var(--ink); font-weight: 600; }

.lead-paragraph {
  font-family: var(--display) !important;
  font-size: 22px !important;
  line-height: 1.7 !important;
  color: var(--ink) !important;
  margin-bottom: 32px !important;
  letter-spacing: 0.005em;
}
.dropcap {
  float: left;
  font-family: var(--display);
  font-size: 84px;
  line-height: 0.85;
  padding: 6px 14px 0 0;
  color: var(--wine);
  font-weight: 400;
}

.article__h2 {
  font-family: var(--display);
  font-size: clamp(28px, 3.4vw, 38px);
  font-weight: 400;
  color: var(--forest-deep);
  letter-spacing: 0.01em;
  margin: 64px 0 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  position: relative;
}
.article__h2::before {
  content: "✦";
  position: absolute;
  top: 0;
  left: 0;
  transform: translateY(-50%);
  color: var(--gilt);
  background: var(--bg);
  padding: 0 12px 0 0;
  font-size: 16px;
  line-height: 1;
}

.quote {
  margin: 36px 0;
  padding: 28px 36px;
  border-left: 3px solid var(--wine);
  background: oklch(96% 0.025 85);
  font-family: var(--serif);
  font-style: italic;
  font-size: 21px;
  line-height: 1.5;
  color: var(--ink);
  border-radius: 0 var(--r) var(--r) 0;
}
.quote cite {
  display: block;
  margin-top: 14px;
  font-size: 14px;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  font-style: normal;
}

.rod {
  padding: 28px 32px;
  margin: 0;
  background: oklch(99% 0.010 85);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gilt);
  border-radius: var(--r);
  transition: transform .3s ease, box-shadow .3s ease;
}
.rod:hover {
  transform: translateX(2px);
  box-shadow: var(--shadow-sm);
}
.rod h3,
.rod__name {
  font-family: var(--display);
  font-size: clamp(22px, 2.4vw, 26px);
  font-weight: 400;
  margin: 0 0 10px;
  color: var(--forest-deep);
  letter-spacing: 0.015em;
  line-height: 1.35;
  word-spacing: 0.04em;
}

/* Inline surname mentions inside .rod paragraphs */
.rod p .surname {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.2em;
  color: var(--wine);
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.rod__slava {
  font-size: 14px !important;
  letter-spacing: 0.08em;
  color: var(--wine) !important;
  margin: 0 0 14px !important;
  font-family: var(--sans) !important;
  font-style: italic;
}
.rod p { font-size: 16.5px !important; line-height: 1.75 !important; margin-bottom: 12px !important; }
.rod p:last-child { margin-bottom: 0 !important; }
.rod__list {
  font-family: var(--serif) !important;
  font-style: italic;
  font-size: 17px !important;
  color: var(--ink) !important;
  background: oklch(96% 0.025 85);
  padding: 16px 20px;
  border-radius: var(--r);
  line-height: 1.8 !important;
}

.closing {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px !important;
  color: var(--ink) !important;
  margin-top: 32px !important;
}

.ornament {
  border: 0;
  height: 40px;
  margin: 56px 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 40'><line x1='10' y1='20' x2='80' y2='20' stroke='%23b88a4a' stroke-width='0.8'/><line x1='120' y1='20' x2='190' y2='20' stroke='%23b88a4a' stroke-width='0.8'/><text x='100' y='28' text-anchor='middle' fill='%23b88a4a' font-family='serif' font-size='24'>✦</text></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.article__footer {
  margin-top: 56px;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--ink-muted);
}
.article__footer p { margin: 4px 0; font-size: 14px !important; line-height: 1.7 !important; }

/* ==========================================================================
   GALLERY
   ========================================================================== */
.gallery-group {
  margin-bottom: 80px;
}
.gallery-group:last-child {
  margin-bottom: 0;
}
.gallery-group__head {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.gallery-group__head h2 {
  font-family: var(--display);
  font-size: clamp(28px, 3.4vw, 36px);
  font-weight: 400;
  color: var(--forest-deep);
  letter-spacing: 0.01em;
  margin: 0 0 8px;
  display: flex;
  align-items: center;
}
.gallery-group__head p {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
}

.gallery {
  display: grid;
  gap: 24px;
}
.gallery--2 { grid-template-columns: repeat(2, 1fr); }
.gallery--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) {
  .gallery--2, .gallery--3 { grid-template-columns: 1fr; }
}

.frame {
  margin: 0;
  background: oklch(99% 0.010 85);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 8px 8px 0;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .35s ease, box-shadow .35s ease;
  position: relative;
}
.frame:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.frame img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: calc(var(--r-lg) - 4px);
  display: block;
}
.frame figcaption {
  font-family: var(--serif);
  font-size: 15px;
  font-style: italic;
  color: var(--ink-soft);
  text-align: center;
  padding: 14px 12px 16px;
}

/* Placeholder */
.frame--placeholder { background: var(--bg-alt); }
.frame--placeholder .ph {
  width: 100%;
  height: 280px;
  border-radius: calc(var(--r-lg) - 4px);
  background:
    repeating-linear-gradient(45deg,
      oklch(92% 0.020 80) 0,
      oklch(92% 0.020 80) 10px,
      oklch(89% 0.030 80) 10px,
      oklch(89% 0.030 80) 20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink-muted);
  padding: 20px;
  text-align: center;
}
.ph__icon {
  font-size: 38px;
  color: var(--gilt);
  line-height: 1;
}
.ph__name {
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 12.5px;
  background: oklch(99% 0.010 85);
  border: 1px solid var(--border-strong);
  padding: 4px 10px;
  border-radius: 3px;
  color: var(--ink-soft);
}
.ph__hint {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.credit {
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-muted);
  font-style: italic;
  text-align: right;
}

.upload-note {
  margin-top: 60px;
  padding: 24px 28px;
  background: oklch(96% 0.030 85);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r);
  font-size: 15px;
  color: var(--ink-soft);
}
.upload-note strong { color: var(--ink); margin-right: 8px; }
.upload-note code {
  background: oklch(99% 0.010 85);
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 13.5px;
  border: 1px solid var(--border);
  color: var(--wine);
}

/* ==========================================================================
   FINAL POLISH
   ========================================================================== */

/* Subtle separator that fades between sections on the same background */
.section + .section:not(.section--alt):not(.section--dark) {
  position: relative;
}
.section + .section:not(.section--alt):not(.section--dark)::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 1px;
  background: var(--gilt);
  opacity: 0.5;
}

/* Decorative ornament under hero title area (above stats) */
.hero__inner::after {
  content: "✦";
  display: block;
  text-align: center;
  color: var(--gilt);
  font-family: var(--display);
  font-size: 14px;
  margin-top: 4px;
  margin-bottom: 24px;
  opacity: 0.7;
}

/* Better italic emphasis in body */
.article-body em,
.two-col__text em,
.monastery em,
.feature em {
  font-family: var(--serif);
  font-style: italic;
  color: var(--wine);
}

/* Refined hero CTA arrow */
.hero__cta {
  position: relative;
  transition: all .3s cubic-bezier(.4, 0, .2, 1);
}
.hero__cta:hover {
  letter-spacing: 0.2em;
  padding-left: 36px;
  padding-right: 36px;
}

/* Gentle entry animation */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero__logo    { animation: rise 0.9s ease-out both; }
.hero__tagline { animation: rise 0.9s ease-out 0.15s both; }
.hero__stats   { animation: rise 0.9s ease-out 0.30s both; }
.hero__cta     { animation: rise 0.9s ease-out 0.45s both; }
.page-head .section__eyebrow,
.page-head .article__title,
.page-head .lead,
.page-head .article__meta,
.page-head .article__source { animation: rise 0.8s ease-out both; }
.page-head .article__title { animation-delay: 0.1s; }
.page-head .article__meta  { animation-delay: 0.2s; }
.page-head .lead,
.page-head .article__source { animation-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .hero__logo, .hero__tagline, .hero__stats, .hero__cta,
  .page-head .section__eyebrow,
  .page-head .article__title,
  .page-head .lead,
  .page-head .article__meta,
  .page-head .article__source { animation: none; }
}

/* Refined timeline cards on hover — golden inner line */
.t-item {
  position: relative;
  overflow: hidden;
}
.t-item::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--gilt), transparent 60%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s ease;
}
.t-item:hover::before { transform: scaleX(1); }

/* Monastery card — gold underline on hover */
.monastery {
  position: relative;
  overflow: hidden;
}
.monastery::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gilt), transparent);
  transform: scaleX(0);
  transition: transform .5s ease;
}
.monastery:hover::after { transform: scaleX(1); }

/* Quote — decorative quotation mark */
.quote {
  position: relative;
}
.quote::before {
  content: "“";
  position: absolute;
  top: 6px;
  left: 14px;
  font-family: var(--display);
  font-size: 64px;
  line-height: 0.7;
  color: var(--gilt);
  opacity: 0.4;
}

/* Section eyebrow — refined line */
.section__eyebrow::before { width: 22px; }

/* Make article body em prettier */
.article-body em { font-family: var(--serif); }

/* Tighten badges */
.badge {
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 7px 16px;
  color: var(--ink);
}

/* Refined callout */
.callout {
  align-items: center;
}
.callout__icon {
  font-size: 32px;
}

/* Footer brand text refinements */
.footer__brand p {
  font-family: var(--serif);
}

/* Hero stat label tighter */
.hero__stats span {
  font-size: 11px;
  letter-spacing: 0.22em;
}

/* Section title gets a subtle bottom ornament when followed by paragraph */
.section__title + .lead {
  margin-top: -16px;
}

/* Polish article title em — gentler */
.article__title em {
  font-family: var(--serif);
  font-style: italic;
  color: var(--wine);
  font-size: 0.72em;
  font-weight: 400;
  letter-spacing: 0;
}

/* Polish drop cap edge */
.dropcap {
  margin-right: 4px;
}

/* Gallery group head — subtle baseline */
.gallery-group__head {
  position: relative;
}

/* Smooth image fade-in on load */
.frame img {
  opacity: 0;
  transition: opacity .6s ease;
}
.frame img.loaded,
.frame img:not([loading="lazy"]) {
  opacity: 1;
}
/* Fallback for lazy images: show as soon as decoded */
.frame img[loading="lazy"] {
  animation: rise 0.6s ease-out 0.1s both;
}

/* ==========================================================================
   MAP CARD
   ========================================================================== */
.card--map {
  padding: 24px;
}
.map {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: var(--bg-alt);
  margin-bottom: 14px;
}
.map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  filter: saturate(0.85) contrast(0.96);
}
.map__link {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wine);
  font-weight: 500;
  margin-bottom: 18px;
  transition: color .2s ease, transform .2s ease;
}
.map__link:hover {
  color: var(--forest-deep);
  transform: translateX(2px);
}
.neighbors {
  list-style: none;
  padding: 14px 0 0;
  margin: 0;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 16px;
}
.neighbors li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 15px;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.neighbors em {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-muted);
}
.pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  padding: 0 6px;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--wine);
  border: 1px solid var(--wine);
  border-radius: 3px;
}

/* ==========================================================================
   CONTACT FORM
   ========================================================================== */
.contact-form {
  display: grid;
  gap: 14px;
}
.field {
  display: block;
}
.field__label {
  display: block;
  font-family: var(--sans);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: oklch(70% 0.020 70);
  margin-bottom: 6px;
  font-weight: 500;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 15px;
  color: oklch(95% 0.020 70);
  background: oklch(22% 0.030 130);
  border: 1px solid oklch(38% 0.040 130);
  border-radius: var(--r);
  transition: border-color .2s ease, background .2s ease;
  resize: vertical;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--gilt);
  background: oklch(26% 0.030 130);
}
.contact-form select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23b88a4a' stroke-width='1.5'><path d='M1 1l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px;
  padding-right: 36px;
}
.contact-form select option {
  background: oklch(22% 0.030 130);
  color: oklch(95% 0.020 70);
}
.hp {
  position: absolute !important;
  left: -9999px !important;
  height: 0;
  width: 0;
  opacity: 0;
  pointer-events: none;
}
.form-btn {
  margin-top: 6px;
  padding: 14px 28px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: oklch(22% 0.030 130);
  background: var(--gilt);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: all .25s ease;
}
.form-btn:hover {
  background: oklch(96% 0.018 85);
  letter-spacing: 0.22em;
  transform: translateY(-1px);
}
.form-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.form-status {
  margin: 8px 0 0;
  font-size: 14px;
  padding: 10px 14px;
  border-radius: var(--r);
  font-family: var(--sans);
}
.form-status.is-ok {
  background: oklch(38% 0.080 145 / 0.25);
  color: oklch(88% 0.040 145);
}
.form-status.is-err {
  background: oklch(40% 0.095 25 / 0.25);
  color: oklch(88% 0.060 30);
}

/* ==========================================================================
   LIGHTBOX
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: oklch(15% 0.020 130 / 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 60px;
  animation: lbFade .25s ease;
}
.lightbox.is-open { display: flex; }
@keyframes lbFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.lightbox__figure {
  margin: 0;
  max-width: min(1200px, 92vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.lightbox__img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: var(--r);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: lbZoom .35s cubic-bezier(.4, 0, .2, 1);
}
@keyframes lbZoom {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}
.lightbox__caption {
  color: oklch(85% 0.020 70);
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  text-align: center;
  max-width: 600px;
}
.lightbox__close,
.lightbox__nav {
  position: absolute;
  background: oklch(99% 0.010 85 / 0.1);
  border: 1px solid oklch(99% 0.010 85 / 0.2);
  color: oklch(95% 0.020 70);
  cursor: pointer;
  border-radius: 50%;
  transition: all .2s ease;
  font-family: var(--display);
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__close {
  top: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  font-size: 28px;
  line-height: 1;
}
.lightbox__nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  font-size: 32px;
  line-height: 1;
}
.lightbox__nav--prev { left: 28px; }
.lightbox__nav--next { right: 28px; }
.lightbox__close:hover,
.lightbox__nav:hover {
  background: var(--gilt);
  border-color: var(--gilt);
  color: oklch(22% 0.030 130);
}
@media (max-width: 720px) {
  .lightbox { padding: 16px; }
  .lightbox__close { top: 16px; right: 16px; }
  .lightbox__nav   { width: 40px; height: 40px; font-size: 24px; }
  .lightbox__nav--prev { left: 8px; }
  .lightbox__nav--next { right: 8px; }
}

/* ==========================================================================
   RESPONSIVE & POLISH — final pass
   ========================================================================== */

/* iOS safe heights for lightbox */
@supports (height: 100dvh) {
  .lightbox { height: 100dvh; }
  .lightbox__img { max-height: 75dvh; }
}

/* Smoother body on small screens */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .section { padding: 64px 0; }
  .page-head { padding: 56px 0 30px; }
  .page-head--article { padding: 64px 0 36px; }
  .container { padding-left: 22px; padding-right: 22px; }
  .nav__inner { padding-left: 20px; padding-right: 20px; }
}

/* Very small screens */
@media (max-width: 480px) {
  .container { padding-left: 18px; padding-right: 18px; }
  .nav__inner { padding: 10px 18px; }
  .section { padding: 52px 0; }
}

/* Hero — tighter on mobile */
@media (max-width: 720px) {
  .hero { padding: 56px 0 70px; }
  .hero__logo { width: min(280px, 80%); margin-bottom: 22px; }
  .hero__tagline { font-size: 18px; margin-bottom: 36px; }
  .hero__stats strong { font-size: 26px; }
  .hero__stats > div { padding: 16px 8px; }
  .hero__stats span { font-size: 10px; letter-spacing: 0.16em; }
}
@media (max-width: 360px) {
  .hero__stats strong { font-size: 22px; }
}

/* Hero CTA — bigger touch target */
@media (max-width: 720px) {
  .hero__cta { padding: 14px 26px; font-size: 13px; letter-spacing: 0.14em; }
  /* Disable letter-spacing expansion on touch — it jitters */
  .hero__cta:hover { letter-spacing: 0.14em; padding-left: 26px; padding-right: 26px; }
}

/* Section title tighter on mobile */
@media (max-width: 720px) {
  .section__title { margin-bottom: 24px; }
  .lead { font-size: 18px; margin-bottom: 32px; }
  .lead-paragraph { font-size: 19px !important; }
  .dropcap { font-size: 64px; padding: 4px 10px 0 0; }
}

/* Two-column gap tighter on mobile */
@media (max-width: 720px) {
  .two-col { gap: 32px; }
}

/* Card / monastery / feature — comfier padding on mobile */
@media (max-width: 720px) {
  .card { padding: 24px 22px; }
  .card h3 { font-size: 22px; }
  .monastery { padding: 30px 24px; }
  .monastery h3 { font-size: 28px; }
  .feature { padding: 26px 20px; }
  .feature h3 { font-size: 24px; }
  .t-item { padding: 26px 22px; }
  .t-item h3 { font-size: 24px; }
  .article__h2 { font-size: 26px; margin-top: 48px; }
  .rod { padding: 24px 22px; }
  .rod h3, .rod__name { font-size: 22px; }
  .rod p .surname { font-size: 1.1em; }
}

/* Callout — stack on small screens */
@media (max-width: 560px) {
  .callout {
    flex-direction: column;
    gap: 10px;
    padding: 22px 24px;
  }
  .callout__icon { font-size: 28px; }
}

/* Gallery — 2 cols on tablet, 1 col on phone */
@media (max-width: 900px) {
  .gallery--3 { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .gallery--2 { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}
@media (max-width: 560px) {
  .gallery--3, .gallery--2 { grid-template-columns: 1fr; gap: 16px; }
}

/* Gallery thumbnails — shorter on phones */
@media (max-width: 900px) {
  .frame img { height: 240px; }
}
@media (max-width: 560px) {
  .frame img { height: 280px; }
}

/* Gallery group head margin on mobile */
@media (max-width: 720px) {
  .gallery-group { margin-bottom: 56px; }
  .gallery-group__head h2 { font-size: 26px; }
  .gallery-group__head p { font-size: 16px; }
}

/* Form inputs — 16px on mobile prevents iOS auto-zoom */
@media (max-width: 720px) {
  .contact-form input,
  .contact-form select,
  .contact-form textarea {
    font-size: 16px;
    padding: 14px 14px;
  }
  .form-btn { padding: 16px 24px; font-size: 13px; letter-spacing: 0.14em; }
  .form-btn:hover { letter-spacing: 0.14em; }
}

/* Map — square on phones, taller on small tablets */
@media (max-width: 560px) {
  .map { aspect-ratio: 1 / 1; }
  .neighbors { grid-template-columns: 1fr; }
}

/* Nav touch targets bigger on mobile */
@media (max-width: 820px) {
  .nav__links a {
    padding: 8px 2px;
    font-size: 13.5px;
  }
  .nav__inner { padding-top: 10px; padding-bottom: 10px; }
}

/* Hero CTA — no animation jitter on touch */
@media (hover: none) {
  .hero__cta:hover {
    background: var(--forest-deep);
    transform: none;
    letter-spacing: 0.16em;
    padding-left: 30px;
    padding-right: 30px;
  }
  .t-item:hover,
  .monastery:hover,
  .feature:hover .feature__icon,
  .frame:hover {
    transform: none;
  }
}

/* Footer — friendlier on mobile */
@media (max-width: 720px) {
  .footer { padding: 40px 0 28px; }
  .footer__brand { flex-direction: column; gap: 10px; text-align: center; }
  .footer__brand img { height: 50px; }
  .footer__brand p { font-size: 18px; }
  .footer__meta p { font-size: 13px; }
}

/* Quote — smaller on mobile */
@media (max-width: 560px) {
  .quote { padding: 22px 26px 22px 30px; font-size: 18px; }
  .quote::before { font-size: 48px; left: 10px; top: 4px; }
}

/* Article body — comfier on mobile */
@media (max-width: 720px) {
  .article-body p { font-size: 17px; line-height: 1.75; }
  .article-body { padding: 50px 0 70px; }
  .article__title { font-size: clamp(34px, 8vw, 48px); }
  .rod__list { font-size: 16px !important; padding: 14px 16px; }
}

/* Hide hero entry ornament on very small screens (saves vertical space) */
@media (max-width: 480px) {
  .hero__inner::after { display: none; }
}

/* Better focus rings for keyboard nav */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gilt);
  outline-offset: 2px;
  border-radius: 3px;
}
.contact-form input:focus-visible,
.contact-form select:focus-visible,
.contact-form textarea:focus-visible {
  outline-offset: 0;
}

/* Smoother image aspect on lightbox */
.lightbox__img {
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Polish: section eyebrow spacing on mobile */
@media (max-width: 720px) {
  .section__eyebrow { font-size: 11.5px; letter-spacing: 0.28em; padding-left: 18px; }
  .section__eyebrow::before { font-size: 10px; }
}

/* ==========================================================================
   PRODUCTION POLISH — final pass
   ========================================================================== */

/* Skip-to-content for screen readers / keyboard */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--bg);
  padding: 12px 20px;
  text-decoration: none;
  font-family: var(--sans);
  font-size: 14px;
  border-radius: 0 0 6px 0;
  transition: top .2s ease;
}
.skip-link:focus {
  top: 0;
  outline: none;
}

/* Image decoding & loading polish */
img { content-visibility: auto; }

/* Smooth scrolling but only when no user pref against it */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* Better tap highlighting on iOS */
a, button { -webkit-tap-highlight-color: oklch(40% 0.095 25 / 0.15); }

/* Selection styling */
::selection {
  background: oklch(68% 0.115 75 / 0.45);
  color: var(--ink);
}

/* Better font rendering on Windows */
@supports (-webkit-text-stroke: 0) {
  body { -webkit-text-stroke: 0.01em transparent; }
}

/* Hero — better balance on small screens */
@media (max-width: 480px) {
  .hero { padding: 48px 0 64px; }
  .hero__logo { width: min(240px, 75%); margin-bottom: 18px; }
  .hero__tagline { font-size: 17px; line-height: 1.5; margin-bottom: 30px; }
  .hero__stats { margin-bottom: 36px; }
  .hero__stats strong { font-size: 22px; }
  .hero__stats > div { padding: 14px 6px; }
  .hero__stats span { font-size: 9.5px; letter-spacing: 0.14em; }
  .hero__cta { padding: 12px 24px; font-size: 12px; }
}

/* Tablet: ensure two-column layouts breathe */
@media (min-width: 760px) and (max-width: 1000px) {
  .two-col { gap: 44px; }
  .gallery--3 { grid-template-columns: repeat(2, 1fr); }
}

/* Lightbox — proper mobile sizing using dvh */
.lightbox {
  height: 100vh;
  height: 100dvh;
}
.lightbox__img {
  max-height: 80vh;
  max-height: 75dvh;
}
@media (max-width: 720px) {
  .lightbox__caption { font-size: 14px; padding: 0 16px; }
  .lightbox__figure { gap: 12px; }
}

/* Form polish — better disabled state + invalid feedback */
.contact-form input:user-invalid:not(:focus),
.contact-form select:user-invalid:not(:focus),
.contact-form textarea:user-invalid:not(:focus) {
  border-color: oklch(50% 0.12 25);
}

/* Better placeholder color on form */
.contact-form ::placeholder {
  color: oklch(55% 0.020 70);
  opacity: 1;
}

/* Frame click affordance */
.gallery .frame:not(.frame--placeholder) {
  cursor: zoom-in;
}
.gallery .frame:not(.frame--placeholder):focus-visible {
  outline: 2px solid var(--gilt);
  outline-offset: 4px;
}

/* Map link tap target */
.map__link { display: inline-block; padding: 6px 2px; }

/* Mobile: more breathing room in cards */
@media (max-width: 480px) {
  .card { padding: 22px 18px; }
  .monastery { padding: 24px 20px; }
  .feature { padding: 22px 16px; }
  .t-item { padding: 22px 18px; }
  .rod { padding: 22px 20px; }
}

/* Mobile: stop text from getting too small */
@media (max-width: 480px) {
  .article-body p { font-size: 16.5px; }
  .lead-paragraph { font-size: 18px !important; }
  .rod p { font-size: 16px !important; }
  .rod__name { font-size: 21px !important; }
  .rod p .surname { font-size: 1.05em; }
}

/* Single column rod grid below 760px is enough — at 480 increase gap */
@media (max-width: 760px) {
  .rod-grid { column-gap: 0; }
  .rod-grid .rod { margin-bottom: 16px; }
}

/* Map iframe — better mobile aspect */
@media (max-width: 480px) {
  .map { aspect-ratio: 4 / 3; }
}

/* Footer: tighten on very narrow */
@media (max-width: 480px) {
  .footer { padding: 32px 0 24px; }
  .footer__brand img { height: 44px; }
  .footer__brand p { font-size: 16px; }
  .footer__meta p { font-size: 12.5px; }
}

/* Print styles — friendly hard copy */
@media print {
  .nav, .footer, .lightbox, .hero__cta, .contact-form, .map, .map__link, .neighbors,
  .hero__bg, .upload-note { display: none !important; }
  body { background: white; color: black; font-size: 12pt; }
  .section { padding: 16pt 0 !important; }
  .container { max-width: 100% !important; padding: 0 !important; }
  .hero { padding: 0 0 16pt !important; text-align: left; }
  .hero__logo { width: 120pt; margin: 0 0 12pt; }
  .section__title, .article__title, .hero h1, h2, h3 { color: black !important; }
  a { color: black; text-decoration: underline; }
  .frame img { max-height: 200pt; }
  .gallery { grid-template-columns: repeat(2, 1fr) !important; }
  .timeline, .grid--2, .grid--3, .rod-grid { display: block !important; }
  .t-item, .monastery, .feature, .rod { break-inside: avoid; page-break-inside: avoid; margin-bottom: 12pt; }
  .lead-paragraph { font-size: 13pt !important; }
  .article-body p { font-size: 11pt !important; line-height: 1.5 !important; }
  .section--dark, .section--alt { background: transparent !important; color: black !important; }
  .section--dark *, .section--alt * { color: black !important; }
}

/* Hide scrollbar on horizontal nav scroll (mobile) */
.nav__links { scrollbar-color: transparent transparent; }

/* Ensure body never has horizontal overflow */
html, body { overflow-x: hidden; }

/* Form submit button — match design language fully */
.form-btn {
  font-family: var(--sans);
  text-shadow: 0 1px 0 oklch(75% 0.080 75 / 0.4);
}

/* Subtle paper-grain on cards (production touch) */
.card, .monastery, .t-item, .rod, .frame {
  position: relative;
}

/* Improve image quality hints */
.frame img, .hero__logo, .nav__brand img, .footer__brand img {
  image-rendering: -webkit-optimize-contrast;
}

/* Stop hero logo from being clipped at the top on small screens */
@media (max-width: 360px) {
  .hero { padding-top: 40px; }
  .hero__logo { width: min(220px, 85%); }
  .hero__stats strong { font-size: 20px; }
}
