/* Church of the Infinite Mother — coming soon
   Visual world: dawn oratory. The mountain vista is the nave;
   typography is an inscription in the morning sky. */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cormorant Garamond";
  src: url("fonts/cormorant-garamond-latin-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Tangerine";
  src: url("fonts/tangerine-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Tangerine";
  src: url("fonts/tangerine-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Swap the heading face here. For a monospace all-caps alternative set e.g.
     --font-title: "IBM Plex Mono", ui-monospace, monospace; --title-case: uppercase;
     --title-weight: 500; --title-scale: 0.55; --title-tracking: 0.12em; */
  --font-title: "Tangerine", "Apple Chancery", "Snell Roundhand", cursive;
  --title-weight: 700;
  --title-case: none;
  --title-scale: 1;
  --title-tracking: 0.005em;
  --font-display: "Cormorant Garamond", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --ink: oklch(0.23 0.025 48);
  --ink-lede: oklch(0.28 0.03 45);
  --bronze: oklch(0.30 0.055 52);
  --bronze-hover: oklch(0.22 0.05 48);
  --ring: oklch(0.28 0.07 52);
  --select-bg: oklch(0.72 0.09 68 / 0.42);
  --select-fg: oklch(0.20 0.03 48);
  --theme: #c99a92;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-display);
  color: var(--ink);
  background: var(--theme);
  line-height: 1.5;
}

::selection {
  background: var(--select-bg);
  color: var(--select-fg);
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 4px;
}

.page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  isolation: isolate;
}

.backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.backdrop picture,
.backdrop img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
}

/* A whisper of dusk at the very top so the inscription sits in even light.
   The mountains and the sea of clouds stay clear. */
.veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to bottom,
      oklch(0.55 0.04 50 / 0.16) 0%,
      oklch(0.55 0.03 50 / 0.06) 22%,
      oklch(0.55 0.02 50 / 0) 38%
    );
}

.sanctuary {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: min(64rem, calc(100% - 2.5rem));
  margin: 0 auto;
  padding-top: max(3.25rem, calc(6.5vh + env(safe-area-inset-top)));
  padding-bottom: max(3rem, env(safe-area-inset-bottom));
  padding-left: 0;
  padding-right: 0;
}

.title {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-title);
  font-weight: var(--title-weight);
  font-style: normal;
  text-transform: var(--title-case);
  letter-spacing: var(--title-tracking);
  color: var(--ink);
  text-wrap: balance;
  /* Tangerine is a fine script: a soft dawn halo keeps the hairlines legible over the sky. */
  text-shadow:
    0 0 0.35em oklch(0.93 0.035 60 / 0.55),
    0 0 1.1em oklch(0.90 0.04 55 / 0.35);
}

.title-pre {
  font-size: calc(clamp(2.6rem, 4.6vw, 3.8rem) * var(--title-scale));
  line-height: 0.9;
}

.title-main {
  font-size: calc(clamp(4.4rem, 9.6vw, 8rem) * var(--title-scale));
  line-height: 0.92;
}

.mark {
  display: block;
  width: 5.5rem;
  height: 0.9rem;
  margin: 1.05rem 0 0;
  color: var(--bronze);
}

.lede {
  margin: 0.95rem 0 0;
  max-width: 26ch;
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.125rem, 2.15vw, 1.4rem);
  line-height: 1.45;
  letter-spacing: 0.01em;
  color: var(--ink-lede);
  text-wrap: pretty;
}

/* The invitation rests on the sea of clouds, leaving the peaks clear. */
.sanctuary {
  min-height: 100vh;
  min-height: 100dvh;
}

.foot {
  margin-top: auto;
  padding-top: 2rem;
  padding-bottom: max(17vh, 1.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.links,
.lede {
  text-shadow: 0 0 0.6em oklch(0.94 0.03 60 / 0.7), 0 0 1.4em oklch(0.92 0.03 60 / 0.45);
}

.links {
  display: flex;
  gap: 1.6rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.35rem;
}

.channel {
  font-weight: 500;
  font-style: normal;
  font-size: 0.8125rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bronze);
  padding: 0.55rem 0.35rem;
  border-radius: 2px;
  transition: color 0.35s var(--ease-out-expo);
}

.channel:hover,
.channel:focus-visible {
  color: var(--bronze-hover);
}

.channel:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.38em;
}

.channel:active {
  color: var(--ink);
}

@media (prefers-reduced-motion: no-preference) {
  .sanctuary {
    animation: arrive 1.7s var(--ease-out-expo) both;
  }
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(0.85rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 480px) {
  .sanctuary {
    width: min(40rem, calc(100% - 2rem));
    padding-top: max(2.75rem, calc(5.5vh + env(safe-area-inset-top)));
  }

  .title {
    letter-spacing: 0.02em;
  }

  .channel {
    /* Keep the uppercase inscription readable and tappable on small screens. */
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

@media (min-width: 1600px) {
  .sanctuary {
    padding-top: max(4rem, 8vh);
  }
}

@media (min-width: 701px) {
  .sanctuary {
    padding-top: max(2.75rem, calc(4.5vh + env(safe-area-inset-top)));
  }

  .lede {
    max-width: none;
  }

  .links {
    margin-top: 1.15rem;
  }
}

/* Faith and practice: a quiet scroll beneath the vista. */
.scroll {
  background: oklch(0.965 0.012 70);
  color: var(--ink);
  padding: clamp(3.5rem, 8vw, 6.5rem) 1.25rem clamp(3rem, 6vw, 5rem);
  border-top: 1px solid oklch(0.80 0.04 60 / 0.6);
}

.part {
  width: min(40rem, 100%);
  margin: 0 auto;
}

.part + .part {
  margin-top: clamp(2.6rem, 5vw, 3.6rem);
}

.part h2 {
  margin: 0 0 0.9rem;
  font-family: var(--font-title);
  font-weight: var(--title-weight);
  text-transform: var(--title-case);
  font-size: calc(clamp(2.6rem, 5vw, 3.4rem) * var(--title-scale));
  line-height: 1;
  text-align: center;
  color: var(--bronze);
}

.part h2::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 1px;
  margin: 0.85rem auto 0;
  background: currentColor;
  opacity: 0.5;
}

.part h3 {
  margin: 1.6rem 0 0.35rem;
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bronze);
}

.part p,
.part li {
  font-size: clamp(1.15rem, 1.6vw, 1.3rem);
  line-height: 1.6;
  text-wrap: pretty;
}

.part p {
  margin: 0 0 0.9rem;
}

.part ul {
  margin: 0;
  padding-left: 1.2rem;
}

.part li {
  margin-bottom: 0.7rem;
}

.part ol.canon {
  margin: 0 0 0.9rem;
  padding-left: 1.6rem;
}

.part li::marker {
  color: var(--bronze);
}

.part cite {
  font-style: italic;
}

.colophon {
  background: oklch(0.965 0.012 70);
  text-align: center;
  padding: 0 1.25rem max(2.5rem, env(safe-area-inset-bottom));
}

.colophon p {
  margin: 0;
  font-size: 0.8125rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bronze);
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
