/* WorshipFlow site. Colours and type are the app's own (WfTheme): Stage Dark and Clean Light. */
:root {
  --stage: #0C0C0E;
  --stage-2: #161618;
  --stage-3: #1F1F22;
  --stage-ink: #F3F3F4;
  --stage-soft: #A8A8AF;
  --amber: #F2B33D;
  --paper: #FAF9F6;
  --paper-2: #EFEEEA;
  --card: #FFFFFF;
  --ink: #1C1C1E;
  --soft: #5E5E63;
  --slate: #3E5C76;
  --slate-soft: #E1E8EE;

  --m: clamp(20px, 3vw, 40px);          /* the page's one pair of outer margins */
  --gap: clamp(120px, 14vw, 200px);     /* between sections */

  /* Five sizes */
  --t-small: 15px;
  --t-body: 18px;
  --t-statement: clamp(22px, 2vw, 28px);
  --t-head: clamp(32px, 3.4vw, 52px);
  --t-display: clamp(64px, 9vw, 168px);

  --ease: cubic-bezier(.2, .7, .2, 1);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ml: "Noto Sans Malayalam", "Malayalam Sangam MN", sans-serif;   /* Baloo Chettan breaks conjuncts under lang="ml" */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--stage); color: var(--stage-ink);
  font: 400 var(--t-body)/1.55 var(--sans); -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, dl, dd, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
::selection { background: var(--amber); color: var(--ink); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--m); top: -60px; background: var(--amber); color: var(--ink); padding: 10px 16px; z-index: 10; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- The split stage ---------- */
.split { display: grid; grid-template-columns: 47% 53%; }
.stage { position: sticky; top: 0; height: 100svh; padding: 20px 0 20px var(--m); z-index: 0; }
.stage-frame { position: relative; height: 100%; overflow: hidden; background: #000; }
.layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; opacity: 0; visibility: hidden; transition: opacity .2s; }  /* a cut through black, like a projector */
.layer.is-on { opacity: 1; visibility: visible; transition: opacity .9s var(--ease); }
.read { position: relative; z-index: 1; min-width: 0; }

