/* Self-hosted so no request leaves aftersong.app and text renders before any third party answers. */
/* Self-hosted so no request leaves aftersong.app and text renders before any third party
   answers. The app's faces: Archivo Black for anything display-sized, Figtree for everything
   else, and nothing below medium anywhere. */
@font-face {
  font-family: "Archivo Black";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/archivoblack-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/figtree-medium.woff2") format("woff2");
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/figtree-bold.woff2") format("woff2");
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/fonts/figtree-extrabold.woff2") format("woff2");
}

:root {
  /* NightTheme, as the app wears it: plum ground, cream ink, ember for the one live thing,
     gold for highlights. Flat and high-chroma: no glows, no gradients. */
  --bg0: #241c26;
  --bg1: #17121a;
  --ink: #f8f3ec;
  --muted: rgba(248, 243, 236, 0.75);
  --faint: rgba(248, 243, 236, 0.58);
  --glass: rgba(248, 243, 236, 0.14);
  --line: rgba(248, 243, 236, 0.2);
  --accent: #ff6a3d;
  --accent-deep: #ffc93d;
  --on-accent: #241c26;
  --radius-card: 24px;
  --radius-glass: 20px;
  --radius-tile: 22px;
  --radius-thumb: 14px;
  --display: "Archivo Black", "Arial Black", "Helvetica Neue", sans-serif;
  --sans: "Figtree", "Avenir Next", "Helvetica Neue", sans-serif;
  --pad-x: clamp(1rem, 4.5vw, 1.75rem);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html, body {
  margin: 0;
  min-height: 100%;
  max-width: 100%;
  overflow-x: clip;
  color: var(--ink);
  background: var(--bg0);
  font-family: var(--sans);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* -- Shared chrome -- */
.site-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding:
    calc(0.85rem + var(--safe-top))
    calc(var(--pad-x) + var(--safe-right))
    0.85rem
    calc(var(--pad-x) + var(--safe-left));
  font-size: 0.82rem;
  font-weight: 500;
}

.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover { color: var(--ink); }

.site-nav__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem 1rem;
}

.wrap {
  width: min(720px, calc(100% - (var(--pad-x) * 2)));
  margin: 0 auto;
  padding: 2.5rem 0 calc(4rem + var(--safe-bottom));
}

.brand {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  letter-spacing: 0;
  margin: 0 0 0.35rem;
}

.tag {
  color: var(--muted);
  margin: 0 0 2rem;
  max-width: 36rem;
  line-height: 1.5;
}

.card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius-glass);
  padding: 1.25rem 1.35rem;
  margin: 1rem 0;
}

.card h2, .card h1 {
  font-family: var(--display);
  margin: 0 0 0.65rem;
  font-size: 1.35rem;
}

.card p, .card li {
  color: var(--muted);
  line-height: 1.6;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  margin: 1.5rem 0 2rem;
  font-size: 0.92rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.75rem;
  padding: 0.95rem 1.25rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
  max-width: 100%;
  text-align: center;
}

.btn:hover {
  text-decoration: none;
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.btn--ghost {
  background: var(--glass);
  color: var(--ink);
  border: 1px solid var(--line);
}

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

.btn[aria-disabled="true"],
.btn.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.btn__short { display: none; }
.btn__full { display: inline; }

.legal h1 {
  font-family: var(--display);
  font-size: clamp(1.65rem, 6vw, 2rem);
  margin: 0 0 0.5rem;
}

.legal h2 {
  font-family: var(--display);
  font-size: 1.15rem;
  margin: 1.75rem 0 0.5rem;
}

.legal p, .legal li {
  color: var(--muted);
  line-height: 1.65;
}

.meta {
  color: var(--faint);
  font-size: 0.85rem;
}

footer.site-foot,
.wrap > footer {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.85rem;
}

/* -- Product landing (mobile-first) -- */
.landing {
  overflow-x: clip;
}

.hero {
  position: relative;
  /* Fill the phone frame without forcing overflow when content is tall */
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding:
    calc(4.25rem + var(--safe-top))
    calc(var(--pad-x) + var(--safe-right))
    calc(1.35rem + var(--safe-bottom))
    calc(var(--pad-x) + var(--safe-left));
  isolation: isolate;
}

.hero__atmosphere {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 90% 60% at 72% 10%, rgba(255, 106, 61, 0.26), transparent 62%),
    var(--bg0);
  animation: atmosphereBreathe 9s ease-in-out infinite alternate;
}

