/* =========================================================================
   Молитва Онлайн — a candle in a dark church: warm parchment, deep charcoal,
   and the gold of a flame carried over from the original brand (#fac952).
   ========================================================================= */

:root {
  --ink:        #1e1913;
  --ink-soft:   #4b4137;
  --muted:      #7d7165;
  --paper:      #fcf9f4;
  --paper-2:    #f5efe4;
  --paper-3:    #efe7d8;
  --line:       #e4dac7;

  --gold:       #b58a26;   /* readable on parchment */
  --gold-warm:  #fac952;   /* the original brand flame */
  --gold-deep:  #8a6716;

  --dark:       #17120d;
  --dark-2:     #221b13;
  --dark-3:     #2f261b;
  --on-dark:    #f3ece0;
  --on-dark-dim:#b9ad9b;

  --radius:   14px;
  --radius-s: 10px;
  --shadow:   0 1px 2px rgba(30,25,19,.05), 0 8px 24px -12px rgba(30,25,19,.18);
  --shadow-lg:0 2px 4px rgba(30,25,19,.06), 0 24px 48px -20px rgba(30,25,19,.28);

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Mulish", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  --measure: 68ch;
  --gap: clamp(1rem, 2.5vw, 1.75rem);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 clamp(1rem, .96rem + .18vw, 1.075rem)/1.72 var(--sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg, iframe { max-width: 100%; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -.005em;
  margin: 0;
  text-wrap: balance;
}

.wrap { width: min(100% - 2.5rem, 1180px); margin-inline: auto; }

.icon { width: 24px; height: 24px; flex: none; }
.icon-sm { width: 18px; height: 18px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--gold-warm); color: var(--dark);
  padding: .7rem 1.1rem; border-radius: 0 0 var(--radius-s) 0; font-weight: 700;
}
.skip:focus { left: 0; }

:where(a, button, input, [tabindex]):focus-visible {
  outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px;
}

/* ------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .78rem 1.35rem;
  border: 1px solid transparent; border-radius: 999px;
  font: 700 .95rem/1 var(--sans);
  text-decoration: none; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease;
}
.btn .icon { width: 19px; height: 19px; }
.btn-lg { padding: .95rem 1.7rem; font-size: 1rem; }

.btn-gold {
  background: linear-gradient(180deg, var(--gold-warm), #efb437);
  color: #2a1f08;
  box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 10px 22px -12px rgba(190,140,30,.9);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 16px 28px -14px rgba(190,140,30,1); }
.btn-gold:active { transform: translateY(0); }

.btn-ghost { background: transparent; color: var(--on-dark); border-color: rgba(243,236,224,.32); }
.btn-ghost:hover { border-color: rgba(243,236,224,.6); background: rgba(243,236,224,.07); }

/* -------------------------------------------------------------- header */

.site-head {
  position: sticky; top: 0; z-index: 40;
  /* Deeper than the panel tone and matched to the top bar, so the hero
     photo behind it cannot wash the bar out through the blur. */
  background: color-mix(in srgb, var(--dark) 97%, transparent);
  backdrop-filter: blur(10px);
  color: var(--on-dark);
  border-bottom: 1px solid rgba(243,236,224,.1);
}
.head-in { display: flex; align-items: center; gap: var(--gap); min-height: 76px; }

.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; margin-right: auto; }
.brand-mark { color: var(--gold-warm); display: grid; place-items: center; flex: none; }
.mark { width: 38px; height: 38px; }
.brand-text { display: grid; line-height: 1.2; min-width: 0; }
.brand-text b { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; letter-spacing: .01em; }
.brand-text i { font-style: normal; font-size: .74rem; color: var(--on-dark-dim); }

/* three top-level items only; the ten services live in a panel */
.nav-main { list-style: none; display: flex; align-items: center; gap: .2rem; margin: 0; padding: 0; }
.nav-main > li { position: static; }
.nav { position: relative; }
.nav-main > li > a, .sub-btn {
  display: flex; align-items: center; gap: .4rem;
  padding: .6rem .9rem; border-radius: 999px;
  background: transparent; border: 0; cursor: pointer;
  color: var(--on-dark-dim); text-decoration: none;
  font: 500 .95rem/1 var(--sans); white-space: nowrap;
  transition: color .16s ease, background-color .16s ease;
}
.nav-main > li > a:hover, .sub-btn:hover { color: var(--on-dark); background: rgba(243,236,224,.08); }
.nav-main > li > a[aria-current], .sub-btn[data-current] { color: var(--gold-warm); }
.chev { transition: rotate .2s ease; }
.sub-btn[aria-expanded="true"] .chev { rotate: 180deg; }

