@font-face {
  font-family: Inter;
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'Instrument Serif';
  src: url('/assets/fonts/instrument-serif.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Instrument Serif';
  src: url('/assets/fonts/instrument-serif-italic.woff2') format('woff2');
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  /* Palette: deep teal and dark ink on warm paper. */
  --paper: #fbf7f0;
  --ink: #14212b;
  --muted: #5b6770;
  --deep: #264653;
  --teal: #1d6f66;
  --gold: #1d6f66;
  --line: #e4d9c8;
  --gutter: clamp(24px, 5.15vw, 90px);
  --display-font: 'Instrument Serif', Georgia, serif;
  --ui-font: Inter, system-ui, sans-serif;
  --entrance-ease: cubic-bezier(.23, 1, .32, 1);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  background:
    var(--paper);
  color: var(--ink);
  font: 400 1rem/1.5 var(--ui-font);
  -webkit-user-select: none;
  user-select: none;
}

.topbar, .hero, .footer {
  width: min(100%, 1740px);
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: max(18px, env(safe-area-inset-top)) 10px;
}

.logo-link {
  display: inline-block;
  border-radius: 8px;
  touch-action: manipulation;
}

.logo {
  display: block;
  width: clamp(94px, 8.3vw, 126px);
  height: auto;
}

.music-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding-inline: 15px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: transparent;
  color: var(--ink);
  font: 600 .8rem/1 var(--ui-font);
  cursor: pointer;
}

.music-bars {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 15px;
  color: var(--gold);
}

.music-bars i {
  width: 2px;
  height: 6px;
  border-radius: 2px;
  background: currentColor;
}

.music-bars i:nth-child(2) { height: 11px; }
.music-bars i:last-child { height: 8px; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, .91fr) minmax(0, 1.09fr);
  grid-template-rows: 1fr auto;
  grid-template-areas: 'intro portrait' 'verse portrait';
  column-gap: clamp(32px, 4.5vw, 88px);
  row-gap: 28px;
  padding-block: 12px 34px;
}

.hero-copy {
  grid-area: intro;
  align-self: center;
  padding-block: 16px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.85rem, 5.9vw, 6.5rem);
  font-weight: 850;
  line-height: .97;
  letter-spacing: -.068em;
}

.hero h1 span { display: block; }

.hero h1 .title-accent {
  margin-top: .07em;
  color: var(--teal);
}

.launch-status {
  display: flex;
  align-items: baseline;
  gap: .22em;
  margin: clamp(23px, 4vh, 46px) 0 0;
  color: var(--ink);
  font: 400 clamp(2.25rem, 3.75vw, 4.2rem)/1.04 var(--display-font);
}

/* One FCM accent for the launch date and all four countdown rings. */
.launch-status em { color: var(--teal); }
.launch-status { flex-wrap: wrap; }

/* Launch countdown: four rings that sweep once a second, with digits that roll. */
.countdown {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(10px, 2.2vw, 22px);
  margin: clamp(18px, 3vh, 30px) 0 0;
}

.cd-unit {
  display: grid;
  justify-items: center;
  gap: 8px;
}

