/* Prayer Cards, prayercards.app
   Tokens, type and spacing follow website/README.md and the references in website/design/. */

@font-face { font-family: "Fraunces"; src: url("/fonts/Fraunces.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/fonts/InstrumentSerif-Italic.woff2") format("woff2"); font-style: italic; font-weight: 400; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("/fonts/EBGaramond.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "EB Garamond"; src: url("/fonts/EBGaramond-Italic.woff2") format("woff2"); font-weight: 400 800; font-style: italic; font-display: swap; }

:root {
  /* Colour */
  --paper: #F2EADA;
  --card: #FAF5EC;
  --ink: #221A17;
  --ink-2: #3A302A;
  --muted: #6B5F55;
  --rule: #E4D8C6;
  --teal: #285E63;
  --rose: #D09491;
  --sage: #9EAB96;
  --slip: #FCF9F1;
  --slip-ink: #2B2520;
  --slip-meta: #6B5D50;
  --changed: #9A5450;
  --on-teal-eyebrow: #E9C2BF;
  --on-teal-aside: #D3DCCB;

  /* Card categories */
  --cat-marriage: #9A5450;
  --cat-family: #56684F;
  --cat-smallgroup: #285E63;
  --cat-work: #3E5468;
  --cat-suffering: #76506A;

  /* Type */
  --font-display: Fraunces, serif;
  --font-ui: Inter, system-ui, sans-serif;
  --font-aside: "Instrument Serif", serif;
  --font-scripture: "EB Garamond", serif;

  /* Shape */
  --radius-card: 26px;
  --radius-pill: 999px;
  --radius-icon-sm: 13px;
  --radius-icon-lg: 26px;
  --shadow-card: 0 2px 8px -2px rgba(34, 26, 23, .10), 0 14px 32px -8px rgba(34, 26, 23, .16), 0 32px 64px -18px rgba(34, 26, 23, .18);
  --shadow-circle: 0 0 0 10px rgba(40, 94, 99, .10), 0 0 70px 18px rgba(40, 94, 99, .30), inset 0 -30px 60px rgba(0, 0, 0, .10);
  --shadow-slip: drop-shadow(0 1px 0 rgba(10, 30, 32, .25)) drop-shadow(0 16px 18px rgba(10, 30, 32, .38));

  /* Layout and motion */
  --max: 1240px;
  --pad: clamp(20px, 5vw, 56px);
  --ease: cubic-bezier(.22, 1, .36, 1);

  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .22 0 0 0 0 .14 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Base */

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background-color: var(--paper);
  background-image: var(--noise);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  color: var(--ink);
  font-family: var(--font-ui);
}
a { color: var(--ink); text-decoration-color: rgba(34, 26, 23, .3); text-underline-offset: 3px; }
a:hover { color: var(--teal); }
img { display: block; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
.on-dark :focus-visible { outline-color: var(--paper); }
[tabindex="-1"]:focus { outline: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  padding: 12px 20px; border-radius: var(--radius-pill);
  background: var(--ink); color: var(--paper); text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 16px; color: var(--paper); }

/* Shared type */

.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--teal); }
.h1 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(48px, 6.6vw, 88px); line-height: .98; letter-spacing: -.035em; text-wrap: balance; }
.h2 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(36px, 4.6vw, 58px); line-height: 1.02; letter-spacing: -.03em; text-wrap: balance; }
.lead { margin: 0; font-size: 18px; line-height: 1.55; color: var(--ink-2); text-wrap: pretty; }
.aside { margin: 0; font-family: var(--font-aside); font-style: italic; font-size: 20px; line-height: 1.35; color: var(--muted); }

/* Header */