/* the services panel */
.sub {
  /* Anchored to the right of the nav, not centred on the button, so a
     720px panel can never run past the edge of a narrow desktop. */
  position: absolute; top: calc(100% + .7rem); right: 0; left: auto;
  width: min(calc(100vw - 3rem), 720px); padding: .7rem;
  background: var(--dark-2); border: 1px solid rgba(243,236,224,.14);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; translate: 0 8px;
  transition: opacity .18s ease, translate .18s ease, visibility .18s;
}
.sub[data-open] { opacity: 1; visibility: visible; translate: 0 0; }
.sub-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; grid-template-columns: 1fr 1fr; }
.sub-grid a {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .7rem; align-items: center;
  white-space: normal;
  padding: .6rem .7rem; border-radius: var(--radius-s);
  text-decoration: none; color: var(--on-dark-dim);
  transition: background-color .16s ease;
}
.sub-grid a:hover { background: rgba(243,236,224,.08); }
.sub-icon {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px;
  color: var(--gold-warm);
  background: rgba(250,201,82,.12); border: 1px solid rgba(250,201,82,.2);
}
.sub-text { display: grid; gap: .1rem; min-width: 0; }
.sub-text b { color: var(--on-dark); font-size: .93rem; font-weight: 700; white-space: normal; }
.sub-text i {
  font-style: normal; font-size: .78rem; color: var(--on-dark-dim); line-height: 1.45;
  white-space: normal; overflow-wrap: anywhere;
}
.sub-grid a[aria-current] .sub-text b { color: var(--gold-warm); }

