/*
 * upnodai.com: one small stylesheet, no web fonts (the system font, like the app), no scripts.
 * Brand colours (decision 2026-11-18): indigo is the only accent; teal only for a "good" signal.
 * Contrast (WCAG 2.2 AA) is checked by the axe tests in e2e/smoke.spec.ts.
 */
:root {
  --bg: #f6f2ea;
  --card: #fffdf9;
  --text: #14193a;
  --muted: #646a85;
  --border: #e4dfd3;
  --accent: #3b4bd8;
  --accent-hover: #2f3db8;
  --good: #2ba999;
  --radius: 20px;
  --font:
    system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    sans-serif;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
a:hover {
  color: var(--accent-hover);
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
main:focus {
  outline: none;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}
p {
  margin: 0 0 1em;
}

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}
.narrow {
  max-width: 640px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  background: var(--card);
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  z-index: 10;
}
.skip:focus {
  top: 12px;
}

/* ---------------------------------------------------------------- header */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  min-height: 44px;
}
.brand:hover {
  color: var(--text);
}
.mark {
  flex: none;
  display: block;
}
/*
 * The drawing is 15% larger than the indigo square (the teal accent sticks out at the
 * bottom-right): negative margins keep the square's own size for alignment.
 */
.mark-32 {
  margin: 0 -5px -5px 0;
}
.mark-20 {
  margin: 0 -3px -3px 0;
}
.lang {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.lang:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------------------------------------------------------------- hero */

.hero {
  display: grid;
  gap: 40px;
  align-items: center;
  padding-top: 32px;
  padding-bottom: 56px;
}
.soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  font-weight: 600;
  font-size: 0.95rem;
}
.soon-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
h1 {
  font-size: clamp(2.4rem, 7vw, 4.1rem);
  font-weight: 750;
  max-width: 13ch;
}
.lead {
  font-size: clamp(1.15rem, 2.4vw, 1.35rem);
  color: var(--muted);
  max-width: 34ch;
  margin: 0;
}

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

/* Demo card (product-like output, always labelled "Demo data") */
.demo {
  margin: 0;
  max-width: 400px;
  width: 100%;
  justify-self: center;
  box-shadow:
    0 1px 2px rgb(20 25 58 / 4%),
    0 12px 32px rgb(20 25 58 / 6%);
}
.badge {
  display: inline-block;
  margin: 0 0 16px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.demo-title {
  font-weight: 700;
  margin: 0;
}
.demo-question {
  color: var(--muted);
  margin: 0 0 18px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.cell {
  aspect-ratio: 1;
  border-radius: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
}
.cell::after {
  content: '';
  width: 30%;
  height: 30%;
  border-radius: 50%;
  border: 2px solid #b9b4a8;
}
.cell.is-named::after {
  border: 0;
  background: var(--good);
}
.demo-summary {
  font-weight: 700;
  margin: 0 0 8px;
}
.legend {
  display: flex;
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.9rem;
}
.legend li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #b9b4a8;
}
.dot.is-named {
  border: 0;
  background: var(--good);
}
.demo figcaption {
  color: var(--muted);
  font-size: 0.875rem;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

/* ---------------------------------------------------------------- sections */

.section {
  padding-top: 24px;
  padding-bottom: 40px;
}
h2 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 720;
}
.points {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  display: grid;
  gap: 16px;
}
.point h3 {
  font-size: 1.25rem;
  margin-top: 16px;
}
.point p {
  color: var(--muted);
  margin: 0;
}
.num {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}
.honest {
  color: var(--muted);
  max-width: 60ch;
}

.stat {
  margin: 0;
  display: grid;
  gap: 8px 32px;
  align-items: center;
}
.figure {
  font-size: clamp(3.5rem, 12vw, 5.5rem);
  font-weight: 780;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--accent);
  margin: 0;
}
.stat-body {
  font-size: clamp(1.15rem, 2.6vw, 1.4rem);
  font-weight: 600;
  margin: 0;
  max-width: 40ch;
}
.source {
  color: var(--muted);
  font-size: 0.95rem;
}

.launch {
  text-align: left;
}
.launch > p {
  color: var(--muted);
  max-width: 52ch;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0 0;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
.button:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}
.button.secondary {
  background: var(--card);
  color: var(--accent);
}
.button.secondary:hover {
  background: var(--bg);
  color: var(--accent-hover);
}

/* Waitlist form (only rendered when the switch is on) */
.waitlist {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  max-width: 520px;
}
.waitlist h3 {
  font-size: 1.2rem;
}
.waitlist label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}
.waitlist input[type='email'] {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid #8d8a83;
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
}
.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
  margin: 16px 0 8px;
}
.consent input {
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}
.consent label {
  font-weight: 500;
  margin: 0;
}
.fine {
  color: var(--muted);
  font-size: 0.9rem;
}
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------------------------------------------------------------- privacy, messages */

.prose {
  max-width: 760px;
  margin-top: 16px;
  margin-bottom: 48px;
}
.prose h1 {
  font-size: clamp(2rem, 6vw, 2.8rem);
  max-width: none;
}
.prose h2 {
  font-size: 1.3rem;
  margin-top: 1.8em;
}
.updated {
  color: var(--muted);
}
.message {
  margin-top: 24px;
  margin-bottom: 64px;
}
.message h1 {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  max-width: none;
}
.message h2 {
  font-size: 1.4rem;
  margin-top: 1.6em;
}

/* ---------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 32px;
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 0.95rem;
}
.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  align-items: center;
  justify-content: space-between;
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin: 0;
}
/* One line when the three links fit; on phones they stack evenly (never two plus one). */
.footer-links {
  display: flex;
  gap: 4px 20px;
  list-style: none;
  padding: 0;
  margin: 0;
}
@media (max-width: 599px) {
  .footer-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-links {
    flex-direction: column;
    gap: 0;
  }
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* ---------------------------------------------------------------- wider screens */

@media (min-width: 760px) {
  .points {
    grid-template-columns: repeat(3, 1fr);
  }
  .stat {
    grid-template-columns: auto 1fr;
    padding: 40px;
  }
  .stat .source {
    grid-column: 2;
  }
  .launch {
    padding: 40px;
  }
}
@media (min-width: 960px) {
  .hero {
    grid-template-columns: 1.25fr 1fr;
    gap: 64px;
    padding-top: 56px;
    padding-bottom: 80px;
  }
  .demo {
    justify-self: end;
  }
}

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