/* ================================================================ landing (signed out)
   The world is the page: a sample world lives in a shulker box beside the invite box, a quiet mono
   caption row with its in-world day runs under it, and the block wordmark (wordmark.js) closes the
   first screen. Below: three plain steps. */
:root {
  /* The wordmark is one big shulker box: a pale rim on top, the lid above a dark seam, the shell below,
     and a little loot inside. --wm-grass/dirt/stone keep their names for the block roles. */
  --wm-grass: #cba5dc; --wm-dirt: #a274b8; --wm-stone: #8a5ea1; --wm-seam: #3b2449; --wm-coal: #5b3a6e;
  --wm-iron: #5fd37e; --wm-gold: #f0c341; --wm-diamond: #5fe0d3; --wm-shirt: #e0674f; --wm-pants: #2f3a5a;
}
:root[data-theme="sunset"] { --wm-shirt: #3f7fc4; }
:root[data-theme="night"] { --wm-grass: #e2c6ee; --wm-dirt: #b98bcc; --wm-stone: #a57abb; --wm-seam: #2a1838; --wm-coal: #6d4a80; --wm-pants: #2a3150; }

body[data-view="welcome"] .layout { display: block; max-width: none; padding: 0; }
body[data-view="welcome"] .layout > .stage { display: none; }
body[data-page="home"][data-view="welcome"] .topbar-right > .swatches { display: none; }
.lw { animation: none; }

.lw-first { min-height: calc(100svh - 76px); display: flex; flex-direction: column; }
.lw-hero {
  flex: 1 0 auto; position: relative; display: grid; grid-template-columns: minmax(360px, 590px) minmax(0, 1fr);
  max-width: var(--maxw); width: 100%; margin: 0 auto; padding: 0 var(--gutter); min-height: 0;
}
.lw-copy { position: relative; z-index: 2; padding-top: clamp(8px, 3.5vh, 44px); padding-bottom: 16px; }
.lw-title {
  font: 800 clamp(2.5rem, 3.9vw, 4rem)/.96 var(--font-display); letter-spacing: -.048em;
  max-width: 12ch; text-wrap: balance;
}
.lw-lede { margin-top: 18px; font-size: 18px; line-height: 1.5; color: var(--ink-2); max-width: 31em; text-wrap: pretty; }
.lw .banner { margin-top: 22px; }

.lw-invite { margin-top: 26px; max-width: 470px; }
.lw-label, .lw-kicker, .lw-cap, .lw-sample, .lw-drag {
  font-family: var(--font-mono); font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
}
.lw-label { display: block; font-size: 11px; color: var(--ink-3); margin-bottom: 10px; }
.lw-field {
  display: flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line-2);
  border-radius: 999px; padding: 5px 5px 5px 22px; box-shadow: var(--shadow-card); transition: border-color .2s, box-shadow .2s;
}
.lw-field:focus-within { border-color: var(--ink-3); box-shadow: 0 0 0 4px var(--focus-ring), var(--shadow-card); }
.lw-field input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 16px; padding: 11px 0; }
.lw-field input[aria-invalid="true"] { color: var(--danger); }
.lw-reveal { border: 0; background: none; color: var(--ink-3); font: 500 11px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; padding: 10px; border-radius: 999px; cursor: pointer; }
.lw-reveal:hover { color: var(--ink); }
.lw-go.btn { border-radius: 999px; padding-inline: 22px; white-space: nowrap; }
.lw-invite .field-msg { margin: 10px 0 0 22px; }
.lw-alt { margin-top: 16px; font-size: 15px; color: var(--ink-2); }
.lw-alt a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }
.lw .small-deal { margin-top: 20px; max-width: 44em; font-size: 12.5px; }
.lw-label-note { margin-left: 10px; color: var(--warn-ink); letter-spacing: .04em; text-transform: none; }

