/* Welcome templates */
.welcome {
  min-height: 100dvh;
  background: var(--w-bg, var(--red));
  color: var(--w-fg, #fff);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  padding-top: 0;
}
.welcome-bg {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,.16), transparent 36%),
    radial-gradient(circle at 92% 88%, rgba(0,0,0,.22), transparent 42%);
}
.welcome-copy { display: contents; }
.welcome-logo {
  order: 1;
  width: 64px; height: 64px; object-fit: contain;
  margin: 16px auto 0;
  position: relative; z-index: 1;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.2));
}
.welcome-kicker {
  order: 1;
  padding: 18px 22px 0;
  text-align: center;
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .88;
  position: relative; z-index: 1;
}
.welcome h1 {
  order: 2;
  font-size: clamp(2.2rem, 9vw, 3.2rem);
  line-height: .98;
  text-align: center;
  padding: 16px 18px 0;
  position: relative; z-index: 1;
  text-shadow: 0 12px 28px rgba(0,0,0,.18);
}
.welcome-sub {
  order: 3;
  text-align: center;
  padding: 10px 28px 0;
  font-weight: 650;
  opacity: .88;
  position: relative; z-index: 1;
}
.welcome-hero {
  order: 4;
  flex: 1;
  display: grid;
  place-items: center;
  position: relative; z-index: 1;
  padding: 10px 20px 0;
  min-height: 0;
}
.welcome-hero img,
.welcome-hero video,
.welcome-photo-fallback {
  width: min(86%, 340px);
  max-height: 44dvh;
  height: 44dvh;
  object-fit: cover;
  border-radius: 32px;
  box-shadow: 0 30px 50px rgba(0,0,0,.28);
}
.welcome-photo-fallback {
  background: rgba(0,0,0,.18);
}
.welcome-actions {
  order: 5;
  padding: 10px 22px 8px;
  display: grid;
  gap: 12px;
  position: relative; z-index: 1;
  width: 100%;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}
.welcome .btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  height: 54px; border-radius: 999px; border: 0; cursor: pointer; font-weight: 700;
  text-decoration: none;
}
.welcome .ico { width: 20px; height: 20px; display: block; flex-shrink: 0; }

