/* Gubae on the web.
 *
 * Two languages live in the same markup: every translated string is written
 * twice, once with data-lang="en" and once with data-lang="am", and the
 * <html lang> attribute decides which is drawn. No templating, nothing to go
 * wrong if the script fails -- the page stays in whichever language it was
 * served in.
 */

:root {
  color-scheme: light dark;

  /* ink */
  --ink: #15172b;
  --ink-2: #4b4a63;
  --ink-3: #78768f;

  /* ground */
  --bg: #fbfaff;
  --surface: #ffffff;
  --surface-2: #f3f1fa;
  --line: #e6e2f2;

  /* brand */
  --brand: #4b2fa8;
  --brand-ink: #ffffff;
  --brand-soft: #efe9ff;
  --accent: #b8762b;
  --gold: #e0a458;

  /* night, used by the dark panels in both themes */
  --night-1: #2d2152;
  --night-2: #1a1233;
  --night-3: #0f0a1e;

  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-xl: 34px;

  --shadow-1: 0 1px 2px rgba(21, 23, 43, .05), 0 2px 8px rgba(21, 23, 43, .04);
  --shadow-2: 0 2px 6px rgba(21, 23, 43, .06), 0 18px 40px rgba(21, 23, 43, .08);

  --ui: "Noto Sans Ethiopic", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --scripture: "Noto Serif Ethiopic", Georgia, "Times New Roman", serif;

  --gutter: 20px;
  --max: 1140px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f3f1fb;
    --ink-2: #c3bed8;
    --ink-3: #928ca9;
    --bg: #0b0817;
    --surface: #151027;
    --surface-2: #1d1734;
    --line: #2b2446;
    --brand: #e0a458;
    --brand-ink: #1d1227;
    --brand-soft: #241b3d;
    --accent: #e0a458;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow-2: 0 2px 8px rgba(0, 0, 0, .5), 0 20px 48px rgba(0, 0, 0, .4);
  }
}
:root[data-theme="dark"] {
  --ink: #f3f1fb; --ink-2: #c3bed8; --ink-3: #928ca9;
  --bg: #0b0817; --surface: #151027; --surface-2: #1d1734; --line: #2b2446;
  --brand: #e0a458; --brand-ink: #1d1227; --brand-soft: #241b3d; --accent: #e0a458;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-2: 0 2px 8px rgba(0, 0, 0, .5), 0 20px 48px rgba(0, 0, 0, .4);
}

* { box-sizing: border-box; }

/* An author rule like `display: flex` beats the browser's own rule for the
 * hidden attribute. State it once so hidden always means hidden. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Whatever the page's language is, every other language's copy is hidden.
 * Adding a language is one more line here and one more <option>. */
html[lang="am"] [data-lang]:not([data-lang="am"]) { display: none; }
html[lang="en"] [data-lang]:not([data-lang="en"]) { display: none; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }

a { color: inherit; }
img { max-width: 100%; }

h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -.025em; font-weight: 800; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.08rem; letter-spacing: -.01em; }
p { margin: 0; }

.eyebrow {
  display: inline-block;
  font-size: .74rem; font-weight: 800; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent);
}
.lede { color: var(--ink-2); font-size: 1.06rem; }

.skip { position: absolute; left: -9999px; }
.skip:focus {
  position: fixed; left: 16px; top: 12px; z-index: 100;
  background: var(--surface); color: var(--ink); padding: 10px 14px;
  border-radius: var(--r-sm); border: 2px solid var(--brand);
}

/* ---------------------------------------------------------------- header */

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 10px; height: 76px; }

.brand { display: flex; align-items: center; text-decoration: none; flex: 0 0 auto; }
.brand img { height: 40px; width: auto; }
@media (max-width: 520px) { .brand img { height: 34px; } }
/* One mark at a time, wherever the pair appears -- header or footer.
 * Nothing else may set `display` on these, or it wins on specificity and
 * both are drawn. */
.on-light, .on-dark { display: block; }
.on-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .on-light { display: none; }
  :root:not([data-theme="light"]) .on-dark { display: block; }
}
:root[data-theme="dark"] .on-light { display: none; }
:root[data-theme="dark"] .on-dark { display: block; }

.site-nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.site-nav a {
  padding: 9px 13px; border-radius: var(--r-sm); text-decoration: none;
  color: var(--ink-2); font-weight: 650; font-size: .93rem; white-space: nowrap;
}
.site-nav a:hover { color: var(--ink); background: var(--surface-2); }
@media (max-width: 760px) { .site-nav .hide-sm { display: none; } }

