/* StandEquipped landing page (standequipped.app). Dark by design.
   One centred axis, one light, one type scale. The light starts as a single source
   above, the dawn rises beneath it line by line, and both are full at the figure. */

@font-face { font-family: 'Cinzel'; src: url('/assets/fonts/Cinzel_400Regular.latin.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Cinzel'; src: url('/assets/fonts/Cinzel_700Bold.latin.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/assets/fonts/Inter_400Regular.latin.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/assets/fonts/Inter_500Medium.latin.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/assets/fonts/Inter_600SemiBold.latin.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Lora'; src: url('/assets/fonts/Lora_400Regular.latin.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Lora'; src: url('/assets/fonts/Lora_400Regular_Italic.latin.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }

:root {
  /* Colour */
  --night: #040404;       /* the page before any light */
  --stage: #F2C46B;       /* the app's stage light */
  --gold: #E6B249;        /* fills */
  --gold-text: #E8B754;   /* gold words */
  --ivory: #F3EEE4;       /* primary words */
  --dim: #B4AA99;         /* secondary words, 8:1 on night */
  --faint: #8F8676;       /* footer and captions, 5.3:1 on night */
  --on-gold: #1a1206;

  /* Type: one scale, roughly a fourth per step. */
  --display: 'Cinzel', Georgia, serif;
  --serif: 'Lora', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
  --t-body:  clamp(1.0625rem, 1.42vw, 1.3125rem);           /* description */
  --t-lead:  clamp(1.1875rem, 1rem + 0.9vw, 1.75rem);       /* the three lines */
  --t-s:     clamp(1.5rem, 2.5vw, 2.25rem);                 /* Ephesians 6:13 */
  --t-verse: clamp(1.625rem, 0.9rem + 2.35vw, 3rem);        /* Ephesians 6:10-11 */
  --t-m:     clamp(2rem, 0.95rem + 3.4vw, 3.875rem);        /* titles */
  --t-l:     clamp(2.125rem, 5.1vw, 4.875rem);              /* the opening line */
  --t-xl:    clamp(2.5rem, 1.1rem + 5.2vw, 6rem);           /* a line alone on a screen */

  /* Space: one rhythm. */
  --s-1: 12px;
  --s-2: 20px;
  --s-3: clamp(28px, 3.4vw, 40px);
  --s-4: clamp(40px, 5vw, 56px);
  --gutter: clamp(20px, 5vw, 56px);
  --measure: 60ch;

  /* Motion: one curve. */
  --ease: cubic-bezier(.22, .61, .36, 1);

  /* The light, driven by main.js. These are the still values for no JS and
     reduced motion: a calm morning, neither night nor full day. */
  --a: 0.55;      /* the source above */
  --rise: 0.6;    /* how high the dawn has climbed */
  --glow: 0.7;    /* how bright the dawn is */
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--night);
  color: var(--ivory);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: clip;
  font: 400 1.125rem/1.6 var(--sans);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p, figure, blockquote { margin: 0; }

:focus-visible {
  outline: 2px solid var(--stage);
  outline-offset: 4px;
  border-radius: 6px;
}

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

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  padding: 14px 18px; background: var(--ivory); color: var(--night);
  font-weight: 600; text-decoration: none; border-radius: 10px;
}
.skip:focus { top: 16px; }

/* ------------------------------------------------------------------ */
/* The sky. Every layer moves only by opacity and transform.           */
/* ------------------------------------------------------------------ */

.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background: var(--night);
}
.sky > * { position: absolute; }

/* The air itself warming from above. */
.sky__air {
  inset: 0;
  background: linear-gradient(180deg, #3e230a 0%, #1f1207 38%, #0b0705 72%, #050404 100%);
  opacity: calc(var(--a) * 0.4);
}

/* A wide, soft wash from above. */
.sky__wash {
  left: 50%; top: 0;
  width: 240vmax; height: 240vmax;
  margin-left: -120vmax; margin-top: -120vmax;
  background: radial-gradient(closest-side,
    rgba(242, 190, 100, 0.32) 0%,
    rgba(226, 160, 64, 0.15) 30%,
    rgba(168, 98, 34, 0.07) 55%,
    rgba(120, 66, 24, 0) 100%);
  transform: scale(calc(0.3 + var(--a) * 0.45));
  opacity: calc(0.45 + var(--a) * 0.55);
  will-change: transform, opacity;
}

/* The source: a small, bright presence just past the top edge. */
.sky__source {
  left: 50%; top: 0;
  width: 90vmax; height: 90vmax;
  margin-left: -45vmax; margin-top: -52vmax;
  background: radial-gradient(closest-side,
    rgba(255, 234, 192, 0.88) 0%,
    rgba(242, 192, 104, 0.55) 18%,
    rgba(222, 156, 68, 0.22) 42%,
    rgba(186, 114, 46, 0.06) 70%,
    rgba(186, 114, 46, 0) 100%);
  transform: scale(calc(0.46 + var(--a) * 0.54));
  opacity: calc(0.7 + var(--a) * 0.3);
  will-change: transform, opacity;
}

/* A faint shaft from the source down the page's axis. */
.sky__shaft {
  left: 50%; top: 0;
  width: 70vmin; height: 115vh;
  margin-left: -35vmin;
  background: radial-gradient(ellipse 50% 100% at 50% 0%,
    rgba(242, 196, 107, 0.15) 0%,
    rgba(226, 164, 70, 0.06) 42%,
    rgba(226, 164, 70, 0) 78%);
  transform-origin: 50% 0;
  transform: scaleX(calc(0.55 + var(--a) * 1.1));
  opacity: calc(0.65 + var(--a) * 0.35);
  will-change: transform, opacity;
}

/* The dawn: a wide warm field that climbs from below the floor. */
.sky__sun {
  left: 50%; bottom: 0;
  width: max(170vw, 1500px); height: 130vh;
  background: radial-gradient(closest-side,
    rgba(242, 196, 107, 0.40) 0%,
    rgba(232, 170, 78, 0.25) 18%,
    rgba(190, 120, 44, 0.13) 40%,
    rgba(120, 66, 20, 0.06) 64%,
    rgba(0, 0, 0, 0) 100%);
  transform: translate(-50%, calc(95vh - var(--rise) * 52vh));
  opacity: var(--glow);
  will-change: transform, opacity;
}

/* The bright line where the dawn first breaks. */
.sky__horizon {
  left: 50%; bottom: 0;
  width: max(120vw, 1100px); height: 34vh;
  background: radial-gradient(closest-side,
    rgba(255, 220, 150, 0.26) 0%,
    rgba(242, 196, 107, 0.14) 30%,
    rgba(200, 130, 50, 0.05) 62%,
    rgba(0, 0, 0, 0) 100%);
  transform: translate(-50%, calc(28vh - var(--rise) * 16vh));
  opacity: calc(var(--glow) * 0.9);
  will-change: transform, opacity;
}

/* A still vignette: the edges of the room stay in shadow. */
.sky__vignette {
  inset: 0;
  background: radial-gradient(ellipse 75% 85% at 50% 40%, rgba(4, 4, 4, 0) 55%, rgba(4, 4, 4, 0.55) 100%);
}

/* Fine grain so the gradients never band on dark screens. */
.sky__grain {
  inset: -50%;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ------------------------------------------------------------------ */
/* Header                                                              */
/* ------------------------------------------------------------------ */

.top {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 18px) var(--gutter) 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  min-height: 48px;
  padding-right: 8px;
  text-decoration: none;
  color: var(--ivory);
}
.brand img { width: 19px; height: auto; }
.brand span {
  font: 700 0.875rem/1 var(--display);
  letter-spacing: 0.16em;
  padding-top: 1px;
}

.login {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  margin-right: -14px;
  font: 500 0.9375rem/1 var(--sans);
  color: var(--ivory);
  text-decoration: none;
  transition: color 200ms var(--ease);
}
.login:hover { color: var(--gold-text); }

/* ------------------------------------------------------------------ */
/* Type scale                                                          */
/* ------------------------------------------------------------------ */

h1, h2 { margin: 0; font-weight: 400; }

.t-xl, .t-l, .t-m {
  font-family: var(--display);
  font-weight: 400;
  color: var(--ivory);
  text-wrap: balance;
}
.t-xl { font-size: var(--t-xl); line-height: 1.05; letter-spacing: 0.016em; max-width: 16em; }
.nw { white-space: nowrap; }
.t-l  { font-size: var(--t-l);  line-height: 1.12; letter-spacing: 0.012em; }
.t-m  { font-size: var(--t-m);  line-height: 1.1;  letter-spacing: 0.02em; }

.t-verse, .t-s {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--ivory);
  text-wrap: balance;
}
.t-verse { font-size: var(--t-verse); line-height: 1.3; letter-spacing: -0.004em; }
.t-s     { font-size: var(--t-s);     line-height: 1.35; }

/* Every Scripture reference on the page, one style. */
.ref {
  display: block;
  margin-top: var(--s-3);
  font: 500 0.9375rem/1.4 var(--sans);
  font-style: normal;
  letter-spacing: 0.02em;
  color: var(--gold-text);
}

/* ------------------------------------------------------------------ */
/* Sections: one centred axis                                          */
/* ------------------------------------------------------------------ */

/* main must not form a stacking context: the figure's light blends with the sky. */

section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-inline: var(--gutter);
}

/* The opening */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  justify-content: center;
  padding-top: calc(env(safe-area-inset-top) + 120px);
  /* Room for the sword cue (104px + 20px inset) so it never overlaps the sign-up note. */
  padding-bottom: 136px;
}
.hero h1 span { display: block; }
/* Short screens (small laptop windows, landscape phones): less air above and below,
   so the sword cue still lands on the first screen. */
@media (max-height: 720px) {
  .hero { padding-top: calc(env(safe-area-inset-top) + 84px); padding-bottom: 124px; }
}

/* The way on: the sword of the Spirit, point down, at the foot of the opening, with a
   light running down the blade. It says "there is more" without words, links to the
   next screen, and fades once the visitor scrolls. */
.hero { position: relative; }
.onward {
  position: absolute; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 20px);
  transform: translateX(-50%);
  display: flex; align-items: flex-start; justify-content: center;
  width: 48px; height: 104px;
  border-radius: 24px;
  transition: opacity .6s ease;
}
.onward.is-gone { opacity: 0; pointer-events: none; }
.onward:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.onward__sword {
  position: relative; display: block;
  width: 26px; height: 92px; margin-top: 4px;
}
.onward__sword img {
  display: block; width: 100%; height: 100%;
  filter: brightness(.72) sepia(.25);
  transition: filter .3s ease;
}
.onward:hover .onward__sword img { filter: brightness(1) sepia(.2); }
.onward__sword::after {
  content: ''; position: absolute; inset: 0;
  -webkit-mask: url('assets/landing/sword-down.webp') center / 100% 100% no-repeat;
          mask: url('assets/landing/sword-down.webp') center / 100% 100% no-repeat;
  background: linear-gradient(to bottom, rgba(255, 226, 160, 0) 42%, rgba(255, 236, 190, .95) 50%, rgba(255, 226, 160, 0) 58%) 0 0 / 100% 300% no-repeat;
  background-position: 0 100%;
  animation: onward-blade 2.6s cubic-bezier(.45, 0, .2, 1) 1.8s infinite;
}
/* With a 300%-tall background, position 100% puts the band above the hilt and 0% puts it
   past the tip, so this runs the light down the blade, hilt to tip. */