.lang {
  display: flex; align-items: center; gap: .1rem;
  padding: .2rem; border-radius: 999px;
  border: 1px solid rgba(243,236,224,.18);
}
.lang-item {
  display: grid; place-items: center; min-width: 34px;
  padding: .34rem .5rem; border-radius: 999px;
  font: 700 .8rem/1 var(--sans); text-transform: uppercase; letter-spacing: .04em;
  color: var(--on-dark-dim); text-decoration: none;
  transition: color .16s ease, background-color .16s ease;
}
a.lang-item:hover { color: var(--on-dark); background: rgba(243,236,224,.1); }
.lang-item.is-on { color: #2a1f08; background: var(--gold-warm); }
.lang-item.is-off { opacity: .38; cursor: not-allowed; }

.nav-burger {
  display: none; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 999px;
  background: transparent; color: inherit;
  border: 1px solid rgba(243,236,224,.28); cursor: pointer;
}

@media (max-width: 1020px) {
  /* The menu drops onto its own row, so the bar must be allowed to wrap —
     without this it stays inline and squeezes the logo and the button. */
  .head-in { flex-wrap: wrap; }
  .lang {
  display: flex; align-items: center; gap: .1rem;
  padding: .2rem; border-radius: 999px;
  border: 1px solid rgba(243,236,224,.18);
}
.lang-item {
  display: grid; place-items: center; min-width: 34px;
  padding: .34rem .5rem; border-radius: 999px;
  font: 700 .8rem/1 var(--sans); text-transform: uppercase; letter-spacing: .04em;
  color: var(--on-dark-dim); text-decoration: none;
  transition: color .16s ease, background-color .16s ease;
}
a.lang-item:hover { color: var(--on-dark); background: rgba(243,236,224,.1); }
.lang-item.is-on { color: #2a1f08; background: var(--gold-warm); }
.lang-item.is-off { opacity: .38; cursor: not-allowed; }

.nav-burger { display: inline-flex; order: 3; }
  .head-cta { order: 2; }
  .nav {
    order: 4; flex-basis: 100%;
    display: grid; grid-template-rows: 0fr;
    transition: grid-template-rows .22s ease;
  }
  .nav[data-open] { grid-template-rows: 1fr; }
  .nav > .nav-main { overflow: hidden; min-height: 0; }
  .nav-main { flex-direction: column; align-items: stretch; gap: .1rem; padding-bottom: 0; }
  .nav[data-open] > .nav-main { padding-bottom: .9rem; }
  .has-sub { position: static; }
  .nav-main a, .sub-btn { width: 100%; justify-content: flex-start; padding: .75rem .9rem; border-radius: var(--radius-s); }
  .sub-btn { justify-content: space-between; }
  .sub {
    position: static; translate: none; width: auto; padding: 0;
    background: transparent; border: 0; box-shadow: none;
    display: grid; grid-template-rows: 0fr;
    opacity: 1; visibility: visible;
    transition: grid-template-rows .22s ease;
  }
  .sub[data-open] { grid-template-rows: 1fr; translate: none; padding: .25rem 0 .5rem; }
  .sub > .sub-grid { overflow: hidden; min-height: 0; grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .head-in { gap: .5rem; min-height: 66px; }
  .lang-item { min-width: 28px; padding: .3rem .35rem; font-size: .74rem; }
  .head-cta span { display: none; }
  .head-cta { padding: .7rem .9rem; }
  .brand-text i { display: none; }
  .brand-text b { font-size: 1.08rem; }
  .brand { gap: .55rem; }
  .mark { width: 32px; height: 32px; }
}

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative; isolation: isolate; overflow: hidden;
  color: var(--on-dark);
  padding: clamp(3.2rem, 8vw, 6rem) 0 clamp(3rem, 7vw, 5.5rem);
  /* The service photo sits under a veil that is heaviest behind the text
     column and lifts towards the edges, so the church still reads. */
  background-image:
    radial-gradient(120% 90% at 50% 45%,
      rgba(14,10,6,.86) 0%, rgba(14,10,6,.72) 45%, rgba(14,10,6,.55) 100%),
    url("/assets/img/hero.webp");
  background-size: cover;
  background-position: center 38%;
  background-repeat: no-repeat;
}
.hero-in { text-shadow: 0 1px 16px rgba(10,7,4,.8), 0 1px 3px rgba(10,7,4,.6); }
.hero-glow {
  position: absolute; inset: -30% 0 auto 50%; translate: -50% 0;
  width: min(900px, 120%); aspect-ratio: 1;
  background: radial-gradient(circle, rgba(250,201,82,.2), rgba(250,201,82,.05) 42%, transparent 68%);
  z-index: -1; pointer-events: none;
}
.hero-in { max-width: 56rem; margin-inline: auto; text-align: center; }
.hero h1 { font-size: clamp(2.1rem, 1.4rem + 3.1vw, 3.9rem); }
.hero-home h1 { font-size: clamp(2.3rem, 1.4rem + 3.6vw, 4.3rem); }
.hero-lead {
  margin: 1.35rem auto 0; max-width: var(--measure);
  color: var(--on-dark-dim); font-size: clamp(1.02rem, .98rem + .3vw, 1.2rem); line-height: 1.75;
}
.hero-lead strong { color: var(--on-dark); font-weight: 700; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; margin-top: 2.1rem; }

/* ------------------------------------------------------------ services */

.services { padding: clamp(3rem, 7vw, 5rem) 0; background: var(--paper-2); }
.section-title {
  font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.5rem);
  margin-bottom: 2rem; text-align: center; padding-bottom: .7rem;
}
.section-title::after {
  content: ""; display: block; width: 60px; height: 3px; margin: .7rem auto 0;
  border-radius: 3px; background: linear-gradient(90deg, var(--gold-warm), var(--gold-deep));
}
.card-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: var(--gap);
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
}
/* Ten services read best as two rows of five. Every section keeps the same
   container width so their left edges line up down the page. */
@media (min-width: 1100px) { .card-grid { grid-template-columns: repeat(5, 1fr); } }
.card {
  display: grid; gap: .5rem; height: 100%; padding: 1.4rem 1.15rem 1.2rem;
  grid-template-rows: auto auto 1fr auto;   /* keeps the arrow on the baseline */
  justify-items: center; text-align: center;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  text-decoration: none; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.card-icon {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--gold-warm) 26%, transparent), transparent);
  color: var(--gold-deep); border: 1px solid color-mix(in srgb, var(--gold) 28%, transparent);
}
.card h3 { font-size: 1.16rem; line-height: 1.25; }
.card p { margin: 0; color: var(--muted); font-size: .875rem; line-height: 1.55; }
.card-go { color: var(--gold); align-self: end; transition: translate .2s ease; }
.card:hover .card-go { translate: 4px 0; }

