/* Christian Practice — the website.
   The same book as the app, in its two lights: vellum and ink by day,
   warm black and cream by candlelight. Red rubrics by day, gold at night.
   The arch (a niche, a window) and the lit window are the signature shapes. */

:root {
  --ground: #F3ECDB;
  --page: #FBF7EC;
  --ink: #2A2118;
  --soft: rgba(42, 33, 24, 0.74);
  --faint: rgba(42, 33, 24, 0.5);
  --rubric: #A3271B;
  --gold: #856010;
  --gold-line: rgba(133, 96, 16, 0.75);
  --hair: rgba(42, 33, 24, 0.14);
  --flame: #F2C766;
  --glow: rgba(242, 199, 102, 0.42);
  --glass: rgba(251, 247, 236, 0.62);
  --glass-strong: rgba(251, 247, 236, 0.82);
  --glass-edge: rgba(255, 255, 255, 0.75);
  --glass-shadow: 0 10px 30px rgba(42, 33, 24, 0.10), 0 1px 2px rgba(42, 33, 24, 0.08);
  --button-bg: #2A2118;
  --button-ink: #F3ECDB;
  --unlit: rgba(42, 33, 24, 0.07);
  --shadow-deep: 0 30px 60px -20px rgba(42, 33, 24, 0.35);

  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(16px, 5vw, 40px);
  --max: 1160px;
  --ease-spring: cubic-bezier(0.22, 1, 0.36, 1);      /* close to a critically damped spring */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
}

:root[data-theme="night"] {
  --ground: #17130E;
  --page: #1E1913;
  --ink: #F3EBDD;
  --soft: rgba(243, 235, 221, 0.70);
  --faint: rgba(243, 235, 221, 0.48);
  --rubric: #E2A93A;
  --gold: #E2A93A;
  --gold-line: rgba(226, 169, 58, 0.7);
  --hair: rgba(255, 255, 255, 0.12);
  --glow: rgba(242, 199, 102, 0.22);
  --glass: rgba(34, 28, 21, 0.55);
  --glass-strong: rgba(34, 28, 21, 0.82);
  --glass-edge: rgba(255, 255, 255, 0.14);
  --glass-shadow: 0 10px 30px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.3);
  --button-bg: #F3EBDD;
  --button-ink: #17130E;
  --unlit: rgba(255, 255, 255, 0.06);
  --shadow-deep: 0 30px 70px -20px rgba(0, 0, 0, 0.7);
  color-scheme: dark;
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  transition: background-color 600ms ease, color 600ms ease;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.15; text-wrap: balance; }
::selection { background: var(--flame); color: #2A2118; }
:focus-visible { outline: 2px solid var(--rubric); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--page); padding: 8px 14px; border-radius: 10px; }
.skip:focus { left: 8px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Rubric: the small red (gold at night) capitals the app uses for labels. */
.rubric {
  font: 600 0.72rem/1.2 var(--serif);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rubric);
  margin: 0 0 14px;
}
.display {
  font-size: clamp(2.5rem, 6vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
}
.title {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
}
.lede { font-size: clamp(1.1rem, 1.8vw, 1.3rem); color: var(--soft); max-width: 34em; }
.soft { color: var(--soft); }

/* ---------- Glass ---------- */

.glass {
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-edge);
}

/* ---------- Navigation ---------- */

.nav {
  position: fixed;
  top: 12px; left: 50%;
  z-index: 50;
  width: min(calc(100% - 24px), 980px);
  transform: translate(-50%, 0);
  display: flex; align-items: center; gap: 8px;
  padding: 8px 8px 8px 18px;
  border-radius: 999px;
  transition: transform 500ms var(--ease-spring), background-color 400ms ease, box-shadow 400ms ease;
}
.nav.is-hidden { transform: translate(-50%, -120%); }
.wordmark {
  display: inline-flex; align-items: center; gap: 9px;
  text-decoration: none;
  font: 600 0.72rem/1 var(--serif); letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--rubric);
  white-space: nowrap;
}
.wordmark .mark {
  width: 12px; height: 16px;
  border-radius: 9999px 9999px 0 0;
  background: linear-gradient(var(--flame), var(--gold));
  box-shadow: 0 0 12px var(--glow);
}
.nav-links { display: flex; gap: 2px; margin: 0 auto; }
.nav-links a {
  font: 500 0.9rem/1 var(--sans);
  text-decoration: none;
  color: var(--soft);
  padding: 10px 12px; border-radius: 999px;
  transition: color 200ms ease, background-color 200ms ease;
}
.nav-links a:hover { color: var(--ink); background: var(--unlit); }
.nav-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }

.theme-toggle {
  position: relative;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--hair);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  display: grid; place-items: center;
  transition: transform 120ms ease-out, background-color 200ms ease;
}
.theme-toggle:hover { background: var(--unlit); }
.theme-toggle:active { transform: scale(0.92); }
.theme-toggle svg { width: 20px; height: 20px; transition: transform 600ms var(--ease-spring), opacity 300ms ease; position: absolute; }
.theme-toggle .moon { opacity: 0; transform: rotate(-60deg) scale(0.6); }
:root[data-theme="night"] .theme-toggle .sun { opacity: 0; transform: rotate(60deg) scale(0.6); }
:root[data-theme="night"] .theme-toggle .moon { opacity: 1; transform: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 0;
  font: 600 0.95rem/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: transform 120ms ease-out, box-shadow 300ms ease, background-color 300ms ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.97); }
.btn-ink { background: var(--button-bg); color: var(--button-ink); box-shadow: 0 8px 20px -8px rgba(0,0,0,0.45); }
.btn-ink:hover { box-shadow: 0 12px 28px -8px rgba(0,0,0,0.5); }
.btn-quiet { color: var(--ink); background: transparent; border: 1px solid var(--hair); }
.btn-quiet:hover { background: var(--unlit); }
.btn small { display: block; font: 500 0.66rem/1.1 var(--sans); opacity: 0.75; letter-spacing: 0.02em; }
.btn .apple { width: 18px; height: 18px; }
.btn-store { min-height: 52px; padding: 0 22px 0 18px; text-align: left; }
.btn-store span { display: flex; flex-direction: column; gap: 2px; font-size: 1rem; }
.nav .btn { min-height: 40px; padding: 0 16px; font-size: 0.85rem; }

@media (max-width: 960px) {
  .nav-links { display: none; }
}
@media (max-width: 420px) {
  .wordmark .full { display: none; }
}

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

