/* src/components/jr/gate/gate.css — SJ2 Gate.
   Transcribed from art-source/design-sj2-2026-09-12/screens/SJ2 Gate.dc.html. The gate is the
   one screen with its own page colour: #f4efe4, not the stage cream. */

.jr-gate {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--sj-page);
}

/* ---------------------------------------------------------------- the parent bar */
.jr-gate-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--sj-chrome-h);
  padding: 0 30px;
  background: var(--sj-card);
  border-bottom: 1px solid var(--sj-line-warm);
  box-sizing: border-box;
}

.jr-gate-mark {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--sj-teal);
  display: block;
}

/* The gate's wordmark is 22px, not the child chrome's 27px. */
.jr-gate-bar .jr-wordmark { font-size: 22px; }

.jr-gate-tag {
  flex: none;
  white-space: nowrap;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--sj-teal-ink);
  background: var(--sj-teal-tint);
  border-radius: var(--sj-r-pill);
  padding: 7px 15px;
}

.jr-gate-gap { flex: 1 1 auto; }

.jr-gate-back {
  flex: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--sj-r-cta);
  background: var(--sj-card);
  border: 1.5px solid var(--sj-line-warm);
  font-weight: 600;
  font-size: 17px;
  color: var(--sj-ink);
  text-decoration: none;
  box-sizing: border-box;
}

/* ---------------------------------------------------------------- the two columns */
.jr-gate-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 44px;
  padding: 0 70px;
}

.jr-gate-left {
  flex: 0 1 540px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.jr-gate-h1 {
  margin: 0;
  font-weight: 600;
  font-size: 52px;
  line-height: 1.06;
  color: var(--sj-ink);
  letter-spacing: -.015em;
  text-wrap: pretty;
}

/* The one paragraph on the gate set in the story face, exactly as her frame does. */
.jr-gate-p {
  margin: 0;
  font-family: var(--sj-font-story);
  font-size: 22px;
  line-height: 1.45;
  color: var(--sj-ink);
  text-wrap: pretty;
}

.jr-gate-list { display: flex; flex-direction: column; gap: 13px; }

.jr-gate-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 17px 20px;
  border-radius: var(--sj-r-card);
  background: var(--sj-card);
  border: 2px solid var(--sj-green-line);
}

.jr-gate-chip {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: block;
}

.jr-gate-item-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.jr-gate-item-title { font-weight: 600; font-size: 20px; color: var(--sj-ink); }
.jr-gate-item-note {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--sj-ink);
  text-wrap: pretty;
}

/* ---------------------------------------------------------------- the keypad panel */
.jr-gate-panel {
  flex: 0 0 466px;
  background: var(--sj-card);
  border: 2px solid var(--sj-teal-line);
  border-radius: 30px;
  box-shadow: 0 18px 44px rgba(22, 53, 43, .16);
  padding: 34px 36px;
  display: flex;
  flex-direction: column;
  gap: 17px;
  box-sizing: border-box;
}

.jr-gate-panel-label {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--sj-teal-ink);
}

.jr-gate-cells { display: flex; gap: 11px; }

.jr-gate-cell {
  flex: 1 1 0;
  height: 84px;
  border-radius: 20px;
  background: var(--sj-page);
  border: 2px solid var(--sj-line-warm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 36px;
  color: var(--sj-ink);
}

.jr-gate-cell-on { background: var(--sj-teal-tint); border-color: var(--sj-teal-ink); }

.jr-gate-pad {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}

/* 64px keys: this one control already clears the child floor, which is a happy accident of
   her layout rather than a rule she was following. */
.jr-gate-key {
  appearance: none;
  cursor: pointer;
  min-height: 64px;
  border-radius: 16px;
  background: var(--sj-page);
  border: 1.5px solid var(--sj-line-warm);
  font-family: var(--sj-font);
  font-weight: 600;
  font-size: 25px;
  color: var(--sj-ink);
}
.jr-gate-key:active { background: var(--sj-teal-tint); border-color: var(--sj-teal); }

.jr-gate-note {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--sj-ink);
  text-wrap: pretty;
}
/* Her wrong-code colour. The LINE is not loss language ("that is not the code", never
   "wrong"), and this is the parent's side besides. */