.lang-select {
  font: inherit; font-size: .84rem; font-weight: 750;
  padding: 8px 30px 8px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  cursor: pointer; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.lang-select:hover { border-color: var(--brand); color: var(--brand); }
.lang-select:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); font: inherit; font-size: .84rem; font-weight: 750;
  cursor: pointer; white-space: nowrap;
}
.pill:hover { border-color: var(--brand); color: var(--brand); }

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 750; font-size: .96rem; text-decoration: none;
  cursor: pointer; transition: transform .12s ease, filter .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--gold); color: #26190b; }
.btn-primary:hover { filter: brightness(1.07); }
.btn-solid { background: var(--brand); color: var(--brand-ink); }
.btn-solid:hover { filter: brightness(1.12); }
.btn-outline { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost { border-color: rgba(255,255,255,.34); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-sm { padding: 9px 15px; font-size: .88rem; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ----------------------------------------------------------------- hero */

.stage { max-width: var(--max); margin: var(--gutter) auto 0; padding: 0 var(--gutter); }

.deck {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: linear-gradient(140deg, var(--night-1), var(--night-2) 58%, var(--night-3));
  color: #fff;
  padding: clamp(30px, 4.5vw, 54px);
  display: grid;
  gap: clamp(28px, 4vw, 52px);
  align-items: center;
}
@media (min-width: 900px) { .deck { grid-template-columns: 1.08fr .92fr; } }

.deck::before {
  content: ""; position: absolute; width: 520px; height: 520px;
  right: -170px; top: -210px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(96, 120, 255, .26), transparent 68%);
}

.pitch { position: relative; z-index: 1; display: grid; gap: 14px; align-content: start; }
.pitch .eyebrow { color: var(--gold); }
.pitch h1 { max-width: 15ch; }
.pitch .meta { color: #cfc9e4; font-size: 1.02rem; max-width: 42ch; }
.pitch .cta-row { margin-top: 8px; align-items: center; }

/* The side that turns. The panels stack on top of each other, so the column
 * keeps one height instead of jumping as the content changes. */
.turner-col { position: relative; z-index: 1; display: grid; gap: 14px; }
.turner { position: relative; min-height: 340px; }
@media (max-width: 899px) { .turner { min-height: 310px; } }

.panel {
  position: absolute; inset: 0;
  display: grid; gap: 12px; align-content: center; justify-items: start;
  padding: clamp(20px, 2.6vw, 28px);
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(10px);
  opacity: 0; visibility: hidden; transform: translateX(22px) scale(.98);
  transition: opacity .5s ease, transform .5s ease, visibility .5s;
}
.panel.on { opacity: 1; visibility: visible; transform: none; }
.panel .eyebrow { color: var(--gold); }

.panel-shot {
  width: 100%; aspect-ratio: 16 / 8; object-fit: cover; display: block;
  border-radius: var(--r-md);
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(0, 0, 0, .25);
}
.panel-title { font-size: clamp(1.1rem, 2vw, 1.35rem); line-height: 1.25; }
.panel-meta { color: #cfc9e4; font-size: .93rem; line-height: 1.5; }
.panel .quote {
  font-family: var(--scripture);
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  line-height: 1.72;
}

.dots { display: flex; gap: 8px; justify-content: center; }
.dots button {
  width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, .32); cursor: pointer;
  transition: width .2s, background .2s;
}
.dots button[aria-current="true"] { width: 26px; background: var(--gold); }

/* --------------------------------------------------------------- layout */

section { padding: clamp(44px, 7vw, 76px) 0; }
.section-head { margin-bottom: 26px; display: grid; gap: 10px; }
.section-head .lede { max-width: 56ch; }
.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); }
.cols-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 22px; box-shadow: var(--shadow-1);
}
.card h3 { margin-bottom: 6px; }
.card p { color: var(--ink-2); font-size: .95rem; }
a.card { text-decoration: none; display: block; transition: transform .14s ease, box-shadow .14s ease, border-color .14s; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--brand); }

.tile-icon {
  width: 42px; height: 42px; border-radius: var(--r-sm);
  display: grid; place-items: center; margin-bottom: 14px;
  background: var(--brand-soft); color: var(--brand); font-size: 1.2rem; font-weight: 800;
}

