/* The sign-in page: what entente is, beside a finished form. Phone: brand, headline, form, then the
   picture and flags. Desktop (900px and up): two halves, the product on a slightly different surface. */
body { padding: 0; }
.front {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 0;
  max-width: 480px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(48px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}
.front .theme-toggle { position: absolute; top: 20px; right: 16px; margin: 0; }
.front header { position: static; margin: 0 0 24px; min-height: 44px; }
.front header::after { content: none; }

.intro { margin-bottom: 28px; }
.headline { font-size: 38px; line-height: 1.1; letter-spacing: -.025em; font-weight: 600; margin: 0 0 14px; }
.lede { font-size: 17px; line-height: 1.55; color: var(--muted); margin: 0; max-width: 30em; }

/* The form card */
.signin { padding: 28px; margin-bottom: 0; }
.signin h2 { font-size: 24px; line-height: 1.2; margin: 0 0 20px; }
.signin .form { grid-template-columns: 1fr; gap: 16px; margin-bottom: 0; }
.signin .field > label { color: var(--text); font-size: 14px; letter-spacing: 0; }
.signin .note { margin: 16px 0 0; }
.signin .btn { width: 100%; margin-top: 20px; }
.fine { margin: 14px 0 0; text-align: center; font-size: 14px; color: var(--muted); }

.pw { position: relative; }
.pw .input { padding-right: 76px; }
.pw-toggle {
  position: absolute; top: 2px; right: 2px; bottom: 2px; min-width: 64px; padding: 0 14px;
  border: 0; border-radius: calc(var(--radius-sm) - 2px); background: transparent;
  color: var(--accent-strong); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
}
.pw-toggle:hover { text-decoration: underline; text-underline-offset: 3px; }
:root[data-theme="dark"] .pw-toggle { color: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pw-toggle { color: var(--accent); } }

/* The picture: the call screen in miniature */
.show { margin-top: 44px; }
.scene { display: flex; flex-direction: column; gap: 4px; }
.bubble { display: flex; align-items: flex-end; gap: 10px; max-width: 88%; }
.bubble p { margin: 0; padding: 14px 18px; border-radius: 20px; font-size: 18px; line-height: 1.35; color: var(--text); }
.bubble.mine { align-self: flex-start; }
.bubble.mine p { background: var(--accent-soft); border-bottom-left-radius: 6px; }
.bubble.theirs { align-self: flex-end; }
.bubble.theirs p { background: var(--other-soft); border-bottom-right-radius: 6px; }
.bubble p:lang(ko) { font-family: var(--sans); font-weight: 500; }
.av { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 600 16px/1 var(--serif); font-variation-settings: "SOFT" 100; color: var(--on-accent); }
.mine .av { background: var(--accent); }
.theirs .av { background: var(--other); }
.wave { align-self: center; display: block; margin: 2px 0; }
.wave .a { fill: var(--accent); }
.wave .m { fill: var(--control); }
.wave .b { fill: var(--other); }

.langs { margin-top: 28px; display: flex; flex-direction: column; gap: 12px; }
.flags { display: flex; flex-wrap: wrap; gap: 8px; }
.flags img { width: 24px; height: 18px; border-radius: 3px; box-shadow: 0 0 0 1px var(--border); }
.langs p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--muted); max-width: 26em; }

@media (max-width: 380px) { .headline { font-size: 34px; } .signin { padding: 22px; } }

@media (min-width: 900px) {
  .front {
    max-width: none;
    margin: 0;
    padding: 48px 0;
    min-height: 100vh;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "brand form" "intro form" "show form";
    grid-template-rows: auto auto auto;
    align-content: center;
    background: linear-gradient(90deg, color-mix(in srgb, var(--panel-2) 80%, var(--bg)) 50%, transparent 50%);
  }
  .front .theme-toggle { top: 24px; right: 28px; }
  .front header { grid-area: brand; justify-self: end; width: min(100%, 500px); margin: 0 clamp(32px, 5vw, 72px) 40px 0; }
  .intro { grid-area: intro; justify-self: end; width: min(100%, 500px); margin: 0 clamp(32px, 5vw, 72px) 0 0; }
  .show { grid-area: show; justify-self: end; width: min(100%, 500px); margin: 48px clamp(32px, 5vw, 72px) 0 0; }
  .signin { grid-area: form; align-self: center; justify-self: start; width: min(100%, 420px); margin: 0 0 0 clamp(32px, 5vw, 72px); padding: 36px; }
  .headline { font-size: 52px; }
  .lede { font-size: 19px; }
}