/* ------------------------------------------------ about / how / faq */

.kicker {
  margin: 0 0 .5rem; text-align: center;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold-deep);
}

.about {
  position: relative; isolation: isolate; overflow: hidden;
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  color: var(--on-dark);
}
/* The cathedral stays visible: the veil is concentrated behind the text
   column and thins out towards the edges, where the towers show through. */
.about-bg {
  position: absolute; inset: 0; z-index: -1;
  background-image:
    radial-gradient(115% 85% at 50% 48%,
      rgba(14,10,6,.70) 0%, rgba(14,10,6,.50) 42%, rgba(14,10,6,.26) 72%, rgba(14,10,6,.22) 100%),
    url("/assets/img/kafedralni-sobor.webp");
  background-size: cover;
  background-position: center 42%;
}
@media (max-width: 800px) {
  .about-bg {
    background-image:
      radial-gradient(130% 80% at 50% 48%,
        rgba(14,10,6,.76) 0%, rgba(14,10,6,.58) 45%, rgba(14,10,6,.36) 100%),
      url("/assets/img/kafedralni-sobor-760.webp");
  }
}
.about-in {
  max-width: 62rem; margin-inline: auto; text-align: center;
  text-shadow: 0 1px 14px rgba(10,7,4,.75), 0 1px 3px rgba(10,7,4,.5);
}
.about .kicker { color: var(--gold-warm); }
.about .section-title { color: var(--on-dark); }
.about .section-title::after { background: linear-gradient(90deg, var(--gold-warm), var(--gold-deep)); }
.about-lead {
  margin: 0 auto 1.4rem; max-width: 58ch;
  font-size: clamp(1.02rem, .98rem + .28vw, 1.16rem);
  line-height: 1.75; color: var(--on-dark);
}
.about-history {
  margin: 0 auto; max-width: 68ch;
  color: rgba(243,236,224,.88); font-size: .97rem; line-height: 1.8;
}

/* --- how it works --- */

.how { padding: clamp(3rem, 7vw, 5rem) 0; }
.step-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
}
/* Four across, so the arrows between steps always read left to right. */
@media (min-width: 1000px) { .step-grid { grid-template-columns: repeat(4, 1fr); } }
.step {
  position: relative; display: grid; gap: .5rem;
  justify-items: center; text-align: center;
  padding: 2.1rem 1.2rem 1.5rem;
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius);
}
.step-num {
  position: absolute; top: -.85rem; left: 50%; translate: -50% 0;
  width: 34px; height: 34px; display: grid; place-items: center;
  font: 700 .92rem/1 var(--sans); color: #2a1f08;
  background: linear-gradient(180deg, var(--gold-warm), #efb437);
  border-radius: 50%; box-shadow: 0 6px 14px -8px rgba(190,140,30,.9);
}
.step-icon {
  width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%;
  color: var(--gold-deep); margin-bottom: .35rem;
  background: linear-gradient(160deg, color-mix(in srgb, var(--gold-warm) 24%, transparent), transparent);
  border: 1px solid color-mix(in srgb, var(--gold) 26%, transparent);
}
.step-icon .icon { width: 34px; height: 34px; stroke-width: 1.4; }

/* A chevron in the gap between steps, pointing to the next one. */
@media (min-width: 1000px) {
  .step:not(:last-child)::after {
    content: ""; position: absolute; z-index: 1;
    top: 50%; right: calc(var(--gap) / -2);
    width: 11px; height: 11px;
    translate: 50% -50%; rotate: 45deg;
    border-top: 2px solid var(--gold);
    border-right: 2px solid var(--gold);
    border-radius: 1px;
  }
}
.step h3 {
  font-size: 1.16rem; line-height: 1.3;
  /* two lines reserved so the body copy starts level across steps */
  min-height: 2.6em; display: flex; align-items: center;
}
.step p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.6; }

/* --- faq --- */

.faq { padding: clamp(3rem, 7vw, 5rem) 0 clamp(3.5rem, 8vw, 5.5rem); }
.faq-list { max-width: 46rem; margin-inline: auto; display: grid; gap: .7rem; }
.faq-item {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.05rem 1.25rem; cursor: pointer; list-style: none;
  font-family: var(--serif); font-size: 1.16rem; font-weight: 600; color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--gold-deep); }
