/* =========================================================
   ეკლესიების სარესტავრაციო ფონდი — styles
   ღია/ქვიშისფერი + ოქრო + მელნისფერი; ნაზი ქართული ორნამენტები
   ========================================================= */

:root {
  --parchment: #F6F1E7;
  --parchment-2: #FBF8F1;
  --stone: #EBE3D3;
  --ink: #2B2622;
  --ink-soft: #4A433C;
  --muted: #847A6C;
  --gold: #B08D4F;
  --gold-deep: #927238;
  --gold-soft: #D8C39A;
  --line: rgba(43, 38, 34, 0.12);
  --line-gold: rgba(176, 141, 79, 0.32);

  --maxw: 1140px;
  --pad: clamp(20px, 5vw, 48px);
  --r: 4px;

  --serif: "Cormorant Garamond", "Noto Serif", Georgia, serif;
  --display: "Marcellus", "Cormorant Garamond", Georgia, serif;
  --geo: "Noto Sans Georgian", "Noto Serif", system-ui, sans-serif;
  --cyr: "Noto Serif", "Noto Sans Georgian", system-ui, serif;

  /* ნაგულისხმევი ფონტი (ka) — გადაიწერება lang კლასებით */
  --font-body: var(--geo);
  --font-head: var(--geo);
}

/* ფონტი სკრიპტის მიხედვით */
html.lang-en { --font-body: var(--serif); --font-head: var(--display); }
html.lang-ru { --font-body: var(--cyr);   --font-head: var(--cyr); }
html.lang-ka { --font-body: var(--geo);   --font-head: var(--geo); }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 50% -200px, rgba(216,195,154,0.25), transparent 60%),
    var(--parchment);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ლათინური ფრაგმენტები (IBAN, email, რიცხვები) ka/ru რეჟიმშიც სუფთად */
.lat { font-family: var(--serif); font-feature-settings: "lnum" 1; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }

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

a { color: inherit; text-decoration: none; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.18; color: var(--ink); margin: 0; letter-spacing: .2px; }

/* =================== Kicker / typography helpers =================== */
.kicker {
  font-size: .78rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 .9rem;
  font-weight: 600;
}
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 56ch; }

/* =================== Header =================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246,241,231,0.82);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s, box-shadow .3s;
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px -18px rgba(43,38,34,.5);
}
.header-inner { display: flex; align-items: center; gap: 18px; min-height: 70px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; min-width: 0; }
.brand-mark { width: 22px; height: 22px; color: var(--gold); flex: none; }
.brand-name {
  font-family: var(--display);
  font-size: .94rem; letter-spacing: .03em; line-height: 1.2; color: var(--ink);
  max-width: 32ch;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
html.lang-ka .brand-name { font-family: var(--geo); font-weight: 600; font-size: .9rem; }

.nav { display: flex; gap: 26px; align-items: center; }
.nav a {
  font-size: .92rem; color: var(--ink-soft); position: relative; padding: 6px 0;
  transition: color .2s;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px;
  background: var(--gold); transition: right .25s ease;
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { right: 0; }

.header-right { display: flex; align-items: center; gap: 14px; }
.lang-switch { display: flex; border: 1px solid var(--line-gold); border-radius: 999px; overflow: hidden; }
.lang-switch button {
  font-family: inherit; font-size: .78rem; letter-spacing: .04em;
  padding: 6px 11px; border: 0; background: transparent; color: var(--muted);
  cursor: pointer; transition: color .2s, background .2s;
}
.lang-switch button:hover { color: var(--ink); }
.lang-switch button.is-active { background: var(--gold); color: #fff; }

.burger { display: none; flex-direction: column; gap: 5px; width: 38px; height: 38px;
  align-items: center; justify-content: center; background: none; border: 0; cursor: pointer; }
.burger span { width: 22px; height: 1.8px; background: var(--ink); transition: transform .3s, opacity .3s; }

/* =================== Hero =================== */
.hero { position: relative; padding: clamp(70px, 13vw, 150px) 0 clamp(40px, 7vw, 70px); overflow: hidden; }
.hero-orn {
  position: absolute; top: -40px; left: 50%; transform: translateX(-50%);
  width: min(560px, 92vw); aspect-ratio: 1; color: var(--gold);
  opacity: .08; pointer-events: none;
}
.hero-orn svg { width: 100%; height: 100%; }
.hero-inner { position: relative; text-align: center; max-width: 820px; margin: 0 auto; }
.hero-title {
  font-size: clamp(2.1rem, 6vw, 4rem); line-height: 1.1; margin: .2em 0 .5em;
  letter-spacing: .01em;
}
html.lang-ka .hero-title { line-height: 1.22; }
.hero-sub { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--ink-soft); max-width: 60ch; margin: 0 auto; }
.hero-cta { display: flex; gap: 14px; justify-content: center; margin-top: 2.2rem; flex-wrap: wrap; }

