/* Ads in Order's holding site (Phase 32): the app's teal and slate, light and
   dark following the visitor's setting (32.0, decision 7). Text contrast is at
   least 4.5:1 in both themes. */

:root {
  --bg: #ffffff;
  --surface: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #475569;
  --accent: #0f766e;
  --accent-ink: #ffffff;
  --accent-hover: #115e59;
  --link: #0f766e;
  --ok: #166534;
  --error: #b91c1c;
  --focus: #0f766e;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f172a;
    --surface: #1e293b;
    --border: #334155;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --accent: #5eead4;
    --accent-ink: #042f2e;
    --accent-hover: #99f6e4;
    --link: #5eead4;
    --ok: #86efac;
    --error: #fca5a5;
    --focus: #5eead4;
    color-scheme: dark;
  }
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

a {
  color: var(--link);
}

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

/* `hidden` wins over a form row's own display, so the drop-down can hide the rows it doesn't need. */
[hidden] {
  display: none !important;
}

.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;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  padding: 0.5rem 0.75rem;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 0.375rem;
  z-index: 10;
}

.skip:focus {
  top: 1rem;
}

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

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

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

.top nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.95rem;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.25rem);
  letter-spacing: -0.02em;
  max-width: 18ch;
}

h2 {
  font-size: 1.6rem;
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1rem;
}

.hero {
  padding: 3rem 0 2.5rem;
}

.lead {
  font-size: 1.25rem;
  color: var(--muted);
  max-width: 40rem;
}

.points ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.points li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem;
}

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

.problem,
.features,
.how,
.audience,
.pilot,
.faq,
.form-section {
  padding: 3rem 0 0.5rem;
}

.form-section > p {
  color: var(--muted);
}

.site-form {
  display: grid;
  gap: 1rem;
  max-width: 34rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

label {
  font-weight: 600;
  font-size: 0.95rem;
}

.optional {
  font-weight: 400;
  color: var(--muted);
}

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--muted);
  border-radius: 0.375rem;
  padding: 0.6rem 0.7rem;
}

textarea {
  resize: vertical;
}

.check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.check input {
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.2rem;
  accent-color: var(--accent);
}

.check label {
  font-weight: 400;
}

/* The field bots fill in: out of sight and out of reach for people. */
.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.small {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0;
}

.button {
  display: inline-block;
  justify-self: start;
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
  border-radius: 0.5rem;
  padding: 0.7rem 1.2rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--accent-hover);
}

.button[disabled] {
  opacity: 0.7;
  cursor: wait;
}

.status {
  margin: 0;
  font-weight: 600;
}

.status[data-state="ok"] {
  color: var(--ok);
}

.status[data-state="error"] {
  color: var(--error);
}

.foot {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.foot p {
  margin: 0 0 0.25rem;
}

.page {
  max-width: 44rem;
  padding: 2rem 0 1rem;
}

.page h1 {
  font-size: 2.25rem;
  max-width: none;
}

.field-error {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--error);
}

[aria-invalid="true"] {
  border-color: var(--error);
}

/* 32.5: more to the page. */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
}

@media (max-width: 52rem) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--link);
  font-size: 0.875rem;
  font-weight: 600;
}

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

.button.secondary {
  background: transparent;
  color: var(--link);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.button.secondary:hover {
  background: var(--surface);
}

/* The hero's drawing: the plan's bars, spend under budget, and results rising, in the page's own colours. */
.hero-art {
  width: 100%;
  height: auto;
}

.art-card {
  fill: var(--surface);
  stroke: var(--border);
}

.art-label {
  fill: var(--muted);
  font: 600 13px ui-sans-serif, system-ui, sans-serif;
}

.art-small {
  fill: var(--muted);
  font: 11px ui-sans-serif, system-ui, sans-serif;
}

.art-small.strong {
  fill: var(--link);
  font-weight: 600;
}

.art-axis {
  stroke: var(--border);
  stroke-width: 2;
}

.art-bar {
  fill: var(--accent);
}

.art-bar.soft {
  opacity: 0.45;
}

.art-budget {
  stroke: var(--muted);
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
}

.art-spend {
  fill: none;
  stroke: var(--muted);
  stroke-width: 2.5;
  stroke-linejoin: round;
}

.art-results {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-dasharray: 460;
  stroke-dashoffset: 460;
  animation: art-draw 1.4s 0.3s cubic-bezier(0.2, 0, 0, 1) forwards;
}

.art-dot {
  fill: var(--accent);
  opacity: 0;
  animation: art-show 0.3s 1.5s ease-out forwards;
}

@keyframes art-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes art-show {
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .art-results,
  .art-dot {
    animation: none;
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

.problem h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  max-width: 26ch;
}

.problem p {
  max-width: 46rem;
  color: var(--muted);
}

.problem p strong {
  color: var(--text);
}

.features ul {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.features li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem;
}

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

.icon {
  width: 1.75rem;
  height: 1.75rem;
  margin-bottom: 0.6rem;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.how ol {
  list-style: none;
  counter-reset: step;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.how li {
  counter-increment: step;
}

.how li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 0.75rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

.how li p,
.audience p {
  color: var(--muted);
}

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

.pilot {
  margin-top: 3rem;
  padding: 2rem 1.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
}

.ticks {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
}

.ticks li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.4rem;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.45rem;
  width: 0.9rem;
  height: 0.5rem;
  border-left: 2.5px solid var(--accent);
  border-bottom: 2.5px solid var(--accent);
  transform: rotate(-45deg);
}

.faq details {
  max-width: 46rem;
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 0;
}

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

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

/* Where "Join the pilot" and "Contact us" land: the form's heading, not under the page's top edge. */
.anchor {
  display: block;
  position: relative;
  top: -1rem;
}

/* 32.7: the legal pages, written from the app's own text. */

.legal h2 {
  font-size: 1.2rem;
  margin-top: 2rem;
}

.legal p {
  font-size: 0.975rem;
}

.note {
  padding: 0.75rem 1rem;
  border: 1px solid #d97706;
  border-radius: 0.5rem;
  background: var(--surface);
  font-weight: 600;
}