.faq-chev { color: var(--gold); flex: none; transition: rotate .2s ease; }
.faq-item[open] .faq-chev { rotate: 180deg; }
.faq-a { padding: 0 1.25rem 1.2rem; }
.faq-a p { margin: 0; color: var(--ink-soft); font-size: .97rem; line-height: 1.7; }

/* ------------------------------------------------------- lit candles rail */

.candles {
  padding: clamp(3rem, 7vw, 5rem) 0;
  background: var(--paper-2);
  border-top: 1px solid var(--line);
}
.candles-lead {
  margin: -1rem auto 2.2rem; max-width: 56ch;
  text-align: center; color: var(--muted);
}

.candles-rail { position: relative; }

.candles-track {
  list-style: none; margin: 0; padding: .35rem .25rem 1rem;
  display: flex; gap: var(--gap);
  overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-padding-inline: .25rem;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.candles-track::-webkit-scrollbar { display: none; }

.candle { flex: 0 0 clamp(210px, 24vw, 268px); scroll-snap-align: start; }
.candle figure {
  margin: 0; height: 100%;
  display: grid; grid-template-rows: auto 1fr;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.candle img {
  display: block; width: 100%; height: auto; aspect-ratio: 3 / 4;
  object-fit: cover; background: var(--paper-3);
}
.candle figcaption {
  display: grid; gap: .2rem; padding: .95rem 1rem 1.05rem; text-align: center;
}
.candle figcaption b {
  font-size: .96rem; line-height: 1.35; color: var(--ink);
  /* two lines reserved so names and dates line up across the rail */
  min-height: 2.7em; display: flex; align-items: center; justify-content: center;
}
.candle-who {
  font-family: var(--serif); font-size: 1.12rem; font-weight: 600; color: var(--gold-deep);
}
.candle time { font-size: .8rem; color: var(--muted); }

.rail-btn {
  position: absolute; top: calc(50% - 2.2rem); z-index: 2;
  width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--paper); color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 50%;
  box-shadow: var(--shadow); cursor: pointer;
  transition: background-color .16s ease, color .16s ease, opacity .16s ease;
}
.rail-btn:hover { background: var(--paper-3); color: var(--ink); }
.rail-btn[disabled] { opacity: 0; pointer-events: none; }
.rail-prev { left: -14px; }
.rail-next { right: -14px; }
.chev-left  { rotate: 90deg; }
.chev-right { rotate: -90deg; }

@media (max-width: 900px) {
  .rail-prev, .rail-next { display: none; }
  .candles-track { padding-inline: .25rem; scroll-padding-inline: .25rem; }
}

/* --------------------------------------------------------------- prose */

.prose-wrap { padding: clamp(3rem, 7vw, 5rem) 0; }
.prose { max-width: var(--measure); margin-inline: auto; }
.prose > * + * { margin-top: 1.15rem; }
.prose h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
  margin-top: 2.6rem; padding-left: 1rem; position: relative;
}
.prose h2::before {
  content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 3px;
  border-radius: 3px; background: linear-gradient(180deg, var(--gold-warm), var(--gold-deep));
}
.prose h3 { font-size: clamp(1.28rem, 1.1rem + .7vw, 1.6rem); margin-top: 2rem; }
.prose h4 { font-size: 1.18rem; margin-top: 1.6rem; }
.prose p { color: var(--ink-soft); }
.prose strong { color: var(--ink); font-weight: 700; }
.prose a { color: var(--gold-deep); text-underline-offset: .18em; }

.ticks { list-style: none; margin: 1.3rem 0 0; padding: 0; display: grid; gap: .7rem; }
.ticks li { display: grid; grid-template-columns: auto 1fr; gap: .7rem; align-items: start; color: var(--ink-soft); }
.ticks .icon { color: var(--gold-deep); margin-top: .34em; }

.cta-row { margin-top: 1.9rem; text-align: center; }

.embed { margin-top: 1.9rem; display: flex; justify-content: center; }
.embed iframe {
  width: 100%; max-width: 380px; height: 470px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper); box-shadow: var(--shadow);
}

/* -------------------------------------------------------------- footer */

