/*
 * The splash. Mobile first, then wider from 900 pixels for laptops and desktops. No scripts, no
 * outside requests and no inline styles in the page, so the server's Content-Security-Policy
 * holds. These are the light colours; dark.css holds the dark ones, and the page loads it when
 * the device is set to dark.
 */

:root {
  color-scheme: light;

  --bg: #faf6f0;
  --ink: #1f1a24;
  --muted: #6b6472;
  --card: #ffffff;
  /* The two glows take the colours of the avatars' clothes: a purple shirt, a blue suit. */
  --glow-one: rgb(142 63 209 / 0.2);
  --glow-two: rgb(47 98 184 / 0.2);
  --shadow: 0 1px 2px rgb(31 26 36 / 0.06), 0 14px 34px -18px rgb(31 26 36 / 0.3);
  --focus: #2f62b8;

  --round: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* The two glows sit behind the two avatars. */
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(62% 36% at 28% 37%, var(--glow-one), transparent 72%),
    radial-gradient(62% 36% at 72% 37%, var(--glow-two), transparent 72%);
  background-repeat: no-repeat;
  font: 1rem/1.5 var(--body);
}

h1,
p {
  margin: 0;
  padding: 0;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

/* The two avatars, side by side and a little overlapped, each on a pale disc in its own colour. */

.pair {
  --size: min(40vw, 188px);
  --ring: 6px;
  display: flex;
  justify-content: center;
}

.face {
  display: block;
  overflow: hidden;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  box-shadow: 0 0 0 var(--ring) var(--bg), var(--shadow);
}

.face img {
  display: block;
  width: 100%;
  height: 100%;
}

.face + .face {
  margin-left: calc(var(--size) * -0.12);
}

.face.one {
  background-image: linear-gradient(165deg, #f6eeff, #dcc8f7);
}

.face.two {
  background-image: linear-gradient(165deg, #eef4fd, #c6d8f4);
}

/* The page: the avatars and the words in the middle, the way in at the bottom right. */

.splash {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}

.splash main {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 30px;
  padding-bottom: 5vh;
  text-align: center;
}

.words {
  display: grid;
  gap: 12px;
  max-width: 22rem;
}

.kicker {
  font: 700 1.125rem / 1 var(--round);
  letter-spacing: 0.04em;
  color: var(--muted);
}

h1 {
  font: 700 clamp(2.6rem, 12vw, 4rem) / 1.02 var(--round);
  letter-spacing: -0.02em;
}

.sub {
  color: var(--muted);
  font-size: 1.0625rem;
  text-wrap: balance;
}

.door {
  display: flex;
  justify-content: flex-end;
}

.door a {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
}

.door a:hover,
.door a:focus-visible {
  color: var(--ink);
  background-color: var(--card);
  box-shadow: var(--shadow);
}

/*
 * The refusal page (pages/404.html). On Cloudflare Pages it is what every address but the front
 * page answers, the "Sign in" link's among them while home.jillandbob.com does not exist. Plain
 * on purpose: no avatars, no glow, nothing to read but the notice.
 */

body.refused {
  background-image: none;
}

.notice {
  min-height: 100vh;
  min-height: 100svh;
  max-width: 36rem;
  margin: 0 auto;
  display: grid;
  align-content: center;
  gap: 16px;
  padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) 14vh
    max(24px, env(safe-area-inset-left));
}

.notice .tag {
  font: 600 0.75rem / 1 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.notice .tag::before {
  content: "";
  display: block;
  width: 36px;
  height: 3px;
  margin-bottom: 18px;
  background-color: var(--ink);
}

.notice h1 {
  font: 700 clamp(1.9rem, 8vw, 2.5rem) / 1.1 var(--body);
  letter-spacing: -0.015em;
}

.notice .back {
  margin-top: 20px;
  font-size: 0.9375rem;
  color: var(--muted);
}

.notice .back a {
  text-underline-offset: 3px;
}

/* Laptops and desktops: more room, and the way in at the top right, where people look for it. */

@media (min-width: 900px) {
  .notice {
    gap: 20px;
    font-size: 1.125rem;
  }

  .notice h1 {
    font-size: 3rem;
  }

  .pair {
    --size: 224px;
    --ring: 8px;
  }

  .splash {
    grid-template-rows: auto 1fr;
    padding: 20px 28px 28px;
  }

  .door {
    order: -1;
  }

  .door a {
    font-size: 1rem;
  }

  .splash main {
    gap: 38px;
    padding-bottom: 9vh;
  }

  .words {
    gap: 16px;
    max-width: 34rem;
  }

  .kicker {
    font-size: 1.375rem;
  }

  h1 {
    font-size: 5.25rem;
  }

  .sub {
    font-size: 1.3125rem;
  }
}
