/* Goodwin site styles. No web fonts and no third-party requests. */

: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: "Iowan Old Style", "Charter", "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --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;
}

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

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(2.1rem, 5vw, 3.2rem);
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1em;
}

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

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

.small {
  font-size: 0.9rem;
}

/* Header */

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

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  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;
  gap: 20px;
  font-size: 0.95rem;
}

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

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

@media (max-width: 560px) {
  .site-nav .optional {
    display: none;
  }
}

/* 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:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Sections */

section {
  padding: 72px 0;
  border-bottom: 1px solid var(--line);
}

section:last-of-type {
  border-bottom: 0;
}

.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);
  max-width: 36em;
}

/* Hero */

.hero {
  padding-top: 64px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

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

@media (max-width: 860px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* Threads */

.threads {
  display: grid;
  gap: 16px;
}

.thread {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 18px 18px;
}

.thread-private {
  border-color: var(--accent);
  border-style: dashed;
}

.thread-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.avatars {
  display: flex;
  flex-shrink: 0;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid var(--surface);
}

.avatar + .avatar {
  margin-left: -10px;
}

.avatar-goodwin {
  background: var(--accent);
  color: var(--accent-ink);
}

.avatar-sam {
  background: var(--avatar-other);
  color: var(--avatar-other-ink);
}

.thread-name {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
  min-width: 0;
}

.thread-name strong {
  font-size: 0.95rem;
}

.thread-name span {
  font-size: 0.8rem;
  color: var(--muted);
}

.thread-tag {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
}

.thread-private .thread-tag {
  color: var(--accent);
  border-color: var(--accent);
}

.msg {
  width: fit-content;
  max-width: 86%;
  padding: 9px 14px;
  border-radius: 18px;
  font-size: 0.95rem;
  line-height: 1.45;
  margin-bottom: 8px;
}

.msg:last-child {
  margin-bottom: 0;
}

.msg .who {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.msg.goodwin {
  background: var(--bubble-goodwin);
  border-bottom-left-radius: 6px;
}

.msg.goodwin .who {
  color: var(--accent);
}

.msg.other {
  background: var(--bubble-other);
  border-bottom-left-radius: 6px;
}

.msg.other .who {
  color: var(--avatar-other);
}

.msg.you {
  background: var(--bubble-you);
  color: var(--bubble-you-ink);
  margin-left: auto;
  border-bottom-right-radius: 6px;
}

/* Steps and cards */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 36px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 36px;
}

@media (max-width: 760px) {
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.card p:last-child {
  margin-bottom: 0;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--serif);
  font-weight: 600;
  margin-bottom: 12px;
}

/* Privacy */

.promise-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.promise-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

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

.promise-list strong {
  display: block;
}

.promises {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.promises span {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Under the hood */

code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 6px;
  padding: 1px 6px;
}

.status-note {
  font-size: 0.9rem;
  color: var(--muted);
  border-left: 3px solid var(--accent);
  padding: 2px 0 2px 14px;
  max-width: 40em;
}

.diagram {
  display: grid;
  grid-template-columns: 1fr minmax(90px, 140px) 1fr minmax(90px, 140px) 1fr;
  align-items: stretch;
  margin: 40px 0 8px;
}

.node {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 0.9rem;
  color: var(--muted);
}

.node strong {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--ink);
}

.node-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.node-vault {
  border: 2px solid var(--accent);
  background: var(--accent-soft);
}

.node-vault .node-label {
  color: var(--accent);
}

.link {
  position: relative;
  align-self: center;
  min-width: 0;
  padding: 0 10px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
}

.link::before {
  content: "";
  display: block;
  height: 0;
  border-top: 2px dashed var(--field-line);
  margin: 0 0 6px;
}

@media (max-width: 860px) {
  .diagram {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .link {
    padding: 10px 0 10px 24px;
    text-align: left;
    min-width: 0;
  }

  .link::before {
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    height: auto;
    border-top: 0;
    border-left: 2px dashed var(--field-line);
    margin: 0;
  }
}

.tech-steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 40px 0 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px 40px;
}

@media (max-width: 760px) {
  .tech-steps {
    grid-template-columns: 1fr;
  }
}

.tech-steps li {
  counter-increment: step;
  position: relative;
  padding-left: 44px;
}

.tech-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--serif);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tech-steps h3 {
  font-size: 1.1rem;
  margin-bottom: 0.3em;
}

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

.limits {
  align-items: start;
}

.limits ul {
  margin: 0;
  padding-left: 1.1em;
  color: var(--muted);
}

.limits li {
  margin-bottom: 0.6em;
}

.limits li:last-child {
  margin-bottom: 0;
}

.limits strong {
  color: var(--ink);
}

/* Waitlist form */

.waitlist {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 560px;
}

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

.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="email"],
input[type="tel"] {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--field-line);
  border-radius: 10px;
  padding: 11px 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;
}

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

.form-status {
  margin-top: 14px;
}

.form-status:empty {
  display: none;
}

.form-status.error {
  color: var(--error);
}

.form-success h3 {
  margin-bottom: 0.3em;
}

/* FAQ */

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.faq details p {
  margin: 10px 0 0;
  color: var(--muted);
}

/* Long-form pages */

.prose {
  max-width: 44em;
  padding: 56px 0 72px;
}

.prose h1 {
  margin-bottom: 0.3em;
}

.prose h2 {
  font-size: 1.4rem;
  margin-top: 1.8em;
}

.prose ul {
  padding-left: 1.2em;
}

.prose li {
  margin-bottom: 0.4em;
}

.draft-note {
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.9rem;
}

/* Footer */

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

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

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

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