/* ============================================================
   5-Schritte Meditations-Guide — page styles
   Layout adapted from the Claude Design draft (Meditations-Guide.dc.html).
   ============================================================ */

a.cta-btn:hover { background: var(--brand-primary-hover) !important; }
a.cta-outline:hover { background: var(--bg-section-alt) !important; }

@keyframes m2sFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes m2sBreathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(157, 175, 146, 0.45); }
  50%      { box-shadow: 0 0 0 10px rgba(157, 175, 146, 0); }
}
/* Barely-there breath for the large rings behind the closing photo. */
@keyframes m2sHaloBreathe {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%      { opacity: 0.85; transform: scale(1.012); }
}

.page { position: relative; background: var(--bg-page); min-height: 100vh; overflow-x: hidden; }

/* ---------- Language switch ---------- */
.lang-switch {
  position: absolute;
  top: 16px;
  right: 20px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 2px;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}
.lang-switch a {
  padding: 4px 7px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-muted);
  transition: color var(--duration-fast) var(--ease-calm),
              background var(--duration-fast) var(--ease-calm);
}
.lang-switch a:hover { color: var(--brand-accent); background: var(--bg-surface); }
.lang-switch a[aria-current="true"] { color: var(--brand-accent); }
.lang-switch span { color: var(--border-strong); }

/* ---------- Hero ---------- */
.hero {
  max-width: 760px;
  margin: 0 auto;
  padding: 96px 24px 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}
.hero__logo {
  width: 72px; height: 72px; object-fit: contain;
  animation: m2sFadeUp 800ms var(--ease-calm) both;
}
.hero .eyebrow { animation: m2sFadeUp 800ms var(--ease-calm) both; animation-delay: 80ms; }
.hero h1 {
  font-size: var(--text-4xl);
  max-width: 16ch;
  animation: m2sFadeUp 800ms var(--ease-calm) both;
  animation-delay: 140ms;
}
.hero__intro {
  display: flex; flex-direction: column; gap: 16px;
  font-size: var(--text-lg);
  color: var(--text-secondary);
  text-align: left;
  max-width: 60ch;
  animation: m2sFadeUp 800ms var(--ease-calm) both;
  animation-delay: 240ms;
}
.hero__intro p { margin: 0; }
/* the thesis line — highlighted with a sage rule on the left, like the Step 5 list */
.hero__lead {
  border-left: 2px solid var(--brand-primary);
  padding-left: 20px;
  color: var(--text-primary);
  font-weight: var(--weight-medium);
}

/* ---------- Inline emphasis system (used everywhere, one meaning each) ----------
   .u-key    key insight inside a paragraph — sage underline, same weight/colour
   .u-strong bold lead-in label at the start of a line — no underline
   .m2s-quote standalone pull-quote — display face, accent colour, one size    */
.u-key {
  text-decoration: underline;
  text-decoration-color: var(--brand-primary);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.u-strong {
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}
.hero__scroll-hint {
  width: 1px; height: 56px;
  background: linear-gradient(to bottom, transparent, var(--border-strong));
  margin-top: 16px;
}

/* ---------- Buttons ---------- */
/* PDF download — a corner badge mirroring .lang-switch on the opposite side. */
.cta-outline {
  position: absolute;
  top: 16px;
  left: 20px;
  z-index: 5;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--bg-page);
  color: var(--brand-accent);
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
  font-size: var(--text-xs);
  text-decoration: none;
  transition: background var(--duration-base) var(--ease-calm);
}
.cta-outline svg { flex-shrink: 0; }
@media (max-width: 560px) {
  .cta-outline { padding: 9px; }
  .cta-outline__label { display: none; }
}
.cta-btn {
  display: inline-flex; align-items: center;
  padding: 16px 32px;
  border-radius: var(--radius-md);
  background: var(--brand-primary);
  color: var(--text-on-accent);
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
  font-size: var(--text-lg);
  text-decoration: none;
  transition: background var(--duration-base) var(--ease-calm);
}

/* ---------- Journey ---------- */
.journey {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 40px;
  position: relative;
}
.journey__track {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 120px;
}
.m2s-path {
  position: absolute;
  left: calc(50% - 1px);
  top: 0; bottom: 0;
  width: 2px;
  background-image: repeating-linear-gradient(to bottom,
    var(--border-strong) 0 5px, transparent 5px 14px);
  z-index: 0;
}
.m2s-path__progress {
  position: absolute;
  top: 0; left: -1px;
  width: 4px;
  border-radius: 2px;
  background: var(--brand-primary);
  opacity: 0.75;
  height: 0%;
}

.m2s-step {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 88px 1fr;
  align-items: start;
  opacity: 0;
  transform: translate(var(--enter-x, 0), 18px);
  transition: opacity 900ms var(--ease-calm), transform 900ms var(--ease-calm);
}
.m2s-step.is-visible { opacity: 1; transform: none; }
.m2s-step[data-dir="left"]  { --enter-x: -24px; }
.m2s-step[data-dir="right"] { --enter-x: 24px; }