.welcome-preview-root { height: 100%; }
.welcome-preview-root .welcome {
  min-height: 100%;
  height: 100%;
  padding-top: 0;
}
.welcome-preview-root .welcome-hero img,
.welcome-preview-root .welcome-hero video,
.welcome-preview-root .welcome-photo-fallback {
  max-height: 210px;
  height: 210px;
}
.welcome-preview-root .welcome.tpl-poster .welcome-hero img,
.welcome-preview-root .welcome.tpl-poster .welcome-hero video,
.welcome-preview-root .welcome.tpl-poster .welcome-photo-fallback,
.welcome-preview-root .welcome.tpl-night .welcome-hero img,
.welcome-preview-root .welcome.tpl-night .welcome-hero video,
.welcome-preview-root .welcome.tpl-night .welcome-photo-fallback,
.welcome-preview-root .welcome.tpl-stack .welcome-hero img,
.welcome-preview-root .welcome.tpl-stack .welcome-hero video,
.welcome-preview-root .welcome.tpl-stack .welcome-photo-fallback {
  max-height: none;
  height: 100%;
}
.welcome-preview-root .welcome h1 { font-size: 1.7rem; }
.welcome .btn-solid {
  background: var(--w-btn, #fff);
  color: var(--w-btn-fg, var(--red));
}
.welcome .btn-ghost {
  background: transparent;
  color: var(--w-fg, #fff);
  border: 1.5px solid rgba(255,255,255,.55);
  border-color: color-mix(in srgb, var(--w-fg, #fff) 70%, transparent);
}
.welcome-legal {
  order: 6;
  text-align: center;
  font-size: .72rem;
  opacity: .78;
  padding: 0 28px calc(var(--safe-b) + 10px);
  position: relative; z-index: 1;
}
.welcome .is-off { display: none !important; }

/* Poster — full-bleed photo */
.welcome.tpl-poster .welcome-hero,
.welcome.tpl-night .welcome-hero {
  position: absolute; inset: 0;
  padding: 0; flex: none;
  z-index: 0;
}
.welcome.tpl-poster .welcome-hero img,
.welcome.tpl-poster .welcome-hero video,
.welcome.tpl-poster .welcome-photo-fallback,
.welcome.tpl-night .welcome-hero img,
.welcome.tpl-night .welcome-hero video,
.welcome.tpl-night .welcome-photo-fallback {
  width: 100%; height: 100%; max-height: none;
  border-radius: 0; box-shadow: none;
}
.welcome.tpl-poster .welcome-bg {
  z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,.15) 10%, rgba(0,0,0,.78) 100%);
}
.welcome.tpl-night .welcome-bg {
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(20,8,12,.2), rgba(20,8,12,.82)),
    radial-gradient(circle at 80% 20%, color-mix(in srgb, var(--w-bg) 55%, transparent), transparent 42%);
}
.welcome.tpl-poster .welcome-copy,
.welcome.tpl-night .welcome-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  margin-top: auto;
  z-index: 2;
  padding: 28px 22px calc(var(--safe-b) + 16px);
}
.welcome.tpl-poster h1,
.welcome.tpl-night h1,
.welcome.tpl-poster .welcome-kicker,
.welcome.tpl-night .welcome-kicker,
.welcome.tpl-poster .welcome-sub,
.welcome.tpl-night .welcome-sub,
.welcome.tpl-poster .welcome-legal,
.welcome.tpl-night .welcome-legal { text-align: center; padding-left: 0; padding-right: 0; }
.welcome.tpl-poster h1,
.welcome.tpl-night h1 { max-width: 14ch; padding-top: 8px; margin-left: auto; margin-right: auto; }
.welcome.tpl-poster .welcome-logo,
.welcome.tpl-night .welcome-logo { margin: 0 auto 10px; }

/* Stack — app splash */
.welcome.tpl-stack .welcome-hero {
  flex: 1.15;
  padding: 0;
}
.welcome.tpl-stack .welcome-hero img,
.welcome.tpl-stack .welcome-hero video,
.welcome.tpl-stack .welcome-photo-fallback {
  width: 100%; height: 100%; max-height: none;
  border-radius: 0 0 36px 36px;
}
.welcome.tpl-stack .welcome-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 0 0;
}
.welcome.tpl-stack .welcome-kicker { padding-top: 18px; }

/* Editorial — light */
.welcome.tpl-editorial {
  padding-bottom: 8px;
}
.welcome.tpl-editorial .welcome-bg {
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.7), transparent 48%);
}
.welcome.tpl-editorial .welcome-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.welcome.tpl-editorial h1 {
  font-size: clamp(2rem, 8vw, 2.8rem);
  letter-spacing: -.05em;
  text-shadow: none;
  max-width: 14ch;
}
.welcome.tpl-editorial .welcome-hero img,
.welcome.tpl-editorial .welcome-hero video {
  border-radius: 28px;
  box-shadow: 0 18px 40px rgba(40,30,20,.14);
}
.welcome.tpl-editorial .welcome-kicker {
  letter-spacing: .18em;
  font-size: .72rem;
}
.welcome.tpl-editorial .btn-ghost {
  border-color: color-mix(in srgb, var(--w-fg) 22%, transparent);
}

/* Luxo */
.welcome.tpl-dark .welcome-bg {
  background:
    radial-gradient(circle at 50% -10%, rgba(243,230,200,.12), transparent 42%);
}
.welcome.tpl-dark .welcome-kicker {
  letter-spacing: .22em;
  color: var(--w-fg);
}
.welcome.tpl-dark h1 { text-shadow: none; font-weight: 700; }
.welcome.tpl-dark .welcome-hero img,
.welcome.tpl-dark .welcome-hero video {
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(0,0,0,.45);
}

