/* ==========================================================================
   Św. Juda Tadeusz — strona wotywna
   Paleta: noc kaplicy, złoto świecy, zieleń szaty apostoła.
   ========================================================================== */

:root {
  --tlo:        #0e1613;
  --tlo-2:      #121d18;
  --karta:      #16221c;
  --linia:      rgba(224, 185, 95, 0.22);
  --zloto:      #e0b95f;
  --zloto-jasne:#f3ddaa;
  --zloto-cien: #a9853a;
  --kremowy:    #efe7d7;
  --stlumiony:  #a8b3aa;
  --zielen:     #1f4a3a;
  --czerwien:   #8c3129;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
           Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --max: 62rem;
  --waski: 40rem;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  /* bez background-attachment: fixed — na mobile potrafi ciąć płynność przewijania */
  background: var(--tlo);
  background-image:
    radial-gradient(1100px 650px at 50% 0, rgba(38,60,48,.9) 0%, rgba(26,42,34,0) 65%),
    linear-gradient(180deg, var(--tlo) 0%, var(--tlo-2) 50%, var(--tlo) 100%);
  background-repeat: no-repeat;
  color: var(--kremowy);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--zloto); text-decoration-color: rgba(224,185,95,.4); text-underline-offset: 3px; }
a:hover { color: var(--zloto-jasne); }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--zloto); color: #10190f; padding: .6rem 1rem; z-index: 100;
}
.skip:focus { left: .5rem; top: .5rem; }

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

/* ---------- Górny pasek ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  padding: .7rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(14, 22, 19, .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--linia);
}

.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  color: var(--kremowy); text-decoration: none;
  font-size: .95rem; letter-spacing: .13em; text-transform: uppercase;
}
.brand-mark, .footer-mark { width: 22px; height: 22px; fill: var(--zloto); }
.brand-mark .stroke, .footer-mark .stroke { fill: none; stroke: var(--zloto); stroke-width: 1.6; stroke-linecap: round; }

.nav {
  display: flex; gap: clamp(.7rem, 2vw, 1.6rem); flex-wrap: wrap;
  font-family: var(--sans); font-size: .78rem;
  letter-spacing: .1em; text-transform: uppercase;
}
.nav a { color: var(--stlumiony); text-decoration: none; padding: .2rem 0; border-bottom: 1px solid transparent; }
.nav a:hover { color: var(--zloto); border-bottom-color: var(--linia); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5rem) clamp(1.2rem, 5vw, 2rem) clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}
.hero-glow {
  position: absolute; inset: 0;
  background: radial-gradient(520px 380px at 50% 22%, rgba(224,185,95,.10), transparent 70%);
  pointer-events: none;
}
.icon-wrap { margin: 0 auto 1.6rem; width: min(300px, 68vw); }
.icon { width: 100%; height: auto; display: block; }

.flame-group { transform-origin: 130px 58px; animation: drzenie 3.6s ease-in-out infinite; }
@keyframes drzenie {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  30%      { transform: scale(1.05, .97) rotate(-1.6deg); opacity: .92; }
  55%      { transform: scale(.97, 1.05) rotate(1.4deg); opacity: 1; }
  78%      { transform: scale(1.02, .99) rotate(-.6deg); opacity: .95; }
}
.rays { animation: oddech 9s ease-in-out infinite; transform-origin: 130px 150px; }
@keyframes oddech { 0%,100% { opacity: .38; } 50% { opacity: .68; } }

.eyebrow {
  font-family: var(--sans); font-size: .72rem; letter-spacing: .24em;
  text-transform: uppercase; color: var(--zloto-cien); margin: 0 0 .9rem;
}
.eyebrow.center { text-align: center; }

.hero-title {
  font-size: clamp(2.4rem, 8vw, 4.2rem);
  line-height: 1.05; margin: 0 0 .5rem; font-weight: 400;
  letter-spacing: .01em;
  background: linear-gradient(180deg, #f7e9c6 0%, var(--zloto) 55%, var(--zloto-cien) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  margin: 0 0 1.8rem; font-size: clamp(1.05rem, 2.6vw, 1.3rem);
  color: var(--kremowy); font-style: italic; opacity: .9;
}
.hero-lead {
  max-width: 34rem; margin: 0 auto 2rem; color: var(--stlumiony); font-size: 1rem;
}
.hero-actions { display: flex; gap: .8rem; justify-content: center; flex-wrap: wrap; }

.feast {
  margin: 2.2rem 0 0; font-family: var(--sans); font-size: .78rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--zloto-cien);
}

/* ---------- Przyciski ---------- */
.btn {
  display: inline-block; cursor: pointer;
  font-family: var(--sans); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  padding: .8rem 1.5rem; border-radius: 2px;
  border: 1px solid var(--linia); background: transparent; color: var(--kremowy);
  text-decoration: none; transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.btn:hover { border-color: var(--zloto); color: var(--zloto-jasne); background: rgba(224,185,95,.07); }
.btn-primary {
  background: linear-gradient(180deg, var(--zloto-jasne), var(--zloto));
  color: #14211a; border-color: transparent; font-weight: 600;
}
.btn-primary:hover { color: #14211a; background: linear-gradient(180deg, #fff0cc, var(--zloto-jasne)); }
.btn-small { padding: .55rem 1rem; font-size: .72rem; }
.btn-ghost { color: var(--stlumiony); }

/* ---------- Sekcje ---------- */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.2rem, 5vw, 2rem);
  /* żeby przyklejony pasek nie przykrywał nagłówka przy skoku z menu */
  scroll-margin-top: 5.5rem;
}
.section-title {
  font-weight: 400; font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  line-height: 1.2; margin: 0 0 1.2rem; color: var(--kremowy);
}
.section-title.center, .section-lead.center { text-align: center; }
.section-lead {
  max-width: 36rem; margin: 0 auto 2.4rem; color: var(--stlumiony); font-size: .98rem;
}
.section-actions { text-align: center; margin-top: 2rem; }