/* =================== Buttons =================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 28px; border-radius: 999px; font-size: .95rem; font-family: inherit;
  letter-spacing: .02em; cursor: pointer; transition: transform .2s, box-shadow .25s, background .25s, color .25s;
  border: 1px solid transparent;
}
.btn-primary { background: var(--gold); color: #fff; box-shadow: 0 10px 24px -12px rgba(146,114,56,.7); }
.btn-primary:hover { background: var(--gold-deep); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-gold); }
.btn-ghost:hover { border-color: var(--gold); background: rgba(176,141,79,.07); }

/* =================== Divider (interlace) =================== */
.divider { display: flex; align-items: center; justify-content: center; gap: 4px; margin: clamp(34px,6vw,60px) 0 0; color: var(--gold); opacity: .55; }
.divider svg { width: 56px; height: 22px; }
.divider svg:nth-child(2) { color: var(--gold-deep); }
.divider.light { color: var(--gold-soft); opacity: .7; margin: 0 0 26px; }

/* =================== Sections =================== */
.section { padding: clamp(56px, 9vw, 110px) 0; }
.section-alt { background: var(--stone); border-block: 1px solid var(--line); }
.section-head { max-width: 640px; margin: 0 auto clamp(34px,5vw,54px); text-align: center; }
.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); margin-bottom: .5rem; }

.two-col { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.col-text h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); margin-bottom: 1rem; }
.col-text .lead { margin-bottom: 1.6rem; }

/* about (single column, centered) */
.about-single { max-width: 760px; margin-inline: auto; text-align: center; }
.about-single h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); margin-bottom: 1rem; }
.about-single .lead { margin: 0 auto 1.8rem; }
.about-single .stats { justify-content: center; }

/* stats */
.stats { display: flex; gap: clamp(20px, 4vw, 44px); flex-wrap: wrap; margin-top: 1.4rem; }
.about-single .stat { align-items: center; text-align: center; }
.stat { display: flex; flex-direction: column; }
.stat-num { font-family: var(--display); font-size: clamp(2rem, 4vw, 2.8rem); color: var(--gold-deep); line-height: 1; }
.stat-label { font-size: .85rem; color: var(--muted); margin-top: .35rem; max-width: 16ch; }

/* media frame with corner ornaments */
.media-frame { position: relative; aspect-ratio: 4/5; border: 1px solid var(--line-gold);
  display: grid; place-items: center; border-radius: var(--r); }
.frame-corner { position: absolute; width: 30px; height: 30px; color: var(--gold); opacity: .8; }
.frame-corner.tl { top: 10px; left: 10px; }
.frame-corner.tr { top: 10px; right: 10px; transform: scaleX(-1); }
.frame-corner.bl { bottom: 10px; left: 10px; transform: scaleY(-1); }
.frame-corner.br { bottom: 10px; right: 10px; transform: scale(-1); }
.media-cross { width: 54px; height: 54px; color: var(--gold-soft); opacity: .6; }

/* photos filling media areas */
.card-media img, .news-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-frame { overflow: hidden; }
.media-frame img.frame-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.media-frame .frame-corner { z-index: 2; }

/* placeholder visuals (until real photos) */
.placeholder {
  background:
    repeating-linear-gradient(135deg, rgba(176,141,79,.05) 0 12px, transparent 12px 24px),
    var(--parchment-2);
  position: relative; overflow: hidden;
}
.placeholder-note {
  position: absolute; inset: auto; left: 50%; bottom: 12px; transform: translateX(-50%);
  font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
  opacity: .6;
}

/* =================== Project cards =================== */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 3vw, 30px); }
.card {
  background: var(--parchment-2); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; transition: transform .25s, box-shadow .3s, border-color .3s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -28px rgba(43,38,34,.6); border-color: var(--line-gold); }
