/* ============================================================
   Церковний календар — site
   Aesthetic: illuminated manuscript × modern editorial
   Parchment, gold leaf, Cormorant (app font) + Spectral
   ============================================================ */

:root {
  --paper:      #F3ECDC;
  --paper-deep: #EBE1CD;
  --card:       #FBF7EC;
  --ink:        #2A2118;
  --ink-soft:   #6E6149;
  --ink-faint:  #9A8C70;
  --gold:       #A47B2E;
  --gold-deep:  #7E5A1C;
  --gold-lit:   #E6C66A;
  --line:       rgba(126, 90, 28, 0.18);
  --line-soft:  rgba(126, 90, 28, 0.10);
  --shadow:     28px 40px 80px -40px rgba(58, 40, 12, 0.45);
  --radius:     18px;
  --maxw:       1080px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Spectral", Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* layered parchment atmosphere + grain ------------------------------------ */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(1100px 620px at 72% -8%, rgba(230, 198, 106, 0.30), transparent 60%),
    radial-gradient(900px 500px at 8% 4%, rgba(164, 123, 46, 0.10), transparent 55%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-deep) 100%);
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: 0.05; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* typography -------------------------------------------------------------- */
h1, h2, h3 { font-family: "Cormorant Garamond", "Cormorant", Georgia, serif; font-weight: 600; line-height: 1.08; margin: 0; }
h1 { font-size: clamp(3rem, 8.5vw, 6.2rem); letter-spacing: -0.5px; }
h2 { font-size: clamp(2rem, 4.6vw, 3.1rem); letter-spacing: -0.3px; }
h3 { font-size: 1.55rem; }
p  { margin: 0.7em 0; }
a  { color: var(--gold-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }

.eyebrow {
  font-family: "Spectral", serif;
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--gold-deep);
}

.shimmer {
  background: linear-gradient(100deg, var(--gold-deep) 0%, var(--gold) 22%, var(--gold-lit) 50%, var(--gold) 78%, var(--gold-deep) 100%);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: shine 7s linear infinite;
}
@keyframes shine { to { background-position: -220% center; } }

/* layout ------------------------------------------------------------------ */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 26px; }
.narrow { max-width: 760px; }

