/* lebensfeier.ch: Jahresringe in der Farbpalette von mariostankovic.com.
   Jeder Ring eine Feier, von der Willkommensfeier innen bis zum Gedenken aussen.
   Fonts self-hosted: Young Serif for the voice, Hanken Grotesk for text
   (both SIL OFL). */
@font-face { font-family: "Young Serif"; font-weight: 400; font-display: swap; src: url("../fonts/young-serif-400.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-weight: 500; font-display: swap; src: url("../fonts/hanken-grotesk-500.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-weight: 700; font-display: swap; src: url("../fonts/hanken-grotesk-700.woff2") format("woff2"); }

:root {
  /* brand palette, as on mariostankovic.com */
  --lemon: #ffd449;
  --amber: #eb8f50;
  --marigold: #e9b15e;
  --terracotta: #ec6f41;
  --sage: #9faf70;
  --jade: #4ea57b;
  --petrol: #216d7a;

  /* light: a morning ground with a hint of lemon */
  --ground: #fff8e1;
  --glow: rgba(255, 212, 73, 0.38);
  --ink: #0e2d41;
  --ink-soft: #2e4a5b;
  --muted: #5b6d77;
  --signal: #c9532a;
  --bark: rgba(14, 45, 65, 0.22);
  --grain-opacity: 0.85;

  --f-voice: "Young Serif", Georgia, "Times New Roman", serif;
  --f-text: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ground: #0e1e2b;
    --glow: rgba(33, 109, 122, 0.3);
    --ink: #fff6dd;
    --ink-soft: #dde3e2;
    --muted: #a2b3ba;
    --signal: #ffd449;
    --bark: rgba(255, 246, 221, 0.22);
    --grain-opacity: 0.65;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(60vmax 60vmax at 100% 45%, var(--glow), transparent 60%),
    var(--ground);
  color: var(--ink);
  font: 500 1.0625rem/1.6 var(--f-text);
}

/* ---- grain: the same fine film grain as on mariostankovic.com
   (backgrounds.css there), barely visible, like a grainy photograph. Above the
   ground and the rings, below the text. ---- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'300'%20height%3D'300'%3E%3Cfilter%20id%3D'n'%3E%3CfeTurbulence%20type%3D'fractalNoise'%20baseFrequency%3D'0.85'%20numOctaves%3D'3'%20stitchTiles%3D'stitch'%2F%3E%3CfeColorMatrix%20type%3D'saturate'%20values%3D'0'%2F%3E%3CfeComponentTransfer%3E%3CfeFuncA%20type%3D'linear'%20slope%3D'1.8'%2F%3E%3C%2FfeComponentTransfer%3E%3C%2Ffilter%3E%3Crect%20width%3D'100%25'%20height%3D'100%25'%20filter%3D'url(%23n)'%2F%3E%3C%2Fsvg%3E");
  background-size: 280px 280px;
  mix-blend-mode: overlay;
  opacity: var(--grain-opacity);
}
.rings { z-index: 0; }
.page { z-index: 2; }

/* ---- rings ---- */
.rings { position: relative; height: min(66vw, 400px); overflow: hidden; }
.rings svg {
  position: absolute;
  width: min(122vw, 720px);
  height: auto;
  right: -24%;
  bottom: 0;
  overflow: visible;
}
.r { fill: none; transform-box: fill-box; transform-origin: center; }
.r-0 { fill: var(--amber); }
.r-1 { stroke: var(--lemon); }
.r-2 { stroke: var(--marigold); }
.r-3 { stroke: var(--terracotta); }
.r-4 { stroke: var(--sage); }
.r-5 { stroke: var(--jade); }
.r-6 { stroke: var(--petrol); }
.r-bark { stroke: var(--bark); stroke-width: 1.2; stroke-dasharray: 0.6 3.2; stroke-linecap: round; }

@media (prefers-reduced-motion: no-preference) {
  .r { animation: grow 1.4s cubic-bezier(0.22, 0.61, 0.36, 1) backwards; }
  .r-1 { animation-delay: 0.1s; }
  .r-2 { animation-delay: 0.2s; }
  .r-3 { animation-delay: 0.3s; }
  .r-4 { animation-delay: 0.4s; }
  .r-5 { animation-delay: 0.5s; }
  .r-6 { animation-delay: 0.6s; }
  .r-bark { animation-delay: 0.75s; }
}
@keyframes grow { from { transform: scale(0.55); opacity: 0; } }

/* ---- text ---- */
.page {
  position: relative;
  max-width: 36rem;
  padding-inline: 1.25rem;
  padding-block: 0.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.page > * { margin: 0; }

.brand {
  font: 400 1.35rem/1 var(--f-voice);
  color: var(--signal);
}
h1 {
  font: 400 clamp(2.1rem, 4.6vw + 0.6rem, 3.6rem)/1.08 var(--f-voice);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.lead { display: flex; flex-direction: column; gap: 0.7rem; color: var(--ink-soft); font-size: 1.125rem; max-width: 32rem; }
.lead p { margin: 0; text-wrap: pretty; }

h2 {
  margin-top: 0.75rem;
  margin-bottom: -0.6rem;
  font: 700 0.78rem/1.2 var(--f-text);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.offers { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.offers li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 1.15rem;
}
.offers li::before {
  content: "";
  flex: none;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  border: 0.3rem solid var(--c);
}

/* Zur Person: the kicker sits above the name, the closing line in the voice face. */
h2#person { margin-top: 0.25rem; margin-bottom: -1rem; }
.close { margin-top: 0.25rem; max-width: 32rem; font: 400 1.4rem/1.35 var(--f-voice); color: var(--ink); text-wrap: balance; }
a.brand { text-decoration: none; justify-self: start; align-self: flex-start; }
a.brand:hover { color: var(--terracotta); }

/* Link to the person page: the name of the page in the voice face, a ring as
   its marker, so it reads as a door and not as a footnote. */
.more {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.85rem;
  align-items: baseline;
  max-width: 32rem;
  margin-top: 0.5rem;
  text-decoration: none;
  color: var(--ink);
}
.more::before {
  content: "";
  grid-row: span 2;
  align-self: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  border: 0.42rem solid var(--amber);
  transition: border-color 0.2s;
}
.more-title { font: 400 1.5rem/1.2 var(--f-voice); text-decoration: underline; text-decoration-color: var(--terracotta); text-decoration-thickness: 2px; text-underline-offset: 0.22em; }
.more-text { color: var(--muted); font-size: 1rem; }
.more:hover::before { border-color: var(--terracotta); }
.more:hover .more-title { color: var(--signal); }

.notice {
  margin-top: 0.5rem;
  font: 400 1.25rem/1.3 var(--f-voice);
  color: var(--signal);
}
footer { display: flex; flex-direction: column; align-items: flex-start; gap: 0.6rem; margin-top: -0.6rem; font-size: 0.95rem; color: var(--muted); }
footer .mail { font-size: 1.15rem; color: var(--ink); }
a { color: inherit; text-decoration-color: var(--terracotta); text-decoration-thickness: 2px; text-underline-offset: 0.25em; }
a:hover { color: var(--ink); }
a:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 3px; border-radius: 2px; }

/* ---- celebration pages ---- */
/* the page's own ring stays bright, the others step back */
body[data-ring] .r:not(.r-bark):not(.r-0) { transition: opacity 0.6s; opacity: 0.3; }
body[data-ring="1"] .r-1, body[data-ring="2"] .r-2, body[data-ring="3"] .r-3,
body[data-ring="4"] .r-4, body[data-ring="5"] .r-5, body[data-ring="6"] .r-6 { opacity: 1 !important; }

.offers a { color: inherit; text-decoration: none; background-image: linear-gradient(var(--c), var(--c)); background-size: 100% 2px; background-position: 0 100%; background-repeat: no-repeat; padding-bottom: 1px; }
.offers a:hover { color: var(--signal); }

.kicker {
  display: flex; align-items: center; gap: 0.6rem;
  margin-bottom: -0.75rem;
  font: 700 0.78rem/1.2 var(--f-text); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}
.kicker::before { content: ""; width: 0.85rem; height: 0.85rem; border-radius: 50%; border: 0.25rem solid var(--c); }
.lead-big { font-size: 1.25rem; line-height: 1.55; color: var(--ink); max-width: 32rem; text-wrap: pretty; }

.prose { display: flex; flex-direction: column; gap: 0.8rem; max-width: 34rem; color: var(--ink-soft); }
.prose > * { margin: 0; }
.prose h2, .steps h2, .faq h2, .cta h2, .others h2 {
  margin: 1.1rem 0 0; font: 400 1.55rem/1.2 var(--f-voice); letter-spacing: 0; text-transform: none; color: var(--ink); text-wrap: balance;
}
.others h2 { font-size: 1.2rem; }
.prose ul { padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.35rem; }
.prose li::marker { color: var(--terracotta); }
.prose blockquote { margin: 0.4rem 0; padding-left: 1rem; border-left: 3px solid var(--marigold); font: 400 1.2rem/1.45 var(--f-voice); color: var(--ink); }
.prose strong { color: var(--ink); font-weight: 700; }

.steps, .faq, .cta, .others { display: flex; flex-direction: column; gap: 0.8rem; max-width: 34rem; }
.steps ol { list-style: none; margin: 0.2rem 0 0; padding: 0; counter-reset: step; display: flex; flex-direction: column; gap: 1.1rem; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.4rem 1fr; column-gap: 0.9rem; }
.steps li::before {
  content: counter(step); grid-row: span 2; display: grid; place-items: center;
  width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 0.3rem solid var(--c);
  font: 400 1.05rem/1 var(--f-voice); color: var(--ink);
}
.step-name { font: 400 1.25rem/1.3 var(--f-voice); color: var(--ink); padding-top: 0.35rem; }
.step-text { color: var(--ink-soft); }

.faq details { border-bottom: 1px solid var(--bark); padding: 0.55rem 0; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--ink); list-style-position: outside; }
.faq summary:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 3px; }
.faq details p { margin: 0.5rem 0 0.2rem; color: var(--ink-soft); }

.cta p { margin: 0; color: var(--ink-soft); }
.cta .mail { font-size: 1.2rem; color: var(--ink); align-self: flex-start; }

/* the one sentence a page stands on: large, in the accent colour, on a warm
   band so it cannot be overlooked */
.anchor {
  max-width: 34rem;
  margin-block: 0.6rem;
  padding: 1.1rem 1.3rem 1.2rem;
  border-radius: 0.9rem;
  border-left: 0.5rem solid var(--terracotta);
  background: color-mix(in srgb, var(--amber) 22%, transparent);
  font: 400 clamp(2.2rem, 4vw + 1rem, 3.4rem)/1.08 var(--f-voice);
  letter-spacing: -0.01em;
  color: var(--signal);
  -webkit-text-stroke: 0.6px currentColor;
  text-wrap: balance;
}

/* "Im Todesfall" on the farewell page: the phone number first */
.urgent { max-width: 34rem; padding: 1rem 1.2rem; border-radius: 0.9rem; border: 2px solid var(--jade); display: flex; flex-direction: column; gap: 0.35rem; }
.urgent p { margin: 0; color: var(--ink-soft); }
.urgent .urgent-title { font: 700 0.78rem/1.2 var(--f-text); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.urgent-tel { font: 400 clamp(1.8rem, 3vw + 0.9rem, 2.4rem)/1.1 var(--f-voice); color: var(--ink); text-decoration: none; align-self: flex-start; }
.urgent-tel:hover { color: var(--signal); }

/* help box on the page about suicide: calm, always near the top */
.help { max-width: 34rem; padding: 1rem 1.15rem; border-radius: 0.9rem; border: 2px solid var(--jade); background: color-mix(in srgb, var(--jade) 9%, transparent); display: flex; flex-direction: column; gap: 0.55rem; }
.help p { margin: 0; font-weight: 700; color: var(--ink); }
.help ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.help li { display: grid; grid-template-columns: 3.2rem 1fr; gap: 0.6rem; align-items: baseline; color: var(--ink-soft); }
.help .tel { font: 400 1.35rem/1 var(--f-voice); color: var(--ink); text-decoration: none; }

/* price list */
.pricelist { display: flex; flex-direction: column; gap: 0.2rem; max-width: 36rem; }
.pricelist h2 { margin: 1.1rem 0 0.4rem; font: 400 1.55rem/1.2 var(--f-voice); letter-spacing: 0; text-transform: none; color: var(--ink); }
.price-row { display: grid; grid-template-columns: 1fr auto; column-gap: 1rem; padding: 0.75rem 0 0.75rem 1.9rem; border-bottom: 1px solid var(--bark); position: relative; }
.price-row::before { content: ""; position: absolute; left: 0; top: 1.05rem; width: 0.85rem; height: 0.85rem; border-radius: 50%; border: 0.25rem solid var(--c); }
.price-row h3 { margin: 0; font: 700 1.05rem/1.4 var(--f-text); color: var(--ink); }
.price-row h3 a { color: inherit; text-decoration: none; }
.price-row h3 a:hover { color: var(--signal); }
.price-amount { margin: 0; max-width: 15rem; font: 400 1.15rem/1.4 var(--f-voice); color: var(--ink); text-align: right; }
.price-sub { margin: 0.3rem 0 0; color: var(--ink-soft); }
.price-incl { grid-column: 1 / -1; margin: 0.25rem 0 0; color: var(--ink-soft); font-size: 0.97rem; }
@media (max-width: 30rem) { .price-row { grid-template-columns: 1fr; } .price-amount { text-align: left; } }
.price-note { color: var(--muted) !important; font-size: 0.97rem; }
.price-note a, .small-links a { color: var(--ink); }
.small-links { margin: 0; font-size: 1.05rem; }

.legal { margin: -0.5rem 0 0; font-size: 0.85rem; color: var(--muted); }
.legal a { color: inherit; }

/* ---- wide screens: text left, rings grow in from the right edge ---- */
@media (min-width: 1100px) {
  .rings {
    position: absolute;
    inset: 0 0 auto auto;
    width: 50vw;
    height: 100vh;
    height: 100dvh;
    min-height: 640px;
  }
  .rings svg {
    width: min(96vh, 46vw, 900px);
    right: max(-14vw, -22vh);
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
  }
  .page {
    min-height: 100vh;
    min-height: 100dvh;
    justify-content: center;
    padding-inline: clamp(3rem, 8vw, 8rem) 0;
    padding-block: 4rem;
    max-width: calc(36rem + clamp(3rem, 8vw, 8rem));
  }
}

/* ---- 404 ---- */
.page--lost { padding-top: 3rem; }
