/* Fonts are hosted here (fonts/), so pages make no requests to Google. Both are SIL OFL, licenses alongside. */
@font-face {
  font-family: "Gloock";
  src: url("fonts/gloock-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

/* Colors: logo maroon and rose on a pale strawberry-milk pink. */
:root {
  --background: #fdf4f4;
  --text: #581010;
  --muted: #7f4646;
  --border: #dcbcbc;
  --button: #581010;
  --button-text: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}

h1,
h2 {
  font-family: "Gloock", Georgia, serif;
  font-weight: 400;
}

a {
  color: inherit;
}

/* Keeps the hidden attribute working on elements given a display value below (like the form after signup). */
[hidden] {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Coming-soon page */

.home {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto; /* content centered, Privacy pinned to the bottom */
  place-items: center;
  padding: 24px 16px;
  text-align: center;
}

.home main {
  width: 100%;
  max-width: 520px;
}

.logo {
  display: block;
  width: 112px;
  height: auto;
  margin: 0 auto;
}

/* Three round photos, like the badge on the glove. The middle one wears the logo's double ring. */
.photos {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 28px 0 32px;
}

.photo {
  display: block;
  width: min(27vw, 140px);
  height: auto;
  border-radius: 50%;
  box-shadow:
    0 0 0 4px var(--background),
    0 0 0 5px var(--text);
}

.photos > .photo:first-child {
  margin-right: -18px;
}

.photos > .photo:last-child {
  margin-left: -18px;
}

.photo-main {
  position: relative;
  z-index: 1;
}

.photo-main .photo {
  width: min(42vw, 210px);
  box-shadow:
    0 0 0 6px var(--background),
    0 0 0 7px var(--text),
    0 0 0 12px var(--background),
    0 0 0 13px var(--text);
}

/* A ladybug from the glove artwork, perched on the ring. */
.ladybug {
  position: absolute;
  top: -14px;
  right: -12px;
  width: min(11vw, 54px);
  height: auto;
  transform: rotate(28deg);
}

.home h1 {
  margin: 0;
  font-size: clamp(2rem, 7.5vw, 2.75rem);
  line-height: 1.1;
  text-wrap: balance;
}

.intro {
  max-width: 30em;
  margin: 12px auto 24px;
  color: var(--muted);
  font-size: 1.125rem;
  text-wrap: pretty;
}

form {
  display: flex;
  gap: 8px;
  max-width: 440px;
  margin: 0 auto;
}

input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

input::placeholder {
  color: var(--muted);
  opacity: 0.8;
}

input:focus {
  outline: 2px solid var(--button);
  outline-offset: -1px;
}

button {
  height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--button);
  color: var(--button-text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: var(--muted);
}

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

button:disabled {
  opacity: 0.6;
}

.message {
  min-height: 1.5em;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.message.is-done {
  color: var(--text);
  font-size: 1.0625rem;
  font-weight: 700;
}

.pattern {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 24px auto 0;
}

.social {
  margin: 4px 0 0;
}

.social a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-weight: 700;
  text-decoration: none;
}

.social a:hover {
  text-decoration: underline;
}

.privacy-link {
  margin: 24px 0 0;
  font-size: 0.8125rem;
}

.privacy-link a {
  color: var(--muted);
}

@media (max-width: 400px) {
  form {
    flex-direction: column;
  }

  input {
    flex: none;
  }
}

/* Privacy page */

.policy {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 16px 64px;
}

.policy h1 {
  margin: 24px 0 0;
  font-size: 2.25rem;
  line-height: 1.15;
}

.policy h2 {
  margin: 28px 0 4px;
  font-size: 1.25rem;
}

.policy p {
  margin: 0;
}

.back,
.effective {
  color: var(--muted);
  font-size: 0.875rem;
}
