/* The waitlist page's stylesheet (Worthfold 1.3, phase 0). The desktop
   application's design in Purple (DESIGN.md, section 3; styles/tokens.css and
   ui/theme.js hold the same values): Light, and Dark by the browser's own
   setting, with the Aurora wash at the slider's default. The page has no
   script of its own for the look, so everything lives here. */

/* Inter, bundled as the application bundles it, never loaded from the
   internet (DESIGN.md, Type); the license file sits beside it. */
@font-face {
  font-family: "Inter";
  src: url("assets/fonts/Inter-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --font-body: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --radius-card: 22px;
  --radius-small: 13px;
  --radius-control: 10px;
  --radius-icon: 12px;
  --radius-pill: 999px;
  /* A control is a touch target of at least 44 points (the plan's rule 8). */
  --control-height: 48px;
  --motion-quick: 0.15s;
  --aurora: 0.65;
  --gradient-a: #5b2e9c;
  --gradient-b: #a8329f;
  --gradient: linear-gradient(135deg, var(--gradient-a), var(--gradient-b));

  /* Purple in Light. */
  --accent: #6d3caf;
  --accent-2: #b23faf;
  --tint: #efe6fa;
  --tint-text: #4a2380;
  --accent-strong: #4a2380;
  --text-link: #4a2380;
  --surface-page: color-mix(in srgb, var(--tint) 42%, #f8f7fb);
  --surface-panel: #ffffff;
  --surface-control: #faf9fc;
  --text-primary: #1c1827;
  --text-secondary: #625d72;
  /* Muted text on the page ground itself, a shade darker than in a card, so
     it keeps 4.5:1 over the wash counted at its full color. */
  --text-page-muted: #514b60;
  --border: #e3dfeb;
  --card-edge: transparent;
  --field-border: #d6d0e0;
  --danger: #c43a33;
  --danger-text: #b3322c;
  --success-text: #0b6e4a;
  --wash-a: 16%;
  --wash-b: 13%;
  --wash-a-size: 760px 400px;
  --wash-b-size: 680px 380px;
  --shadow: 0 1px 2px rgba(28, 24, 39, 0.05), 0 10px 28px color-mix(in srgb, var(--gradient-a) 9%, transparent);
  --shadow-primary: 0 6px 16px color-mix(in srgb, var(--gradient-a) 32%, transparent);
  --shadow-lift: 0 16px 36px color-mix(in srgb, var(--gradient-a) 28%, transparent);
}

/* Purple in Dark (DESIGN.md, principle 4), kept checked for the day it is
   wanted: the page shows Light to everyone (the owner, 2026-10-19), and
   data-appearance="dark" on the html element turns this on. */
:root[data-appearance="dark"] {
  --accent: #b98cf0;
  --accent-2: #e58af2;
  --tint: #2e2045;
  --tint-text: #e6d7fb;
  --accent-strong: #b98cf0;
  --text-link: #b98cf0;
  --surface-page: color-mix(in srgb, var(--tint) 20%, #07060d);
  --surface-panel: #14121d;
  --surface-control: #100e18;
  --text-primary: #f2f0fa;
  --text-secondary: #a39fb8;
  --text-page-muted: #a39fb8;
  --border: #2a2740;
  --card-edge: #26233a;
  --field-border: #6a6588;
  --danger: #ff8078;
  --danger-text: #ff8078;
  --success-text: #52dca4;
  --wash-a: 55%;
  --wash-b: 40%;
  --wash-a-size: 760px 420px;
  --wash-b-size: 700px 400px;
  --shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 18px 40px rgba(0, 0, 0, 0.4);
  --shadow-primary: 0 0 24px color-mix(in srgb, var(--gradient-b) calc(40% * var(--aurora)), transparent);
  --shadow-lift: 0 0 0 1px color-mix(in srgb, var(--gradient-b) 40%, transparent), 0 20px 50px rgba(0, 0, 0, 0.5),
    0 0 44px color-mix(in srgb, var(--gradient-b) calc(22.4% * var(--aurora)), transparent);
}

/* The page's ground and the wash across its top, as styles/base.css paints
   them. */
* {
  box-sizing: border-box;
}

html {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--surface-page);
  background-image:
    radial-gradient(var(--wash-a-size) at 10% -10%,
      color-mix(in srgb, var(--gradient-a) calc(var(--wash-a) * var(--aurora)), transparent), transparent 70%),
    radial-gradient(var(--wash-b-size) at 92% -14%,
      color-mix(in srgb, var(--gradient-b) calc(var(--wash-b) * var(--aurora)), transparent), transparent 70%);
  background-repeat: no-repeat;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--text-link);
  font-weight: 600;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

/* The page's column: 32 at the sides from wide windows down, 20 from 900,
   16 on a phone (DESIGN.md, Space and density). */
.wrap {
  width: 100%;
  max-width: 1184px;
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 900px) {
  .wrap {
    padding: 0 20px;
  }
}

@media (max-width: 480px) {
  .wrap {
    padding: 0 16px;
  }
}

/* The header: the folded-ledger mark and the name, as the sidebar's brand. */
.site-header {
  padding: 22px 0 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  color: var(--text-primary);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 9px;
}

main {
  flex: 1;
}

/* The hero: the words and the form beside the picture on a wide window, one
   above the other when narrower. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 40px;
  align-items: center;
  padding-block: 40px 24px;
}

@media (max-width: 1040px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding-block-start: 28px;
  }
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5.2vw, 54px);
  font-weight: 760;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.lead {
  margin: 0 0 26px;
  max-width: 34em;
  font-size: 17.5px;
  color: var(--text-page-muted);
}

h2 {
  margin: 0 0 18px;
  font-size: 26px;
  font-weight: 760;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 12px;
}

/* The form: the two fields side by side where there is room, one above the
   other on a phone, the main button under them, then the bot check and the
   status line. */
.join {
  max-width: 560px;
}

.join label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
}

.optional {
  color: var(--text-page-muted);
  font-weight: 500;
}

.join-fields {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 12px 14px;
  margin-bottom: 14px;
}

@media (max-width: 560px) {
  .join-fields {
    grid-template-columns: minmax(0, 1fr);
  }
}

.join input {
  width: 100%;
  min-width: 0;
  min-height: var(--control-height);
  padding: 7px 14px;
  border: 1px solid var(--field-border);
  border-radius: var(--radius-control);
  background: var(--surface-control);
  color: var(--text-primary);
  font: inherit;
  font-size: 16px;
}

.join input::placeholder {
  color: var(--text-secondary);
  opacity: 1;
}

.join input:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
  outline: none;
}