/* The world: no frame. A soft disc of whatever sky the sample world is in sits behind it. */
.lw-world { position: relative; min-height: 0; margin-right: calc(-1 * var(--gutter)); margin-left: -4%; }
.lw-halo {
  position: absolute; inset: 0 4% 0 6%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--sky-top, #9fd3f3) 62%, transparent) 0%,
    color-mix(in srgb, var(--sky-bottom, #eaf5fa) 45%, transparent) 58%, transparent 100%);
  opacity: .9; pointer-events: none;
}
.lw-world[data-night="true"] .lw-halo { opacity: 1; }
.lw-slot { position: absolute; inset: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 93%, transparent 100%), linear-gradient(180deg, transparent 0, #000 12%, #000 92%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 93%, transparent 100%), linear-gradient(180deg, transparent 0, #000 12%, #000 92%, transparent 100%);
  mask-composite: intersect; }
.lw-slot canvas { display: block; width: 100%; height: 100%; outline: none; }
.lw-drag { position: absolute; right: calc(var(--gutter) + 4px); top: 6px; margin: 0; font-size: 10.5px; color: var(--ink-3); transition: opacity .6s; pointer-events: none; }
.lw-world.touched .lw-drag, .lw-world[data-replay="none"] .lw-drag { opacity: 0; }

/* The caption row: one quiet mono line, the in-world day on the left. */
.lw-cap {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 28px;
  max-width: var(--maxw); width: 100%; margin: 0 auto; padding: 14px var(--gutter) 10px;
  font-size: 11px; color: var(--ink-2);
}
.lw-cap p { margin: 0; display: flex; align-items: center; gap: 0; white-space: nowrap; min-width: 0; }
.lw-cap-l #lw-day { color: var(--ink); font-weight: 600; }
.lw-dot { margin: 0 9px; color: var(--ink-3); }
.lw-cap-r { gap: 18px !important; }
.lw-cap-r button { font: inherit; letter-spacing: inherit; text-transform: inherit; color: var(--ink-2); background: none; border: 0; border-bottom: 1px solid transparent; padding: 2px 0; cursor: pointer; }
.lw-cap-r button:hover, .lw-cap-r button:focus-visible { color: var(--ink); border-color: var(--ink); }
.lw-sample { font-size: 10px; color: var(--ink-3); border: 1px dashed var(--line-3); border-radius: 999px; padding: 3px 8px; }

.lw-word { width: 100%; margin-top: 6px; }
.wm canvas { display: block; width: 100%; touch-action: pan-y; -webkit-user-select: none; user-select: none; }

/* Below the first screen. */
.lw-more { padding-bottom: 72px; }
.lw-band { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: start; padding-top: 128px; }
.lw-band-head { position: sticky; top: 40px; }
.lw-kicker { font-size: 11px; color: var(--accent-ink); }
.lw-h2 { margin-top: 14px; font: 800 clamp(2.1rem, 3.8vw, 3.6rem)/1 var(--font-display); letter-spacing: -.045em; text-wrap: balance; }
.lw-sub { margin-top: 18px; font-size: 17px; line-height: 1.55; color: var(--ink-2); max-width: 28em; text-wrap: pretty; }

/* How it works: three plain numbered lines. */
.lw-steps { list-style: none; margin: 0; padding: 8px 0 0; counter-reset: step; display: grid; gap: 18px; max-width: 620px; }
.lw-steps li { counter-increment: step; display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: baseline; font-size: 20px; line-height: 1.4; }
.lw-steps li::before { content: counter(step); font: 600 13px var(--font-mono); color: var(--accent-ink); }

@media (max-width: 900px), (max-height: 640px) {
  .lw-first { height: auto; min-height: 0; max-height: none; }
  .lw-hero { grid-template-columns: minmax(0, 1fr); padding: 0 16px; min-height: 0; }
  .lw-copy { padding: 8px 0 8px; }
  .lw-title { font-size: clamp(2.35rem, 10.5vw, 3.4rem); }
  .lw-lede { font-size: 16.5px; margin-top: 14px; }
  .lw-steps li { font-size: 17px; grid-template-columns: 32px minmax(0, 1fr); }
  .lw-invite { margin-top: 22px; }
  .lw-field { padding-left: 16px; }
  .lw-go.btn { padding-inline: 16px; }
  .lw-world { height: min(84vw, 420px); margin: 0 -16px; }
  .lw-drag { right: 16px; top: auto; bottom: 6px; }
  .lw-cap { gap: 6px 16px; padding: 8px 16px 6px; font-size: 10.5px; }
  .lw-cap-r { gap: 12px !important; }
  .lw-band { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 80px; }
  .lw-band-head { position: static; }
}

:root { --maxw: 1440px; --gutter: clamp(20px,4vw,64px); }
#landing[hidden] { display: none; }
.lw-copy > .panel { padding: 0; width: 100%; }
.lw-copy .intro { display: none; }
.lw-copy .welcome { margin-top: 22px; }
.lw-copy .owner-footer { margin-top: 18px; }
.lw-signin { border: 0; padding: 0; background: none; cursor: pointer; }
#auth-status:empty { display: none; }
/* "Sign in" (header or hero) points at the login card: a static outline for 1.2 s, with a pulse when motion is allowed. */
.signin-pulse { outline: 3px solid var(--focus); outline-offset: 4px; animation: signin-pulse 1.2s ease-out; }
@keyframes signin-pulse { from { box-shadow: 0 0 0 14px var(--focus-ring); background: var(--accent-soft); } }
.lw-sample { display: inline-block !important; }
#landing .bs-replay { width:100%;height:100%; }

#wordmark-motion { align-self: flex-end; margin: 8px var(--gutter); border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); padding: 8px 14px; font: 500 12px var(--font-mono); cursor: pointer; }

/* The SVG fallback uses external styles under the sealed script/style CSP. */
.bs-replay-fallback svg { width: 100%; height: 100%; display: block; }

/* Decorative texture must not introduce a data-image source under img-src self. */
body .stage-sky::after, body .sky::after { background-image: repeating-radial-gradient(circle at 17% 31%, var(--ink) 0 .5px, transparent .75px 1.5px); background-size: 7px 11px; opacity: .015; }

/* Shulker brand accents across every customer palette. */
:root:root[data-theme] { --accent: #6f3f99; --accent-hover: #62378a; --accent-edge: #4b2970; --accent-soft: #efe5f6; --accent-ink: #6f3f99; }
:root:root[data-theme="night"] { --accent: #8a55b8; --accent-hover: #9762c4; --accent-edge: #563076; --accent-soft: #2a2140; --accent-ink: #cfa9ec; }