/* The projected slide: what the congregation sees */
.slide { position: absolute; inset: 0; background: #000; display: flex; align-items: center; justify-content: center; padding: 96px 32px 140px; text-align: center; }
.verses { display: grid; width: 100%; }
.verse { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .3s; }
.verse.is-on { opacity: 1; visibility: inherit; transition: opacity 1s var(--ease); }
.verse .ml { font: 500 clamp(20px, 2vw, 32px)/1.6 var(--ml); color: var(--stage-ink); }
.verse .tr { font: 400 clamp(17px, 1.6vw, 26px)/1.55 var(--sans); color: var(--stage-ink); margin-top: 1.2em; }
.mode-native .tr, .mode-latin .ml { display: none; }
.mode-latin .tr { margin-top: 0; color: var(--stage-ink); font-size: clamp(20px, 2vw, 32px); }
.script-toggle { position: absolute; top: 20px; left: 20px; display: flex; background: var(--stage-3); padding: 4px; border-radius: 999px; }
.script-toggle button { border: 0; background: transparent; padding: 8px 14px; font-size: var(--t-small); font-weight: 500; color: var(--stage-soft); border-radius: 999px; cursor: pointer; transition: background .25s, color .25s; }
.script-toggle button:hover { color: var(--stage-ink); }
.script-toggle button[aria-pressed="true"] { background: var(--amber); color: var(--ink); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; padding: 0 var(--m) 0 clamp(40px, 5vw, 72px); }
.nav { display: flex; justify-content: flex-end; gap: clamp(16px, 2vw, 28px); padding-top: 32px; font-size: var(--t-small); font-weight: 500; }
.nav a { text-decoration: none; color: var(--stage-soft); transition: color .2s; }
.nav a:hover { color: var(--stage-ink); }
.nav .nav-action { color: var(--amber); }
.hero-text { position: absolute; top: 34%; left: clamp(40px, 5vw, 72px); right: var(--m); max-width: 36ch; }
.lede { font-size: var(--t-statement); line-height: 1.3; font-weight: 500; }
.hero-sub { margin-top: 20px; font-size: var(--t-body); color: var(--stage-soft); max-width: 36ch; }
.badges { display: flex; align-items: center; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.badges a { display: block; transition: transform .2s var(--ease), opacity .2s; }
.badges a:hover { transform: translateY(-2px); opacity: .9; }
.badges img { height: 48px; width: auto; }
.badges img.gp { height: 71px; margin: -11px -9px; }  /* Google's badge carries its own padding */
.wordmark {
  position: absolute; right: var(--m); bottom: 40px; margin: 0;
  font-size: var(--t-display); font-weight: 500; letter-spacing: -.045em; line-height: .9;
  white-space: nowrap; color: var(--stage-ink); transform-origin: 100% 100%;
}

/* ---------- In the app: a printed order of service ---------- */
.menu-field { background: var(--stage-2); padding: var(--gap) var(--m) var(--gap) clamp(40px, 5vw, 72px); }
.sheet {
  background: var(--paper); color: var(--ink); max-width: 600px; padding: 72px clamp(24px, 4vw, 52px);
  --z: 12px;
  clip-path: polygon(0 var(--z), 4% 0, 8% var(--z), 12% 0, 16% var(--z), 20% 0, 24% var(--z), 28% 0, 32% var(--z), 36% 0, 40% var(--z), 44% 0, 48% var(--z), 52% 0, 56% var(--z), 60% 0, 64% var(--z), 68% 0, 72% var(--z), 76% 0, 80% var(--z), 84% 0, 88% var(--z), 92% 0, 96% var(--z), 100% 0,
    100% calc(100% - var(--z)), 96% 100%, 92% calc(100% - var(--z)), 88% 100%, 84% calc(100% - var(--z)), 80% 100%, 76% calc(100% - var(--z)), 72% 100%, 68% calc(100% - var(--z)), 64% 100%, 60% calc(100% - var(--z)), 56% 100%, 52% calc(100% - var(--z)), 48% 100%, 44% calc(100% - var(--z)), 40% 100%, 36% calc(100% - var(--z)), 32% 100%, 28% calc(100% - var(--z)), 24% 100%, 20% calc(100% - var(--z)), 16% 100%, 12% calc(100% - var(--z)), 8% 100%, 4% calc(100% - var(--z)), 0 100%);
}
.sheet h2 { font-size: var(--t-head); font-weight: 700; letter-spacing: -.03em; line-height: 1; text-align: center; margin-bottom: 48px; }
.group + .group { margin-top: 48px; }
.group h3 { font-size: var(--t-statement); font-weight: 700; letter-spacing: -.01em; margin-bottom: 20px; color: var(--slate); }
.item { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; column-gap: 8px; }
.item + .item { margin-top: 18px; }
.item dt { font-weight: 700; }
.item::after { content: ""; grid-column: 2; grid-row: 1; border-bottom: 4px dotted #C9C6BE; transform: translateY(-5px); }
.item dd { grid-column: 3; grid-row: 1; font-weight: 500; white-space: nowrap; }
.item p { grid-column: 1 / -1; font-size: var(--t-small); color: var(--soft); max-width: 40ch; margin-top: 2px; }

/* ---------- A week: run-in column ---------- */
.week { background: var(--paper); color: var(--ink); padding: var(--gap) var(--m) var(--gap) clamp(40px, 5vw, 72px); }
.week h2 { font-size: var(--t-head); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; max-width: 600px; margin-bottom: 48px; }
.stage-step { max-width: 600px; }
.stage-step + .stage-step { margin-top: 72px; }
.stage-step p { color: var(--soft); line-height: 1.6; }
.stage-step b { color: var(--ink); }
.evidence { margin-top: 20px; aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-2); }
.evidence img { width: 100%; height: 100%; object-fit: cover; }
.evidence.wide img { object-position: 0 0; }

/* ---------- Try it: input half, output half ---------- */
.showcase { position: relative; display: grid; grid-template-columns: 1fr 1fr; min-height: 90svh; }
.field-dark { background: var(--stage); padding: 22svh var(--m) 160px; display: flex; flex-direction: column; align-items: flex-end; }
.field-dark > * { width: min(100%, 34ch); }
.field-label { font-size: var(--t-small); color: var(--stage-soft); margin-bottom: 16px; }
#chordpro {
  font: 400 clamp(18px, 1.5vw, 22px)/1.6 var(--sans); color: var(--stage-ink); background: var(--stage-2);
  border: 0; padding: 20px; resize: vertical; min-height: 12em; width: min(100%, 34ch);
}
#chordpro:focus-visible { outline: 3px solid var(--amber); outline-offset: 0; }
.field-light { background: var(--paper); color: var(--ink); padding: 22svh var(--m) 160px; }
.sheet-ui { width: min(100%, 520px); background: var(--card); border: 1px solid #E6E4DF; padding: 24px; }
.keys { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.keys-label { font-size: var(--t-small); font-weight: 600; color: var(--slate); }
.keys-row { display: flex; flex-wrap: wrap; gap: 4px; }
.keys-row button { min-width: 36px; height: 36px; padding: 0 6px; border: 1px solid #E6E4DF; background: var(--paper); font-size: var(--t-small); font-weight: 600; color: var(--slate); cursor: pointer; transition: background .2s, color .2s, transform .15s; }
.keys-row button:hover { background: var(--slate-soft); }
.keys-row button:active { transform: scale(.94); }
.keys-row button[aria-pressed="true"] { background: var(--slate); color: #fff; border-color: var(--slate); }
.rendered { background: var(--slate-soft); border-left: 4px solid var(--slate); padding: 20px 18px; min-height: 9em; }
.r-line { display: flex; flex-wrap: wrap; align-items: flex-end; }
.r-line + .r-line { margin-top: 6px; }
.r-seg { display: inline-flex; flex-direction: column; white-space: pre; }
.r-chord { font-size: var(--t-small); font-weight: 700; color: var(--slate); min-height: 1.3em; line-height: 1.3; padding-right: .35em; }
.r-text { font-size: var(--t-body); line-height: 1.4; }
.r-chord.flash { animation: flash .5s var(--ease); }
@keyframes flash { from { transform: translateY(-6px); opacity: 0; } to { transform: none; opacity: 1; } }
.credit { margin-top: 14px; font-size: var(--t-small); color: var(--soft); }
.split-heading { position: absolute; left: 0; right: 0; bottom: 40px; display: grid; grid-template-columns: 1fr 1fr; pointer-events: none;
  font-size: var(--t-head); font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.split-heading span:first-child { color: var(--stage-ink); text-align: right; padding-right: 20px; }
.split-heading span:last-child { color: var(--ink); padding-left: 20px; }

/* ---------- Pricing: two plans, two fields ---------- */
.pricing { display: grid; grid-template-columns: 5fr 7fr; min-height: 90svh; color: var(--ink); }
.plan { position: relative; display: flex; flex-direction: column; padding: 56px var(--m) 48px; }
.plan-free { background: var(--slate-soft); }
.plan-premium { background: var(--amber); }
.plan h3 { font-size: var(--t-display); font-weight: 700; letter-spacing: -.045em; line-height: .9; }
.plan-for { margin-top: 24px; font-size: var(--t-statement); line-height: 1.3; font-weight: 500; max-width: 26ch; }
.plan-incl { margin-top: 20px; max-width: 46ch; }
.plan-foot { margin-top: auto; padding-top: 48px; display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.price { font-size: var(--t-display); font-weight: 700; letter-spacing: -.045em; line-height: .9; }
.price span { font-size: var(--t-body); font-weight: 500; letter-spacing: 0; }
.plan-note { margin-top: 16px; font-size: var(--t-small); }
.btn { display: inline-block; padding: 16px 28px; font-size: var(--t-body); font-weight: 600; text-decoration: none; transition: transform .2s var(--ease), background .2s; }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: #000; transform: translateY(-2px); }

/* ---------- Questions ---------- */
.faq { background: var(--paper); color: var(--ink); display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; padding: var(--gap) var(--m); }
.faq h2 { grid-column: 1 / 4; font-size: var(--t-head); font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.faq-text { grid-column: 5 / 13; columns: 2; column-gap: 56px; }
.faq-text p { break-inside: avoid; margin-bottom: 20px; line-height: 1.55; }
.faq-text b { font-weight: 600; }
.faq-text a { color: var(--slate); font-weight: 600; text-underline-offset: 3px; }

/* ---------- Footer ---------- */
.footer { display: grid; grid-template-columns: 1fr 1fr; min-height: 100svh; background: var(--stage); }
.footer-pic { overflow: hidden; position: relative; }
.footer-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 0 8%; transform: scale(2.1); transform-origin: 2% 9%; }
.footer-menu { padding: 80px var(--m) 40px clamp(40px, 6vw, 96px); display: flex; flex-direction: column; }
.footer-mark { font-size: var(--t-statement); font-weight: 500; letter-spacing: -.03em; color: var(--stage-soft); }
.footer-h { margin-top: 40px; font-size: var(--t-head); font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.menu-links { margin-top: 56px; }
.menu-links li + li { margin-top: 20px; }
.menu-links a { font-size: clamp(24px, 2.6vw, 40px); font-weight: 700; letter-spacing: -.02em; text-decoration: none; display: inline-block; transition: transform .25s var(--ease), color .25s; }
.menu-links:hover a { color: var(--stage-soft); }
.menu-links a:hover, .menu-links a:focus-visible { color: var(--stage-ink); transform: translateX(12px); }
.footer-small { margin-top: auto; padding-top: 64px; display: grid; gap: 16px; font-size: var(--t-small); color: var(--stage-soft); }
.footer-small a { color: var(--stage-ink); }

/* ---------- Motion ---------- */
.js [data-in] > *, .js [data-in].stage-step > *, .js .plan[data-in] > * { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js [data-in].is-in > * { opacity: 1; transform: none; }
.js [data-in].is-in > *:nth-child(2) { transition-delay: .08s; }
.js [data-in].is-in > *:nth-child(3) { transition-delay: .16s; }
.js [data-in].is-in > *:nth-child(4) { transition-delay: .24s; }
.js h2[data-in] { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js h2[data-in].is-in { opacity: 1; transform: none; }
.js .faq-text[data-in] > * { transition-delay: 0s; }

@supports (animation-timeline: view()) {
  .wordmark { animation: settle linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
  @keyframes settle { to { scale: .93; } }
}
.footer-pic img { animation: drift 24s ease-in-out infinite alternate; }
@keyframes drift { to { transform: scale(2.25) translate(-1.5%, -1%); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-in] > *, .js h2[data-in] { opacity: 1 !important; transform: none !important; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1080px) {
  .faq h2 { grid-column: 1 / -1; margin-bottom: 40px; }
  .faq-text { grid-column: 1 / -1; }
}

/* ---------- Phone ---------- */
@media (max-width: 760px) {
  :root { --m: 20px; --gap: 96px; --t-display: 17vw; }
  body { overflow-x: clip; }
  .r-text { font-size: 16px; }
  .sheet-ui { padding: 16px; }
  .split { display: block; }
  .stage { position: relative; height: 64svh; padding: 12px 12px 0; }
  .layer[data-layer="list"], .layer[data-layer="chords"] { display: none; }
  .slide { padding: 72px 20px 32px; }
  .verse .ml { font-size: 19px; }
  .verse .tr { font-size: 16px; }
  .script-toggle { top: 12px; left: 12px; right: 12px; justify-content: space-between; }
  .script-toggle button { padding: 8px 10px; }
  .hero { min-height: 0; padding: 0 var(--m) 64px; display: flex; flex-direction: column; }
  .nav { display: none; }
  .wordmark { position: relative; right: auto; bottom: auto; order: -1; margin-top: -.42em; font-size: 17vw; z-index: 2; }
  .hero-text { position: static; max-width: none; margin-top: 24px; }
  .lede { font-size: 22px; }
  .menu-field, .week { padding: var(--gap) var(--m); }
  .sheet { padding: 48px 20px; }
  .group h3 { font-size: 19px; }
  .showcase { grid-template-columns: 1fr; }
  .field-dark { align-items: stretch; padding: 40px var(--m) 96px; }
  .field-dark > *, #chordpro { width: 100%; }
  .field-light { padding: 96px var(--m) 48px; }
  .split-heading { position: static; grid-column: 1; grid-row: 1; display: block; padding: 0 var(--m); background: var(--stage); }
  .split-heading span { display: block; text-align: left !important; padding: 0 !important; }
  .split-heading span:first-child { padding-top: var(--gap) !important; }
  .split-heading span:last-child { color: var(--amber); }
  .pricing { grid-template-columns: 1fr; }
  .plan-premium { order: -1; }
  .plan { min-height: 70svh; }
  .plan-foot .btn { width: 100%; text-align: center; }
  .faq { display: block; }
  .faq-text { columns: 1; }
  .footer { grid-template-columns: 1fr; }
  .footer-pic { height: 50svh; }
  .footer-menu { padding: 56px var(--m) 32px; }
  .menu-links a { font-size: 8vw; }
}

/* ---------- Text pages: privacy, support ---------- */
.doc-page { background: var(--paper); color: var(--ink); }
.doc-bar { display: flex; justify-content: space-between; align-items: baseline; padding: 28px var(--m); background: var(--stage); color: var(--stage-ink); font-size: var(--t-small); font-weight: 500; }
.doc-bar a { text-decoration: none; }
.doc-bar .home { font-size: var(--t-statement); letter-spacing: -.03em; }
.doc-bar .nav-action { color: var(--amber); }
.doc { max-width: 680px; margin: 0 auto; padding: 96px var(--m) 140px; }
.doc h1 { font-size: var(--t-head); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; }
.doc .updated { margin-top: 16px; color: var(--soft); font-size: var(--t-small); }
.doc h2 { margin-top: 56px; font-size: var(--t-statement); font-weight: 700; letter-spacing: -.01em; }
.doc p, .doc li { margin-top: 16px; line-height: 1.6; }
.doc ul { list-style: disc; padding-left: 1.2em; }
.doc a { color: var(--slate); font-weight: 600; text-underline-offset: 3px; }
.doc-foot { background: var(--stage); color: var(--stage-soft); padding: 40px var(--m); font-size: var(--t-small); display: flex; gap: 24px; flex-wrap: wrap; }
.doc-foot a { color: var(--stage-ink); }
