/* Landing page only. The support and privacy pages use style.css.
   Colours follow the app's missal theme (Shared/Theme.swift). */
:root {
  color-scheme: light dark;
  --parchment: #f4ecdd;
  --vellum: #fcf9f0;
  --ink: #291c14;
  --ink-soft: #665445;
  --rubric: #9e1a1c;
  --gold: #946b1c;
  --rule: #d9c9a3;
  --shadow: rgba(60, 30, 10, 0.22);
  /* Fixed tones, the same in light and dark. */
  --burgundy: #6e121c;
  --burgundy-deep: #4d0a14;
  --night: #16080b;
  --ivory: #faf2e0;
  --gold-leaf: #dbb55c;
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --parchment: #110e11;
    --vellum: #201c1b;
    --ink: #ede3cc;
    --ink-soft: #b3a68f;
    --rubric: #e0665c;
    --gold: #d6ad57;
    --rule: #4a3f2c;
    --shadow: rgba(0, 0, 0, 0.5);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font: 18px/1.6 var(--serif);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--rubric); }
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }

.wrap { max-width: 66rem; margin: 0 auto; padding-left: 1.5rem; padding-right: 1.5rem; }

.label {
  font: 600 0.78rem/1.2 var(--serif);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rubric);
  margin: 0 0 0.9rem;
}
h1, h2, h3 { font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(2.5rem, 6vw, 4.4rem); line-height: 1.04; margin: 0 0 1.3rem; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); line-height: 1.1; margin: 0 0 1rem; letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; line-height: 1.25; margin: 0 0 0.4rem; }
p { margin: 0 0 1rem; }
.lede { font-size: 1.25rem; line-height: 1.5; color: var(--ink-soft); max-width: 33rem; }
.small { font-size: 0.9rem; color: var(--ink-soft); }
.center { text-align: center; }
.center .lede, .colors .lede { margin-left: auto; margin-right: auto; }