section { position: relative; padding: clamp(80px, 13vw, 150px) 0; }
.section-head { max-width: 40rem; margin-bottom: clamp(36px, 6vw, 64px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .lede { margin-left: auto; margin-right: auto; }
.section-head .title + .lede { margin-top: 18px; }
.split .title + .lede, .split .subtitle + .lede { margin-top: 18px; }
.split .durations { margin-top: 26px; }

/* A thin ruled line, the way a page is ruled. */
.rule { height: 1px; background: var(--hair); border: 0; margin: 0; }

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

.hero {
  min-height: 100svh;
  padding: 120px 0 60px;
  display: flex; align-items: center;
  isolation: isolate;
}
.hero::before {
  /* The light that falls from a high window. */
  content: "";
  position: absolute; inset: -10% -10% auto;
  height: 90%;
  z-index: -1;
  background: radial-gradient(ellipse 60% 55% at 72% 30%, var(--glow), transparent 70%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero-copy .lede { margin: 24px 0 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-note { margin-top: 18px; font: 500 0.85rem/1.4 var(--sans); color: var(--faint); }

.week {
  display: flex; align-items: center; gap: 16px;
  margin-top: 44px;
  font: 500 0.88rem/1.4 var(--sans); color: var(--soft);
}
.windows { display: flex; align-items: flex-end; gap: 6px; }
.win {
  width: 12px; height: 18px;
  border-radius: 9999px 9999px 0 0;
  background: var(--unlit);
  border: 1px solid var(--hair);
  transition: background 700ms ease, box-shadow 900ms ease, border-color 700ms ease;
}
.win.lit {
  background: linear-gradient(#FFF0B8, var(--flame) 45%, #D9902A);
  border-color: rgba(217, 144, 42, 0.6);
  box-shadow: 0 0 14px var(--glow), 0 0 4px rgba(242, 199, 102, 0.8);
}

.hero-visual { position: relative; display: grid; justify-items: center; padding-top: 110px; }
/* The church the app opens on, behind the phone: its arch, its coloured glass and its candles. */
.hero-church {
  position: absolute;
  top: 0; left: 50%;
  width: 124%; max-width: 580px;
  transform: translate3d(-50%, var(--parallax, 0px), 0);
  -webkit-mask-image: radial-gradient(ellipse 62% 66% at 50% 46%, #000 62%, transparent 100%);
  mask-image: radial-gradient(ellipse 62% 66% at 50% 46%, #000 62%, transparent 100%);
}
.hero-visual .phone { position: relative; width: min(60%, 250px); z-index: 2; }

@media (max-width: 900px) {
  .hero { min-height: auto; padding-top: 110px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { margin-top: 20px; }
  .hero-church { width: 108%; }
}
@media (max-width: 480px) {
  .hero-visual { padding-top: 90px; }
}

/* ---------- Phone ---------- */

.phone {
  aspect-ratio: 1206 / 2622;
  border-radius: 15% / 7%;
  padding: 3.2%;
  background: linear-gradient(145deg, #3a332b, #0f0d0a 40%, #2a241d);
  box-shadow: var(--shadow-deep), inset 0 0 0 1.5px rgba(255, 255, 255, 0.14), inset 0 0 0 4px #0b0a08;
  position: relative;
}
.phone .screen {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 12% / 5.6%;
  overflow: hidden;
  background: var(--ground);
}
.phone .screen img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity 600ms ease, transform 900ms var(--ease-spring);
}
.phone .screen img.is-off { opacity: 0; transform: scale(1.02); }
/* Each screen comes in both lights; show the one that matches the page. */
.phone .screen .night { opacity: 0; }
:root[data-theme="night"] .phone .screen .day { opacity: 0; }
:root[data-theme="night"] .phone .screen .night { opacity: 1; }
.phone .screen .is-off.night, .phone .screen .is-off.day { opacity: 0 !important; }

/* ---------- The practice (sticky phone, four leaves) ---------- */

.practice-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 7vw, 100px);
  align-items: start;
}
.practice-phone { position: sticky; top: max(90px, calc(50vh - 300px)); display: grid; justify-items: center; }
.practice-phone .phone { width: min(100%, 290px); }
.steps { list-style: none; margin: 0; padding: 0; }
.step {
  min-height: 62vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 24px 0;
  opacity: 0.35;
  transition: opacity 600ms ease;
}
.step.is-active { opacity: 1; }
.step-num {
  font: 600 3.2rem/1 var(--serif);
  color: var(--rubric);
  margin-bottom: 10px;
}
.step h3 { font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -0.015em; margin-bottom: 12px; }
.step p { color: var(--soft); max-width: 30em; font-size: 1.1rem; }
.step .verse {
  margin-top: 8px;
  padding-left: 16px;
  border-left: 2px solid var(--rubric);
  font-style: italic;
  color: var(--ink);
}
.step .verse cite { display: block; margin-top: 6px; font: normal 600 0.7rem/1 var(--serif); letter-spacing: 0.18em; text-transform: uppercase; color: var(--rubric); }

@media (max-width: 860px) {
  .practice-grid { grid-template-columns: 1fr; }
  .practice-phone { position: relative; top: 0; order: 2; }
  .step { min-height: auto; opacity: 1; padding: 22px 0; border-top: 1px solid var(--hair); }
}

/* ---------- Pray (the sanctuary: the quietest place) ---------- */

.sanctuary {
  background: #17130E;
  color: #F3EBDD;
  --soft: rgba(243, 235, 221, 0.7);
  --faint: rgba(243, 235, 221, 0.48);
  --rubric: #E2A93A;
  --hair: rgba(255, 255, 255, 0.12);
  --glass: rgba(34, 28, 21, 0.55);
  --glass-edge: rgba(255, 255, 255, 0.14);
  --page: #1E1913;
  --ink: #F3EBDD;
  --ground: #17130E;
  overflow: hidden;
}
.sanctuary::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 50% 60% at 50% 40%, rgba(242, 199, 102, 0.16), transparent 70%);
  pointer-events: none;
}
.pray-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 32px);
  margin-top: clamp(40px, 6vw, 70px);
}
.pray-card {
  position: relative;
  border-radius: 32px;
  padding: clamp(24px, 4vw, 44px);
  overflow: hidden;
  min-height: 400px;
  display: flex; flex-direction: column;
}
.pray-card h3 { font-size: clamp(1.45rem, 2.2vw, 1.8rem); letter-spacing: -0.015em; margin-bottom: 12px; }
.pray-card p { color: var(--soft); max-width: 26em; }

.breath { margin-top: auto; display: grid; place-items: center; padding-top: 30px; }
/* A window that breathes: its light rises on the breath in and falls on the breath out. */
.breath-window {
  width: 74px; height: 108px; margin-bottom: 18px;
  border-radius: 9999px 9999px 0 0;
  border: 1.5px solid rgba(226, 169, 58, 0.8);
  background: linear-gradient(#FFF0B8, var(--flame) 45%, #D9902A);
  box-shadow: 0 0 46px rgba(242, 199, 102, 0.5);
  animation: breathe 9s ease-in-out infinite;
}
.breath-word {
  font: 500 0.8rem/1 var(--serif); letter-spacing: 0.24em; text-transform: uppercase; color: var(--rubric);
}
.breath-word span { transition: opacity 900ms ease; }
@keyframes breathe {
  0%, 100% { opacity: 0.35; box-shadow: 0 0 12px rgba(242, 199, 102, 0.2); }
  45%, 55% { opacity: 1; box-shadow: 0 0 60px rgba(242, 199, 102, 0.65); }
}
.durations { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip {
  font: 500 0.82rem/1 var(--sans);
  padding: 9px 14px; border-radius: 999px;
  border: 1px solid var(--hair);
  color: var(--soft);
  background: transparent;
}

.together { margin-top: auto; padding-top: 30px; display: grid; place-items: center; }
/* One lit window for each person praying: they kindle one by one. */
.presence { display: flex; justify-content: center; align-items: flex-end; gap: 9px; min-height: 40px; }
.presence i {
  width: 20px; height: 29px; border-radius: 9999px 9999px 0 0;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14);
  transition: background 900ms ease, box-shadow 1100ms ease, border-color 900ms ease;
}
.presence i.on {
  background: linear-gradient(#FFF0B8, var(--flame) 45%, #D9902A);
  border-color: rgba(217, 144, 42, 0.6);
  box-shadow: 0 0 16px rgba(242, 199, 102, 0.7);
}
.present { margin-top: 18px; font: 500 0.88rem/1.4 var(--sans); color: var(--soft); text-align: center; }
.present b { color: var(--ink); font-variant-numeric: tabular-nums; }

.pray-card .bells { margin-top: auto; padding-top: 30px; }
.sanctuary .split .phone { width: min(100%, 270px); }
@media (max-width: 980px) {
  .pray-grid { grid-template-columns: 1fr; }
  .pray-card { min-height: auto; }
}

/* ---------- Paths ---------- */

.split {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 7vw, 100px); align-items: center;
}
.split .phone { width: min(100%, 290px); margin: 0 auto; }
.lengths { display: flex; gap: clamp(16px, 3vw, 36px); margin: 30px 0; }
.length b { display: block; font: 600 clamp(2.6rem, 5vw, 3.6rem)/1 var(--serif); letter-spacing: -0.03em; }
.length span { font: 500 0.82rem/1.3 var(--sans); color: var(--soft); }
.themes { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split.flip .phone-col { order: 2; }
}

/* ---------- People (holy cards) ---------- */

.cards-viewport {
  position: relative;
  overflow: hidden;
  margin-top: 10px;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  mask-image: linear-gradient(to right, transparent, #000 var(--gutter), #000 calc(100% - var(--gutter)), transparent);
}
.cards-viewport.is-dragging { cursor: grabbing; }
.cards-track {
  display: flex; gap: clamp(14px, 2vw, 22px);
  padding: 30px var(--gutter) 40px;
  width: max-content;
  will-change: transform;
}
.holy-card {
  width: clamp(210px, 24vw, 260px);
  flex: 0 0 auto;
  background: var(--page);
  border-radius: 22px;
  padding: 14px 14px 18px;
  box-shadow: 0 1px 0 var(--hair), 0 18px 40px -22px rgba(0, 0, 0, 0.45);
  border: 1px solid var(--hair);
  transition: transform 500ms var(--ease-spring), box-shadow 500ms ease;
}
.holy-card:hover { transform: translateY(-6px); box-shadow: 0 1px 0 var(--hair), 0 30px 50px -24px rgba(0, 0, 0, 0.55); }
.holy-card .arch {
  aspect-ratio: 3 / 4;
  border-radius: 9999px 9999px 0 0;
  padding: 4px;
  background: var(--page);
  outline: 1px solid var(--gold-line);
  outline-offset: -1px;
}
.holy-card .arch img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 9999px 9999px 0 0;
  pointer-events: none;
}
.holy-card h3 { font-size: 1.25rem; margin: 16px 0 2px; letter-spacing: -0.01em; }
.holy-card .meta { font: 500 0.8rem/1.4 var(--sans); color: var(--soft); }
.holy-card .num { font: 600 0.62rem/1 var(--serif); letter-spacing: 0.2em; text-transform: uppercase; color: var(--rubric); margin-top: 12px; }
.cards-hint { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 0 24px; }
.cards-hint .section-head { flex: 1 1 28rem; margin-bottom: 0; }
.cards-hint .cards-nav { margin-bottom: 6px; }
@media (max-width: 640px) { .cards-hint .cards-nav { margin-top: 20px; } }
.cards-nav { display: flex; gap: 8px; }
.round {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--hair); background: var(--glass); color: var(--ink);
  cursor: pointer;
  transition: transform 120ms ease-out, background-color 200ms ease;
}
.round:active { transform: scale(0.92); }
.round:hover { background: var(--unlit); }
.round svg { width: 18px; height: 18px; }

/* ---------- The year ---------- */

.year-band {
  display: flex; height: 64px; border-radius: 18px; overflow: hidden;
  margin: 10px 0 18px;
  box-shadow: inset 0 0 0 1px var(--hair);
}
.season {
  position: relative; border: 0; padding: 0; cursor: pointer;
  background: var(--day);
  transition: flex-grow 700ms var(--ease-spring), filter 300ms ease;
  flex: var(--w) 1 0;
  min-width: 26px;
}
.season:hover { filter: brightness(1.08); }
:root[data-theme="night"] .season { background: var(--night); }
.season.is-active { flex-grow: calc(var(--w) * 2.4); }
.season.is-active::after {
  content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55); border-radius: inherit;
}
.season-detail { min-height: 7.5em; }
.season-detail h3 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 8px; letter-spacing: -0.015em; }
.season-detail p { color: var(--soft); max-width: 34em; }
.season-detail .rubric { color: var(--season-ink, var(--rubric)); }
.year-art {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(8px, 1.4vw, 16px);
  margin-top: 36px;
}
.year-art figure { margin: 0; }
.year-art .arch {
  aspect-ratio: 3 / 4.2;
  border-radius: 9999px 9999px 0 0;
  overflow: hidden;
  outline: 1px solid var(--gold-line); outline-offset: 3px;
  opacity: 0.55;
  transform: translateY(8px);
  transition: opacity 600ms ease, transform 700ms var(--ease-spring);
}
.year-art .arch img { width: 100%; height: 100%; object-fit: cover; }
.year-art figure.is-active .arch { opacity: 1; transform: none; }
.year-art figcaption { margin-top: 10px; font: 500 0.75rem/1.3 var(--sans); color: var(--soft); text-align: center; }
@media (max-width: 640px) {
  .year-art { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Everywhere ---------- */

.everywhere {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 26px);
}
.tile {
  border-radius: 28px; padding: 28px;
  background: var(--page);
  border: 1px solid var(--hair);
  display: flex; flex-direction: column; gap: 10px;
  min-height: 300px;
  overflow: hidden;
}
.tile h3 { font-size: 1.45rem; letter-spacing: -0.01em; }
.tile p { color: var(--soft); margin: 0; }
.tile .art { margin-top: auto; padding-top: 18px; display: grid; place-items: center; }

.widget-mock {
  width: 170px; height: 170px; border-radius: 34px;
  padding: 16px;
  background: linear-gradient(160deg, #2a2219, #17130E);
  color: #F3EBDD;
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.6);
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.widget-mock img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.widget-mock::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 20%, rgba(23,19,14,0.9)); }
.widget-mock > * { position: relative; z-index: 1; }
.widget-mock .rubric { color: #E2A93A; font-size: 0.56rem; margin: auto 0 4px; }
.widget-mock b { font: 600 1.02rem/1.15 var(--serif); }
.widget-mock .windows { margin-top: 10px; gap: 4px; }
.widget-mock .win { width: 8px; height: 12px; border-color: rgba(255,255,255,0.15); background: rgba(255,255,255,0.08); }
.widget-mock .win.lit { background: linear-gradient(#FFF0B8, #F2C766 45%, #D9902A); }

.watch {
  width: 150px; aspect-ratio: 0.84; border-radius: 40px;
  background: linear-gradient(145deg, #3a332b, #0f0d0a 45%, #2a241d);
  padding: 10px;
  box-shadow: 0 20px 40px -18px rgba(0,0,0,0.6), inset 0 0 0 1.5px rgba(255,255,255,0.14);
  position: relative;
}
.watch::after { content: ""; position: absolute; right: -5px; top: 30%; width: 6px; height: 26px; border-radius: 3px; background: #2a241d; }
.watch .face {
  width: 100%; height: 100%; border-radius: 32px; background: #000; color: #F3EBDD;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; text-align: center; padding: 12px;
}
.watch .face .rubric { margin: 0; color: #E2A93A; font-size: 0.5rem; }
.watch .face b { font: 600 0.9rem/1.15 var(--serif); }
.watch .face .windows { gap: 3px; }
.watch .face .win { width: 7px; height: 10px; border-color: rgba(255,255,255,0.15); background: rgba(255,255,255,0.08); }
.watch .face .win.lit { background: linear-gradient(#FFF0B8, #F2C766 45%, #D9902A); }

.bell {
  width: 100%; max-width: 230px;
  border-radius: 22px; padding: 14px 16px;
  display: flex; gap: 12px; align-items: center;
  font: 500 0.82rem/1.35 var(--sans);
}
.bell img { width: 38px; height: 38px; border-radius: 9px; flex: none; }
.bell > div { flex: 1; min-width: 0; text-align: left; }
.bell-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin: 0; }
.bell b { min-width: 0; font-weight: 600; color: var(--ink); }
.bell time { flex: none; padding-top: 1px; color: var(--faint); font-size: 0.74rem; font-variant-numeric: tabular-nums; }
.bell span { display: block; color: var(--soft); }
.bells { display: grid; gap: 10px; width: 100%; justify-items: center; }
.bells .bell:nth-child(2) { transform: scale(0.95); opacity: 0.8; }

/* Listening: the painting, the step being read, and the pause. */
.player { width: 100%; max-width: 250px; border-radius: 22px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; }
.player img { width: 44px; height: 56px; object-fit: cover; border-radius: 9999px 9999px 4px 4px; border: 1.5px solid var(--gold-line); }
.player .rubric { margin: 0 0 3px; font-size: 0.56rem; }
.player b { display: block; font: 600 0.95rem/1.2 var(--serif); color: var(--ink); }
.player div { flex: 1; min-width: 0; }
.player .pause { width: 34px; height: 34px; border-radius: 50%; background: var(--button-bg); position: relative; flex: none; }
.player .pause::before, .player .pause::after { content: ""; position: absolute; top: 11px; width: 4px; height: 12px; border-radius: 1px; background: var(--button-ink); }
.player .pause::before { left: 11px; } .player .pause::after { right: 11px; }

.carry { width: 100%; max-width: 250px; border-radius: 22px; padding: 16px 18px; }
.carry .windows { margin-bottom: 12px; }
.carry .rubric { margin: 0 0 4px; font-size: 0.56rem; }
.carry b { font: 500 italic 1.1rem/1.3 var(--serif); color: var(--ink); }

.wallpaper { display: flex; gap: 10px; align-items: flex-end; }
.wallpaper img { width: 62px; height: 128px; object-fit: cover; border-radius: 14px; border: 1px solid var(--hair); box-shadow: 0 14px 28px -16px rgba(0, 0, 0, 0.5); }
.wallpaper img:nth-child(2) { width: 72px; height: 150px; }

@media (max-width: 900px) {
  .everywhere { grid-template-columns: 1fr; }
  .tile { min-height: auto; }
}

/* ---------- Privacy ---------- */

.promises { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 26px); }
.promise { border-top: 1px solid var(--hair); padding-top: 22px; }
.promise h3 { font-size: 1.3rem; margin-bottom: 8px; letter-spacing: -0.01em; }
.promise p { color: var(--soft); margin: 0; }
.promise .icon { width: 28px; height: 28px; color: var(--rubric); margin-bottom: 14px; }
@media (max-width: 760px) { .promises { grid-template-columns: 1fr; } }

/* ---------- Languages ---------- */

.langs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.langs .chip { font-size: 0.95rem; padding: 12px 18px; color: var(--ink); background: var(--page); }

/* ---------- Final ---------- */

.final { text-align: center; padding-bottom: clamp(100px, 14vw, 170px); }
.final-church {
  width: min(78%, 330px); margin: 0 auto 28px;
  -webkit-mask-image: radial-gradient(ellipse 60% 62% at 50% 52%, #000 58%, transparent 100%);
  mask-image: radial-gradient(ellipse 60% 62% at 50% 52%, #000 58%, transparent 100%);
}
.final .title { max-width: 14em; margin: 0 auto; }
.final .lede { margin: 18px auto 32px; }
.final .hero-actions { justify-content: center; }

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

.footer { border-top: 1px solid var(--hair); padding: 40px 0 50px; font: 500 0.85rem/1.6 var(--sans); color: var(--soft); }
.footer-grid { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: flex-start; }
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer a { text-decoration: none; color: var(--soft); }
.footer a:hover { color: var(--ink); }
.footer .credit { margin-top: 18px; max-width: 46em; color: var(--faint); font-size: 0.78rem; }

/* ---------- Reading pages (privacy, terms, support) ---------- */

.leaf-page { padding: 130px 0 90px; }
.leaf {
  max-width: 760px; margin: 0 auto;
  background: var(--page);
  border: 1px solid var(--hair);
  border-radius: 28px;
  padding: clamp(28px, 6vw, 64px);
  box-shadow: 0 30px 60px -40px rgba(0, 0, 0, 0.35);
}
.leaf .title { margin-bottom: 8px; }
.leaf .effective { font: 500 0.85rem/1.4 var(--sans); color: var(--faint); margin-bottom: 34px; }
.leaf h2 { font-size: 1.25rem; margin: 34px 0 10px; letter-spacing: -0.005em; }
.leaf h2 .n { color: var(--rubric); margin-right: 8px; }
.leaf p { color: var(--soft); }
.leaf a:not(.btn) { color: var(--rubric); }
.leaf .first::first-letter {
  float: left; font-size: 3.6em; line-height: 0.82; padding: 6px 10px 0 0; color: var(--rubric); font-weight: 600;
}
.faq details { border-top: 1px solid var(--hair); padding: 18px 0; }
.faq details:last-child { border-bottom: 1px solid var(--hair); }
.faq summary {
  cursor: pointer; list-style: none;
  font: 600 1.15rem/1.35 var(--serif);
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; width: 10px; height: 10px; flex: none;
  border-right: 1.5px solid var(--rubric); border-bottom: 1.5px solid var(--rubric);
  transform: rotate(45deg) translateY(-3px);
  transition: transform 400ms var(--ease-spring);
}
.faq details[open] summary::after { transform: rotate(225deg) translateY(-3px); }
.faq details p { margin: 12px 0 0; }
.contact {
  margin-top: 34px; padding: 22px; border-radius: 20px;
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center;
}
.contact p { margin: 0; }
/* The address is one long word: on the narrowest phones the button takes the line and the text gets smaller. */
@media (max-width: 360px) { .contact .btn { width: 100%; padding: 0 12px; font-size: 0.85rem; } }

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0) scale(0.985);
  filter: blur(6px);
  transition: opacity 900ms var(--ease-out), transform 1100ms var(--ease-spring), filter 900ms var(--ease-out);
  transition-delay: var(--delay, 0ms);
}
.reveal.is-in { opacity: 1; transform: none; filter: none; }
.no-js .reveal { opacity: 1; transform: none; filter: none; }

/* ---------- Accessibility preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; }
  .reveal { transform: none; filter: none; transition: opacity 400ms ease; }
  .hero-church { transform: translate3d(-50%, 0, 0); }
  .phone .screen img, .season, .holy-card, .year-art .arch, .nav { transition-duration: 200ms; transition-timing-function: ease; }
  .phone .screen img.is-off { transform: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .glass { background: var(--glass-strong); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --soft: var(--ink); --hair: rgba(42, 33, 24, 0.5); }
  :root[data-theme="night"] { --hair: rgba(255, 255, 255, 0.5); }
  .glass { background: var(--glass-strong); }
}

/* ---------- The church (the same drawing as the invitation to pray; see backend/scripts/church-scene.ts) ---------- */

:root {
  --church-page: var(--ground);
  --stone: #DBCCB3; --stone-lit: #FFF5DE; --stone-near: #B8A68C; --stone-joint: rgba(84, 62, 36, 0.13);
  --stone-shade: rgba(84, 62, 36, 0.22); --church-glow: rgba(255, 219, 158, 0.55); --glass-dim: 0;
  --linen: #F5EDD9; --linen-shade: #B3A68F; --wax: #F7F0DB; --wax-shade: #B8A88C;
}
:root[data-theme="night"] {
  --stone: #16110D; --stone-lit: #573D26; --stone-near: #080604; --stone-joint: rgba(0, 0, 0, 0.35);
  --stone-shade: rgba(0, 0, 0, 0.55); --church-glow: rgba(242, 160, 70, 0.30); --glass-dim: 0.5;
}
.church { display: block; width: 100%; height: auto; }
.church .flame { transform-box: fill-box; transform-origin: 50% 100%; animation: church-flame 3.4s ease-in-out infinite; }
.church .flame.two { animation-delay: -1.3s; animation-duration: 4.1s; }
.church .halo { animation: church-halo 5s ease-in-out infinite; }
@keyframes church-flame { 0%, 100% { transform: scale(1, 1) rotate(-1.5deg); } 35% { transform: scale(0.94, 1.07) rotate(1.5deg); } 70% { transform: scale(1.04, 0.95) rotate(-0.5deg); } }
@keyframes church-halo { 0%, 100% { opacity: 0.85; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .church .flame, .church .halo, .breath-window { animation: none; } }

/* The church with a week's code in its altarpiece, on a page of its own. */
.church-col { max-width: 420px; margin: 0 auto; width: 100%; }
.church-col .church, .leaf .church { border-radius: 9999px 9999px 28px 28px; border: 1px solid var(--gold-line); }
.leaf .church { max-width: 340px; margin: 0 auto 34px; }

/* ---------- The year, further ---------- */
.year-more { margin-top: clamp(56px, 8vw, 100px); }
.subtitle { font: 600 clamp(1.7rem, 3.2vw, 2.4rem)/1.12 var(--serif); letter-spacing: -0.015em; margin: 0 0 14px; }
ul.plain { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 14px; max-width: 34em; }
ul.plain li { padding-left: 22px; position: relative; color: var(--soft); }
ul.plain li::before { content: ""; position: absolute; left: 0; top: 0.42em; width: 9px; height: 13px; border-radius: 9999px 9999px 0 0; background: linear-gradient(#FFF0B8, var(--flame) 45%, #D9902A); }
ul.plain b { color: var(--ink); font-weight: 600; }

/* ---------- The waiting list ---------- */

.join { max-width: 34rem; }
.join-label { display: block; margin-bottom: 10px; font: 600 0.72rem/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--rubric); }
.join-row {
  display: flex; gap: 6px; padding: 6px;
  border-radius: 999px;
  background: var(--glass-strong);
  border: 1px solid var(--hair);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: blur(18px) saturate(1.2); backdrop-filter: blur(18px) saturate(1.2);
  transition: border-color 200ms ease, box-shadow 300ms ease;
}
.join-row:focus-within { border-color: var(--gold-line); box-shadow: var(--glass-shadow), 0 0 0 4px var(--glow); }
.join input[type="email"] {
  flex: 1; min-width: 0; min-height: 48px;
  padding: 0 18px;
  border: 0; border-radius: 999px;
  background: transparent; color: var(--ink);
  font: 400 1.05rem/1 var(--serif);
}
.join input[type="email"]::placeholder { color: var(--faint); }
.join input[type="email"]:focus { outline: none; }
.join .btn { min-height: 48px; flex: none; white-space: nowrap; }
.join .btn:disabled { opacity: 0.6; cursor: progress; }
.join .trap { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.join-note { margin: 14px 4px 0; max-width: 31rem; font: 500 0.85rem/1.5 var(--sans); color: var(--faint); }
.join[data-state="error"] .join-note { color: var(--rubric); }
.join[data-state="error"] .join-row { border-color: var(--rubric); }
.final .join, .final .join-note { margin-left: auto; margin-right: auto; }
.final .join { text-align: left; }
.final-join { margin-top: 8px; }
@media (max-width: 560px) {
  .join-row { flex-direction: column; border-radius: 26px; padding: 8px; }
  .join input[type="email"] { min-height: 50px; text-align: center; }
  .join .btn { width: 100%; white-space: normal; }
}
@media (max-width: 640px) { .nav .nav-join { display: none; } }

/* ---------- The language menu ---------- */

.lang-menu { position: relative; }
.lang-menu summary {
  list-style: none; cursor: pointer;
  height: 40px; padding: 0 12px;
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; border: 1px solid var(--hair);
  font: 600 0.78rem/1 var(--sans); letter-spacing: 0.04em; color: var(--ink);
  transition: background-color 200ms ease;
}
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover { background: var(--unlit); }
.lang-menu summary svg { width: 17px; height: 17px; }
.lang-menu ul {
  position: absolute; right: 0; top: calc(100% + 10px);
  min-width: 190px; margin: 0; padding: 8px; list-style: none;
  border-radius: 20px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow-deep);
  -webkit-backdrop-filter: blur(24px) saturate(1.3); backdrop-filter: blur(24px) saturate(1.3);
  transform-origin: top right;
  animation: lang-open 260ms var(--ease-spring);
}
@keyframes lang-open { from { opacity: 0; transform: translateY(-6px) scale(0.97); } }
.lang-menu a {
  display: block; padding: 10px 14px; border-radius: 12px;
  font: 500 0.95rem/1.2 var(--sans); text-decoration: none; color: var(--soft);
}
.lang-menu a:hover { background: var(--unlit); color: var(--ink); }
.lang-menu a[aria-current="page"] { color: var(--ink); font-weight: 650; }
.lang-menu a[aria-current="page"]::after { content: ""; display: inline-block; width: 7px; height: 10px; margin-left: 10px; border-radius: 9999px 9999px 0 0; background: linear-gradient(var(--flame), var(--gold)); box-shadow: 0 0 8px var(--glow); }
.langs a.chip { text-decoration: none; transition: border-color 200ms ease, background-color 200ms ease; }
.langs a.chip:hover { border-color: var(--gold-line); }
.langs a.chip[aria-current="page"] { border-color: var(--gold-line); box-shadow: 0 0 0 3px var(--glow); }

/* ---------- After joining ---------- */

.leaf-short { max-width: 600px; text-align: center; }
.leaf-short .lede { margin: 18px auto 14px; color: var(--ink); }
.leaf-short .soft { font: 500 0.9rem/1.5 var(--sans); color: var(--faint); margin-bottom: 30px; }
.lit-window { display: flex; justify-content: center; margin-bottom: 26px; }
.lit-window .win { width: 46px; height: 66px; border-radius: 9999px 9999px 4px 4px; }
.lit-window .win.lit { animation: kindle 1600ms var(--ease-out) both; }
@keyframes kindle { from { background: var(--unlit); box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { .lang-menu ul, .lit-window .win.lit { animation: none; } }

/* Japanese and Chinese headings: each phrase (made by the build) stays on one line when it fits. */
.ph, .ph .w { display: inline-block; }