.site-header {
  max-width: var(--max); margin: 0 auto; padding: 28px var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand img { width: 56px; height: 56px; border-radius: var(--radius-icon-sm); box-shadow: 0 6px 16px -8px rgba(34, 26, 23, .45); }
.wordmark { font-family: var(--font-display); font-size: 30px; font-weight: 600; letter-spacing: -.025em; line-height: 1; }
.btn-dark {
  display: flex; flex: none; white-space: nowrap; align-items: center;
  min-height: 52px; padding: 0 28px; border-radius: var(--radius-pill);
  background: var(--ink); color: var(--paper); text-decoration: none;
  font-size: 17px; font-weight: 600; letter-spacing: -.01em;
  transition: background-color 200ms ease;
}
.btn-dark:hover { background: var(--ink-2); color: var(--paper); }

/* Store buttons. TODO(store-badges): swap for Apple's official "Download on the App Store"
   badge (and Google's later) before launch; their guidelines require it. */

.stores { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.store {
  display: flex; align-items: center; gap: 12px; white-space: nowrap;
  border-radius: var(--radius-pill); text-decoration: none;
}
.store svg { flex: none; }
.store__label { display: flex; flex-direction: column; align-items: flex-start; flex: none; white-space: nowrap; }
.store__small { font-size: 11px; line-height: 1.15; letter-spacing: .02em; }
.store__big { font-size: 21px; font-weight: 600; line-height: 1.1; letter-spacing: -.02em; }
.store--apple { height: 62px; padding: 0 30px 0 24px; background: var(--ink); color: var(--paper); box-shadow: 0 12px 24px -14px rgba(34, 26, 23, .7); }
.store--apple:hover { color: var(--paper); }
.store--apple .store__small { color: rgba(242, 234, 218, .8); }
.store--soon { height: 59px; padding: 0 28px 0 22px; border: 1.5px dashed rgba(34, 26, 23, .32); color: var(--muted); }
.on-dark .store--apple { background: var(--paper); color: var(--ink); box-shadow: none; }
.on-dark .store--apple:hover { color: var(--ink); }
.on-dark .store--apple .store__small { color: rgba(34, 26, 23, .75); }
.on-dark .store--soon { border-color: rgba(242, 234, 218, .35); color: rgba(242, 234, 218, .75); }

/* Hero */

.hero {
  max-width: var(--max); margin: 0 auto; padding: 32px var(--pad) 104px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
  gap: 48px 56px; align-items: center;
}
.hero__copy { display: flex; flex-direction: column; gap: 26px; max-width: 580px; }
.hero__lead { font-size: 20px; line-height: 1.5; }
.hero .stores { margin-top: 8px; }

.stage { --s: 1; width: 100%; position: relative; }
.stage__art { position: absolute; left: 50%; top: 0; transform: scale(var(--s)); transform-origin: top center; }
.hero__stage { height: calc(660px * var(--s)); }
.hero__fan { width: 620px; height: 660px; margin-left: -310px; }
.hero__circle {
  position: absolute; left: 30px; top: 50px; width: 560px; height: 560px;
  border-radius: 50%; background: var(--teal); box-shadow: var(--shadow-circle);
}
.hero__slot {
  position: absolute; left: 145px; top: 95px; width: 330px; height: 470px;
  transition: transform 620ms var(--ease);
}

/* Card overlays: a hero card you can shuffle, or a carousel card you can bring to the centre */
.overlay {
  position: absolute; inset: 0; z-index: 1; margin: 0; padding: 0;
  border: 0; border-radius: var(--radius-card); background: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Prayer card (mirrors lib/ui/today/today_screen.dart) */

.card {
  --accent: var(--cat-marriage);
  --card-paper: var(--card);
  --card-muted: var(--muted);
  --card-ink-accent: var(--accent);
  --card-wash: linear-gradient(to bottom, color-mix(in srgb, var(--accent) 12%, var(--card-paper)) 0%, var(--card-paper) 60%);
  --card-rule: var(--rule);
  --card-rule-soft: rgba(228, 216, 198, .75);
  --ptw-bg: color-mix(in srgb, var(--accent) 7%, transparent);
  --ptw-border: color-mix(in srgb, var(--accent) 45%, transparent);

  position: relative; width: 100%; height: 100%; box-sizing: border-box;
  display: flex; flex-direction: column; padding: 24px 20px 18px;
  border-radius: var(--radius-card); overflow: hidden;
  background-color: var(--card-paper); background-image: var(--card-wash);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, var(--shadow-card);
  font-family: var(--font-ui); color: var(--ink); text-align: left;
  transition: background-color 500ms ease;
}
.card[data-tint] {
  --card-muted: rgba(34, 26, 23, .74);
  --card-ink-accent: var(--ink);
  --card-wash: none;
  --card-rule: rgba(34, 26, 23, .18);
  --card-rule-soft: rgba(34, 26, 23, .12);
  --ptw-bg: rgba(250, 245, 236, .35);
  --ptw-border: rgba(34, 26, 23, .35);
}
.card[data-tint="rose"] { --card-paper: var(--rose); }
.card[data-tint="sage"] { --card-paper: var(--sage); }

.card__ribbon { position: absolute; top: 0; right: 24px; width: 8px; height: 40px; background: var(--card-ink-accent); border-radius: 0 0 2px 2px; }
.card__cats { display: flex; flex-wrap: wrap; gap: 6px 14px; padding-right: 40px; }
.card__cat { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; line-height: 1.3; letter-spacing: .16em; text-transform: uppercase; color: var(--card-ink-accent); }
.card__dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.card__name { margin: 14px 0 0; font-family: var(--font-display); font-size: 36px; font-weight: 600; line-height: 1.04; letter-spacing: -.025em; color: var(--ink); }
.card__subtitle { margin: 6px 0 0; font-family: var(--font-aside); font-style: italic; font-size: 18px; line-height: 1.35; color: var(--card-muted); }
.card__rule { height: 1px; background: var(--card-rule); margin: 16px 0 2px; flex: none; }
.card__items { flex: 1; min-height: 0; overflow: hidden; margin: 0; padding: 0; list-style: none; }
.card__item { display: flex; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--card-rule-soft); }
.card__item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.card__who { font-family: var(--font-display); font-size: 17px; font-weight: 500; line-height: 1.25; color: var(--ink); }
.card__req { font-size: 15px; line-height: 1.4; color: var(--ink); }
.card--group .card__req { font-size: 14px; color: var(--card-muted); }
.card__book { width: 44px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center; color: var(--card-ink-accent); }
.card__meta { margin-top: 12px; min-height: 19px; font-size: 13px; line-height: 1.45; color: var(--card-muted); }
.card__done { display: flex; align-items: center; gap: 6px; color: var(--card-ink-accent); font-weight: 600; }
.card__actions { margin-top: 10px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; }
.card__ptw {
  display: flex; align-items: center; gap: 7px; min-height: 44px; box-sizing: border-box; padding: 0 15px;
  border-radius: var(--radius-pill); border: 1px solid var(--ptw-border); background: var(--ptw-bg);
  color: var(--card-ink-accent); text-decoration: none; cursor: pointer;
  font-family: var(--font-display); font-size: 15px; font-weight: 500; line-height: 1.1;
}
a.card__ptw:hover { color: var(--card-ink-accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.card__mark {
  display: flex; align-items: center; min-height: 44px; box-sizing: border-box; padding: 10px 2px; border: 0; background: none; cursor: pointer;
  font-family: var(--font-ui); font-size: 14px; line-height: 1.45; color: var(--card-muted);
}
button.card__mark:hover { color: var(--ink); }

/* Pray Today */

.today { padding: 64px 0 104px; }
.today__head {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--pad);
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 28px;
}
.intro { display: flex; flex-direction: column; align-items: center; gap: 16px; max-width: 680px; }
.datepill {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 12px;
  padding: 12px 24px; border-radius: var(--radius-pill);
  background: rgba(34, 26, 23, .05); border: 1px solid rgba(34, 26, 23, .08);
}
.datepill__date { font-family: var(--font-display); font-size: 20px; font-weight: 600; line-height: 1.2; letter-spacing: -.02em; }
.datepill__line { font-size: 14px; line-height: 1.45; color: var(--muted); }

.carousel { --k: 1; position: relative; height: calc(530px * var(--k)); margin-top: 40px; overflow: hidden; overflow-x: clip; overflow-y: visible; }
.carousel__track { position: absolute; inset: 0; transform: scale(var(--k)); transform-origin: top center; touch-action: pan-y; }
.slide {
  position: absolute; top: 22px; left: calc(50% - 165px); width: 330px; height: 470px;
  transition: left 380ms var(--ease), transform 380ms var(--ease), opacity 380ms ease;
}
.carousel__controls { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 4px; }
.round-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 0; padding: 0;
  background: var(--ink); color: var(--paper); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 200ms ease, background-color 200ms ease;
}
.round-btn:hover { background: var(--ink-2); }
.round-btn[aria-disabled="true"] { opacity: .3; cursor: default; background: var(--ink); }
.dots { display: flex; align-items: center; }
.dot { padding: 19px 4px; cursor: pointer; }
.dot span { display: block; width: 6px; height: 6px; border-radius: 3px; background: rgba(107, 95, 85, .45); transition: width 300ms ease; }
.dot--active span { width: 24px; background: var(--ink); }

/* Pray the Word */

.ptw { background: var(--teal); color: var(--paper); }
.ptw__inner {
  max-width: var(--max); margin: 0 auto; padding: 112px var(--pad);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
  gap: 48px 64px; align-items: center;
}
.ptw__stage { height: calc(620px * var(--s)); }
.ptw__art { width: 600px; height: 620px; margin-left: -300px; }
.ptw__card { position: absolute; left: 30px; top: 30px; width: 330px; height: 470px; transform: rotate(-6deg); }
.ptw__copy { display: flex; flex-direction: column; gap: 18px; max-width: 540px; }
.ptw .eyebrow { color: var(--on-teal-eyebrow); }
.ptw .h2 { color: var(--paper); }
.ptw .lead { color: rgba(242, 234, 218, .88); }
.ptw .aside { font-size: 21px; color: var(--on-teal-aside); }

/* Scripture slip */

.slip { position: absolute; left: 196px; top: 236px; width: 384px; transform: rotate(2.5deg); filter: var(--shadow-slip); }
.slip__paper {
  position: relative; background: var(--slip); padding: 28px 24px 22px 26px;
  /* torn(412) from the design reference, precomputed */
  clip-path: polygon(0.000% 0.52px,4.167% 1.52px,8.333% 1.65px,12.500% 3.37px,16.667% 0.67px,20.833% 1.76px,25.000% 0.24px,29.167% 4.52px,33.333% 0.60px,37.500% 3.20px,41.667% 0.16px,45.833% 0.28px,50.000% 4.35px,54.167% 4.69px,58.333% 2.85px,62.500% 0.76px,66.667% 0.17px,70.833% 0.41px,75.000% 4.53px,79.167% 3.70px,83.333% 0.05px,87.500% 2.73px,91.667% 2.36px,95.833% 3.84px,100.000% 2.44px,calc(100% - 2.58px) 6.250%,calc(100% - 3.10px) 12.500%,calc(100% - 0.60px) 18.750%,calc(100% - 2.71px) 25.000%,calc(100% - 1.78px) 31.250%,calc(100% - 3.80px) 37.500%,calc(100% - 3.94px) 43.750%,calc(100% - 0.78px) 50.000%,calc(100% - 1.21px) 56.250%,calc(100% - 3.94px) 62.500%,calc(100% - 1.78px) 68.750%,calc(100% - 2.50px) 75.000%,calc(100% - 0.37px) 81.250%,calc(100% - 2.43px) 87.500%,calc(100% - 1.33px) 93.750%,100.000% calc(100% - 3.63px),95.833% calc(100% - 0.51px),91.667% calc(100% - 4.22px),87.500% calc(100% - 1.51px),83.333% calc(100% - 1.72px),79.167% calc(100% - 2.88px),75.000% calc(100% - 1.19px),70.833% calc(100% - 3.75px),66.667% calc(100% - 4.73px),62.500% calc(100% - 4.74px),58.333% calc(100% - 3.69px),54.167% calc(100% - 1.83px),50.000% calc(100% - 4.25px),45.833% calc(100% - 3.61px),41.667% calc(100% - 1.29px),37.500% calc(100% - 1.81px),33.333% calc(100% - 0.61px),29.167% calc(100% - 0.18px),25.000% calc(100% - 4.49px),20.833% calc(100% - 1.76px),16.667% calc(100% - 0.59px),12.500% calc(100% - 4.39px),8.333% calc(100% - 4.15px),4.167% calc(100% - 4.60px),0.000% calc(100% - 3.58px));
}
.slip__gutter { position: absolute; left: 0; top: 0; bottom: 0; width: 16px; background: linear-gradient(to right, rgba(70, 50, 30, .08), rgba(70, 50, 30, 0)); }
.slip__through {
  position: absolute; top: 60px; left: 26px; right: 24px; height: 200px; overflow: hidden; transform: scaleX(-1);
  font-family: var(--font-scripture); font-size: 19px; line-height: 1.48; color: rgba(43, 37, 32, .04);
}
.slip__head { position: relative; display: flex; align-items: baseline; padding-bottom: 8px; border-bottom: 1px solid rgba(107, 93, 80, .35); }
.slip__ref { flex: 1; font-family: var(--font-scripture); font-size: 16px; font-variant-caps: all-small-caps; letter-spacing: .08em; color: var(--slip-meta); }
.slip__text { position: relative; margin: 14px 0 0; font-family: var(--font-scripture); font-size: 19px; line-height: 1.48; color: var(--slip-ink); }
.slip__text sup { font-size: 10.5px; font-weight: 600; line-height: 1.2; vertical-align: top; color: var(--slip-meta); margin-right: 3px; }
.slip__text em { color: var(--changed); }
.slip__foot {
  position: relative; margin-top: 12px; display: flex; justify-content: space-between; gap: 12px;
  font-family: var(--font-scripture); font-size: 13px; font-variant-caps: all-small-caps; letter-spacing: .06em; color: var(--slip-meta);
}

/* Download and footer (ink band) */

.ink { background: var(--ink); color: var(--paper); }
.download {
  max-width: var(--max); margin: 0 auto; padding: 112px var(--pad) 104px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px;
}
.download__icon { width: 112px; height: 112px; border-radius: var(--radius-icon-lg); box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .7); }
.cta-title { margin: 12px 0 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(42px, 5.4vw, 72px); line-height: 1; letter-spacing: -.035em; }
.download .aside { font-size: 23px; color: rgba(242, 234, 218, .78); }
.download .stores { justify-content: center; margin-top: 12px; }

.site-footer { border-top: 1px solid rgba(242, 234, 218, .12); }
.site-footer__inner {
  max-width: var(--max); margin: 0 auto; padding: 36px var(--pad) 44px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 48px;
}
.site-footer__about { display: flex; flex-direction: column; gap: 10px; max-width: 540px; }
.site-footer__wordmark { font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.site-footer__note { margin: 0; font-size: 13px; line-height: 1.5; color: rgba(242, 234, 218, .7); }
.site-footer__nav { display: flex; gap: 24px; align-items: flex-start; font-size: 14px; }
/* 44px targets without moving the text off the reference baseline */
.site-footer__nav a { display: inline-flex; align-items: center; min-height: 44px; margin: -13px 0 -14px; color: var(--paper); text-decoration-color: rgba(242, 234, 218, .3); }
.site-footer__nav a:hover { color: var(--paper); text-decoration-color: var(--paper); }

/* Text pages: privacy, terms, support, 404 */

.page { max-width: 680px; margin: 0 auto; padding: 32px var(--pad) 104px; }
.page .eyebrow { margin-bottom: 16px; }
.page h1 { margin: 0 0 24px; }
.page h2 { margin: 40px 0 12px; font-family: var(--font-display); font-size: 26px; font-weight: 600; line-height: 1.15; letter-spacing: -.02em; }
.page p:not(.eyebrow), .page li { font-size: 18px; line-height: 1.55; color: var(--ink-2); }
.page p { margin: 0 0 16px; }
.page ul { margin: 0 0 16px; padding-left: 22px; }
.page .btn-dark { display: inline-flex; margin-top: 16px; }
.todo {
  margin: 8px 0 32px; padding: 20px 24px; border-radius: 16px;
  border: 1.5px dashed rgba(154, 84, 80, .55); background: rgba(154, 84, 80, .06);
}
.todo .eyebrow { color: var(--changed); margin-bottom: 8px; }
.todo p:last-child { margin-bottom: 0; }

/* Motion */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