@keyframes onward-blade {
  0%   { background-position: 0 100%; }
  100% { background-position: 0 0%; }
}

.lede {
  max-width: var(--measure);
  margin-top: var(--s-3);
  color: var(--dim);
  font-size: var(--t-body);
  line-height: 1.6;
  text-wrap: balance;
}

/* Hand-set line breaks on wide screens; balanced wrapping on phones. */
@media (min-width: 720px) {
  .ln { display: block; }
}

/* The middle: one line per screen, held still while the page moves. */
.moment {
  display: block;
  padding: 0;
  height: calc(var(--h, 1.6) * 100vh);
  height: calc(var(--h, 1.6) * 100svh);
}

.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: grid;
  place-items: center;
  padding: 88px var(--gutter);
  text-align: center;
}

.pair { display: grid; gap: 0.28em; }
.pair span { display: block; }

.scripture { max-width: 18.5em; font-size: var(--t-verse); }
.scripture blockquote { display: grid; gap: 0.55em; }
.scripture .ref { margin-top: var(--s-4); }

.wide { display: none; }
@media (min-width: 700px) { .wide { display: inline; } }

/* Three lines: the shape of a day. */
.day {
  gap: var(--s-2);
  padding-top: 8vh;
  padding-bottom: 30vh;
}
.day p {
  max-width: 32em;
  font: 400 var(--t-lead)/1.5 var(--serif);
  color: var(--ivory);
  text-wrap: balance;
}

