/* The public front door and development picker. Artwork stays on plum; the sign-in surface follows the person's theme. */

/* ── The frame ───────────────────────────────────────────────────────── */

.front-door {
  min-block-size: 100dvh;
  background: var(--bg);
}

.front-door__wrap {
  max-inline-size: 100rem;
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.front-door__masthead {
  background: var(--plum);
  color: var(--on-plum);
  padding-block: calc(var(--space-5) + var(--safe-top)) var(--space-5);
}

.front-door__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

/* Which environment this is: one quiet word, drawn from the masthead's own color so it reads on the plum in both modes. */
.front-door__environment {
  background: color-mix(in srgb, currentColor 10%, transparent);
  color: color-mix(in srgb, currentColor 80%, transparent);
  border-color: color-mix(in srgb, currentColor 18%, transparent);
}

/* The image and the way in share the first screen. Their px-safe wrapper keeps
   physical notch insets on the correct edge in either text direction. */
.front-door__experience {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-inline-size: none;
  padding-inline: 0;
}

.living-mosaic {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: end;
  min-inline-size: 0;
  min-block-size: 30rem;
  overflow: clip;
  background: var(--plum);
  color: var(--on-plum);
}

.living-mosaic__art,
.living-mosaic__still,
.living-mosaic__canvas {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
}

.living-mosaic__art {
  z-index: -2;
  pointer-events: none;
}

.living-mosaic__still {
  object-fit: cover;
  object-position: 52% center;
}

.living-mosaic__canvas {
  opacity: 0;
  transition: opacity 900ms ease;
}

.living-mosaic[data-ready="true"] .living-mosaic__canvas {
  opacity: 1;
}

.living-mosaic[data-ready="true"] .living-mosaic__still {
  opacity: 0;
  transition: opacity 900ms ease;
}

.living-mosaic::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--plum) 4%, transparent) 22%, color-mix(in srgb, var(--plum) 45%, transparent) 48%, var(--plum) 84%);
}

.living-mosaic__story {
  padding-block: 12rem 5.5rem;
  padding-inline: var(--space-5);
}

.front-door__hero-title {
  max-inline-size: 15ch;
  margin: 0;
  color: inherit;
  font-size: clamp(2.8rem, 5.2vw, 5.6rem);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.03;
  text-wrap: balance;
}

.living-mosaic__lede {
  max-inline-size: 45ch;
  margin-block: var(--space-5) 0;
  color: color-mix(in srgb, var(--on-plum) 82%, var(--plum));
  font-size: clamp(0.94rem, 1.2vw, 1.08rem);
  line-height: 1.7;
}

.living-mosaic__controls {
  position: absolute;
  inset-block-end: var(--space-4);
  inset-inline-start: var(--space-5);
}

.living-mosaic__toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-block-size: var(--target-min);
  padding-block: var(--space-2);
  padding-inline: var(--space-3);
  border: 1px solid color-mix(in srgb, var(--on-plum) 35%, var(--plum));
  border-radius: 2rem;
  background: var(--plum);
  color: var(--on-plum);
  font: inherit;
  font-size: var(--text-xs);
  cursor: pointer;
}

.living-mosaic__toggle:hover {
  border-color: var(--gold-bright);
}

.living-mosaic__toggle:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 4px;
}

.living-mosaic__toggle-icon {
  inline-size: 0.6rem;
  block-size: 0.65rem;
  border-inline: 2px solid currentColor;
}

.living-mosaic__toggle[data-paused="true"] .living-mosaic__toggle-icon {
  border: 0;
  background: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.front-door__welcome {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-6);
  min-inline-size: 0;
  background: var(--surface);
  padding-block: clamp(2.5rem, 5vw, 5rem);
  padding-inline: var(--space-5);
}

.front-door__welcome-content {
  inline-size: 100%;
  max-inline-size: 27rem;
  margin-inline: auto;
}

.front-door__welcome-mark {
  color: var(--accent);
  margin-block-end: var(--space-6);
}

