/* Goodwin shell styles. They match the waitlist site in site/public/styles.css.
   Fonts are self-hosted from app/assets/fonts. Nothing loads from another
   site. See docs/design/typography.md. */

@font-face {
  font-family: "Goodwin Serif";
  src: url("/assets/source-serif-4.v1-83a97355.woff2") format("woff2");
  font-weight: 500 700;
  font-display: swap;
}

@font-face {
  font-family: "Goodwin Sans";
  src: url("/assets/atkinson-hyperlegible-next.v1-4bec184b.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --paper: #f7f5f0;
  --surface: #ffffff;
  --ink: #1d2733;
  --muted: #5b6673;
  --line: #e2ddd3;
  --field-line: #cdc6b9;
  --accent: #2f5d50;
  --accent-ink: #ffffff;
  --accent-soft: #e4ece8;
  --bubble-goodwin: #e4ece8;
  --bubble-other: #efebe3;
  --bubble-you: #2f5d50;
  --bubble-you-ink: #ffffff;
  --avatar-other: #9a6a3f;
  --avatar-other-ink: #ffffff;
  --error: #9b2c2c;

  --serif: "Goodwin Serif", "Iowan Old Style", "Charter", "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: "Goodwin Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1080px;
  --gutter: 20px;
  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #14181d;
    --surface: #1b2027;
    --ink: #e8e4dc;
    --muted: #9aa3ad;
    --line: #2c333c;
    --field-line: #434c58;
    --accent: #8cbcab;
    --accent-ink: #0f1a16;
    --accent-soft: #1f2b27;
    --bubble-goodwin: #1f2b27;
    --bubble-other: #262b33;
    --bubble-you: #3d6f61;
    --bubble-you-ink: #f4f1ea;
    --avatar-other: #d2a679;
    --avatar-other-ink: #1b1510;
    --error: #f0a3a3;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper: #14181d;
  --surface: #1b2027;
  --ink: #e8e4dc;
  --muted: #9aa3ad;
  --line: #2c333c;
  --field-line: #434c58;
  --accent: #8cbcab;
  --accent-ink: #0f1a16;
  --accent-soft: #1f2b27;
  --bubble-goodwin: #1f2b27;
  --bubble-other: #262b33;
  --bubble-you: #3d6f61;
  --bubble-you-ink: #f4f1ea;
  --avatar-other: #d2a679;
  --avatar-other-ink: #1b1510;
  --error: #f0a3a3;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

/* Arrow cursor over text. Pointer on anything you can click.
   Text fields keep the text cursor, since you type there. */
body {
  cursor: default;
}

a,
button,
label,
select,
summary,
[role="button"],
input[type="checkbox"],
input[type="radio"],
input[type="submit"],
input[type="button"] {
  cursor: pointer;
}

input:not([type="checkbox"], [type="radio"], [type="submit"], [type="button"]),
textarea {
  cursor: text;
}

button:disabled,
input:disabled {
  cursor: default;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
}

h2 {
  font-size: clamp(1.4rem, 3.5vw, 1.8rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1em;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.narrow {
  max-width: 600px;
  margin: 0 auto;
  padding: 48px var(--gutter) 72px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.9rem;
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
}

/* Header and footer */

.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header .wrap,
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-header .wrap {
  min-height: 64px;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.95rem;
}

.site-nav a,
.site-nav .link-button {
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover,
.site-nav .link-button:hover {
  color: var(--ink);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  font-size: 0.9rem;
  color: var(--muted);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.site-footer a {
  color: var(--muted);
}

/* Buttons */

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  filter: brightness(1.08);
}

.button.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.actions form {
  margin: 0;
}

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

/* Cards and panels */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
}

@media (max-width: 560px) {
  .panel {
    padding: 22px;
  }
}

.note {
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.flash {
  border-radius: 10px;
  padding: 12px 16px;
  margin: 20px auto 0;
  max-width: 600px;
  background: var(--accent-soft);
}

.flash.alert,
.errors {
  color: var(--error);
}

.errors {
  margin-bottom: 18px;
}

.errors ul {
  margin: 0;
  padding-left: 1.2em;
}

.steps {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.promises {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.promises span {
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 12px;
  color: var(--muted);
}

/* Forms */

.field {
  margin-bottom: 18px;
}

.field label,
.field legend {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.field .hint {
  display: block;
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--muted);
}

fieldset.field {
  border: 0;
  padding: 0;
  margin-left: 0;
  margin-right: 0;
  min-width: 0;
}

fieldset.field legend {
  padding: 0;
}

input[type="tel"],
input[type="text"],
select {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--field-line);
  border-radius: 10px;
  padding: 11px 14px;
}

.inline-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.choices label,
.consent label {
  display: flex;
  gap: 10px;
  font-weight: 400;
}

.choices label {
  align-items: center;
}

.consent label {
  align-items: flex-start;
}

input[type="radio"],
input[type="checkbox"] {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
}

.consent {
  font-size: 0.9rem;
  color: var(--muted);
  background: var(--paper);
  border-radius: 10px;
  padding: 12px 14px;
}

.consent input {
  margin-top: 3px;
}

/* Invite link */

.invite-link {
  display: flex;
  gap: 10px;
  align-items: center;
}

.invite-link input {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

/* Lists */

.plain-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1em;
}

.plain-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.plain-list li:last-child {
  border-bottom: 0;
}

[hidden] {
  display: none !important;
}

.spaced {
  margin-top: 24px;
}

.inline-form {
  display: inline;
  margin: 0;
}