.card-media { aspect-ratio: 16/11; }
.card-body { padding: 20px 22px 24px; }
.card-body h3 { font-size: 1.25rem; margin: .55rem 0 .25rem; }
.card-place { font-size: .82rem; color: var(--gold-deep); letter-spacing: .04em; margin: 0 0 .7rem; }
.card-body p:last-child { color: var(--ink-soft); font-size: .95rem; margin: 0; }
.badge {
  display: inline-block; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px; font-weight: 600;
}
.badge-active { background: rgba(176,141,79,.16); color: var(--gold-deep); }
.badge-done { background: rgba(43,38,34,.08); color: var(--ink-soft); }

/* =================== News =================== */
.news-list { display: flex; flex-direction: column; gap: 4px; max-width: 760px; margin-inline: auto; }
.news-item {
  padding: 22px 0; border-bottom: 1px solid var(--line);
}
.news-item:first-child { border-top: 1px solid var(--line); }
.news-date { font-size: .8rem; letter-spacing: .06em; color: var(--gold-deep); text-transform: uppercase; }
.news-body h3 { font-size: 1.3rem; margin: .3rem 0 .4rem; }
.news-body p { margin: 0; color: var(--ink-soft); max-width: 62ch; }

/* =================== Donate =================== */
.donate { position: relative; overflow: hidden; }
.donate-orn { position: absolute; right: -80px; top: 50%; transform: translateY(-50%);
  width: 360px; height: 360px; color: var(--gold); opacity: .07; pointer-events: none; }
.donate-orn svg { width: 100%; height: 100%; }
.bank-card {
  position: relative; background: var(--parchment-2); border: 1px solid var(--line-gold);
  border-radius: var(--r); padding: 30px 32px; box-shadow: 0 20px 44px -30px rgba(43,38,34,.5);
}
.bank-cross { position: absolute; top: 22px; right: 22px; width: 30px; height: 30px; color: var(--gold-soft); opacity: .7; }
.bank-card dl { margin: 0; display: grid; grid-template-columns: 1fr; gap: 2px; }
.bank-card dt { font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 16px; }
.bank-card dt:first-child { margin-top: 0; }
.bank-card dd { margin: 0; font-size: 1.05rem; color: var(--ink); }
.bank-card dd.lat { letter-spacing: .04em; }

/* =================== Contact =================== */
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { display: flex; flex-direction: column; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-list li:first-child { border-top: 1px solid var(--line); }
.contact-list li[hidden] { display: none; }
.c-label { font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.contact-list a { color: var(--gold-deep); transition: color .2s; }
.contact-list a:hover { color: var(--ink); }

/* =================== Footer =================== */
.site-footer { padding: clamp(40px,6vw,64px) 0 34px; background: var(--ink); color: #E9E1D2; }
.site-footer .divider svg { color: var(--gold-soft); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-inner .lat, .site-footer .brand-name { font-family: var(--display); letter-spacing: .05em; }
html.lang-ka .footer-inner > .lat { font-family: var(--geo); }
.site-footer .muted { color: #A89B86; }

/* =================== Reveal animation =================== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* =================== Responsive =================== */
@media (max-width: 880px) {
  .nav {
    position: fixed; inset: 70px 0 auto 0; flex-direction: column; gap: 0;
    background: var(--parchment-2); border-bottom: 1px solid var(--line);
    padding: 8px var(--pad) 20px; transform: translateY(-120%); transition: transform .35s ease;
    box-shadow: 0 20px 40px -24px rgba(43,38,34,.5);
  }
  body.nav-open .nav { transform: translateY(0); }
  .nav a { padding: 14px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav a::after { display: none; }
  .burger { display: flex; }
  body.nav-open .burger span:nth-child(1) { transform: translateY(6.8px) rotate(45deg); }
  body.nav-open .burger span:nth-child(2) { opacity: 0; }
  body.nav-open .burger span:nth-child(3) { transform: translateY(-6.8px) rotate(-45deg); }

  .two-col { grid-template-columns: 1fr; }
  .col-media { order: -1; }
  #donate .col-media, #contact .col-media { order: 0; }
  .cards { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .brand-name { display: none; }
  .cards { grid-template-columns: 1fr; }
  .stats { gap: 24px; }
}