/* event cards */
.ev-card { overflow: hidden; padding: 0; display: flex; flex-direction: column; }
.ev-card .shot {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block;
  background: var(--surface-2);
}
.ev-card .body { padding: 18px 20px 22px; display: grid; gap: 7px; }
.ev-when {
  display: inline-flex; align-items: center; gap: 7px; align-self: start;
  background: var(--brand-soft); color: var(--brand);
  padding: 5px 11px; border-radius: 999px; font-size: .78rem; font-weight: 800;
}
.ev-card h3 { font-size: 1.05rem; }
.ev-where { color: var(--ink-3); font-size: .88rem; }

/* the screenshot rail */
.rail {
  display: flex; gap: 16px; overflow-x: auto;
  padding: 4px var(--gutter) 12px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; -ms-overflow-style: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail figure { margin: 0; flex: 0 0 auto; width: 228px; scroll-snap-align: center; }
.rail img { width: 100%; height: auto; display: block; border-radius: var(--r-md); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.rail figcaption { margin-top: 10px; font-size: .85rem; color: var(--ink-2); text-align: center; }

/* the dark call-to-action band */
.band {
  border-radius: var(--r-xl); padding: clamp(34px, 6vw, 60px) clamp(22px, 5vw, 48px);
  background: linear-gradient(140deg, var(--night-1), var(--night-2) 58%, var(--night-3));
  color: #fff; text-align: center;
}
.band p { color: #cfc9e4; max-width: 54ch; margin: 12px auto 0; }
.band .cta-row { justify-content: center; margin-top: 24px; }

/* ---------------------------------------------------------------- footer */

.site-foot {
  margin-top: clamp(40px, 6vw, 72px);
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  padding: clamp(40px, 6vw, 64px) 0 28px;
}
.foot-top { display: grid; gap: 34px; grid-template-columns: 1.4fr 1fr 1fr 1fr; }
@media (max-width: 860px) { .foot-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-top { grid-template-columns: 1fr; } }
.foot-brand img { height: 32px; width: auto; }
.foot-brand p { color: var(--ink-3); font-size: .92rem; margin-top: 14px; max-width: 34ch; }
.site-foot h4 {
  font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: 14px; font-weight: 800;
}
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-foot a { text-decoration: none; font-size: .93rem; color: var(--ink-2); }
.site-foot a:hover { color: var(--brand); }
.foot-bottom {
  margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between;
  color: var(--ink-3); font-size: .87rem;
}

/* --------------------------------------------------- the reading screens */

/* How far down the page you are. */
.progress {
  position: fixed; inset: 0 auto auto 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--brand), var(--gold));
  z-index: 60; transition: width .1s linear; pointer-events: none;
}

.reader-head {
  position: sticky; top: 76px; z-index: 30;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.reader-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 11px 0;
}
.reader-bar select, .reader-bar input {
  font: inherit; font-size: .92rem; font-weight: 600;
  padding: 10px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  max-width: 100%; box-shadow: var(--shadow-1);
  transition: border-color .15s, box-shadow .15s;
}
.reader-bar select { cursor: pointer; padding-inline-end: 34px; }
.reader-bar select:hover, .reader-bar input:hover { border-color: var(--brand); }
.reader-bar input:focus-visible, .reader-bar select:focus-visible {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.seg {
  display: inline-flex; border: 1px solid var(--line); border-radius: 999px;
  overflow: hidden; background: var(--surface); box-shadow: var(--shadow-1);
}
.seg button {
  font: inherit; font-size: .87rem; font-weight: 750;
  padding: 10px 15px; border: 0; background: transparent;
  color: var(--ink-3); cursor: pointer; transition: color .15s, background .15s;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); }

/* ------------------------------------------------------------ the page */

.reader { padding: 40px 0 10px; }
.reader .wrap.narrow { max-width: 720px; }

.chapter-title {
  font-family: var(--scripture);
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  font-weight: 600; letter-spacing: -.01em; line-height: 1.2;
  margin-bottom: 12px;
}
.chapter-sub {
  color: var(--ink-3); font-size: .86rem; font-weight: 650;
  letter-spacing: .07em; text-transform: uppercase;
  margin-bottom: 30px; padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.verses {
  font-family: var(--scripture);
  font-size: var(--read-size, 1.14rem);
  line-height: 2.1;
  color: color-mix(in srgb, var(--ink) 92%, var(--ink-2));
  max-width: 34em;
}
.verses p { margin: 0 0 1.1em; scroll-margin-top: 150px; }
.vnum {
  font-family: var(--ui); font-size: .62em; font-weight: 800;
  color: var(--accent); margin-inline-end: .5em;
  vertical-align: .55em; user-select: none; -webkit-user-select: none;
}
.verses p.hit, .verses p:target {
  background: var(--brand-soft);
  box-shadow: 0 0 0 10px var(--brand-soft);
  border-radius: 3px;
}

.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 52px; }
.pager .btn { border-radius: 999px; }
.loading, .empty { color: var(--ink-3); padding: 48px 0; text-align: center; }

.reader-foot {
  margin: 56px 0 10px;
  background: linear-gradient(140deg, var(--night-1), var(--night-2) 60%, var(--night-3));
  color: #fff; border: 0;
  border-radius: var(--r-lg); padding: 26px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  box-shadow: var(--shadow-2);
}
.reader-foot img { width: 46px; height: 46px; border-radius: var(--r-sm); }
.reader-foot div { flex: 1 1 240px; }
.reader-foot p { color: #cfc9e4; font-size: .92rem; margin-top: 4px; }

/* ------------------------------------------------------------ the lists */

.results { display: grid; gap: 8px; }
.results button {
  position: relative; text-align: start; font: inherit; cursor: pointer;
  width: 100%; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 15px 42px 15px 18px; color: var(--ink);
  font-weight: 600;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.results button::after {
  content: "›"; position: absolute; inset-inline-end: 18px; top: 50%;
  transform: translateY(-55%); color: var(--ink-3); font-size: 1.3rem;
  transition: inset-inline-end .15s, color .15s;
}
.results button:hover {
  border-color: var(--brand); box-shadow: var(--shadow-1); transform: translateY(-1px);
}
.results button:hover::after { inset-inline-end: 14px; color: var(--brand); }
.results .ref {
  display: block; font-size: .74rem; font-weight: 800; color: var(--accent);
  letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px;
}
.results mark {
  background: var(--brand-soft); color: inherit;
  border-radius: 4px; padding: 0 2px;
}

/* ------------------------------------------------------------- the songs */

.song-sheet {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: clamp(28px, 5vw, 60px);
  box-shadow: var(--shadow-2); position: relative; overflow: hidden;
  text-align: center;
}
.song-sheet::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--gold));
}