.rule {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  max-width: var(--max); margin: 0 auto; padding: 0 2rem;
  color: var(--zloto-cien);
}
.rule::before, .rule::after {
  content: ""; height: 1px; flex: 1;
  background: linear-gradient(90deg, transparent, var(--linia), transparent);
}
.rule span { font-size: .8rem; opacity: .75; }

/* ---------- Karty ---------- */
.card {
  background: linear-gradient(180deg, var(--karta), rgba(22,34,28,.6));
  border: 1px solid var(--linia);
  border-radius: 3px;
  padding: clamp(1.1rem, 3vw, 1.6rem);
}

/* ---------- Intencja ---------- */
.intention { max-width: var(--waski); margin: 0 auto 2.6rem; }
.intention label {
  display: block; font-family: var(--sans); font-size: .74rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--zloto-cien);
  margin-bottom: .7rem;
}
.intention .hint { text-transform: none; letter-spacing: .02em; color: var(--stlumiony); opacity: .7; }
.intention textarea {
  width: 100%; resize: vertical;
  background: rgba(10,16,13,.6); color: var(--kremowy);
  border: 1px solid var(--linia); border-radius: 2px;
  padding: .8rem .9rem; font-family: var(--serif); font-size: 1rem; line-height: 1.6;
}
.intention textarea::placeholder { color: rgba(168,179,170,.55); }
.intention textarea:focus { border-color: var(--zloto); outline: none; }
.intention-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .9rem; }

