/* Clear White. Every color, type size, radius and shadow in the UI comes from here, for the site and the shrine
   editor alike. No other style file may hold a color: src/ui/uiColors.test.ts fails if one does.
   Coral is for the one main action on a screen. Everything else is white or warm gray. */
@font-face {
  font-family: "Nunito";
  src: url("/fonts/nunito-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Small pictures of each place, and the night behind a star. */
  --land-sky: #dfeaf2;
  --land-meadow: #b9cf9a;
  --land-hill: #9fbb8a;
  --land-garden: #a9c69a;
  --land-bloom: #e7a9b4;
  --land-bloom-soft: #f1dca0;
  --land-water: #9fc4d6;
  --land-sand: #d8cfb8;
  --night: #1d2433;
  /* Surfaces */
  --surface: #ffffff;
  --surface-soft: #fbfaf8;
  --surface-sunken: #f3f0ec;
  --surface-pressed: #e9e5e0;
  --page: #f5f3f0;
  --page-wash: linear-gradient(180deg, #fdfcfb 0%, #f7f4f1 58%, #efebe6 100%);
  --scrim: rgba(72, 60, 50, 0.18);

  /* Text */
  --text: #37312d;
  --text-soft: #635b55;
  --line: rgba(74, 62, 54, 0.13);
  --line-strong: rgba(74, 62, 54, 0.26);

  /* The one accent. Dark text on it, not white: that is what keeps the coral soft and still AA. */
  --accent: #f8a692;
  --accent-hover: #f49a84;
  --accent-text: #37312d;
  --danger: #b1343c;
  --danger-wash: #fbeeee;
  --focus: #37312d;

  /* Glass over the world. Opaque enough that dark text passes AA over a night sky; see the contrast test. */
  --glass-fill: rgba(255, 255, 255, 0.88);
  --glass-fill-solid: rgba(255, 255, 255, 0.97);
  --glass-edge: rgba(255, 255, 255, 0.7);
  --glass-blur: blur(18px) saturate(1.2);

  /* Warm shadows instead of borders */
  --shadow-card: 0 20px 52px rgba(92, 70, 54, 0.17), 0 2px 8px rgba(92, 70, 54, 0.06);
  --shadow-float: 0 12px 34px rgba(92, 70, 54, 0.2), 0 1px 4px rgba(92, 70, 54, 0.08);
  --shadow-control: 0 2px 10px rgba(92, 70, 54, 0.11), 0 1px 2px rgba(92, 70, 54, 0.05);
  --shadow-button: 0 6px 16px rgba(232, 128, 104, 0.28);

  /* Radius scale */
  --r-card: 28px;
  --r-control: 18px;
  --r-small: 12px;
  --r-pill: 999px;

  /* Type */
  --sans: "Nunito", ui-rounded, "SF Pro Rounded", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fs-title: 1.875rem;
  --fs-heading: 1.375rem;
  --fs-sub: 1.125rem;
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fw-body: 500;
  --fw-label: 600;
  --fw-heading: 700;

  /* One icon */
  --icon-size: 22px;
  --icon-stroke: 1.8;

  /* Pictures that are not UI surfaces: the ground under a look being chosen, and the ending's far hills. */
  --stage-wash: linear-gradient(180deg, #f7f5f3 0%, #f1eeea 62%, #e6e4dd 100%);
  --ending-hill: rgba(120, 106, 94, 0.09);
  --swatch-edge: rgba(55, 49, 45, 0.22);
  /* The first card's background: the sky of the meadow picture fades to white, so only the meadow keeps its color. */
  --gate-wash: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 30%, rgba(255, 255, 255, 0.5) 40%, rgba(255, 255, 255, 0.08) 52%, rgba(255, 255, 255, 0) 100%);
  --joystick-wash: rgba(255, 255, 255, 0.34);
  --wave-select: rgba(55, 49, 45, 0.12);
  --shadow-tint: rgba(92, 70, 54, 0.3);
}

/* Clear White, for the pages that are only pages: guides, readings, pricing, the rules, About and a memorial's
   share page. The build puts ui/tokens.css in front of this file, so every color, size and radius is a token.
   No script is needed for anything here. */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.site-page {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--page-wash), var(--page);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: var(--fw-body);
  line-height: 1.65;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3 { font-family: var(--sans); font-weight: var(--fw-heading); letter-spacing: -0.003em; color: var(--text); }
h1 { font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.35rem); line-height: 1.15; margin: 0.4rem 0 0.8rem; }
h2 { font-size: var(--fs-heading); line-height: 1.25; margin: 2.2rem 0 0.6rem; }
h3 { font-size: var(--fs-sub); line-height: 1.3; margin: 1.5rem 0 0.4rem; }
p, ul, ol, blockquote { margin: 0 0 1rem; }
ul, ol { padding-left: 1.3rem; }
li { margin: 0.25rem 0; }
a { color: var(--text); text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
a:hover { text-decoration-color: currentColor; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
img { max-width: 100%; height: auto; }
blockquote { padding: 0.9rem 1.1rem; background: var(--surface-sunken); border-radius: var(--r-control); }
blockquote p:last-child { margin-bottom: 0; }
code { font-family: var(--sans); font-size: inherit; }
[hidden] { display: none !important; }

.skip-link { position: absolute; left: -999px; top: 0; padding: 0.6rem 1rem; background: var(--surface); border-radius: var(--r-small); box-shadow: var(--shadow-control); z-index: 10; }
.skip-link:focus { left: 12px; top: 12px; }

/* One button system, as in the app. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font: inherit;
  font-size: var(--fs-body);
  font-weight: var(--fw-heading);
  line-height: 1.3;
  text-decoration: none;
  text-align: center;
  color: var(--accent-text);
  background: var(--accent);
  border: 0;
  border-radius: var(--r-pill);
  padding: 0.6rem 1.5rem;
  min-height: 48px;
  box-shadow: var(--shadow-button);
  cursor: pointer;
}
.btn:hover { background: var(--accent-hover); }
.btn.small { min-height: 44px; padding: 0.3rem 1.1rem; font-size: var(--fs-small); }
.btn.quiet { font-weight: var(--fw-label); background: var(--surface); box-shadow: var(--shadow-control), inset 0 0 0 1px var(--line); }
.btn.quiet:hover { background: var(--surface-sunken); }
.fine { font-size: var(--fs-small); color: var(--text-soft); }
.lead { font-size: 1.12rem; color: var(--text-soft); }

/* Top */
.site-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem max(1rem, env(safe-area-inset-right, 0px)) 0.7rem max(1rem, env(safe-area-inset-left, 0px));
  background: var(--glass-fill-solid);
  box-shadow: 0 1px 0 var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}
.site-brand { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: var(--fw-heading); font-size: 1.15rem; text-decoration: none; color: var(--text); min-height: 44px; }
.site-brand img { display: block; }
.site-nav { flex: 1; min-width: 0; }
.site-nav ul { display: flex; gap: 0.2rem 1.1rem; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.site-nav li { margin: 0; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--fs-small); font-weight: var(--fw-label); color: var(--text-soft); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); text-decoration: underline; }
.site-enter { flex: none; }
@media (max-width: 640px) {
  .site-head { flex-wrap: wrap; row-gap: 0; }
  .site-nav { order: 3; flex-basis: 100%; }
  .site-nav ul { gap: 0 0.9rem; }
  .site-enter { margin-left: auto; }
}

/* The page */
.site-main { flex: 1; width: min(760px, 100%); margin: 0 auto; padding: 1.4rem 1.1rem 3rem; overflow-wrap: anywhere; }
.site-main > article { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: clamp(1.4rem, 1rem + 2vw, 2.6rem); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.2rem 0.5rem; list-style: none; padding: 0; margin: 0 0 0.6rem; font-size: var(--fs-small); color: var(--text-soft); }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 0.5rem; color: var(--line-strong); }
.crumbs a { color: var(--text-soft); }
.answer { font-size: 1.12rem; }
.updated { margin-top: -0.3rem; }
.table-wrap { overflow-x: auto; margin: 0 0 1.2rem; }
table { border-collapse: collapse; width: 100%; font-size: var(--fs-small); }
th, td { text-align: left; vertical-align: top; padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--line); }
th { font-weight: var(--fw-heading); }