.front-door__welcome-title {
  margin: 0;
  font-size: clamp(2rem, 2.7vw, 2.75rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.15;
  text-wrap: balance;
}

.front-door__account {
  margin-block: var(--space-4) var(--space-6);
  color: var(--fg2);
  line-height: 1.65;
}

.front-door__welcome .front-door__sign-in {
  justify-items: stretch;
}

.front-door__welcome .btn {
  inline-size: 100%;
  min-block-size: 3.5rem;
  justify-content: center;
  padding-block: var(--space-3);
  line-height: 1.5;
  white-space: normal;
  overflow-wrap: anywhere;
}

.front-door__welcome .front-door__aside {
  padding: var(--space-4);
  border-radius: var(--radius);
}

.front-door__authentication {
  margin-block-start: var(--space-6);
  border-block-start: 1px solid var(--rule);
  color: var(--fg2);
  font-size: var(--text-xs);
  line-height: 1.7;
}

.front-door__authentication summary {
  min-block-size: var(--target-min);
  padding-block: var(--space-3);
  cursor: pointer;
}

.front-door__welcome-foot {
  max-inline-size: 27rem;
  margin-block: var(--space-5) 0;
  margin-inline: auto;
  color: var(--fg3);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-style: italic;
  text-align: center;
}

.front-door__origin {
  display: grid;
  gap: var(--space-4) var(--space-7);
  max-inline-size: 65rem;
  margin-inline: auto;
  padding-block: var(--space-5);
}

.front-door__origin p {
  margin: 0;
  color: var(--fg2);
  line-height: 1.8;
}

.front-door__origin .front-door__origin-title {
  color: var(--fg1);
  font-family: var(--font-display);
  font-size: 2.25rem;
  line-height: 1.3;
}

@media (min-width: 58rem) {
  .front-door__experience {
    grid-template-columns: minmax(0, 1.65fr) minmax(22rem, 1fr);
    min-block-size: max(42rem, calc(100svh - 6.5rem));
  }
  .living-mosaic__story {
    padding-inline: clamp(2rem, 4.5vw, 5rem);
    padding-block-end: 7rem;
  }
  .living-mosaic__controls {
    inset-inline-start: clamp(2rem, 4.5vw, 5rem);
    inset-block-end: var(--space-6);
  }
  .front-door__welcome {
    padding-inline: clamp(2rem, 3.5vw, 4rem);
  }
  .front-door__origin {
    grid-template-columns: 1fr 3fr;
    align-items: start;
  }
}

@media (max-width: 57.999rem) {
  .living-mosaic {
    min-block-size: 25rem;
  }
  .living-mosaic__story {
    padding-block-start: 9rem;
  }
  .living-mosaic__lede {
    max-inline-size: 55ch;
  }
  .front-door__welcome-mark,
  .front-door__welcome-foot {
    display: none;
  }
}

@media (max-width: 26rem) {
  .living-mosaic {
    min-block-size: 22rem;
  }
  .living-mosaic__story {
    padding-block-start: 5rem;
  }
  .front-door__hero-title {
    font-size: 2.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .living-mosaic .living-mosaic__still {
    opacity: 1;
    transition: none;
  }
  .living-mosaic .living-mosaic__canvas,
  .living-mosaic__controls {
    display: none;
  }
}

/* ── The sections ────────────────────────────────────────────────────── */

.front-door__sections {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-7);
  padding-block: var(--space-7) clamp(4rem, 7vw, 6rem);
}

/* The applications: three to a row where there is room, so nine make a square and not a row with one left over. Every card has the same parts in the same order, its name, where it
   stands, what it does and (at its foot) what it replaces, so a short name beside its state does not make one card different from the next. */
.front-door__apps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
  gap: var(--space-4);
}
.front-door__app {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  min-inline-size: 0;
  padding-block: var(--space-4);
  padding-inline: var(--space-5);
}
.front-door__app-title {
  margin: 0;
  font-size: var(--text-md);
  overflow-wrap: anywhere;
}
.front-door__app-blurb {
  margin: 0;
  color: var(--fg2);
  font-size: var(--text-sm);
  line-height: 1.55;
}
.front-door__app-tag {
  margin: auto 0 0;
  padding-block-start: var(--space-1);
  color: var(--fg3);
  font-size: var(--text-xs);
  font-weight: 600;
}

/* Signing in: the button, or what to do where there is none, with a sentence of explanation under it. */
.front-door__sign-in {
  justify-items: start;
}
.front-door__sign-in > * {
  min-inline-size: 0;
  max-inline-size: 100%;
}
.front-door__aside {
  display: grid;
  gap: var(--space-2);
  justify-items: start;
  padding-block: var(--space-5);
  padding-inline: var(--space-5);
}
.front-door__aside > * {
  margin-block: 0;
}
.front-door__aside-text {
  max-inline-size: 66ch;
  color: var(--fg2);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
/* What was said about the last attempt, and the sentences of explanation, run the section's width, as the one under the sections does, so their right edges are one line; the button keeps its
   own size. */
.front-door__sign-in > :is(.callout, .front-door__aside) {
  justify-self: stretch;
}
.front-door__sign-in > .front-door__aside {
  justify-items: start;
}
.front-door__sections > .front-door__aside {
  justify-items: start;
}

/* ── The footer ──────────────────────────────────────────────────────── */

.front-door__footer {
  padding-block: var(--space-6) calc(var(--space-7) + var(--safe-bottom));
  border-block-start: 1px solid var(--rule);
  color: var(--fg3);
  font-size: var(--text-sm);
}
.front-door__footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
}
.front-door__byline {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}

/* ── The development picker ──────────────────────────────────────────── */

/* One row a person: the button that signs in as them and, beside it, their roles. On a phone the two sit on one line while they fit and the roles wrap under the name when they do not, so
   the list is the screen's width and nothing scrolls sideways. With room, the list is two columns, the names' as wide as the widest name, and each row takes both (a subgrid), so the roles
   start on one line down the page and a row's two parts share a baseline. */
.dev-sign-in-people {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-block: 0;
  padding-inline-start: 0;
  border-block-start: 1px solid var(--rule);
  list-style: none;
}
.dev-sign-in-people > li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-4);
  min-inline-size: 0;
  padding-block: var(--space-2);
  border-block-end: 1px solid var(--rule);
}
.dev-sign-in-people .dev-sign-in-person {
  margin-block: 0;
}
.dev-sign-in-people .btn {
  max-inline-size: 100%;
  white-space: normal;
  overflow-wrap: break-word;
}
.dev-sign-in-roles {
  min-inline-size: 0;
  color: var(--fg2);
  overflow-wrap: anywhere;
}
/* What the person is for: their roles' line, then the offices, the cast's sentence about their part, and the profile roles they hold, stacked in the one cell. */
.dev-sign-in-detail {
  display: grid;
  gap: var(--space-1);
  min-inline-size: 0;
}
.dev-sign-in-about {
  display: grid;
  gap: var(--space-1);
  min-inline-size: 0;
  overflow-wrap: anywhere;
}
.dev-sign-in-offices {
  font-weight: 600;
}
.dev-sign-in-holds {
  color: var(--fg2);
}
@media (min-width: 40rem) {
  .dev-sign-in-people {
    grid-template-columns: max-content minmax(0, 1fr);
    column-gap: var(--space-5);
  }
  .dev-sign-in-people > li {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
  }
  .dev-sign-in-people .btn {
    white-space: nowrap;
    overflow-wrap: normal;
  }
}