/* Keep body, marker and aside on the SAME grid row. Without an explicit row,
   an item with a definite grid-column but no grid-row gets pushed to a new
   row whenever the auto-placement cursor has already passed that column —
   which is what made the number float halfway down the right-side steps. */
.m2s-body,
.m2s-marker-col,
.m2s-aside { grid-row: 1; }

.m2s-body {
  max-width: 490px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.m2s-step[data-dir="left"]  .m2s-body { grid-column: 1; justify-self: end; }
.m2s-step[data-dir="right"] .m2s-body { grid-column: 3; justify-self: start; }

.m2s-body h2 { font-size: var(--text-3xl); }
.m2s-body h3 { font-size: var(--text-lg); margin-top: 8px; }
.m2s-body h4 { font-size: var(--text-base); margin-bottom: 6px; }
.m2s-body p  { margin: 0; font-size: var(--text-base); color: var(--text-secondary); }

/* Step illustration slot — flat brand illustrations with transparent
   backgrounds, shown whole (contain) on a soft paper ground. */
.m2s-figure {
  display: block;
  width: 100%;
  height: auto;          /* override the width/height attrs so aspect-ratio wins */
  aspect-ratio: 3 / 2;
  object-fit: contain;
  border-radius: 22px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}
.m2s-figure--qr {
  aspect-ratio: 1;
  background: var(--color-white);
}

/* Accent-ruled callout — the "3 Dinge" list in Step 5. */
.m2s-note {
  border-left: 2px solid var(--brand-primary);
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}
.m2s-note p { margin: 0; }

/* Same rhythm, no rule — plain sub-list under a heading (Step 1 Stolpersteine). */
.m2s-sublist {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}
.m2s-sublist p { margin: 0; }

.m2s-quote,
.m2s-body .m2s-quote {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: var(--weight-medium);
  color: var(--brand-accent);
}

/* meditation sub-steps in Step 3 — dark olive panels so the actual practice
   stands apart from the paper-white tip cards and illustration frames. */
.m2s-substeps { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; text-align: left; }
.m2s-substep {
  display: flex;
  gap: 14px;
  background: var(--bg-inverse);
  color: var(--text-on-inverse);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}
.m2s-substep h4 { color: var(--text-on-inverse); }
.m2s-substep p  { color: color-mix(in srgb, var(--color-paper) 82%, transparent); }
.m2s-substep .u-key { text-decoration-color: var(--color-sage); }
.m2s-substep__num {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: var(--radius-full);
  background: var(--color-sage);
  color: var(--color-sage-dark);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
}
.m2s-hint { margin: 4px 0 0; font-size: var(--text-sm); font-style: italic; color: var(--text-muted); }

/* marker column */
.m2s-marker-col { grid-column: 2; display: flex; justify-content: center; }
.m2s-marker {
  position: relative;
  width: 66px; height: 66px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-raised);
  border: 2px solid var(--brand-primary);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--brand-accent);
  animation: m2sBreathe 6s var(--ease-calm) infinite;
}
.m2s-marker__icon {
  position: absolute;
  bottom: -12px;
  width: 40px; height: 40px;
  background: var(--bg-page);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  display: flex; align-items: center; justify-content: center;
}
.m2s-step[data-dir="left"]  .m2s-marker__icon { right: -12px; }
.m2s-step[data-dir="right"] .m2s-marker__icon { left: -12px; }

/* aside / tip cards — centred vertically in the step and centred within their
   own (non-text) column, so they sit away from the spine. The aside is just a
   stable layout container; the cards inside it animate individually. */
.m2s-aside {
  max-width: 280px;
  align-self: center;
  justify-self: center;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.m2s-step[data-dir="left"]  .m2s-aside { grid-column: 3; }
.m2s-step[data-dir="right"] .m2s-aside { grid-column: 1; }

/* Tip cards stay hidden until the reader reaches the middle of the step (JS
   adds .aside-in after a short pause), then glide in from the outer edge. */
.m2s-aside .card {
  opacity: 0;
  transition: opacity 800ms var(--ease-calm), transform 800ms var(--ease-calm);
}
.m2s-step[data-dir="left"]  .m2s-aside .card { transform: translateX(56px); }
.m2s-step[data-dir="right"] .m2s-aside .card { transform: translateX(-56px); }
/* extra [data-dir] keeps these ahead of the mobile "from" rules on specificity */
.m2s-step[data-dir] .m2s-aside.aside-in .card { opacity: 1; transform: none; }
/* …but the QR / "guided recording" card rides in with the rest of the step */
.m2s-step.is-visible[data-dir] .m2s-aside .card--with-step { opacity: 1; transform: none; }

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}
.card p { margin: 8px 0 0; font-size: var(--text-sm); color: var(--text-secondary); }
.card .m2s-figure { margin-top: 12px; border-radius: 12px; }
.card .m2s-figure--qr { aspect-ratio: 1; max-width: 180px; margin-inline: auto; }