html:fullscreen,
html:-webkit-full-screen,
html.welcome-full {
  background: #000;
}
html:fullscreen body.page-home .welcome,
html:-webkit-full-screen body.page-home .welcome,
html.welcome-full body.page-home .welcome {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100%;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  border-radius: 0;
}
html:fullscreen body.page-home .welcome-hero,
html:-webkit-full-screen body.page-home .welcome-hero,
html.welcome-full body.page-home .welcome-hero {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}
html:fullscreen body.page-home .welcome-hero img,
html:-webkit-full-screen body.page-home .welcome-hero img,
html.welcome-full body.page-home .welcome-hero img,
html:fullscreen body.page-home .welcome-hero video,
html:-webkit-full-screen body.page-home .welcome-hero video,
html.welcome-full body.page-home .welcome-hero video {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  object-fit: cover;
  object-position: center top;
}

@media (max-width: 959px) {
  html:has(body.page-home),
  body.page-home {
    height: 100%;
    height: 100lvh;
    min-height: 100lvh;
    min-height: -webkit-fill-available;
    overflow: hidden;
  }
  body.page-home .welcome {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    height: 100lvh;
    min-height: 100lvh;
    min-height: -webkit-fill-available;
    background-color: var(--welcome-chrome, #111);
    background-image: var(--welcome-cover, none);
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
  }
  body.page-home .welcome-hero {
    position: absolute;
    top: calc(0px - env(safe-area-inset-top, 0px));
    left: 0;
    right: 0;
    bottom: calc(0px - env(safe-area-inset-bottom, 0px));
    padding: 0;
    flex: none;
    z-index: 0;
    display: block;
    min-height: 100%;
    height: auto;
  }
  body.page-home .welcome-hero img,
  body.page-home .welcome-hero video,
  body.page-home .welcome-photo-fallback {
    width: 100%;
    width: 100vw;
    height: 100%;
    min-height: 100%;
    min-width: 100%;
    max-width: none;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
    object-fit: cover;
    object-position: center top;
  }
  body.page-home .welcome-bg {
    z-index: 1;
    background: linear-gradient(180deg, rgba(0,0,0,.12) 0%, rgba(0,0,0,.04) 28%, rgba(0,0,0,.78) 100%);
  }
  body.page-home .welcome.tpl-editorial .welcome-bg {
    background: linear-gradient(180deg, rgba(243,237,228,.5) 0%, transparent 28%, rgba(243,237,228,.94) 70%);
  }
  body.page-home .welcome-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    text-align: center;
    position: relative;
    z-index: 2;
    min-height: 100dvh;
    min-height: 100svh;
    width: 100%;
    margin: 0;
    padding: calc(var(--safe-t) + 14px) 22px calc(var(--safe-b) + 16px);
  }
  body.page-home .welcome-logo { margin: 0 auto 10px; }
  body.page-home .welcome-kicker,
  body.page-home .welcome h1,
  body.page-home .welcome-sub,
  body.page-home .welcome-legal,
  body.page-home .welcome-actions {
    padding-left: 0;
    padding-right: 0;
    text-align: center;
    width: 100%;
  }
  body.page-home .welcome-kicker { padding-top: 0; }
  body.page-home .welcome h1 { padding-top: 8px; margin-left: auto; margin-right: auto; }
  body.page-home .welcome-actions { padding: 16px 0 8px; width: 100%; max-width: 360px; }
  body.page-home .welcome-legal {
    padding-bottom: 0;
    text-align: center;
    width: 100%;
  }
}

