/* Maine Waymark coming soon.
   Palette hex values between the sampled markers are written by scripts/build_assets.py. */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/fraunces-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/fonts/source-sans-3-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* sampled */
  --navy: #2f4459;
  --gold: #c68c40;
  --cream: #fff5ec;
  --muted: #596776;
  --btn-hover: #d4a86c;
  --btn-hover-text: #2f4459;
  --accent: #b78542;
  /* /sampled */
  --ink: var(--navy);
  --field: color-mix(in srgb, white 65%, var(--cream));
  --serif: "Fraunces", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: "Source Sans 3", "Segoe UI", "Helvetica Neue", sans-serif;
  color-scheme: light;
}

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

html {
  font-size: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background:
    radial-gradient(ellipse 90% 46% at 50% -8%, color-mix(in srgb, var(--gold) 18%, transparent), transparent 58%),
    var(--cream);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.5;
}

body::before {
  content: "";
  position: fixed;
  inset: 12px;
  border: 1px solid color-mix(in srgb, var(--gold) 70%, var(--navy));
  pointer-events: none;
  z-index: 5;
}

::selection {
  background: var(--navy);
  color: var(--cream);
}

.skip {
  position: absolute;
  left: 1rem;
  top: 0.6rem;
  z-index: 10;
  padding: 0.4rem 0.7rem;
  background: var(--cream);
  color: var(--navy);
  transform: translateY(-150%);
}

.skip:focus {
  transform: none;
}

main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2.75rem, 7vh, 4.75rem) clamp(1.25rem, 4vw, 3rem) 1.25rem;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 28rem);
  justify-items: center;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  align-items: center;
  width: min(28rem, 100%);
}

.has-crest .layout {
  grid-template-columns: minmax(15rem, 0.92fr) minmax(18rem, 1fr);
  justify-items: stretch;
  gap: clamp(1.75rem, 4vw, 4.25rem);
  width: min(58rem, 100%);
}

.crest {
  display: block;
  margin: 0;
  min-width: 0;
}

.crest img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(72vh, 640px);
  margin-inline: auto;
}

.star {
  display: block;
  width: 1.35rem;
  height: 1.35rem;
  margin: 0 auto 0.85rem;
  color: var(--gold);
}

.wordmark {
  margin: 0;
  color: var(--navy);
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.7rem, 6vw, 3.5rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
  text-align: center;
}

.wordmark-small {
  font-size: clamp(1.85rem, 5vw, 2.25rem);
}

#signup {
  width: min(26rem, 100%);
}

.has-crest .wordmark {
  display: none;
}

.copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  text-align: center;
}

.has-crest .copy {
  align-items: stretch;
  text-align: left;
}

.has-crest h1,
.has-crest .lede {
  align-self: flex-start;
  margin-inline: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.rule {
  width: 3.25rem;
  height: 1px;
  margin: 0 auto 1.15rem;
  background: var(--gold);
}

.has-crest .rule {
  margin-left: 0;
}

h1 {
  margin: 0;
  max-width: 13.5em;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.5vw, 2.75rem);
  line-height: 1.16;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lede {
  margin: 0.9rem 0 0;
  max-width: 36ch;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}

.signup {
  width: 100%;
  max-width: 26rem;
  margin-top: 1.55rem;
  text-align: left;
}

.signup label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.signup-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

input[type="email"] {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  appearance: none;
  padding: 0.75rem 0.85rem;
  border: 1px solid color-mix(in srgb, var(--navy) 32%, var(--cream));
  border-radius: 2px;
  background: var(--field);
  color: var(--navy);
  font: 400 16px/1.2 var(--sans);
}

input[type="email"]:focus-visible {
  border-color: var(--navy);
}

input:-webkit-autofill {
  -webkit-text-fill-color: var(--navy);
  caret-color: var(--navy);
  box-shadow: 0 0 0 1000px var(--field) inset;
}

button {
  min-width: 8.75rem;
  min-height: 48px;
  appearance: none;
  padding: 0.75rem 1.15rem;
  border: 0;
  border-radius: 2px;
  background: var(--navy);
  color: var(--cream);
  font: 600 16px/1.2 var(--sans);
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

button:hover {
  background: var(--btn-hover);
  color: var(--btn-hover-text);
}

button:disabled {
  cursor: progress;
}

.status {
  margin: 0.8rem 0 0;
  min-height: 1.25em;
  font-size: 0.98rem;
  color: var(--navy);
}

.status:empty {
  margin: 0;
  min-height: 0;
}

.status[data-state="ok"] {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.35;
  max-width: 16em;
  margin: 1.2rem auto 0;
  text-align: center;
  text-wrap: balance;
}

.status:focus,
.status:focus-visible {
  outline: none;
}

.social {
  margin-top: 1.35rem;
}

.social ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 0.2rem;
  color: var(--navy);
  font-size: 0.98rem;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
}

.social a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}

.site-footer {
  padding: 0.25rem 1.25rem 1.7rem;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}

.simple .layout {
  grid-template-columns: minmax(0, 28rem);
  justify-items: center;
  width: min(28rem, 100%);
}

.simple .copy,
.simple .crest {
  align-items: center;
  text-align: center;
}

.simple h1 {
  max-width: 18em;
}

.simple .crest img {
  width: min(11rem, 48vw);
  max-height: 38vh;
}

.simple .rule,
.simple h1,
.simple .lede {
  align-self: center;
  margin-inline: auto;
}

.simple .social ul,
.simple .copy {
  justify-content: center;
}

.simple .back {
  margin-top: 1.1rem;
  color: var(--navy);
  text-decoration-color: var(--gold);
  text-underline-offset: 0.25em;
}

@media (max-width: 840px) {
  body::before {
    inset: 8px;
  }

  .layout,
  .has-crest .layout {
    grid-template-columns: 1fr;
    justify-items: center;
    width: min(28rem, 100%);
  }

  .crest img {
    width: min(18rem, 78vw);
    max-height: 46vh;
  }

  .has-crest main {
    padding-top: 1.6rem;
    padding-bottom: 0.6rem;
  }

  .has-crest .crest img {
    width: auto;
    max-width: min(16.5rem, 72vw);
    max-height: 36vh;
  }

  .has-crest .rule {
    display: none;
  }

  .copy {
    align-items: center;
    text-align: center;
  }

  .rule,
  h1,
  .lede {
    align-self: center;
    margin-inline: auto;
  }

  .social,
  .social ul {
    width: 100%;
  }

  .social ul {
    justify-content: center;
  }

  .status[data-state="ok"] {
    margin-inline: auto;
  }
}

@media (max-width: 560px) {
  .signup-row {
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

@media (forced-colors: active) {
  body::before {
    border-color: CanvasText;
  }

  button,
  input[type="email"] {
    border: 1px solid ButtonText;
  }
}