/* Lists of prices, as in the app */
.price-list { list-style: none; padding: 0; margin: 0 0 1rem; border-top: 1px solid var(--line); }
.price-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.65rem 0; margin: 0; border-bottom: 1px solid var(--line); }
.price-what { display: flex; flex-direction: column; min-width: 0; }
.price-what small, .price-cost small { font-size: var(--fs-small); color: var(--text-soft); font-weight: var(--fw-body); }
.price-cost { display: flex; flex-direction: column; align-items: flex-end; text-align: right; white-space: nowrap; font-weight: var(--fw-label); }
.pricing-soon { padding: 0.8rem 1rem; background: var(--surface-sunken); border-radius: var(--r-control); }

/* Questions, sources and what comes next */
.faq h3 { margin-top: 1.3rem; }
.sources { font-size: var(--fs-small); color: var(--text-soft); }
.sources a { color: var(--text-soft); }
.card-list { list-style: none; padding: 0; display: grid; gap: 0.7rem; }
.card-list li { margin: 0; }
.card-list a { display: block; padding: 0.9rem 1.1rem; border-radius: var(--r-control); background: var(--surface-soft); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; }
.card-list a:hover { background: var(--surface-sunken); }
.card-list strong { display: block; font-weight: var(--fw-heading); }
.card-list span { display: block; font-size: var(--fs-small); color: var(--text-soft); }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps > li { counter-increment: step; position: relative; padding-left: 2.6rem; margin: 0 0 1rem; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0.05rem; width: 1.8rem; height: 1.8rem; border-radius: var(--r-pill); background: var(--surface-sunken); display: grid; place-items: center; font-weight: var(--fw-heading); font-size: var(--fs-small); }
.steps h3 { margin: 0 0 0.2rem; }
.reading { margin: 0.6rem 0 1.2rem; padding: 1rem 1.2rem; border-radius: var(--r-control); background: var(--surface-soft); box-shadow: inset 0 0 0 1px var(--line); }
.reading p { margin-bottom: 0.5rem; white-space: pre-line; }
.reading .fine { margin: 0; }
.order { padding-left: 1.4rem; }
.order li { margin: 0 0 0.6rem; }
.order .fine { display: block; }
.calm {
  margin: 2.4rem 0 0.4rem;
  padding: 1.4rem 1.5rem;
  border-radius: var(--r-card);
  background: var(--gate-wash), url("/meadow-dusk.jpg") center 75% / cover no-repeat, var(--page);
  box-shadow: inset 0 0 0 1px var(--line);
}
.calm h2 { margin-top: 0; }
.calm p { max-width: 34rem; }
.calm .btn { margin-top: 0.3rem; }