/* ------------------------------------------------------------------ */
/* The one appearance of the figure                                    */
/* ------------------------------------------------------------------ */

.stand {
  overflow-x: clip;
  padding-bottom: 20vh;
}

.stand__stage {
  position: relative;
  width: min(100%, calc(90svh * 0.8), 760px);
  flex: none;
  aspect-ratio: 900 / 1125;
}

.stand__glow,
.stand__figure {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* The baked rim light, added onto the page's own light. Its dark ground
   adds nothing under screen, so no rectangle ever shows. */
.stand__glow {
  mix-blend-mode: screen;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 50%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 50%, transparent 100%);
  filter: saturate(0.82) brightness(1.02);
  opacity: calc(0.35 + var(--a) * 0.65);
}

/* The figure itself, cut out, so the page light can sit behind it. */
.stand__figure { z-index: 1; }

/* Where the light lands at his feet. */
.stand__pool {
  position: absolute;
  left: 50%;
  bottom: 10.5%;
  width: 78%;
  height: 9%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side,
    rgba(242, 196, 107, 0.30), rgba(230, 170, 70, 0.09) 50%, rgba(230, 170, 70, 0) 100%);
  opacity: calc(0.25 + var(--a) * 0.75);
}

.verse {
  position: relative;
  z-index: 1;
  margin-top: clamp(-72px, -6svh, -28px);
}
.verse span { white-space: nowrap; }
/* The words sit just past the bright pool, in a little shade, so the gold
   reference keeps 4.5:1 when the light is full. */