.site-foot { background: var(--dark); color: var(--on-dark-dim); padding: clamp(2.8rem, 6vw, 4rem) 0 0; }
.foot-in { display: grid; gap: clamp(1.6rem, 4vw, 2.6rem); grid-template-columns: 1.5fr 1fr 1fr 1.2fr; }
@media (max-width: 900px) { .foot-in { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) {
  .foot-in { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  /* the brand box is as wide as its paragraph, so the logo row needs
     centring inside it, not just the box itself */
  .foot-brand-row { justify-content: center; }
  .foot-brand p { margin-inline: auto; }
  .foot-col ul { justify-items: center; }
  .foot-contact p { justify-content: center; }
  .foot-base { text-align: center; }
}
.foot-brand-row { display: flex; align-items: center; gap: .6rem; }
.foot-brand .brand-mark { color: var(--gold-warm); display: grid; flex: none; }
.foot-brand .mark { width: 32px; height: 32px; }
.foot-brand b { font-family: var(--serif); font-size: 1.35rem; color: var(--on-dark); }
.foot-brand p { margin: .7rem 0 0; font-size: .9rem; max-width: 34ch; line-height: 1.65; }
.foot-col h3, .foot-contact h3 { font-family: var(--sans); font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-warm); }
.foot-col ul { list-style: none; margin: .9rem 0 0; padding: 0; display: grid; gap: .55rem; }
.foot-col a { text-decoration: none; font-size: .92rem; transition: color .16s ease; }
.foot-col a:hover { color: var(--on-dark); }
.foot-contact p { display: flex; align-items: center; gap: .55rem; margin: .9rem 0 0; font-size: .92rem; }
.foot-contact .icon { color: var(--gold-warm); }
.foot-contact a { color: var(--on-dark); text-decoration: none; }
.foot-contact a:hover { text-decoration: underline; }
.foot-base { margin-top: 2.4rem; padding: 1.2rem 0 1.6rem; border-top: 1px solid rgba(243,236,224,.12); }
.foot-base p { margin: 0; font-size: .84rem; }

/* --------------------------------------------------------------- modal */

.modal {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: start center;
  padding: 4.25rem 1.25rem 1.25rem;   /* room for the close button */
  overflow-y: auto;                    /* the overlay scrolls, not the frame */
  overscroll-behavior: contain;
}
.modal[hidden] { display: none; }
/* Fixed, not absolute: the overlay scrolls with a tall form, and an
   absolute backdrop would scroll away with it and expose the page. */
.modal-back { position: fixed; inset: 0; background: rgba(15,11,7,.72); backdrop-filter: blur(3px); }
/* No panel around the form — just the embed itself over the backdrop. */
.modal-box {
  position: relative;
  width: min(100%, 380px);
  background: none; border: 0; box-shadow: none; padding: 0;
}
.modal-box iframe {
  /* No viewport cap: the frame gets the height its form needs and the
     overlay scrolls. JS trims this down if the embed reports its size. */
  width: 100%; height: 1040px; border: 0; display: block;
  border-radius: var(--radius-s);
}
.modal-x {
  position: fixed; top: 1rem; right: 1rem;
  width: 40px; height: 40px; display: grid; place-items: center;
  background: rgba(243,236,224,.12); color: var(--on-dark);
  border: 1px solid rgba(243,236,224,.28); border-radius: 50%;
  cursor: pointer; backdrop-filter: blur(4px);
  transition: background-color .16s ease;
}
.modal-x:hover { background: rgba(243,236,224,.24); }
body.modal-open { overflow: hidden; }

/* ----------------------------------------------------------- dark mode */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f2ebdf; --ink-soft: #cdc2b1; --muted: #9b8f7e;
    --paper: #14100c; --paper-2: #1b1610; --paper-3: #221b14; --line: #362c20;
    --gold: #dcb24f; --gold-deep: #f0c465;
    --dark: #0f0c08; --dark-2: #171208; --dark-3: #241c12;
    --shadow: 0 1px 2px rgba(0,0,0,.5), 0 8px 24px -12px rgba(0,0,0,.7);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.5), 0 24px 48px -20px rgba(0,0,0,.8);
  }
  :root:not([data-theme="light"]) .card-icon { color: var(--gold-deep); }
  :root:not([data-theme="light"]) .form-note.ok { color: #7fca86; }
  :root:not([data-theme="light"]) .form-note.bad { color: #f0a184; }
}

/* -------------------------------------------------------------- print */

@media print {
  .site-head, .hero-actions, .modal, .card-go { display: none !important; }
  .hero { background: none; color: #000; padding: 0 0 1rem; }
  body { background: #fff; }
}