/* ---------- Modlitwa ---------- */
.prayer {
  max-width: var(--waski); margin: 0 auto;
  font-size: clamp(1.06rem, 2.4vw, 1.22rem); line-height: 1.95;
  text-align: justify; hyphens: auto;
}
.prayer p { margin: 0 0 1.5rem; }
.prayer p:first-child::first-letter {
  float: left; font-size: 3.6em; line-height: .82; padding: .06em .1em 0 0;
  color: var(--zloto); font-weight: 400;
}
.slot {
  color: var(--zloto-jasne); font-style: italic;
  border-bottom: 1px dotted var(--zloto-cien); padding: 0 .12em;
}
.slot.pusty { color: var(--stlumiony); opacity: .75; font-style: normal; }
.amen { color: var(--zloto); letter-spacing: .04em; }
.antyfona {
  text-align: center; font-style: italic; color: var(--zloto);
  border-top: 1px solid var(--linia); padding-top: 1.6rem; margin-top: 2rem;
  text-align-last: center;
}

/* ---------- Świece ---------- */
.candles {
  display: grid; gap: 1rem; justify-content: center;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 15rem));
}
.candle {
  position: relative;
  background: linear-gradient(180deg, var(--karta), rgba(22,34,28,.55));
  border: 1px solid var(--linia); border-radius: 3px;
  padding: 1.4rem 1.1rem 1.1rem; text-align: center;
}
.candle-visual { height: 78px; display: flex; align-items: flex-end; justify-content: center; margin-bottom: .9rem; }
.candle-svg { width: 44px; height: 78px; overflow: visible; }
.candle-svg .plomyk { transform-origin: 22px 16px; animation: drzenie 2.9s ease-in-out infinite; }
.candle.wypalona .plomyk { display: none; }
.candle.wypalona .candle-svg { opacity: .45; }
.candle-text { font-size: 1rem; line-height: 1.6; margin: 0 0 .8rem; word-break: break-word; }
.candle-meta {
  font-family: var(--sans); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--zloto-cien); margin: 0;
}
.candle-usun {
  position: absolute; top: .4rem; right: .5rem;
  background: none; border: 0; color: var(--stlumiony); opacity: .45;
  cursor: pointer; font-size: 1.1rem; line-height: 1; padding: .3rem .4rem;
}
.candle-usun:hover { opacity: 1; color: var(--czerwien); }
.empty { text-align: center; color: var(--stlumiony); font-size: .95rem; }

/* ---------- Nowenna ---------- */
.novena-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.2rem; flex-wrap: wrap; margin-bottom: 1.6rem;
}
.progress { flex: 1; min-width: 12rem; }
.progress-bar {
  height: 4px; background: rgba(224,185,95,.14); border-radius: 4px; overflow: hidden;
}
.progress-bar span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--zloto-cien), var(--zloto-jasne));
  transition: width .45s ease;
}
.progress-label {
  margin: .6rem 0 0; font-family: var(--sans); font-size: .72rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--zloto-cien);
}

.days { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.day {
  background: linear-gradient(180deg, var(--karta), rgba(22,34,28,.5));
  border: 1px solid var(--linia); border-radius: 3px; overflow: hidden;
}
.day-head {
  display: flex; align-items: center; gap: .9rem; width: 100%;
  padding: 1rem 1.1rem; background: none; border: 0; cursor: pointer;
  color: var(--kremowy); font-family: var(--serif); font-size: 1.05rem; text-align: left;
}
.day-no {
  flex: none; width: 2.1rem; height: 2.1rem; border-radius: 50%;
  border: 1px solid var(--linia); display: grid; place-items: center;
  font-family: var(--sans); font-size: .8rem; color: var(--zloto);
}
.day.zrobiony .day-no { background: var(--zloto); color: #14211a; border-color: transparent; }
.day-title { flex: 1; }
.day-chevron { flex: none; color: var(--zloto-cien); transition: transform .25s ease; }
.day.otwarty .day-chevron { transform: rotate(90deg); }
.day-body { display: none; padding: 0 1.1rem 1.3rem 4.1rem; }
.day.otwarty .day-body { display: block; }
.day-body p { margin: 0 0 1rem; color: var(--kremowy); }
.day-prosba {
  font-style: italic; color: var(--zloto);
  border-left: 2px solid var(--linia); padding-left: 1rem;
}
.day-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
@media (max-width: 34rem) { .day-body { padding-left: 1.1rem; } }

/* ---------- Proza ---------- */
.prose { max-width: var(--waski); margin: 0 auto; }
.prose p { margin: 0 0 1.4rem; }
.prose blockquote {
  margin: 2rem 0; padding: 1.2rem 1.4rem;
  border-left: 2px solid var(--zloto-cien);
  background: rgba(224,185,95,.05);
  font-style: italic; color: var(--zloto-jasne);
}
.prose blockquote cite {
  display: block; margin-top: .7rem; font-style: normal;
  font-family: var(--sans); font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--zloto-cien);
}

/* ---------- Symbole ---------- */
.grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}
.sym { color: var(--zloto); }
.sym-ico { width: 48px; height: 48px; display: block; margin-bottom: .9rem; }
.sym h3 { margin: 0 0 .6rem; font-weight: 400; font-size: 1.15rem; color: var(--kremowy); }
.sym p { margin: 0; color: var(--stlumiony); font-size: .95rem; line-height: 1.7; }

