@import url("tokens.css");

/* The shared tokens use a 1.5 line-height and a navy heading. The site is a bit
   looser, and in the dark its headings are the light text color, not the navy. */
:root {
  line-height: 1.55;
}

@media (prefers-color-scheme: dark) {
  :root {
    --heading: var(--fg);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
}

a {
  color: var(--water-text);
}

/* The site's ring used to follow --brand, which was the light text color in the dark.
   --heading is that color now (navy in the light, the page text in the dark). */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--heading);
  outline-offset: 2px;
}

.top,
main,
footer {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--heading);
  font-size: 1.3rem;
  font-weight: 700;
  text-decoration: none;
}

.brand svg {
  width: 2.2rem;
  height: 2.2rem;
}

.sign-in {
  font-weight: 600;
}

section {
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
}

.hero {
  padding-top: 2rem;
  border-top: 0;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--water-text);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1 {
  max-width: 22ch;
  margin: 0 0 1rem;
  color: var(--heading);
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1.1;
}

h2 {
  margin: 0 0 1rem;
  color: var(--heading);
  font-size: 1.6rem;
}

h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
}

.lead {
  max-width: 40rem;
  margin: 0 0 1.5rem;
  font-size: 1.2rem;
}

.why p,
.name p,
.signup > p {
  max-width: 42rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button,
button {
  display: inline-block;
  padding: 0.8rem 1.3rem;
  border: 2px solid var(--water);
  border-radius: var(--radius-site-button);
  background: var(--water);
  /* Dark ink: white on this fill was 3.66:1 in light mode and 1.99:1 in dark mode.
     --on-water is about 4.93:1 on the light fill and 9.06:1 on the dark fill. */
  color: var(--on-water);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary {
  background: transparent;
  color: var(--water-text);
}

.note,
.fine {
  color: var(--muted);
  font-size: 0.95rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
}

.grid article {
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius-site);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.grid p {
  margin: 0;
  color: var(--muted);
}

form {
  display: grid;
  gap: 0.9rem;
  max-width: 40rem;
  padding: 1.3rem;
  border-radius: var(--radius-site);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}

.pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.9rem;
}

label {
  display: grid;
  gap: 0.3rem;
}

label span {
  font-weight: 600;
}

label em {
  color: var(--muted);
  font-style: normal;
  font-weight: 400;
}

.short {
  max-width: 8rem;
}

input,
textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--bg);
  color: var(--fg);
  font: inherit;
  font-size: var(--control-font);
}

input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--water);
  outline-offset: 2px;
}

/* For bots only: off-screen, never focused (tabindex -1), hidden from screen readers. */
.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

button {
  justify-self: start;
}

footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.narrow {
  max-width: 40rem;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.narrow h1 {
  font-size: 2rem;
}