.jr-gate-note-bad { color: var(--sj-orange-deep); }

.jr-gate-forgot {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--sj-sun-tint);
  border: 2px solid #f6d98a;
}
.jr-gate-forgot-title { font-weight: 600; font-size: 17px; color: var(--sj-sun-ink); }
.jr-gate-forgot-note {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--sj-ink);
  text-wrap: pretty;
}

.jr-gate-forgot-ask {
  appearance: none;
  cursor: pointer;
  align-self: flex-start;
  padding: 6px 0;
  background: none;
  border: none;
  font-family: var(--sj-font);
  font-weight: 600;
  font-size: 17px;
  color: var(--sj-teal-ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------------------------------------------------------------- the unlocked half */
/* Not the parent surface: an honest line about what is not built yet (phase 2 · parent). */
.jr-gate-open {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 140px;
  text-align: center;
}

.jr-gate-open-title { margin: 0; font-weight: 600; font-size: 40px; color: var(--sj-ink); }

.jr-gate-open-note {
  margin: 0;
  max-width: 60ch;
  font-family: var(--sj-font-story);
  font-size: 20px;
  line-height: 1.45;
  color: var(--sj-ink);
  text-wrap: pretty;
}

.jr-gate-open-actions { display: flex; align-items: center; gap: 20px; margin-top: 6px; }

.jr-gate-open-lock {
  appearance: none;
  cursor: pointer;
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--sj-r-cta);
  background: var(--sj-card);
  border: 1.5px solid var(--sj-line-warm);
  font-family: var(--sj-font);
  font-weight: 600;
  font-size: 17px;
  color: var(--sj-ink);
}

.jr-gate-open-back {
  font-weight: 600;
  font-size: 17px;
  color: var(--sj-teal-ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------------------------------------------------------------- the host behind the door */
/* Phase 2 · parent. The unlocked half is no longer a line of text: it is the whole grown-up
   side, mounted into this host, painting the screen in its own stylesheet
   (src/components/jr/grownups/grownups.css). The gate's own page colour stops at this box. */
.jr-gate-host { position: absolute; inset: 0; }

/* ---------------------------------------------------------------- phones (DECISIONS #164)
   The gate is the first grown-up screen a phone reaches, and the shell runs it outside the
   scaled stage at the device's width (`.jr-phone-natural`, jr_app.js). Her two-column body —
   540px of copy beside a 466px keypad — becomes one column: the keypad first, because it is
   what the parent came for, then the copy. Nothing is restyled; the columns stop being
   columns. Her 64px keys are already thumb-sized and are left exactly as they are. */
@media (max-width: 767px) {
  .jr-phone-natural .jr-gate-bar {
    position: static;
    height: auto;
    min-height: var(--sj-chrome-h);
    flex-wrap: wrap;
    padding-top: env(safe-area-inset-top);
  }
  .jr-phone-natural .jr-gate-body {
    display: flex;
    flex-direction: column-reverse;
    align-items: stretch;
    justify-content: flex-start;
    gap: 22px;
    padding: 18px 16px calc(24px + env(safe-area-inset-bottom));
  }
  .jr-phone-natural .jr-gate-left { flex: 0 0 auto; }
  .jr-phone-natural .jr-gate-panel {
    flex: 0 0 auto;
    width: 100%;
    padding: 20px 16px;
    border-radius: 24px;
  }
  .jr-phone-natural .jr-gate-h1 { font-size: 34px; }
  .jr-phone-natural .jr-gate-p { font-size: 18px; }
  .jr-phone-natural .jr-gate-cell { height: 68px; font-size: 30px; border-radius: 16px; }
  .jr-phone-natural .jr-gate-pad { gap: 8px; }
}