/* header ------------------------------------------------------------------ */
header.site {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(1.4) blur(10px);
  background: rgba(243, 236, 220, 0.72);
  border-bottom: 1px solid var(--line-soft);
}
header.site .bar {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.brand .mark { width: 26px; height: 26px; color: var(--gold-deep); }
.brand b { font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.45rem; letter-spacing: 0.2px; }
header nav { display: flex; align-items: center; gap: 22px; }
header nav a { color: var(--ink-soft); text-decoration: none; font-size: 0.96rem; }
header nav a:hover { color: var(--gold-deep); }

/* language toggle --------------------------------------------------------- */
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang button {
  font-family: "Spectral", serif; font-size: 0.8rem; letter-spacing: 0.06em;
  border: 0; background: transparent; color: var(--ink-faint);
  padding: 6px 13px; cursor: pointer; transition: 0.25s;
}
.lang button.on { background: var(--gold); color: #fff; }

/* hero -------------------------------------------------------------------- */
.hero { padding: clamp(56px, 9vw, 110px) 0 clamp(40px, 6vw, 80px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.hero h1 { margin: 18px 0 0; }
.hero .sub { font-size: 1.22rem; color: var(--ink-soft); max-width: 30ch; margin-top: 22px; }

/* store badges ------------------------------------------------------------ */
.stores { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.badge {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 13px 22px; border-radius: 14px; text-decoration: none;
  font-family: "Spectral", serif;
}
.badge .glyph { width: 22px; height: 22px; }
.badge .lbl { display: flex; flex-direction: column; line-height: 1.12; text-align: left; }
.badge .lbl small { font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.72; }
.badge .lbl span { font-size: 1.12rem; font-weight: 600; }
.badge.app {
  color: #F5EFE0; background: linear-gradient(165deg, #34291A, #1c1610);
  border: 1px solid rgba(230, 198, 106, 0.25);
  position: relative; overflow: hidden;
  transition: transform 0.3s cubic-bezier(.2,.7,.2,1), box-shadow 0.3s;
  box-shadow: 0 14px 30px -16px rgba(40, 28, 8, 0.7);
}
.badge.app::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(230, 198, 106, 0.45), transparent);
  transform: skewX(-18deg); transition: left 0.7s ease;
}
.badge.app:hover { transform: translateY(-3px); box-shadow: 0 22px 40px -18px rgba(40, 28, 8, 0.75); }
.badge.app:hover::after { left: 120%; }
.badge.android {
  color: var(--ink-faint); background: rgba(251, 247, 236, 0.6);
  border: 1px dashed var(--line); cursor: default;
}
.badge.android .glyph { opacity: 0.55; }
.wip {
  font-family: "Spectral", serif; font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-deep);
  border: 1px solid var(--gold); border-radius: 999px; padding: 2px 9px; margin-left: 2px;
}

/* product "today" card ---------------------------------------------------- */
.relic { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.card-note {
  margin-top: 26px; max-width: 32ch; text-align: center;
  font-size: 0.9rem; line-height: 1.5; color: var(--ink-soft);
}
.card-note b { color: var(--ink); font-weight: 600; }
/* rite switch — shown only when live today.json is loaded (WEB-002) */
.rite-switch {
  display: inline-flex; gap: 4px; margin-bottom: 20px; padding: 4px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card);
}
.rite-switch[hidden] { display: none; }
.rite-switch button {
  font-family: "Spectral", serif; font-size: 0.8rem; letter-spacing: 0.04em;
  border: 0; background: transparent; color: var(--ink-faint);
  padding: 7px 15px; border-radius: 999px; cursor: pointer;
  transition: 0.25s; white-space: nowrap;
}
.rite-switch button.on { background: var(--gold); color: #fff; }
.relic .halo {
  position: absolute; width: 130%; aspect-ratio: 1; left: -15%; top: -22%;
  background: radial-gradient(circle, rgba(230, 198, 106, 0.55), transparent 62%);
  filter: blur(8px); z-index: -1;
  animation: breathe 9s ease-in-out infinite;
}
@keyframes breathe { 50% { transform: scale(1.08); opacity: 0.82; } }
.daycard {
  width: min(330px, 84vw);
  background:
    linear-gradient(180deg, var(--card), #F6EFDD);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 30px 30px 26px;
  box-shadow: var(--shadow);
  transform: rotate(-2.5deg);
  transition: transform 0.5s cubic-bezier(.2,.7,.2,1);
}
.daycard:hover { transform: rotate(0deg) translateY(-4px); }
.daycard .edge { display: flex; justify-content: space-between; align-items: baseline; }
.daycard .dd { font-family: "Cormorant Garamond", serif; font-size: 3.4rem; font-weight: 600; line-height: 0.9; color: var(--ink); }
.daycard .mo { text-align: right; font-size: 0.82rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint); }
.daycard hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.daycard .feast {
  font-family: "Cormorant Garamond", serif; font-weight: 600;
  font-size: 1.85rem; line-height: 1.12;
  color: var(--gold-deep);
}
.daycard .rank { display: inline-block; margin-top: 8px; font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.daycard .meta { display: flex; gap: 18px; margin-top: 20px; font-size: 0.86rem; color: var(--ink-soft); }
.daycard .meta b { color: var(--ink); font-weight: 600; }

/* ornamental divider ------------------------------------------------------ */
.rule { display: flex; align-items: center; gap: 18px; color: var(--gold); margin: clamp(54px, 8vw, 100px) 0; }
.rule::before, .rule::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, transparent, var(--line), transparent); }
.rule svg { width: 26px; height: 26px; }

/* features ---------------------------------------------------------------- */
.section-head { text-align: center; margin-bottom: 46px; }
.section-head .eyebrow { display: block; margin-bottom: 12px; }
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.feature {
  background: rgba(251, 247, 236, 0.66);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 28px 28px 26px;
  transition: transform 0.35s cubic-bezier(.2,.7,.2,1), border-color 0.35s, box-shadow 0.35s;
}
.feature:hover { transform: translateY(-4px); border-color: var(--line); box-shadow: 0 20px 40px -28px rgba(58, 40, 12, 0.4); }
.feature .ic { width: 30px; height: 30px; color: var(--gold-deep); margin-bottom: 16px; }
.feature h3 { font-size: 1.7rem; margin-bottom: 4px; }
.feature p { color: var(--ink-soft); font-size: 0.98rem; margin: 0; }

.features.six { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .features.six { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features.six { grid-template-columns: 1fr; } }
.more {
  text-align: center; margin-top: 28px; color: var(--ink-soft);
  font-size: 0.98rem; letter-spacing: 0.01em;
}
.more b { color: var(--gold-deep); font-weight: 600; }

/* privacy statement banner ------------------------------------------------ */
.creed {
  text-align: center; padding: clamp(50px, 8vw, 96px) 0;
}
.creed h2 { max-width: 18ch; margin: 0 auto; }
.creed h2 em { font-style: italic; color: var(--gold-deep); }
.creed p { color: var(--ink-soft); max-width: 46ch; margin: 22px auto 0; }

/* document pages (privacy / support) -------------------------------------- */
.doc { padding: clamp(48px, 7vw, 86px) 0 40px; }
.doc h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); }
.doc .updated { color: var(--ink-faint); font-size: 0.92rem; margin-top: 6px; letter-spacing: 0.04em; }
.doc h2 { font-size: 1.7rem; margin: 38px 0 6px; color: var(--gold-deep); }
.doc .lead {
  background: rgba(251, 247, 236, 0.7); border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 12px; padding: 18px 22px; margin: 26px 0 8px;
  font-size: 1.05rem;
}
.doc p { color: #423724; }
.doc .lead b, .doc p b { color: var(--ink); }

/* footer ------------------------------------------------------------------ */
footer.site { border-top: 1px solid var(--line); margin-top: 40px; padding: 40px 0 56px; }
footer.site .row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
footer.site .links a { color: var(--ink-soft); text-decoration: none; margin-right: 22px; font-size: 0.95rem; }
footer.site .links a:hover { color: var(--gold-deep); }
footer.site .fine { color: var(--ink-faint); font-size: 0.85rem; }

/* language visibility ----------------------------------------------------- */
[data-lang] { display: none; }
[data-lang].show { display: block; }
[data-lang].show.inline { display: inline; }

/* reveal animation -------------------------------------------------------- */
[data-reveal] {
  opacity: 0; transform: translateY(22px);
  transition: opacity 1s cubic-bezier(.2,.7,.2,1), transform 1s cubic-bezier(.2,.7,.2,1);
  transition-delay: var(--d, 0s);
}
[data-reveal].in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* responsive -------------------------------------------------------------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .relic { order: -1; margin-bottom: 8px; }
  .hero .sub { max-width: none; }
  header nav { gap: 14px; }
  header nav a.hide-sm { display: none; }
}
@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; }
  body { font-size: 17px; }
}
