/* Sign-in and the placeholder home.
   Layout idea: brand big at the top over the pattern, the thing she acts
   on in a frosted sheet at the bottom, inside thumb reach. */

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding:
    max(20px, env(safe-area-inset-top))
    16px
    max(16px, env(safe-area-inset-bottom));
}

/* ---- Hero (sign-in) ---- */

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  padding: 24px 20px 32px;
}

.hero-mark {
  width: 44px;
  height: 44px;
  color: var(--accent-text);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(76px, 25vw, 124px);
  line-height: 0.84;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.tagline {
  margin-top: 4px;
  font-size: 1rem;
  color: var(--tx2);
  letter-spacing: 0.01em;
}

/* The pattern is fixed to the viewport, so icons land behind small text
   at some widths. A halo in the page color keeps the text clean. */
.tagline,
.topbar-brand {
  text-shadow: 0 0 4px var(--bg), 0 0 8px var(--bg), 0 0 12px var(--bg);
}

/* ---- Frosted sheet ---- */

.sheet {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid var(--sheet-border);
  background: var(--sheet-bg);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: var(--sheet-shadow);
}

.field-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tx2);
  margin-bottom: -4px;
}

.gate-input {
  min-height: 52px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--input-border);
  background: var(--raise);
  scroll-margin-bottom: 100px;
}

/* Error state: in dark mode the error color sits close to the coral
   brand color, so the field itself also changes, not just the text. */
.gate-input[aria-invalid="true"] {
  border: 2px solid var(--error);
}

.gate-input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.gate-submit {
  min-height: 56px;
  margin-top: 4px;
  padding: 10px 16px;
  border: none;
  border-radius: 14px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Busy state keeps full color (dimming made "Checking..." unreadable in
   gym light); the label change carries the meaning. */
.gate-submit:disabled {
  cursor: progress;
}

.gate-submit:active:not(:disabled) {
  transform: translateY(1px);
}

.gate-error {
  color: var(--error);
  font-size: 0.95rem;
  font-weight: 600;
}

/* Low-stakes action as a text link, but still a full tap target. */
.gate-link {
  min-height: var(--tap);
  min-width: var(--tap);
  padding: 0 4px;
  border: none;
  background: none;
  color: var(--tx2);
  font-size: 0.9rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.muted {
  color: var(--tx2);
}

/* ---- Shared by signed-in screens ---- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 0 20px;
}

.topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.topbar-mark {
  width: 26px;
  height: 26px;
  color: var(--accent-text);
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tx2);
}

/* Highlighter behind display type (wordmark, day title): a hand-drawn
   dry-brush marker stroke per word, from --hl-a / --hl-b in tokens.css.
   Blue under coral letters in dark mode, coral under blue letters in
   light mode. Each word is its own span, so each line gets its own
   stroke; the second word uses a different shape so they don't look
   stamped. The stroke is drawn wider than the word (124%) and clipped
   by the span, so one end is cut straight. That is deliberate: Grace
   compared it with the full stroke and kept this, as more natural. */
.wordmark .neon,
.day-title .neon {
  padding: 0 0.1em;
  margin-left: -0.1em;
  background: var(--hl-a) no-repeat;
  background-size: 124% 60%;
  background-position: 30% 88%;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.wordmark .neon + .sr-only + br + .neon {
  background-image: var(--hl-b);
  background-position: 65% 86%;
}