.verse::before {
  content: '';
  position: absolute;
  inset: -40% -30%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(4, 4, 4, 0.42), rgba(4, 4, 4, 0.18) 60%, rgba(4, 4, 4, 0));
  pointer-events: none;
}

/* ------------------------------------------------------------------ */
/* The close                                                           */
/* ------------------------------------------------------------------ */

.close {
  padding-top: 4vh;
  padding-bottom: 18vh;
}
/* At the close the page is at full light: small words step up to hold 4.5:1. */
.close .notify__note { color: var(--dim); }

/* ------------------------------------------------------------------ */
/* Sign-up                                                             */
/* ------------------------------------------------------------------ */

.notify {
  width: min(100%, 440px);
  margin-top: var(--s-4);
}

.notify__field {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 16px;
  background: rgba(10, 8, 6, 0.55);
  box-shadow: inset 0 0 0 1px rgba(232, 183, 84, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: box-shadow 200ms var(--ease);
}
.notify__field:focus-within {
  box-shadow: inset 0 0 0 1px rgba(242, 196, 107, 0.8), 0 0 0 4px rgba(242, 196, 107, 0.14);
}
.notify.is-error .notify__field {
  box-shadow: inset 0 0 0 1px rgba(240, 165, 140, 0.75);
}
.notify.is-error .notify__field:focus-within {
  box-shadow: inset 0 0 0 1px rgba(240, 165, 140, 0.9), 0 0 0 4px rgba(240, 165, 140, 0.14);
}

.notify input {
  flex: 1 1 auto;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: var(--ivory);
  font: 400 1rem/1 var(--sans);
  border-radius: 10px;
}
.notify input::placeholder { color: var(--faint); opacity: 1; }
.notify input:focus,
.notify input:focus-visible { outline: none; }

.notify button {
  flex: 0 0 auto;
  height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 11px;
  background: var(--gold);
  color: var(--on-gold);
  font: 600 0.9375rem/1 var(--sans);
  letter-spacing: 0.005em;
  cursor: pointer;
  transition: background-color 200ms var(--ease), transform 120ms var(--ease);
}
.notify button:hover { background: var(--stage); }
.notify button:active { transform: scale(0.98); }
.notify button[disabled] { opacity: .6; cursor: progress; }

.notify__note {
  margin-top: 16px;
  min-height: 1.5em;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--faint);
}
.notify.is-error .notify__note { color: #F0A58C; }

.notify.is-done .notify__field { display: none; }
.notify.is-done .notify__note {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  margin: 0 0 calc(16px + 1.3125rem);
  padding: 8px 20px;
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(232, 183, 84, 0.28);
  background: rgba(10, 8, 6, 0.55);
  font-size: 0.9375rem;
  color: var(--ivory);
  text-wrap: balance;
  animation: settle 600ms var(--ease) both;
}
.notify.is-done .notify__note:focus { outline: none; }

.signin {
  margin-top: var(--s-1);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--dim);
}
.signin a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin: -14px 0;
  padding: 0 4px;
  color: var(--gold-text);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: rgba(232, 183, 84, 0.45);
  transition: text-decoration-color 200ms var(--ease);
}
.signin a:hover { text-decoration-color: currentColor; }

