/* PlanSift sign-up page. No external fonts, images or scripts. Light and dark through custom properties. */
:root {
  color-scheme: light dark;
  --bg: #f7f7f5;
  --fg: #1a1a1a;
  --muted: #4d4d4d;
  --card: #ffffff;
  --line: #8a8a85;
  --accent: #0b5cad;
  --accent-fg: #ffffff;
  --danger: #b00020;
  --ok: #1b6e2d;
  --banner-bg: #fff4d6;
  --banner-fg: #5c3b00;
  /* brand (brand/plansift-logo.svg and -dark.svg): indigo tile + white S in light, dark tile + indigo outline + soft S in dark; the amber node never changes */
  --mark-tile: #4338ca;
  --mark-edge: none;
  --mark-s: #ffffff;
  --mark-grid-opacity: 0.14;
  --wordmark-plan: #1e1b4b;
  --wordmark-sift: #4338ca;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121314;
    --fg: #ececec;
    --muted: #b3b3b3;
    --card: #1b1c1e;
    --line: #6c6d70;
    --accent: #6aa9ff;
    --accent-fg: #0a0a0a;
    --danger: #ff8a98;
    --ok: #7be095;
    --banner-bg: #3a2e0f;
    --banner-fg: #ffe3a3;
    --mark-tile: #1f2033;
    --mark-edge: #4338ca;
    --mark-s: #c7d2fe;
    --mark-grid-opacity: 0;
    --wordmark-plan: #e0e7ff;
    --wordmark-sift: #a5b4fc;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 1rem/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

main {
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}

h1 { font-size: 1.6rem; line-height: 1.25; margin: 0.75rem 0 0.5rem; }
.lead { color: var(--muted); margin: 0 0 1.25rem; }

/* DE/EN: both texts are in the page; the one for the other language is hidden (and so is removed from the accessibility tree).
   The two toggle buttons carry lang attributes as well but must stay visible, hence :not(button). */
html[data-lang="de"] body [lang="en"]:not(button),
html[data-lang="en"] body [lang="de"]:not(button) { display: none; }
html[data-lang] body .both [lang] { display: inline; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.mark { width: 40px; height: 40px; flex: none; forced-color-adjust: none; }
.mark-tile { fill: var(--mark-tile); stroke: var(--mark-edge); stroke-width: 2; }
.mark-grid { fill: none; stroke: #fff; stroke-opacity: var(--mark-grid-opacity); stroke-width: 1; }
.mark-s { fill: none; stroke: var(--mark-s); stroke-width: 6.5; stroke-linecap: round; }
.mark-node { fill: #fbbf24; }
.wordmark { font-size: 1.5rem; line-height: 1; letter-spacing: -0.03em; }
.wordmark .plan { color: var(--wordmark-plan); font-weight: 500; }
.wordmark .sift { color: var(--wordmark-sift); font-weight: 800; }
.langbar { display: flex; gap: 0.5rem; justify-content: flex-end; }
.lang {
  min-width: 2.75rem;
  min-height: 2.75rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--card);
  color: var(--fg);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.lang[aria-pressed="true"] { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }

fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.field { margin: 0 0 1.1rem; }
label { display: block; font-weight: 600; margin: 0 0 0.35rem; }

input[type="email"], input[type="text"] {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--card);
  color: var(--fg);
  font: inherit;
  font-size: 1rem; /* 16px: iOS does not zoom into the field */
}

.consent { display: grid; grid-template-columns: 2.75rem 1fr; align-items: start; gap: 0.25rem 0.5rem; }
.consent input[type="checkbox"] { width: 1.5rem; height: 1.5rem; margin: 0.6rem 0 0 0.6rem; accent-color: var(--accent); }
.consent label { font-weight: 400; margin: 0.35rem 0 0; }

/* Honeypot: off-screen (not display:none, which some bots skip), unreachable by keyboard (tabindex=-1) and hidden from assistive technology (aria-hidden). */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

button[type="submit"] {
  min-height: 2.75rem;
  padding: 0.5rem 1.5rem;
  border: 0;
  border-radius: 0.5rem;
  background: var(--accent);
  color: var(--accent-fg);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
button[disabled] { opacity: 0.6; cursor: not-allowed; }

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

.msg { margin: 1rem 0 0; min-height: 1.5rem; font-weight: 600; }
.msg.ok { color: var(--ok); }
.msg.bad { color: var(--danger); }

.banner { margin: 1rem 0; padding: 0.75rem 1rem; border-radius: 0.5rem; background: var(--banner-bg); color: var(--banner-fg); font-weight: 600; }
[hidden] { display: none !important; }

.privacy { margin-top: 2rem; padding: 0.5rem 1rem; border: 1px solid var(--line); border-radius: 0.5rem; background: var(--card); }
.privacy summary { min-height: 2.75rem; display: flex; align-items: center; cursor: pointer; font-weight: 600; }
.privacy dt { font-weight: 700; margin-top: 0.75rem; }
.privacy dd { margin: 0.1rem 0 0; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media (forced-colors: active) {
  button[type="submit"], .lang { border: 2px solid ButtonText; }
}