@media (min-width: 960px) {
  body.page-home .welcome.tpl-classic,
  body.page-home .welcome.tpl-dark,
  body.page-home .welcome.tpl-editorial {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(320px, 520px);
    grid-template-areas:
      "kicker hero"
      "title hero"
      "sub hero"
      "actions hero"
      "legal hero";
    align-items: center;
    column-gap: 48px;
    min-height: calc(100dvh - 78px);
    padding: 40px 8vw 48px;
    border-radius: 0 0 40px 40px;
  }
  body.page-home .welcome.tpl-classic .welcome-bg,
  body.page-home .welcome.tpl-dark .welcome-bg,
  body.page-home .welcome.tpl-editorial .welcome-bg { grid-area: 1 / 1 / -1 / -1; }
  body.page-home .welcome.tpl-classic .welcome-logo,
  body.page-home .welcome.tpl-dark .welcome-logo,
  body.page-home .welcome.tpl-editorial .welcome-logo { grid-area: kicker; margin: 0 0 8px; }
  body.page-home .welcome.tpl-classic .welcome-kicker,
  body.page-home .welcome.tpl-dark .welcome-kicker,
  body.page-home .welcome.tpl-editorial .welcome-kicker { grid-area: kicker; text-align: center; padding: 0 0 8px; }
  body.page-home .welcome.tpl-classic h1,
  body.page-home .welcome.tpl-dark h1,
  body.page-home .welcome.tpl-editorial h1 {
    grid-area: title; text-align: center; font-size: clamp(3rem, 5vw, 4.4rem); padding: 0; max-width: 14ch; margin-left: auto; margin-right: auto;
  }
  body.page-home .welcome.tpl-classic .welcome-sub,
  body.page-home .welcome.tpl-dark .welcome-sub,
  body.page-home .welcome.tpl-editorial .welcome-sub { grid-area: sub; text-align: center; padding: 8px 0 0; }
  body.page-home .welcome.tpl-classic .welcome-hero,
  body.page-home .welcome.tpl-dark .welcome-hero,
  body.page-home .welcome.tpl-editorial .welcome-hero { grid-area: hero; padding: 0; }
  body.page-home .welcome.tpl-classic .welcome-hero img,
  body.page-home .welcome.tpl-classic .welcome-hero video,
  body.page-home .welcome.tpl-dark .welcome-hero img,
  body.page-home .welcome.tpl-dark .welcome-hero video,
  body.page-home .welcome.tpl-editorial .welcome-hero img,
  body.page-home .welcome.tpl-editorial .welcome-hero video {
    width: 100%; max-height: 64dvh; height: 64dvh;
  }
  body.page-home .welcome.tpl-classic .welcome-actions,
  body.page-home .welcome.tpl-dark .welcome-actions,
  body.page-home .welcome.tpl-editorial .welcome-actions {
    grid-area: actions; max-width: 380px; padding: 18px 0 0; width: 100%; margin-left: auto; margin-right: auto;
  }
  body.page-home .welcome.tpl-classic .welcome-legal,
  body.page-home .welcome.tpl-dark .welcome-legal,
  body.page-home .welcome.tpl-editorial .welcome-legal { grid-area: legal; text-align: center; padding: 12px 0 0; }

  body.page-home .welcome.tpl-poster,
  body.page-home .welcome.tpl-night {
    min-height: calc(100dvh - 78px);
    border-radius: 0 0 40px 40px;
    display: flex;
  }
  body.page-home .welcome.tpl-poster .welcome-copy,
  body.page-home .welcome.tpl-night .welcome-copy {
    max-width: 520px;
    padding: 60px 8vw;
    margin: auto auto 4vh;
    align-items: center;
    text-align: center;
    width: 100%;
  }
  body.page-home .welcome.tpl-poster h1,
  body.page-home .welcome.tpl-night h1 { font-size: clamp(3rem, 5vw, 4.6rem); }

  body.page-home .welcome.tpl-stack {
    min-height: calc(100dvh - 78px);
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    border-radius: 0 0 40px 40px;
  }
  body.page-home .welcome.tpl-stack .welcome-hero { min-height: calc(100dvh - 78px); }
  body.page-home .welcome.tpl-stack .welcome-hero img,
  body.page-home .welcome.tpl-stack .welcome-hero video {
    border-radius: 0;
    height: 100%;
  }
  body.page-home .welcome.tpl-stack .welcome-copy {
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 48px;
  }
}