/* ------------------------------------------------------------------ */
/* Footer                                                              */
/* ------------------------------------------------------------------ */

.foot {
  position: relative;
  z-index: 1;
  padding: 160px var(--gutter) calc(env(safe-area-inset-bottom) + 40px);
  margin-top: -120px;
  background: linear-gradient(180deg, rgba(4, 4, 4, 0) 0, rgba(4, 4, 4, 0.92) 150px, var(--night) 100%);
  text-align: center;
  color: var(--faint);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.foot__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 28px;
}
.foot__links a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--dim);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 200ms var(--ease);
}
.foot__links a:hover { color: var(--ivory); }

.foot__nasb {
  max-width: 64ch;
  margin: 16px auto 0;
  text-wrap: pretty;
}
.foot__nasb a {
  display: inline-block;
  padding: 14px 2px;
  margin: -14px 0;
  color: var(--dim);
  text-underline-offset: 3px;
}
.foot__copy { margin-top: 8px; }

/* ------------------------------------------------------------------ */
/* Motion. One language: words come out of the dark, from blur to      */
/* clear, on the same curve. On load, the first light and first line;   */
/* after that, the scroll (main.js) does it.                            */
/* ------------------------------------------------------------------ */

.lit .sky { animation: fade 2.4s var(--ease) both; }
.lit .hero h1 { animation: emerge 1.8s var(--ease) 0.3s both; }
.lit .top,
.lit .lede,
.lit .hero .notify { animation: fade 1s var(--ease) 0.7s both; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes emerge {
  from { opacity: 0; filter: blur(8px); transform: translate3d(0, 14px, 0); }
  to { opacity: 1; filter: blur(0); transform: none; }
}
@keyframes settle {
  from { opacity: 0; filter: blur(4px); }
  to { opacity: 1; filter: blur(0); }
}

[data-in], [data-reveal] { will-change: opacity; }

/* ------------------------------------------------------------------ */
/* Phone                                                               */
/* ------------------------------------------------------------------ */

@media (max-width: 600px) {
  .t-l { font-size: clamp(1.875rem, 8.4vw, 2.375rem); line-height: 1.16; }
  .hero h1 span { display: inline; }
  .hero { padding-top: calc(env(safe-area-inset-top) + 96px); }
  .stage { padding-block: 72px; }
  .stand__stage { width: min(128vw, 560px); }
  .notify button { padding: 0 18px; }
  .foot__links { flex-direction: column; align-items: center; }
}

/* ------------------------------------------------------------------ */
/* Reduced motion: no scroll staging, the light holds still.           */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  .onward__sword::after { background-position: 0 50%; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .moment { height: auto; }
  .stage { position: relative; height: auto; min-height: 100vh; min-height: 100svh; }
  [data-in], [data-reveal] { will-change: auto; }
}
