/* Layout: sticky nav, three auto-playing canvas stories (hero, hire, ministry) each with
   one text panel at a time, then the content for the chosen path. Colours come
   from the tokens below; the canvas reads --ink/--lime/--gold/--violet/--dark (and --dot-lime/--dot-gold when set). */
:root {
  --bg: #0a0b0a;
  --fg: #eef0ea;
  --muted: #9a9f94;
  --line: #252823;
  --surface: #12140f;
  --navbg: rgba(10, 11, 10, 0.92);
  --vig: rgba(10, 11, 10, 0.85);
  --ink: #fff;
  --lime: #b4d447;
  --gold: #dea946;
  --violet: #8f7fd0;
  --dark: 1;
  --accent: #b4d447;
  --on-accent: #1a2205;
  --accent2: #dea946;
  --on-accent2: #2a1c04;
  --minbg: linear-gradient(180deg, #171309, #0a0b0a);
  --minmuted: #a39d8c;
  --minline: #35301f;
  --minsurface: #15120a;
  --grain: 0.06;
  --shadow: #000;
  --disp: "Space Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --bar-h: 56px;
  --radius: 16px;
  --radius-btn: 10px;

  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f5f2fb;
  --fg: #1c1730;
  --muted: #6b6280;
  --line: #ded4ef;
  --surface: #fff;
  --navbg: rgba(245, 242, 251, 0.92);
  --vig: rgba(245, 242, 251, 0.85);
  --ink: #1c1730;
  --lime: #4f6f00;
  --gold: #8a5a00;
  --violet: #5a389c;

  /* Brighter than the text tokens above: dots are not read as text, and the dark ones look flat on pale. */
  --dot-lime: #6a9a00;
  --dot-gold: #c98200;
  --dark: 0;
  --accent: #5d7a0c;
  --on-accent: #fff;
  --accent2: #a8741a;
  --on-accent2: #fff;
  --minbg: linear-gradient(180deg, #fbf3e2, #f5f2fb);
  --minmuted: #6f6450;
  --minline: #e4d6b4;
  --minsurface: #fffaf0;
  --grain: 0.03;
  --shadow: #6d4aa8;

  color-scheme: light;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-snap-type: y proximity;
  scroll-padding-top: calc(var(--bar-h) + 12px);
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--disp);
  line-height: 1.6;
}

a { color: inherit; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px));
}

.muted { color: var(--muted); }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.note {
  font: 400 12px var(--mono);
  color: var(--muted);
}