/* A memorial's own page */
.memorial-page { text-align: center; }
.memorial-page .kicker { margin: 0; font-size: var(--fs-small); font-weight: var(--fw-label); color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.08em; }
.memorial-page h1 { margin-top: 0.2rem; }
.memorial-photo { display: block; width: min(320px, 80%); aspect-ratio: 1 / 1; object-fit: cover; margin: 0.6rem auto 1rem; border-radius: var(--r-card); box-shadow: var(--shadow-card); background: var(--surface-sunken); }
.memorial-dates { color: var(--text-soft); font-weight: var(--fw-label); margin-bottom: 0.4rem; }
.memorial-candles { display: inline-block; padding: 0.35rem 0.9rem; border-radius: var(--r-pill); background: var(--surface-sunken); font-size: var(--fs-small); font-weight: var(--fw-label); }
.memorial-story { text-align: left; margin: 1.6rem auto 0; max-width: 36rem; white-space: pre-line; }
.memorial-page .calm { text-align: left; }

/* Bottom */
.site-foot { background: var(--surface); box-shadow: 0 -1px 0 var(--line); margin-top: auto; }
.site-foot-inner { width: min(960px, 100%); margin: 0 auto; padding: 1.8rem 1.1rem 2rem; display: grid; gap: 1.4rem; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.site-foot h2 { font-size: var(--fs-body); margin: 0 0 0.4rem; }
.site-support p { font-size: var(--fs-small); color: var(--text-soft); margin: 0; }
.site-foot-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.site-foot-links ul { list-style: none; padding: 0; margin: 0; }
.site-foot-links li { margin: 0; }
.site-foot-links a { display: inline-flex; min-height: 36px; align-items: center; font-size: var(--fs-small); color: var(--text-soft); }
.site-foot-fine { grid-column: 1 / -1; margin: 0; font-size: var(--fs-small); color: var(--text-soft); }
.site-foot-fine a { color: var(--text-soft); }
@media (max-width: 640px) {
  .site-foot-inner { grid-template-columns: minmax(0, 1fr); }
}