/* ---------- Wezwania ---------- */
.invocations {
  max-width: var(--waski); margin: 0 auto; padding: 0; list-style: none;
  counter-reset: inv;
}
.invocations li {
  padding: .85rem 0 .85rem 1.6rem; border-bottom: 1px solid rgba(224,185,95,.10);
  position: relative; line-height: 1.6;
}
.invocations li::before {
  content: "\271D"; position: absolute; left: 0; top: .95rem;
  color: var(--zloto-cien); font-size: .75rem;
}
.invocations li:last-child { border-bottom: 0; }
.closing {
  max-width: var(--waski); margin: 2.4rem auto 0; text-align: center;
  font-style: italic; color: var(--zloto-jasne);
  border-top: 1px solid var(--linia); padding-top: 2rem;
}

/* ---------- Stopka ---------- */
.footer {
  text-align: center; padding: 3.5rem 1.5rem 4rem;
  border-top: 1px solid var(--linia); margin-top: 2rem;
  background: linear-gradient(180deg, transparent, rgba(224,185,95,.03));
}
.footer-mark { width: 26px; height: 26px; margin-bottom: 1rem; }
.footer-line { margin: 0 0 1.4rem; font-style: italic; color: var(--zloto); font-size: 1.05rem; }
.footer-note {
  margin: 0 auto .6rem; max-width: 34rem;
  font-family: var(--sans); font-size: .76rem; line-height: 1.7; color: var(--stlumiony); opacity: .8;
}

/* ---------- Wąskie ekrany ---------- */
@media (max-width: 46rem) {
  /* nawigacja jedną linią, przewijana w poziomie — inaczej sticky zjada pół ekranu */
  .topbar { padding: .55rem 1rem; gap: .45rem; }
  .brand { font-size: .82rem; }
  .nav {
    flex-wrap: nowrap; width: 100%; overflow-x: auto;
    scrollbar-width: none; -ms-overflow-style: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; }
}

@media (max-width: 34rem) {
  body { font-size: 17px; }
  .prayer { text-align: left; }
  .prayer p:first-child::first-letter { font-size: 3.1em; }
  .novena-head { flex-direction: column; align-items: stretch; }
}

/* ---------- Druk ---------- */
@media print {
  body { background: #fff; color: #111; font-size: 12pt; }
  .topbar, .nav, .hero-actions, .intention-actions, .section-actions,
  .hero-glow, .rule, #swiece, #nowenna, .footer-note, .skip { display: none !important; }
  .hero { padding: 0 0 1rem; }
  .hero-title { color: #111; -webkit-text-fill-color: #111; }
  .icon-wrap { width: 130px; }
  .prayer, .prose, .invocations { max-width: none; }
  .slot { color: #111; border-bottom: 1px solid #999; }
  .antyfona, .closing, .footer-line { color: #333; }
  a { color: #111; text-decoration: none; }
}