/* QR + its download-page link, wrapped in one tappable block. */
.m2s-qr { display: block; margin-top: 12px; text-decoration: none; }
.m2s-qr .m2s-figure--qr { margin-top: 0; }
.m2s-qr__url {
  display: block;
  margin-top: 10px;
  font-size: var(--text-xs);
  line-height: 1.4;
  text-align: center;
  color: var(--brand-accent);
  word-break: break-all;
  text-decoration: underline;
  text-decoration-color: var(--brand-primary);
  text-underline-offset: 2px;
}
.m2s-qr:hover .m2s-qr__url,
.m2s-qr:focus-visible .m2s-qr__url { color: var(--brand-primary); }

/* ---------- Closing CTA ----------
   Stefan sits centred in the section, framed by softly breathing rings —
   a life-size echo of the step-markers and the meditator-in-a-ring logo. */
.closing {
  position: relative;
  background: var(--bg-section-alt);
  padding: 96px 24px;
  margin-top: 96px;
  overflow: hidden;
}

.closing__inner {
  max-width: 940px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: 56px;
  align-items: center;
}

.closing__figure {
  position: relative;
  margin: 0;
  align-self: center;
  display: flex;
  justify-content: center;
  isolation: isolate;
}
.closing__halo {
  position: absolute;
  left: 50%;
  bottom: 6%;
  width: min(340px, 92%);
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: var(--radius-full);
  background: radial-gradient(circle,
    color-mix(in srgb, var(--color-paper) 82%, transparent) 0 46%,
    transparent 72%);
  z-index: -1;
}
.closing__halo::before,
.closing__halo::after {
  content: "";
  position: absolute;
  inset: 4%;
  border-radius: inherit;
  border: 1px solid color-mix(in srgb, var(--color-sage-dark) 12%, transparent);
  animation: m2sHaloBreathe 11s var(--ease-calm) infinite;
}
.closing__halo::after {
  inset: -26px;
  border-color: color-mix(in srgb, var(--color-sage-dark) 8%, transparent);
  animation-delay: 2.4s;
}
.closing__portrait {
  position: relative;
  width: 100%;
  max-width: 340px;
  height: auto;
  display: block;
  transform: scaleX(-1);
  filter: drop-shadow(0 26px 34px rgb(var(--shadow-color) / 0.22));
}

.closing__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}
.closing__text h2 { font-size: var(--text-2xl); }
.closing__text p { margin: 0; font-size: var(--text-lg); color: var(--text-secondary); }

.site-footer { padding: 32px 24px; text-align: center; }
.site-footer p { margin: 0; font-size: var(--text-sm); color: var(--text-muted); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { padding: 64px 20px 48px; }
  .hero h1 { font-size: var(--text-3xl); }

  .journey__track { gap: 72px; }
  .m2s-path { left: 29px; }

  .m2s-step,
  .m2s-step[data-dir="left"],
  .m2s-step[data-dir="right"] { grid-template-columns: 58px 1fr; column-gap: 18px; }

  .m2s-marker-col { grid-column: 1; grid-row: 1; align-self: start; }
  .m2s-marker { width: 52px; height: 52px; font-size: var(--text-lg); }
  .m2s-marker__icon { display: none; }

  .m2s-step[data-dir="left"]  .m2s-body,
  .m2s-step[data-dir="right"] .m2s-body,
  .m2s-step[data-dir="left"]  .m2s-aside,
  .m2s-step[data-dir="right"] .m2s-aside {
    grid-column: 2;
    justify-self: stretch;
    text-align: left;
    max-width: none;
  }
  .m2s-body  { grid-row: 1; }
  .m2s-aside,
  .m2s-step[data-dir="left"]  .m2s-aside,
  .m2s-step[data-dir="right"] .m2s-aside {
    grid-row: 2;
    margin-top: 20px;
    align-self: start;
    justify-self: stretch;
  }
  /* stacked below the text on mobile — cards rise in place, not sideways */
  .m2s-step[data-dir="left"]  .m2s-aside .card,
  .m2s-step[data-dir="right"] .m2s-aside .card { transform: translateY(16px); }

  .m2s-body h2 { font-size: var(--text-2xl); }

  .closing { padding: 72px 20px; margin-top: 64px; }
  .closing__inner {
    grid-template-columns: 1fr;
    gap: 20px;
    justify-items: center;
    text-align: center;
  }
  .closing__portrait { max-width: 260px; }
  .closing__text { align-items: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__logo, .hero .eyebrow, .hero h1, .hero__intro,
  .m2s-marker, .closing__halo::before, .closing__halo::after { animation: none !important; }
  .m2s-step,
  .m2s-aside .card { transition: none !important; opacity: 1 !important; transform: none !important; }
}