.eyebrow {
  margin-bottom: 16px;
  color: var(--accent);
  font: 500 12px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow.gold { color: var(--accent2); }

/* nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--bar-h);
  border-bottom: 1px solid var(--line);
  background: var(--navbg);
  backdrop-filter: blur(8px);
}

.nav-in {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 100%;
}

.wm {
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  text-decoration: none;
}
.wm .d { color: var(--fg); }

.wm .f {
  color: var(--lime);
  font-weight: 800;
}

.wm .g {
  color: var(--gold);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 1.14em;
  letter-spacing: 0;
}

.brand {
  margin-inline-end: auto;
  font-size: 1.1rem;
}

.nl {
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
}

.nl:hover,
.nl[aria-current="true"] {
  color: var(--fg);
  border-color: var(--accent);
}

.nl.min:hover,
.nl.min[aria-current="true"] { border-color: var(--accent2); }

/* Language menu: flag + name button and a listbox, like the devotionals pages. */
.langmenu {
  position: relative;
  flex: none;
}

.langbtn,
.langopt {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: none;
  color: var(--fg);
  font: 500 14px var(--disp);
  cursor: pointer;
}

.langbtn {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  white-space: nowrap;
}

.langbtn:hover { border-color: var(--accent); }

.langarrow {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s;
}

.langbtn[aria-expanded="true"] .langarrow { transform: rotate(180deg); }

.langlist {
  position: absolute;
  inset-block-start: calc(100% + 6px);
  inset-inline-end: 0;
  z-index: 60;
  min-width: 180px;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  list-style: none;
}

.langlist[hidden] { display: none; }

.langopt {
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  text-align: start;
}

.langopt:hover,
.langopt:focus-visible { background: var(--surface); }

.langopt[aria-selected="true"] {
  color: var(--accent);
  font-weight: 600;
}

.langcheck {
  margin-inline-start: auto;
  visibility: hidden;
}

.langopt[aria-selected="true"] .langcheck { visibility: visible; }

/* Theme switch: sun, track and moon, like the devotionals pages. */
.theme {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  padding: 4px 2px;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.theme-sun,
.theme-moon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: color 0.15s;
}

:root[data-theme="light"] .theme-sun,
:root[data-theme="dark"] .theme-moon { color: var(--accent); }

.theme-track {
  position: relative;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: var(--line);
  transition: background 0.15s;
}

:root[data-theme="dark"] .theme-track { background: var(--accent); }

.theme-dot {
  position: absolute;
  inset-block-start: 2.4px;
  inset-inline-start: 2.4px;
  width: 15.2px;
  height: 15.2px;
  border-radius: 50%;
  background: var(--surface);
  transition: transform 0.15s;
}

:root[data-theme="dark"] .theme-dot { transform: translateX(16px); }
[dir="rtl"][data-theme="dark"] .theme-dot { transform: translateX(-16px); }

@media (width <= 640px) {
  .nav-in { gap: 10px; }
  .nl[data-contact-link] { display: none; }
}

/* Narrow phones: keep the wordmark, language and theme; the paths are reached
   from the doors and the switch links. */
@media (width <= 480px) {
  .nl { display: none; }
  .langbtn .langname { display: none; }
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border: 0;
  border-radius: var(--radius-btn);
  font: 600 1rem var(--disp);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s, filter 0.18s;
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.btn.a {
  background: var(--accent);
  color: var(--on-accent);
}

.btn.m {
  background: var(--accent2);
  color: var(--on-accent2);
}

.btn.mg {
  border: 1px solid var(--minline);
  background: transparent;
  color: var(--fg);
}

/* auto-playing stories */
.story {
  position: relative;
  scroll-snap-align: start;
}


.minband,
.contact,
.s,
.switch {
  scroll-snap-align: start;
}

.pin {
  position: relative;
  display: grid;
  min-height: max(calc(100svh - var(--bar-h)), var(--pin-min, 0px));
  overflow: hidden;
}

/* The hero needs room for the fork spheres above the door cards: on short
   screens it grows past the viewport and the page scrolls a little. */
#story-hero { --pin-min: 680px; }

.scene {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.vig {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 70% at 60% 50%, transparent 45%, var(--vig)),
    radial-gradient(ellipse 60% 50% at 50% 115%, var(--vig), transparent 70%);
}

.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-3%, 2%); }
  50% { transform: translate(2%, -3%); }
  75% { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

/* Panels share one grid cell, so the box is as tall as the tallest panel and
   nothing is ever clipped, whatever the screen height. */
.panel {
  position: relative;
  z-index: 1;
  grid-area: 1 / 1;
  align-self: center;
  padding-block: 40px 72px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 0.16s ease-out, transform 0.16s ease-out;
}

.panel.on {
  opacity: 1;
  pointer-events: auto;
  transform: none;
  transition: opacity 0.6s 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.6s 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.panel .in { max-width: 560px; }

.panel h1,
.panel h2 {
  margin: 0 0 16px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.02;
  text-wrap: balance;
}

.panel h2 { font-size: clamp(1.9rem, 4.2vw, 3.2rem); }

.panel p {
  max-width: 46ch;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 1.05rem;
}

.panel .verse {
  max-width: 28ch;
  margin: 0 0 8px;
  color: var(--fg);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.3;
}

/* The verse and its reference share one box and are centered together. */
.versebox {
  max-width: 28ch;
  text-align: center;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
}

.panel .versebox .verse {
  max-width: none;
  font-size: inherit;
}

.panel .why {
  max-width: none;
  margin: 14px 0 0;
  color: var(--fg);
  font-size: 1.05rem;
}

.refline {
  color: var(--gold);
  font: 500 12px var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.refline.version {
  margin-top: 4px;
  color: var(--muted);
}

.typed {
  min-height: 1.6em;
  margin-bottom: 22px;
  color: var(--accent);
  font: 500 14px var(--mono);
}

.caret {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  margin-inline-start: 2px;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: blink 1s steps(2) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tags span,
.stack span {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font: 400 12px var(--mono);
}

.panel.doorpanel .in { max-width: 900px; }

.doors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 8px;
}

.hint {
  margin: 18px 0 0;
  font: 400 12px var(--mono);
}

.door {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.3s, box-shadow 0.3s;
}

.door:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 40px -24px var(--shadow);
}

.door .k {
  font: 500 12px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.door h3 {
  margin: 0;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  letter-spacing: -0.03em;
  line-height: 1;
}

.door p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.door .go {
  display: inline-block;
  margin-top: 6px;
  font-weight: 600;
  transition: transform 0.3s;
}
.door:hover .go { transform: translateX(8px); }

.door.hire .k,
.door.hire .go { color: var(--accent); }
.door.hire:hover { border-color: var(--accent); }

.door.min .k,
.door.min .go { color: var(--accent2); }
.door.min:hover { border-color: var(--accent2); }

/* scene dots: buttons so the visitor can jump, with a larger hit area than the dot */
.sdots {
  position: absolute;
  top: 50%;
  inset-inline-end: max(8px, env(safe-area-inset-right, 0px));
  z-index: 5;
  display: grid;
  gap: 2px;
  transform: translateY(-50%);
}

.dot {
  position: relative;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.dot::after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background: var(--line);
  transition: background 0.3s, transform 0.3s;
}

.dot.on::after {
  background: var(--accent);
  transform: scale(1.7);
}

/* pause / play for the looping stories */
.pause {
  position: absolute;
  inset-inline-end: max(16px, env(safe-area-inset-right, 0px));
  bottom: 14px;
  z-index: 5;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--navbg);
  color: var(--muted);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.pause::before {
  content: "❚❚";
  letter-spacing: -2px;
}

.pause[aria-pressed="true"]::before {
  content: "▶";
  letter-spacing: 0;
}

.pause:hover {
  color: var(--fg);
  border-color: var(--accent);
}
.story.static .pause { display: none; }

.cue {
  position: absolute;
  bottom: 22px;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font: 500 11px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.cue i {
  display: block;
  width: 1px;
  height: 44px;
  background: linear-gradient(var(--accent), transparent);
  transform-origin: center top;
  animation: cue 1.8s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

@keyframes cue {
  0% { transform: scaleY(0); }

  50% {
    transform: scaleY(1);
    transform-origin: center top;
  }
  51% { transform-origin: center bottom; }

  100% {
    transform: scaleY(0);
    transform-origin: center bottom;
  }
}

.panel.doorpanel {
  align-self: end;
  padding-bottom: 6svh;
}

@media (width <= 820px) {
  .panel {
    align-self: end;
    padding-bottom: calc(9svh + env(safe-area-inset-bottom, 0px));
  }

  .panel p { font-size: 1rem; }

  /* Room above the text for the scene, and a gutter so the scene dots never touch it.
     On tall screens the panel already fits, so this only grows the box on short ones. */
  .panel:not(.doorpanel) {
    padding-top: 170px;
  }

  .panel:not(.doorpanel) .in { padding-inline-end: 24px; }
  .doors { grid-template-columns: 1fr; }

  .door p,
  .cue,
  .grain { display: none; }
}


.story.static .pin {
  position: relative;
  display: block;
  min-height: 0;
  padding-block: 48px;
}

.story.static .scene {
  position: relative;
  height: 320px;
}

.story.static .panel {
  position: relative;
  padding-block: 18px;
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.story.static .cue,
.story.static .sdots { display: none; }

/* path content */
.switch { padding-block: 14px 0; }

.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: 500 13px var(--mono);
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.link:hover { color: var(--fg); }

.s { padding-block: 80px 8px; }

h2.t {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
}
h2.t.how { margin-top: 64px; }

.more {
  margin: 20px 0 0;
  font: 500 14px var(--mono);
}

.more a { color: var(--accent); }

.sub {
  max-width: 58ch;
  margin: 0 0 28px;
  color: var(--muted);
}

.rv {
  transform: translateY(16px);
  transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.rv.in { transform: none; }

.kinds {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.kind {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.25s, border-color 0.25s;
}

.kind:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.kind h3 {
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.kind p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.kind .ex {
  margin-top: 12px;
  color: var(--accent);
  font: 400 12px var(--mono);
}

.ask {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  align-items: center;
  padding: clamp(24px, 4vw, 40px);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.ask h2 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.ask p {
  margin: 0;
  color: var(--muted);
}

.case {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 14px 40px;
  padding: 28px 14px;
  border-top: 1px solid var(--line);
  text-decoration: none;
  transition: background 0.25s, padding-inline-start 0.3s;
}

.case:last-child { border-bottom: 1px solid var(--line); }

.case::before {
  content: "";
  position: absolute;
  top: -1px;
  inset-inline-start: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.case.in::before {
  opacity: 0;
  transform: scaleX(1);
  transition: transform 1.1s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 1.4s 0.9s;
}

a.case:hover {
  padding-inline-start: 24px;
  background: var(--surface);
}

.case h3 {
  margin: 0 0 6px;
  font-size: clamp(1.3rem, 2.6vw, 1.8rem);
}

.case p {
  margin: 0 0 10px;
  color: var(--muted);
}

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.case .note { margin-top: 10px; }

.facts {
  display: grid;
  gap: 8px;
  align-content: start;
  margin: 0;
  padding: 0;
  font-size: 0.95rem;
  list-style: none;
}

.facts li {
  display: flex;
  gap: 10px;
}

.facts li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 700;
}

.chip {
  display: inline-block;
  margin-inline-start: 6px;
  padding: 3px 9px;
  border: 1px solid currentcolor;
  border-radius: 999px;
  color: var(--accent);
  font: 500 11px var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.ride {
  position: relative;
  display: grid;
  gap: 14px;
  max-width: 760px;
  padding-inline-start: 44px;
}

.rline {
  position: absolute;
  top: 8px;
  bottom: 8px;
  inset-inline-start: 13px;
  width: 2px;
  border-radius: 2px;
  background: var(--line);
}

.rfill {
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 100%;
  height: calc(var(--r, 0) * 100%);
  border-radius: 2px;
  background: var(--accent);
}

.rdot {
  position: absolute;
  top: calc(var(--r, 0) * 100% - 7px);
  inset-inline-start: -6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 25%, transparent);
}

.step {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: border-color 0.3s, transform 0.3s;
}

.step.on {
  border-color: var(--accent);
  transform: translateX(6px);
}

.step b {
  display: block;
  margin-bottom: 2px;
  font-size: 1.15rem;
}

.step span {
  color: var(--muted);
  font-size: 0.95rem;
}

/* ministry */
.minband {
  margin-top: 0;
  padding-block: 76px;
  border-top: 1px solid var(--minline);
  background: var(--minbg);
}
.minband h2.t { color: var(--fg); }

.isaiah {
  max-width: 62ch;
  margin: 12px 0 32px;
  padding-inline-start: 18px;
  border-inline-start: 2px solid var(--accent2);
}

.isaiah p {
  margin: 0 0 8px;
  color: var(--minmuted);
  font-size: 1rem;
  font-style: italic;
}

.isaiah cite {
  color: var(--accent2);
  font: 500 12px var(--mono);
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 12px;
}

.stat {
  padding: 16px;
  border: 1px solid var(--minline);
  border-radius: var(--radius);
  background: var(--minsurface);
}

.stat b {
  display: block;
  color: var(--accent2);
  font-size: 2.1rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.stat span {
  color: var(--minmuted);
  font-size: 0.9rem;
}

.minsplit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
}

.offer {
  min-width: 0;
  padding: 26px;
  border: 1px solid var(--minline);
  border-radius: var(--radius);
  background: var(--minsurface);
}

.offer.app {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.apphead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.appicon {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 14px;
}

/* The Google Play logo has a white background, so it sits on a white tile in both themes. */
.store {
  position: relative;
  display: inline-flex;
  padding: 4px 10px;
  border: 1px solid var(--minline);
  border-radius: 12px;
  background: #fff;
}

.store img {
  display: block;
  width: auto;
  height: 52px;
}

/* The visually hidden label becomes a tooltip while the logo is hovered or focused. */
.store:hover .sr,
.store:focus-visible .sr {
  bottom: calc(100% + 8px);
  left: 50%;
  width: auto;
  height: auto;
  padding: 6px 10px;
  overflow: visible;
  border-radius: 8px;
  background: #1f2937;
  color: #fff;
  clip: auto;
  font: 500 12px var(--mono);
  transform: translateX(-50%);
  pointer-events: none;
}

.minbuild { margin-top: 24px; }

.offer h3 {
  margin: 0 0 10px;
  font-size: 1.4rem;
}

.offer p {
  margin: 0 0 18px;
  color: var(--minmuted);
}

.offer ul {
  display: grid;
  gap: 6px;
  margin: 0 0 18px;
  padding-inline-start: 18px;
  color: var(--minmuted);
}

.offer .row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.offer.app .row { margin-top: auto; }

/* contact + footer */
.contact { padding-block: 80px 24px; }

.box {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: center;
  padding: clamp(24px, 5vw, 52px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.box h2 {
  margin: 0 0 8px;
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.box p { margin: 0; }

.mail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 16px 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}

.foot-brand { font-weight: 700; }
.foot-dev { color: var(--fg); }
.foot-4 { color: #84cc16; }
.foot-god { color: #d4a017; }

.foot-mail {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  min-height: 32px;
  color: var(--muted);
  transition: color 0.15s, transform 0.15s;
}

.foot-mail:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

@media (width <= 760px) {
  .ask,
  .case,
  .minsplit,
  .box { grid-template-columns: 1fr; }
}

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

  .rv { transform: none; }
  html { scroll-behavior: auto; }
  .case::before { display: none; }
}

/* Right-to-left (Arabic): flip the few effects that move along the x axis. */
[dir="rtl"] .door:hover .go { transform: translateX(-8px); }
[dir="rtl"] .step.on { transform: translateX(-6px); }
[dir="rtl"] .case::before { transform-origin: right; }