@keyframes atmosphereBreathe {
  from { background-position: 0 0; }
  to { background-position: 0 2%; }
}

.hero__stage {
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(1.35rem, 4vh, 2.25rem);
  flex: 1 1 auto;
  min-height: 0;
}

.hero__copy {
  width: 100%;
  max-width: 34rem;
  animation: riseIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.hero__brand {
  font-family: var(--display);
  font-weight: 400;
  /* Phone-first: readable without wrapping awkwardly or blowing past the frame */
  font-size: clamp(2.55rem, 11.5vw, 4.25rem);
  line-height: 0.98;
  letter-spacing: 0;
  margin: 0 0 0.85rem;
  overflow-wrap: anywhere;
  max-width: 100%;
}

.hero__headline {
  font-family: var(--sans);
  font-weight: 800;
  font-size: clamp(1.2rem, 4.6vw, 1.75rem);
  line-height: 1.25;
  margin: 0 0 0.7rem;
  color: var(--ink);
  max-width: 22ch;
}

.hero__support {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: clamp(0.95rem, 3.6vw, 1.05rem);
  line-height: 1.55;
  max-width: 34ch;
}

.hero__ctas {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  width: 100%;
}

.hero__ctas .btn {
  margin-top: 0;
  width: 100%;
}

.hero__hint {
  margin: 0.75rem 0 0;
  max-width: 36ch;
  line-height: 1.45;
}

/* Product moment — part of the hero plane, not a floating card sticker */
.hero__visual {
  position: relative;
  width: 100%;
  max-width: 26rem;
  margin: 0;
  padding: 1rem 0 0.15rem;
  border-top: 1px solid var(--line);
  animation: riseIn 0.6s 0.05s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero__notify-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.35rem;
}

.hero__notify-title {
  font-family: var(--display);
  font-size: clamp(1.05rem, 4vw, 1.2rem);
  margin: 0 0 0.3rem;
}

.hero__notify-body {
  margin: 0;
  font-size: clamp(0.84rem, 3.4vw, 0.92rem);
  color: var(--muted);
  line-height: 1.45;
  max-width: 34ch;
}

.section {
  width: min(920px, calc(100% - (var(--pad-x) * 2)));
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 4.5rem) 0 0.5rem;
}

.section h2 {
  font-family: var(--display);
  font-size: clamp(1.45rem, 5vw, 2rem);
  margin: 0 0 0.75rem;
  letter-spacing: 0;
}

.section > p {
  color: var(--muted);
  max-width: 34rem;
  line-height: 1.6;
  margin: 0 0 1.75rem;
  font-size: clamp(0.95rem, 3.5vw, 1.02rem);
}

.section__ctas {
  max-width: 26rem;
}

.steps {
  display: grid;
  gap: 1.15rem;
}

.step {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.step strong {
  display: block;
  font-family: var(--display);
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.95rem;
}

.step a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.event-notify {
  width: 100%;
  max-width: 32rem;
  margin: 0 0 2rem;
  padding: 1.1rem 0 0.2rem;
  border-top: 1px solid var(--line);
}

.paths {
  display: grid;
  gap: 1.25rem;
  margin: 0 0 2rem;
}

.path {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--radius-glass);
  padding: 1.2rem 1.3rem 1.35rem;
}

.path h3 {
  font-family: var(--display);
  font-size: clamp(1.15rem, 4vw, 1.35rem);
  font-weight: 500;
  margin: 0 0 0.85rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.path__who {
  margin: 0 0 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.path__list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.95rem;
}

.path__list li + li {
  margin-top: 0.55rem;
}

.path__list strong {
  color: var(--ink);
  font-weight: 600;
}

.plain-facts {
  max-width: 40rem;
  padding: 1.2rem 0 0;
  border-top: 1px solid var(--line);
}

.plain-facts ul {
  margin: 0.35rem 0 0;
  padding-left: 1.15rem;
}

.plain-facts li {
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.95rem;
}

.plain-facts li + li {
  margin-top: 0.55rem;
}

.plain-facts strong {
  color: var(--ink);
  font-weight: 600;
}

@media (min-width: 720px) {
  .paths {
    grid-template-columns: 1fr 1fr;
    gap: 1.35rem;
    align-items: stretch;
  }
}

.landing-foot {
  width: min(920px, calc(100% - (var(--pad-x) * 2)));
  margin: 3rem auto 0;
  padding: 1.35rem 0 calc(2rem + var(--safe-bottom));
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: space-between;
  color: var(--faint);
  font-size: 0.85rem;
}

.landing-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.1rem;
}