.join input.field-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 18%, transparent);
}

/* The main button: the gradient under white text, brightened under the
   mouse (DESIGN.md, Buttons). */
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: var(--control-height);
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  background: var(--gradient);
  color: #ffffff;
  font: 600 15px/1.2 var(--font-body);
  white-space: nowrap;
  box-shadow: var(--shadow-primary);
  cursor: pointer;
  transition: filter var(--motion-quick) ease;
}

.primary-button:hover:not(:disabled) {
  filter: brightness(1.06);
}

.primary-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.cf-turnstile {
  margin-top: 14px;
  min-height: 65px;
}

.join-status {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--text-page-muted);
}

/* A link in running text, the note's or the policy's, reaches 44 points
   tall for a finger without moving the line it sits in. */
.join-status a,
.policy p a {
  display: inline-block;
  padding: 14px 0;
  margin: -14px 0;
}

.join-status[data-state="error"] {
  color: var(--danger-text);
  font-weight: 600;
}

.join-status[data-state="done"] {
  color: var(--success-text);
  font-weight: 600;
}

/* The picture: the application's Dashboard, framed as a card that lifts a
   little from the page. */
.hero-picture {
  margin: 0;
}

.hero-picture img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--card-edge);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lift);
  background: var(--surface-panel);
}

.hero-picture figcaption {
  margin: 12px 4px 0;
  font-size: 13.5px;
  color: var(--text-page-muted);
}

/* What the program does: three rows, each a picture of it beside its words,
   the picture framed as a card, one above the other on a phone. */
.section {
  padding-block: 36px 8px;
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 11fr) minmax(0, 9fr);
  gap: 24px 44px;
  align-items: center;
  padding: 18px 0 26px;
}

@media (max-width: 860px) {
  .feature {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 12px 0 20px;
  }
}

.feature-picture {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--card-edge);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  background: var(--surface-panel);
}

.feature-words p {
  color: var(--text-page-muted);
  font-size: 15.5px;
}

/* The story: plain prose on the page, no card. */
.story p {
  max-width: 720px;
  color: var(--text-page-muted);
  font-size: 16px;
}

/* The footer: the name, the contact address and the policy, each link a
   touch target of its own. */
.site-footer {
  margin-top: 28px;
  padding: 20px 0 28px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-page-muted);
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.site-footer .footer-name {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  color: var(--text-primary);
}

@media (prefers-reduced-motion: reduce) {
  .primary-button {
    transition: none;
  }
}

/* The answer page, for a form sent without the page's script. */
.answer {
  padding-block: 48px;
}

/* The privacy policy: one column of plain reading, lined up at the left
   with everything else. */
.policy {
  padding-block: 24px 40px;
}

.policy h1 {
  margin: 0 0 6px;
  font-size: clamp(30px, 4.5vw, 40px);
  font-weight: 760;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.policy-date {
  margin-bottom: 24px;
  color: var(--text-page-muted);
  font-size: 14px;
}

.policy h2 {
  margin: 30px 0 10px;
  font-size: 20px;
}

.policy p {
  max-width: 720px;
  font-size: 16px;
}
