/* Православен календар — сајт.
   Палетата и типографијата се исти како во апликацијата (lib/theme/). */

@font-face {
  font-family: 'Triodion';
  src: url('../fonts/Triodion-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

:root {
  /* App palette — lib/theme */
  --parchment: #f6f1e6;
  --parchment-raised: #f1eadb;
  --parchment-hatch: #ebe3d2;
  --ink: #241e19;
  --ink-body: #4a4038;
  --ink-secondary: #6f6559;
  --night-bg: #1a1613;
  --night-raised: #211c18;
  --night-hatch: #2a241d;
  --cream: #ebe4d5;
  --cream-body: #b8ae9e;
  --gold: #d4af37;
  --gold-dark: #9e7e1d;
  --gold-light: #f1d87e;
  --crimson: #8b1e0f;

  /* Roles — light */
  --bg: var(--parchment);
  --surface: var(--parchment-raised);
  --hatch: var(--parchment-hatch);
  --text: var(--ink);
  --text-body: var(--ink-body);
  --text-muted: var(--ink-secondary);
  --accent: var(--gold-dark);
  --rule: rgba(36, 30, 25, 0.14);

  --measure: 34rem;
  --page: 68rem;
  --serif: 'PT Serif', Georgia, 'Times New Roman', serif;
  --sans: 'PT Sans', -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Triodion', 'PT Serif', Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--night-bg);
    --surface: var(--night-raised);
    --hatch: var(--night-hatch);
    --text: var(--cream);
    --text-body: var(--cream-body);
    --text-muted: #8a7f6b;
    --accent: var(--gold);
    --rule: rgba(235, 228, 213, 0.14);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-body);
  font: 400 1.0625rem/1.7 var(--serif);
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { color: var(--text); line-height: 1.25; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 5.2vw, 3rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1.1em; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--gold); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--page); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2.5rem); }
.prose { max-width: var(--measure); }

/* ---------- Header ---------- */

.site-head {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
.site-head .wrap {
  display: flex; align-items: center; gap: 1rem;
  min-height: 3.75rem; flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: .6rem;
  font-family: var(--sans); font-weight: 700; font-size: .95rem;
  color: var(--text); text-decoration: none; margin-right: auto;
}
.brand img { width: 28px; height: 28px; border-radius: 6px; display: block; }
.site-head nav { display: flex; gap: 1.15rem; font-family: var(--sans); font-size: .9rem; }
.site-head nav a { color: var(--text-muted); text-decoration: none; }
.site-head nav a:hover, .site-head nav a[aria-current='page'] { color: var(--accent); }

/* ---------- Hero ---------- */

.hero {
  position: relative; overflow: hidden;
  background: #0d0b09; color: var(--cream-body);
  border-bottom: 1px solid var(--gold-dark);
}
/* A tight glow behind the artwork only — the hero must stay darker than the
   page below it, the way the feature graphic is. */
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(46% 58% at 76% 42%, rgba(212,175,55,.13), transparent 70%);
  pointer-events: none;
}
.hero .wrap {
  position: relative; z-index: 1;
  display: grid; gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: 1fr;
  padding-block: clamp(3.5rem, 9vw, 6rem);
}
@media (min-width: 56rem) {
  .hero .wrap { grid-template-columns: 1.15fr .85fr; align-items: center; }
}
.hero h1 { color: var(--gold-light); font-family: var(--display); font-weight: 400; }
.hero .lede { font-size: clamp(1.05rem, 2.1vw, 1.2rem); color: var(--cream); max-width: 32rem; }
.hero-art { margin: 0; }
.hero-art img {
  display: block; width: 100%; height: auto; border-radius: 14px;
  border: 1px solid rgba(212,175,55,.32);
  box-shadow: 0 18px 48px rgba(0,0,0,.55);
}

.cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.6rem; font-family: var(--sans); }
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.15rem; border-radius: 8px;
  font-weight: 700; font-size: .95rem; text-decoration: none;
  border: 1px solid transparent;
}
.btn-primary { background: var(--gold); color: #17130d; }
.btn-primary:hover { background: var(--gold-light); color: #17130d; }
.btn-ghost { border-color: rgba(212,175,55,.45); color: var(--gold-light); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-light); background: rgba(212,175,55,.08); }
.btn[aria-disabled='true'] { opacity: .62; cursor: default; }

/* ---------- Sections ---------- */

section { padding-block: clamp(3rem, 7vw, 4.75rem); }
section + section { border-top: 1px solid var(--rule); }
.section-title { margin-bottom: 2rem; }
.section-title p { color: var(--text-muted); max-width: var(--measure); margin: 0; }

.eyebrow {
  font-family: var(--sans); font-size: .72rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 .6rem;
}

.grid { display: grid; gap: 1.15rem; grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: 12px; padding: 1.4rem 1.45rem;
}
.card h3 { margin-bottom: .35rem; }
.card p { margin: 0; font-size: .97rem; color: var(--text-muted); }
.card .mark {
  display: block; font-family: var(--display); font-size: 1.5rem;
  color: var(--accent); line-height: 1; margin-bottom: .75rem;
}

/* Numbers */
.figures { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.figure { border-left: 2px solid var(--gold-dark); padding: .2rem 0 .2rem 1rem; }
.figure b {
  display: block; font-family: var(--sans); font-weight: 700;
  font-size: clamp(1.7rem, 4vw, 2.15rem); color: var(--text); line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.figure span { font-size: .92rem; color: var(--text-muted); }

/* Privacy callout */
.callout {
  background: var(--hatch); border: 1px solid var(--rule);
  border-left: 3px solid var(--crimson);
  border-radius: 12px; padding: 1.5rem 1.6rem;
}
.callout h2 { margin-top: 0; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.checks li { padding-left: 1.6rem; position: relative; font-size: .97rem; }
.checks li::before {
  content: '\2626'; position: absolute; left: 0; top: 0;
  color: var(--accent); font-size: .95rem;
}

/* ---------- Legal documents ---------- */

.doc-head { padding-block: clamp(2.5rem, 6vw, 3.75rem) 1.5rem; }
.doc-meta {
  font-family: var(--sans); font-size: .88rem; color: var(--text-muted);
  margin: 0; display: flex; flex-wrap: wrap; gap: .3rem 1.2rem;
}
.lang-switch {
  display: flex; gap: .5rem; font-family: var(--sans); font-size: .85rem;
  margin: 1.5rem 0 0; padding: 0; list-style: none;
}
.lang-switch a {
  display: inline-block; padding: .3rem .7rem; border-radius: 999px;
  border: 1px solid var(--rule); text-decoration: none; color: var(--text-muted);
}
.lang-switch a:hover { border-color: var(--gold-dark); color: var(--accent); }

.doc { padding-block: 0 clamp(3rem, 7vw, 4.5rem); }
.doc h2 { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.doc h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 1.5rem; }
.doc h3 { margin-top: 1.75rem; }
.doc ul, .doc ol { padding-left: 1.2rem; margin: 0 0 1.1em; }
.doc li { margin-bottom: .4em; }
.doc code {
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: .875em; background: var(--hatch); padding: .12em .38em;
  border-radius: 4px; border: 1px solid var(--rule);
}
.doc .summary {
  background: var(--surface); border: 1px solid var(--rule);
  border-left: 3px solid var(--gold-dark);
  border-radius: 10px; padding: 1.25rem 1.4rem; margin-bottom: 2rem;
}
.doc .summary p:last-child { margin-bottom: 0; }

.table-scroll { overflow-x: auto; margin: 0 0 1.4em; }
table { border-collapse: collapse; width: 100%; font-size: .94rem; min-width: 32rem; }
th, td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-family: var(--sans); font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }

hr.rule { border: 0; border-top: 1px solid var(--rule); margin: 3rem 0; }

/* ---------- Footer ---------- */

.site-foot {
  border-top: 1px solid var(--rule); background: var(--surface);
  padding-block: 2.75rem; font-size: .92rem;
}
.foot-grid { display: grid; gap: 1.75rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.site-foot h3 {
  font-family: var(--sans); font-size: .75rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: .7rem;
}
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.site-foot a { text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.foot-note {
  margin: 2.5rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--rule);
  color: var(--text-muted); font-size: .87rem; max-width: 46rem;
}
.foot-legal {
  margin: 2.5rem 0 0; padding-top: 1.5rem; border-top: 1px solid var(--rule);
  font-family: var(--sans); font-size: .85rem; color: var(--text-muted);
}
/* Only one rule between the footer columns and the bottom line. */
.foot-note + .foot-legal { margin-top: 1.1rem; padding-top: 0; border-top: 0; }

.skip {
  position: absolute; left: -9999px;
  background: var(--gold); color: #17130d; padding: .6rem 1rem;
  font-family: var(--sans); font-weight: 700; border-radius: 0 0 6px 0;
}
.skip:focus { left: 0; top: 0; z-index: 50; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