.landing-foot a { color: var(--faint); }
.landing-foot a:hover { color: var(--accent); }

/* Short phones / landscape phones: don't trap content in a forced tall hero */
@media (max-height: 700px) and (max-width: 900px) {
  .hero {
    min-height: 0;
    padding-top: calc(3.75rem + var(--safe-top));
  }

  .hero__stage {
    justify-content: flex-start;
    gap: 1.15rem;
  }

  .hero__brand {
    font-size: clamp(2.2rem, 10vw, 3rem);
    margin-bottom: 0.55rem;
  }

  .hero__support {
    margin-bottom: 0.95rem;
  }
}

/* Very narrow frames (SE / small device toolbar) */
@media (max-width: 380px) {
  .btn__full { display: none; }
  .btn__short { display: inline; }
  .site-nav { font-size: 0.78rem; }
  .site-nav__links { gap: 0.65rem 0.85rem; }
}

/* Tablet+ : CTAs can sit in a row; steps become a triad */
@media (min-width: 560px) {
  .hero__ctas {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .hero__ctas .btn {
    width: auto;
    min-width: 0;
  }

  .section__ctas .btn {
    width: auto;
  }
}

@media (min-width: 720px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

/* Laptop / wide: one composition with brand + moment side by side */
@media (min-width: 900px) {
  .hero {
    justify-content: flex-end;
    padding:
      calc(5.5rem + var(--safe-top))
      calc(var(--pad-x) + var(--safe-right))
      calc(2.4rem + var(--safe-bottom))
      calc(var(--pad-x) + var(--safe-left));
  }

  .hero__stage {
    width: min(1080px, 100%);
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: end;
    gap: 2.5rem 3rem;
    min-height: calc(100svh - 8rem);
    min-height: calc(100dvh - 8rem);
  }

  .hero__brand {
    font-size: clamp(3.6rem, 6vw, 5.2rem);
  }

  .hero__headline {
    max-width: none;
  }

  .hero__support {
    max-width: 28rem;
  }

  .hero__visual {
    justify-self: end;
    width: min(100%, 22rem);
    padding: 1.25rem 0 0;
    margin-bottom: 0.35rem;
  }

  .btn__full { display: inline; }
  .btn__short { display: none; }
}

/* -- Invite / lobby -- */
.invite-page {
  min-height: 100svh;
  min-height: 100dvh;
  display: grid;
  align-content: center;
  padding:
    calc(4.5rem + var(--safe-top))
    calc(1.15rem + var(--safe-right))
    calc(2.5rem + var(--safe-bottom))
    calc(1.15rem + var(--safe-left));
  background:
    radial-gradient(900px 500px at 80% 0%, rgba(255, 106, 61, 0.18), transparent 55%),
    var(--bg0);
}

.invite-shell {
  width: min(440px, 100%);
  margin: 0 auto;
  text-align: left;
  animation: riseIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* The guest came for the night, not the brand: the eyebrow names the app, the title is the night. */
.invite-shell .brand {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

.invite-shell h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.2rem, 8vw, 3.2rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.65rem;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.invite-shell .lead {
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 1.5rem;
}

.invite-actions {
  display: grid;
  gap: 0.65rem;
}

.invite-actions .btn { margin-top: 0; width: 100%; }

.invite-meta {
  margin-top: 1.25rem;
  color: var(--faint);
  font-size: 0.8rem;
  word-break: break-all;
  line-height: 1.45;
}

.invite-links {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.88rem;
}

/* Keyboard focus is visible on every interactive element; the outline picks up the accent. */
a:focus-visible,
.btn:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Respect the system setting: no drifting atmosphere, no rise-in, no hover lift. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .btn:hover {
    transform: none;
  }
}

/* Keyboard users can jump past the nav. Visible only when focused. */
.skip-link {
  position: absolute; left: 1rem; top: -100px;
  background: var(--accent); color: var(--on-accent);
  padding: 0.6rem 1rem; border-radius: 999px; font-weight: 600; z-index: 100;
}
.skip-link:focus { top: 1rem; outline: 3px solid var(--ink); outline-offset: 2px; text-decoration: none; }

/* Tap targets: text links in nav rows get a 24px+ box and breathing room (WCAG 2.5.8). */
.site-nav__links a,
.landing-foot nav a,
.invite-links a {
  display: inline-block;
  padding: 0.45rem 0.35rem;
  margin: -0.45rem -0.1rem;
  min-height: 24px;
  line-height: 1.2;
}
.section p a { padding: 0.15rem 0; }
