/* Scheplatform: one stylesheet for index.html, login.html and signup.html.
   Palette: two blues and white. The Google button also uses the two greys
   that Google's branding guidelines prescribe for it. See DESIGN.md. */

:root {
  --blue-deep: #0F3B8C;   /* text, logo, page background, focus ring on white */
  --blue-light: #5BA4F5;  /* accents, hairlines, hover, background shapes */
  --white: #FFFFFF;       /* card, button surfaces, text on blue */

  /* Fixed by Google for the light "Sign in with Google" button. */
  --google-border: #747775;
  --google-text: #1F1F1F;

  /* Deep blue lightened with white, for secondary text on the card. */
  --blue-muted: #4B6CA9;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    "Noto Sans", Arial, sans-serif;
  --radius: 10px;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--white);
  background-color: var(--blue-deep);
  background-image: url("background.svg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
}

h1,
p {
  margin: 0;
}

a {
  color: inherit;
}

img,
svg {
  display: block;
}

/* Shared layout: content centred in the viewport, footer at the bottom. */

.stage {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 16px 32px;
}

.footer {
  flex: none;
  padding: 0 16px 24px;
  font-size: 0.8125rem;
  text-align: center;
  color: var(--white);
}

/* Landing page */

.hero {
  width: 100%;
  max-width: 560px;
  text-align: center;
}

.hero-logo {
  width: 88px;
  height: 88px;
  margin: 0 auto 20px;
}

.hero h1 {
  font-size: clamp(2rem, 7vw, 3rem);
  line-height: 1.1;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.hero-text {
  max-width: 30em;
  margin: 16px auto 0;
  font-size: clamp(1.0625rem, 2.6vw, 1.1875rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 36px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 148px;
  padding: 10px 28px;
  border: 2px solid var(--white);
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.btn-primary {
  background-color: var(--white);
  color: var(--blue-deep);
}

.btn-primary:hover {
  box-shadow: 0 0 0 3px var(--blue-light);
}

.btn-secondary {
  background-color: transparent;
  color: var(--white);
  border-color: var(--blue-light);
}

.btn-secondary:hover {
  border-color: var(--white);
}

/* Sign-in and sign-up card */

.card {
  width: 100%;
  max-width: 400px;
  padding: 40px 32px 28px;
  border-radius: 18px;
  background-color: var(--white);
  color: var(--blue-deep);
  text-align: center;
}

.card-brand {
  display: inline-block;
  padding: 4px;
  border-radius: var(--radius);
}

.card-brand img {
  width: 52px;
  height: 52px;
}

.card h1 {
  margin-top: 12px;
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.card-text {
  margin-top: 8px;
  font-size: 0.9375rem;
  color: var(--blue-muted);
}

/* The Google button: white surface, grey border, unaltered four-colour G. */

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  margin-top: 28px;
  padding: 12px 16px;
  border: 1px solid var(--google-border);
  border-radius: var(--radius);
  background-color: var(--white);
  color: var(--google-text);
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.btn-google svg {
  flex: none;
  width: 22px;
  height: 22px;
}

.btn-google:hover {
  border-color: var(--blue-deep);
  box-shadow: 0 0 0 3px var(--blue-light);
}

/* The minor way in, and the line under the rule. */

.minor {
  margin-top: 8px;
  font-size: 0.875rem;
  color: var(--blue-muted);
}

.minor a,
.switch a {
  display: inline-block;
  padding: 12px 2px;
  color: var(--blue-deep);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  border-radius: 4px;
}

.minor a {
  font-weight: 500;
}

.minor a:hover,
.switch a:hover {
  text-decoration-thickness: 2px;
}

.switch {
  margin-top: 28px;
  padding-top: 8px;
  border-top: 1px solid var(--blue-light);
  font-size: 0.9375rem;
}

/* Keyboard focus: white ring on the blue page, deep blue ring on the card. */

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

.card a:focus-visible {
  outline-color: var(--blue-deep);
}

@media (max-width: 380px) {
  .card {
    padding: 32px 20px 20px;
  }

  .btn-google {
    font-size: 1rem;
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .btn-google {
    transition: none;
  }
}

.minor + .switch {
  margin-top: 8px;
}