/* ---------- Hero: always dark, like a missal cover ---------- */
.hero {
  position: relative;
  overflow: hidden;
  color: var(--ivory);
  background:
    radial-gradient(60rem 40rem at 78% 38%, rgba(219, 181, 92, 0.2), transparent 60%),
    radial-gradient(70rem 50rem at 20% 0%, #7d1924, transparent 70%),
    linear-gradient(160deg, var(--burgundy-deep), var(--night) 75%);
}
.hero::before { /* faint field of crosses, as on a stamped binding */
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cpath d='M27 16h2v8h6v2h-6v14h-2V26h-6v-2h6z' fill='%23dbb55c'/%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%);
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
  pointer-events: none;
}
.hero::after { /* gold fillet along the lower edge */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  border-top: 1px solid var(--gold-leaf);
  border-bottom: 1px solid rgba(219, 181, 92, 0.45);
}
.hero > * { position: relative; }

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  font-size: 0.95rem;
}
.top a { color: var(--ivory); text-decoration: none; }
.top nav { display: flex; align-items: center; gap: 1.25rem; }
.top nav a { opacity: 0.85; }
.top nav a:hover { opacity: 1; text-decoration: underline; }
.brand { display: flex; align-items: center; gap: 0.65rem; font-weight: 600; font-size: 1.05rem; }
.brand img { width: 2.4rem; height: 2.4rem; border-radius: 22%; box-shadow: 0 0.2rem 0.8rem rgba(0, 0, 0, 0.4); }

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
  padding-top: 3rem;
  padding-bottom: 5rem;
}
.hero .label { color: var(--gold-leaf); }
.hero h1 em { font-style: italic; font-weight: 500; color: var(--gold-leaf); }
.hero .lede { color: rgba(250, 242, 224, 0.82); }
.hero .small { color: rgba(250, 242, 224, 0.66); }

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.9rem;
  padding: 0.95rem 1.7rem;
  border-radius: 0.9rem;
  background: linear-gradient(#f0d795, #c9993a);
  color: #2a1608;
  text-decoration: none;
  font: 600 1.08rem/1.2 var(--sans);
  box-shadow: 0 0.6rem 1.6rem rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.cta::after { content: "\2192"; transition: transform 0.15s ease; }
.cta:hover, .cta:focus-visible { filter: brightness(1.06); transform: translateY(-1px); }
.cta:hover::after { transform: translateX(3px); }
.cta-note { display: block; margin-top: 0.9rem; }
/* Apple's official badge, unaltered. Apple asks for at least 40px height and clear space around it. */
.badge { display: inline-block; margin: 0.6rem 0 0.2rem; border-radius: 0.6rem; }
.badge img { height: 3.5rem; width: auto; }
.cta.red {
  background: linear-gradient(var(--burgundy), var(--burgundy-deep));
  color: var(--ivory);
  border: 1px solid var(--gold-leaf);
  box-shadow: 0 0.6rem 1.4rem var(--shadow);
}

/* A screenshot, shown as a screenshot: rounded, with a gold hairline. */
.shot {
  border-radius: 11.5% / 5.3%;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(219, 181, 92, 0.6), 0 2rem 4rem rgba(0, 0, 0, 0.45);
  background: #1b1716;
}
.shot img { width: 100%; }
.duo { display: flex; justify-content: center; align-items: flex-start; }
.duo .shot:first-child { width: 56%; z-index: 2; }
.duo .shot:last-child { width: 48%; margin-left: -10%; margin-top: 16%; filter: brightness(0.9); }
.solo { width: min(100%, 19rem); margin: 0 auto; box-shadow: 0 0 0 1px var(--rule), 0 1.6rem 3.2rem var(--shadow); }

/* ---------- Sections ---------- */
section { padding-top: 5rem; padding-bottom: 5rem; }
.rule {
  border: 0;
  height: 1px;
  background: var(--rule);
  margin: 0 auto;
  max-width: 63rem;
  overflow: visible;
}
.rule::after {
  content: "\271D";
  display: block;
  width: 2.5rem;
  margin: -0.85rem auto 0;
  text-align: center;
  color: var(--gold);
  background: var(--parchment);
  font-size: 1.05rem;
  line-height: 1.7rem;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}
.split.flip > :first-child { order: 2; }

/* ---------- Widgets drawn in CSS, in the vestment colours of Theme.swift ---------- */
.w {
  --top: #1c5e3d; --bottom: #0d3624; --w-ink: var(--ivory); --w-accent: var(--gold-leaf);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.05rem 1.15rem;
  border-radius: 1.5rem;
  background: linear-gradient(var(--top), var(--bottom));
  color: var(--w-ink);
  box-shadow: 0 1.2rem 2.4rem var(--shadow);
  text-align: left;
}
.w::before, .w::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border: 1px solid var(--w-accent);
}
.w::before { inset: 5px; border-radius: calc(1.5rem - 5px); opacity: 0.75; }
.w::after { inset: 8px; border-radius: calc(1.5rem - 8px); opacity: 0.4; }
.w.white { --top: #fef9eb; --bottom: #eddfbd; --w-ink: #332112; --w-accent: #916614; }
.w.red { --top: #a1171f; --bottom: #5c0a14; }
.w.violet { --top: #5c2b75; --bottom: #301447; }
.w p { margin: 0; }
.w-h {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--w-accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.w-h::before { content: "\2020\00a0"; }
.w-t {
  flex: 1;
  min-height: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}
.w-r { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-sm { width: 10.6rem; height: 10.6rem; }
.w-sm .w-t { font-size: 0.8rem; -webkit-line-clamp: 6; line-clamp: 6; }
.w-md { width: min(100%, 22.6rem); height: 10.6rem; }
.w-md .w-t { font-size: 1.02rem; -webkit-line-clamp: 4; line-clamp: 4; }

.today-widgets { display: flex; flex-direction: column; align-items: center; gap: 1.4rem; }
.today-date { font-style: italic; color: var(--ink-soft); }

.colors { text-align: center; }
.swatches {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: center;
  gap: 2rem 1.75rem;
  margin: 2.75rem 0 0;
  padding: 0;
  list-style: none;
}
.swatches li { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; }
.swatches .small { letter-spacing: 0.02em; }
.swatches b { color: var(--ink); font-weight: 600; }

/* ---------- Lists, steps, cards ---------- */
.ticks { list-style: none; padding: 0; margin: 0 0 1rem; }
.ticks li { position: relative; padding: 0.55rem 0 0.55rem 1.9rem; border-bottom: 1px solid var(--rule); }
.ticks li:last-child { border-bottom: 0; }
.ticks li::before { content: "\271D"; position: absolute; left: 0.15rem; color: var(--gold); }

.themes { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
.themes li {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.85rem 0.4rem 0.45rem;
  border: 1px solid var(--rule); border-radius: 999px; background: var(--vellum);
  font-size: 0.95rem;
}
.themes i { width: 1.35rem; height: 1.35rem; border-radius: 0.4rem; border: 1px solid var(--gold-leaf); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin: 2.75rem 0 0; padding: 0; list-style: none; counter-reset: step; text-align: left; }
.steps li {
  counter-increment: step;
  background: var(--vellum);
  border: 1px solid var(--rule);
  border-radius: 1.1rem;
  padding: 1.5rem 1.5rem 1.3rem;
}
.steps li::before {
  content: counter(step, upper-roman);
  display: block;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--rubric);
  margin-bottom: 0.8rem;
}
.steps p { margin: 0; color: var(--ink-soft); font-size: 1rem; }

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 2.75rem; text-align: left; }
.card {
  position: relative;
  background: var(--vellum);
  border: 1px solid var(--rule);
  border-radius: 1.1rem;
  padding: 1.75rem 1.8rem;
}
.card p:last-child { margin-bottom: 0; }
.card.pro {
  background: linear-gradient(var(--burgundy), var(--burgundy-deep));
  border-color: var(--gold-leaf);
  color: var(--ivory);
  box-shadow: 0 1.2rem 2.4rem var(--shadow);
}
.card.pro .label { color: var(--gold-leaf); }
.card.pro .ticks li { border-color: rgba(219, 181, 92, 0.3); }
.card.pro .ticks li::before { color: var(--gold-leaf); }
.card .ticks { margin: 0.75rem 0 0; font-size: 1rem; }
.card .small { margin-top: 0.9rem; }
.card.pro .small { color: rgba(250, 242, 224, 0.72); }

.notes { padding-top: 0; }
.notes ul { padding-left: 1.2rem; margin: 0; color: var(--ink-soft); font-size: 0.95rem; max-width: 50rem; }
.notes li { margin-bottom: 0.5rem; }

/* ---------- Closing: one large red widget ---------- */
.closing { padding-top: 0; }
.closing .w {
  --top: #7d1924; --bottom: var(--night);
  align-items: center;
  text-align: center;
  padding: 4.5rem 1.5rem;
  border-radius: 2rem;
  gap: 0;
}
.closing .w::before { border-radius: calc(2rem - 5px); }
.closing .w::after { border-radius: calc(2rem - 8px); }
.closing img { width: 4.5rem; height: 4.5rem; border-radius: 22%; margin-bottom: 1.5rem; box-shadow: 0 0.6rem 1.6rem rgba(0, 0, 0, 0.4); }
.closing .lede { color: rgba(250, 242, 224, 0.82); margin: 0 auto 0.75rem; }
.closing .w h2 { margin-bottom: 0.8rem; }

footer {
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}
footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }

/* Sections rise gently into place; off when the visitor asks for less motion. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(1.25rem); transition: opacity 0.7s ease, transform 0.7s ease; }
  .js .reveal.in { opacity: 1; transform: none; }
}

@media (max-width: 820px) {
  section { padding-top: 3.5rem; padding-bottom: 3.5rem; }
  .hero-grid, .split { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-grid { padding-top: 1.5rem; padding-bottom: 3.5rem; }
  .split.flip > :first-child { order: 0; }
  .duo { max-width: 24rem; margin: 0 auto; }
  .swatches { grid-template-columns: repeat(2, auto); gap: 1.5rem 1rem; }
  .steps, .cards { grid-template-columns: 1fr; }
  .solo { width: min(74%, 17rem); }
  .closing .w { padding: 3.25rem 1.25rem; }
}
@media (max-width: 400px) {
  .w-sm { width: 9.4rem; height: 9.4rem; }
  .w-sm .w-t { font-size: 0.72rem; }
  .top nav a.hide-s { display: none; }
}