/* The title block above the words. */
.song-head { margin-bottom: 34px; }
.song-head h2 {
  font-family: var(--scripture); font-weight: 600;
  font-size: clamp(1.5rem, 3.4vw, 2.1rem); line-height: 1.2;
  letter-spacing: -.01em;
}
.song-head .by {
  margin-top: 10px; color: var(--ink-3);
  font-size: .82rem; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase;
}
.song-head::after {
  content: ""; display: block; width: 46px; height: 3px; border-radius: 3px;
  margin: 24px auto 0;
  background: linear-gradient(90deg, var(--brand), var(--gold));
}

.song-words {
  font-family: var(--scripture);
  font-size: var(--read-size, 1.14rem);
  line-height: 2.15;
  color: color-mix(in srgb, var(--ink) 92%, var(--ink-2));
  max-width: 30em; margin: 0 auto;
  text-align: center;
  text-wrap: balance;
}
.song-words p { margin: 0 0 2em; white-space: pre-line; }
.song-words p:last-child { margin-bottom: 0; }

/* The chorus, lifted off the page the way it lifts in the singing. */
.song-words p.chorus {
  background: var(--brand-soft);
  border-radius: var(--r-md);
  padding: 22px 26px;
  font-weight: 600;
  margin-inline: -8px;
}
.song-words p.chorus::before {
  content: attr(data-label);
  display: block; margin-bottom: 8px;
  font-family: var(--ui); font-size: .68rem; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase; color: var(--brand);
}

.song-actions {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center;
  margin-top: 38px; padding-top: 28px; border-top: 1px solid var(--line);
}

/* --------------------------------------------------------- the odds left */

.play-badge { display: inline-block; line-height: 0; }
.play-badge img { height: 54px; width: auto; display: block; }
.play-badge:hover img { filter: brightness(1.08); }
@media (max-width: 480px) { .play-badge img { height: 48px; } }

/* The inline icons take the colour of the text beside them, so one glyph is
 * right on a light card and on the dark hero alike. */
.icon { width: 1.05em; height: 1.05em; flex: 0 0 auto; }
.btn .icon { margin-inline-end: -2px; }