.cd-face {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(68px, 19vw, 96px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px #14212b14, inset 0 1px 0 #fff;
}

.cd-ring {
  position: absolute;
  inset: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  transform: rotate(-90deg);
  overflow: visible;
}

.cd-ring circle { fill: none; stroke-width: 2.4; }
.cd-track { stroke: transparent; }
.cd-arc { stroke: var(--teal); stroke-linecap: round; }


.cd-num {
  position: relative;
  display: block;
  width: 100%;
  height: 1.2em;
  overflow: hidden;
  color: var(--ink);
  font: 400 clamp(1.7rem, 5.4vw, 2.6rem)/1.2 var(--display-font);
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.cd-digits { position: absolute; inset: 0; display: block; }

.cd-label {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 650;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.countdown.is-live .cd-unit { display: none; }
.countdown.is-live::after {
  content: 'We are live!';
  color: var(--teal);
  font: 400 clamp(2rem, 4vw, 3.2rem)/1.1 var(--display-font);
  font-style: italic;
}

@media (prefers-reduced-motion: no-preference) {
  .cd-arc { transition: stroke-dashoffset 1s linear; }
  .cd-arc.is-reset { transition: none; }
  .cd-unit { animation: arriving .8s var(--entrance-ease) both; }
  .cd-unit:nth-child(1) { animation-delay: 180ms; }
  .cd-unit:nth-child(2) { animation-delay: 260ms; }
  .cd-unit:nth-child(3) { animation-delay: 340ms; }
  .cd-unit:nth-child(4) { animation-delay: 420ms; }
  .cd-face { transition: transform 260ms var(--entrance-ease), box-shadow 260ms ease; }
  .cd-unit:hover .cd-face { transform: translateY(-3px) scale(1.04); box-shadow: 0 16px 30px #14212b1f, inset 0 1px 0 #fff; }
  .cd-digits.is-in { animation: cd-in .5s var(--entrance-ease) both; }
  .cd-digits.is-out { animation: cd-out .42s ease-in both; }
  .cd-unit[data-unit='s'] .cd-face { animation: cd-breathe 2s var(--entrance-ease) infinite; }
  .countdown.is-live::after { animation: arriving .8s var(--entrance-ease) both; }
}

@keyframes cd-in { from { transform: translateY(70%); opacity: 0; filter: blur(3px); } to { transform: none; opacity: 1; filter: none; } }
@keyframes cd-out { from { transform: none; opacity: 1; } to { transform: translateY(-70%); opacity: 0; filter: blur(3px); } }
@keyframes cd-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025); } }

/* Create your profile button under the countdown. */
.cta-wrap { margin: clamp(16px, 2.6vh, 26px) 0 0; }
.cta-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
  font: 650 1.05rem/1 var(--ui-font);
  letter-spacing: -.01em;
  text-decoration: none;
  overflow: hidden;
  box-shadow: 0 12px 26px #1d6f6640;
  -webkit-tap-highlight-color: transparent;
}
.cta-button:focus-visible { outline: none; text-decoration: underline; text-underline-offset: .25em; }
/* Live button (from 15 December): a teal-to-deep gradient with a light top edge. */
.cta-button:not(.is-soon) {
  background: linear-gradient(135deg, var(--teal) 0%, #2a8f84 48%, var(--deep) 100%);
  box-shadow: 0 12px 26px #1d6f6640, inset 0 1px 0 #ffffff66, inset 0 -2px 0 #14212b26;
  text-shadow: 0 1px 0 #14212b33;
}
.cta-button.is-soon { background: transparent; color: var(--muted); border: 1.5px dashed var(--muted); opacity: .8; box-shadow: none; cursor: not-allowed; }
.cta-note { margin: 10px 0 0; color: var(--muted); font-size: .86rem; }
.cta-icon { flex: none; }

@media (prefers-reduced-motion: no-preference) {
  .cta-wrap { animation: arriving .8s 520ms var(--entrance-ease) both; }
  .cta-button:not(.is-soon) { transition: transform 240ms var(--entrance-ease), box-shadow 240ms ease; }
  .cta-button:not(.is-soon):hover { transform: translateY(-2px); box-shadow: 0 18px 32px #1d6f6652; }
  .cta-button:not(.is-soon):active { transform: translateY(0) scale(.98); }
  .cta-button:not(.is-soon) .cta-icon { transition: transform 240ms var(--entrance-ease); }
  .cta-button:not(.is-soon):hover .cta-icon { transform: translateX(4px); }
  /* Breathing: a slow breath in (about 40% of the cycle) and a longer breath out, with the glow swelling and fading in step. */
  .cta-button:not(.is-soon) { animation: cta-breathe 4.8s ease-in-out 1.4s infinite; }
  .cta-button:not(.is-soon):hover, .cta-button:not(.is-soon):focus-visible { animation-play-state: paused; }
  .cta-button:not(.is-soon)::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, #ffffff40 50%, transparent 70%); transform: translateX(-100%); animation: cta-shine 3.6s ease-in-out 1.6s infinite; }
}

@keyframes cta-breathe {
  0%, 100% { scale: 1; filter: brightness(1); box-shadow: 0 12px 26px #1d6f6640, 0 0 0 0 #2a8f8400, inset 0 1px 0 #ffffff66, inset 0 -2px 0 #14212b26; }
  40% { scale: 1.055; filter: brightness(1.1); box-shadow: 0 18px 38px #1d6f6659, 0 0 0 9px #2a8f8433, 0 0 34px 6px #2a8f8459, inset 0 1px 0 #ffffff80, inset 0 -2px 0 #14212b26; }
}

@keyframes cta-shine { 0%, 60% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

.tagline {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: clamp(.96rem, 1.3vw, 1.17rem);
  letter-spacing: -.02em;
}

.signin-error {
  margin: 18px 0 0;
  max-width: 360px;
  padding: 9px 12px;
  border-inline-start: 2px solid #9b4a37;
  background: #f5e8de;
  color: #762c1a;
  font-size: .86rem;
}

.signin-error:empty { display: none; }

.hero-portrait {
  grid-area: portrait;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: clamp(440px, 65svh, 840px);
  border-radius: clamp(40px, 6.4vw, 110px) 14px 14px 14px;
  background: #efe8dc;
  box-shadow: 0 28px 60px -36px #14212b59;
}

.hero-photo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 91% 41%;
}

.hero-portrait::after {
  content: '';
  position: absolute;
  inset: 10px;
  border: 1px solid #ffffff8c;
  border-radius: max(30px, calc(clamp(40px, 6.4vw, 110px) - 8px)) 9px 9px 9px;
  pointer-events: none;
}

.scripture-card {
  grid-area: verse;
  align-self: end;
  max-width: 510px;
  padding: 18px 0 0;
  border-top: 1px solid var(--line, #ddd3c3);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.scripture {
  display: grid;
  min-width: 0;
}

.scripture figure {
  grid-area: 1 / 1;
  align-self: end;
  margin: 0;
  opacity: 1;
}

.scripture figure[aria-hidden='true'] {
  opacity: 0;
  pointer-events: none;
}

.scripture blockquote {
  margin: 0;
  font: italic 400 clamp(1.25rem, 2vw, 1.86rem)/1.08 var(--display-font);
  text-wrap: pretty;
}

.scripture figcaption {
  margin-top: 9px;
  color: var(--teal);
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .03em;
}

.verse-controls {
  display: flex;
  margin-inline-end: -6px;
  align-items: center;
}

.verse-button {
  font: inherit;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.verse-chevron {
  width: 7px;
  height: 7px;
  border-top: 1.5px solid;
  border-right: 1.5px solid;
  transform: rotate(45deg);
}

.verse-chevron.is-back { transform: rotate(-135deg); }

.rotation-icon {
  width: 8px;
  height: 10px;
  border-inline: 1.5px solid;
}

[data-paused='true'] .rotation-icon {
  width: 0;
  height: 0;
  margin-inline-start: 2px;
  border: 5px solid transparent;
  border-right: 0;
  border-left: 8px solid currentColor;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.home-guide {
  width: min(100%, 1740px);
  margin-inline: auto;
  padding: 40px max(var(--gutter), env(safe-area-inset-right)) 48px max(var(--gutter), env(safe-area-inset-left));
  border-top: 1px solid var(--line);
  -webkit-user-select: text;
  user-select: text;
}
.home-guide > * { max-width: 760px; }
.home-guide > .home-grid { max-width: 1040px; }
.home-guide h2 {
  margin: 32px 0 8px;
  font: 400 clamp(1.6rem, 2.4vw, 2.2rem)/1.15 var(--display-font);
}
.home-guide > h2:first-child { margin-top: 0; }
.home-guide h3 { margin: 16px 0 4px; font-size: 1rem; font-weight: 650; }
.home-guide p, .home-guide li { color: var(--muted); line-height: 1.65; }
.home-guide p { margin: 0 0 8px; }
.home-guide ol { margin: 0; padding-left: 20px; }
.home-guide li + li { margin-top: 4px; }
.home-guide strong { color: var(--ink); font-weight: 600; }
.home-guide a { color: var(--teal); text-decoration-color: #1d6f6680; text-underline-offset: 4px; }
.home-guide .home-launch { color: var(--ink); }
/* Two independent columns: opening a card moves only the cards below it in its own column. */
.home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; align-items: start; }
/* Dropdown cards: the text stays in the page HTML; only the display is collapsed. */
.home-fold { border-bottom: 1px solid var(--line); }
.home-fold summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}
.home-fold summary::-webkit-details-marker { display: none; }
.home-fold summary::after {
  content: '';
  flex: none;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--teal);
  border-bottom: 2px solid var(--teal);
  transform: rotate(45deg);
  transition: transform .2s var(--entrance-ease);
}
.home-fold[open] summary::after { transform: rotate(225deg); }
.home-fold summary:focus-visible { outline: none; background: color-mix(in srgb, var(--teal) 10%, var(--paper)); }
.home-guide .home-fold summary h2 { margin: 0; font-size: clamp(1.3rem, 2vw, 1.7rem); }
.home-fold[open] { padding-bottom: 12px; }
@media (prefers-reduced-motion: reduce) { .home-fold summary::after { transition: none; } }
.home-links { display: flex; flex-wrap: wrap; gap: 8px 16px; }

.footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px 24px;
  padding-block: 16px max(18px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .75rem;
}

.patron, .footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 9px;
  line-height: 1.65;
}

.patron strong { color: var(--ink); }
.footer-links { justify-content: flex-end; column-gap: 14px; }
.footer a {
  color: inherit;
  text-decoration-color: #1d6f6680;
  text-underline-offset: 4px;
}

:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }
button:focus-visible { outline: none; }
:is(.verse-button,.music-toggle):focus-visible { background: color-mix(in srgb, var(--teal) 14%, var(--paper)); }

@media (hover: hover) and (pointer: fine) {
  .music-toggle:hover, .verse-button:hover {
    border-color: var(--line);
    background: #efe8db;
  }

  .footer a:hover { color: var(--gold); text-decoration-color: currentColor; }
}

@media (prefers-reduced-motion: no-preference) {
  .logo-link, .footer a { transition: opacity 180ms ease, color 180ms ease; }
  .logo-link:hover { opacity: .77; }
  
  .hero-copy > :is(h1, .launch-status, .tagline) {
    animation: arriving .76s var(--entrance-ease) both;
  }

  .hero-copy .launch-status { animation-delay: 70ms; }
  .hero-copy .tagline, .scripture-card { animation: arriving .82s 155ms var(--entrance-ease) both; }
  .hero-portrait { animation: arriving 1s var(--entrance-ease) both; }
  .hero-photo { animation: photo-settle 1.65s var(--entrance-ease) both; }

  .scripture figure { transition: opacity 550ms ease, transform 550ms var(--entrance-ease); }
  .scripture figure[aria-hidden='true'] { transform: translateY(3px); }

  .music-toggle[aria-pressed='true'] .music-bars i {
    animation: playing 1.25s ease-in-out infinite alternate;
  }

  .music-bars i:nth-child(2) { animation-delay: -.6s; }
  .music-bars i:last-child { animation-delay: -.3s; }

  @keyframes arriving {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }

  @keyframes photo-settle {
    from { transform: scale(1.035); }
    to { transform: scale(1); }
  }

  @keyframes playing {
    from { transform: scaleY(.55); }
    to { transform: scaleY(1.05); }
  }
}

@media (min-width: 801px) and (max-height: 760px) {
  .topbar { padding-top: max(12px, env(safe-area-inset-top)); }
  .logo { width: min(98px, 8.3vw); }
  .hero { padding-bottom: 24px; row-gap: 15px; }
  .hero-portrait { min-height: max(398px, 64svh); }
  .hero h1 { font-size: clamp(2.85rem, min(5.9vw, 12svh), 6.5rem); }
  .launch-status { margin-top: 20px; }
}

@media (max-width: 800px), (max-width: 1100px) and (orientation: portrait) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    grid-template-areas: 'intro' 'portrait' 'verse';
    padding-block: 12px 26px;
    row-gap: 24px;
  }

  .hero-copy { padding-block: 14px 0; }
  .hero h1 { font-size: clamp(2.85rem, 11.1vw, 6rem); }
  .launch-status { margin-top: 18px; }
  .tagline { margin-top: 8px; }
  .hero-portrait {
    min-height: 0;
    aspect-ratio: 1.19;
    max-height: 530px;
    border-top-left-radius: 54px;
  }
  .hero-portrait::after { border-top-left-radius: 46px; }
  .scripture-card { max-width: none; padding-top: 12px; }
  .scripture blockquote { font-size: clamp(1.36rem, 4.3vw, 2rem); }
  .footer { flex-wrap: wrap; }
  .footer-links { justify-content: flex-start; }
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .home-guide { padding-block: 32px 40px; }
}

@media (max-width: 460px) {
  :root { --gutter: 21px; }
  .topbar { padding-block: max(11px, env(safe-area-inset-top)) 4px; }
  .hero { padding-top: 12px; row-gap: 20px; }
  .hero h1 { font-size: clamp(2.25rem, 11.1vw, 3.4rem); }
  .scripture-card { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .verse-controls { justify-self: end; }
  .footer { gap: 9px; padding-top: 12px; }
}

:is(input, select, textarea):focus-visible { outline: none; border-color: var(--teal); }

/* Tablet: let the hero photo fill the column width instead of shrinking */
@media (min-width: 600px) and (max-width: 1100px) and (orientation: portrait), (min-width: 600px) and (max-width: 800px) {
  .hero-portrait { width: 100%; aspect-ratio: 16 / 10; max-height: none; }
}
.footer a { display: inline-flex; align-items: center; min-height: 28px; }

/* Both public and member pages use these control responses. */
:root {
  -webkit-tap-highlight-color: transparent;
  --motion-spring: cubic-bezier(.2, .85, .24, 1.13);
  --motion-ease: cubic-bezier(.2, .7, .25, 1);
}
@supports (animation-timing-function: linear(0, 1)) {
  :root {
    --motion-spring: linear(0, .065 5%, .22 10%, .57 20%, .83 30%, .975 40%, 1.032 50%, 1.041 58%, 1.024 72%, 1.006 87%, 1);
  }
}

:where(button, .btn, .signin-button, #member-nav a, .bottom-nav a, .tabs a, .account-menu a, .reference-profile-links a) {
  position: relative;
  touch-action: manipulation;
}
/* Suppress circles even if a tab is still running the previous script. */
.press-highlight { display: none; }

::selection { background: #555; color: #fff; }

@media (prefers-reduced-motion: no-preference) {
  :is(button, .btn, .signin-button, #member-nav a, .bottom-nav a, .tabs a, .account-menu a, .reference-profile-links a):not(.photo-open, .conversation-card) {
    transition: scale 180ms var(--motion-spring), background-color 110ms ease, border-color 110ms ease;
  }
  :is(button, .btn, .signin-button, #member-nav a, .bottom-nav a, .tabs a, .account-menu a, .reference-profile-links a):not(:disabled, [aria-disabled="true"], .photo-open, .conversation-card):active {
    scale: .965;
    transition-duration: 45ms, 55ms, 55ms;
  }
  @media (hover: hover) and (pointer: fine) {
    :is(.signin-button, .music-toggle, .icon-button, .feed-compose-actions button, .call-icon-button, .gallery-arrow):not(:disabled, :active):hover {
      scale: 1.035;
    }
  }
}
