/* withrinn.com. Every colour is a token below, copied from
 * apps/rinn-web/src/theme.ts (the Rinn light and dark palettes). Rules
 * further down only use var(--...). src/page.test.ts fails on a hex literal
 * anywhere outside these theme blocks. */

@font-face {
  font-family: "Quicksand";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/quicksand-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* theme:light */
:root,
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #fcfcfc;
  --card-bg: #ffffff;
  --input-bg: rgba(0, 0, 0, 0.05);
  --border: #eaeaea;
  --input-border: rgba(0, 0, 0, 0.08);
  --text-primary: #171717;
  --text-secondary: #666666;
  --text-muted: #999999;
  --accent: #2371f7;
  --accent-text: #ffffff;
  --accent-soft: rgba(35, 113, 247, 0.07);
  --live: #02c44a;
  --danger: #e2201b;
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  --pop-shadow: 0 12px 32px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.06);
}

/* theme:dark */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0a0a;
  --card-bg: #111111;
  --input-bg: #1a1a1a;
  --border: #1f1f1f;
  --input-border: #333333;
  --text-primary: #ededed;
  --text-secondary: #888888;
  --text-muted: #666666;
  --accent: #2371f7;
  --accent-text: #ffffff;
  --accent-soft: rgba(35, 113, 247, 0.1);
  --live: #02c44a;
  --danger: #e2201b;
  --card-shadow: none;
  --pop-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* System preference when nothing has been picked (no data-theme). */
@media (prefers-color-scheme: dark) {
  /* theme:dark */
  :root:not([data-theme]) {
    color-scheme: dark;
    --bg: #0a0a0a;
    --card-bg: #111111;
    --input-bg: #1a1a1a;
    --border: #1f1f1f;
    --input-border: #333333;
    --text-primary: #ededed;
    --text-secondary: #888888;
    --text-muted: #666666;
    --accent-soft: rgba(35, 113, 247, 0.1);
    --card-shadow: none;
    --pop-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  }
}
/* end theme */

:root {
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;
  --font: "Quicksand", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --column: 680px;
}

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

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

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

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 12px;
  background: var(--card-bg);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  z-index: 10;
}

.column {
  width: 100%;
  max-width: var(--column);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header ─────────────────────────────────────────────────────────── */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.brand svg {
  width: 22px;
  height: 20px;
  color: var(--accent);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}
.icon-button:hover {
  color: var(--text-primary);
}
.icon-button svg {
  width: 16px;
  height: 16px;
}
/* The toggle shows the icon for the current choice only. */
.theme-icon {
  display: none;
}
[data-choice="system"] .theme-icon[data-for="system"],
[data-choice="light"] .theme-icon[data-for="light"],
[data-choice="dark"] .theme-icon[data-for="dark"] {
  display: block;
}

.quiet-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
}
.quiet-link:hover {
  color: var(--text-primary);
  background: var(--input-bg);
}

/* ── Hero ───────────────────────────────────────────────────────────── */

.hero {
  padding-block: 56px 24px;
}

.kicker {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 52px);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.lede {
  margin: 20px 0 0;
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 34em;
}

/* ── Form ───────────────────────────────────────────────────────────── */

.join {
  margin-top: 32px;
}

.join-row {
  display: flex;
  gap: 8px;
  max-width: 460px;
}

.field {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text-primary);
  font: inherit;
  font-size: 15px;
}
.field::placeholder {
  color: var(--text-muted);
}
textarea.field {
  height: auto;
  min-height: 76px;
  padding: 10px 14px;
  resize: vertical;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: var(--accent-text);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
.button:hover {
  filter: brightness(1.06);
}
.button[disabled] {
  opacity: 0.6;
  cursor: default;
}
.button svg {
  width: 16px;
  height: 16px;
}

.more {
  margin-top: 12px;
  max-width: 460px;
  font-size: 14px;
  color: var(--text-secondary);
}
.more summary {
  cursor: pointer;
  width: fit-content;
  list-style: none;
}
.more summary::-webkit-details-marker {
  display: none;
}
.more summary:hover {
  color: var(--text-primary);
}
.more-fields {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

/* Kept off-screen, not display:none, so bots still fill it in. */
.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note {
  margin: 12px 0 0;
  min-height: 1.5em;
  font-size: 14px;
  color: var(--text-muted);
}
.form-note[data-state="error"] {
  color: var(--danger);
}

.joined {
  display: none;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
  font-size: 16px;
  font-weight: 500;
}
.joined svg {
  width: 20px;
  height: 20px;
  color: var(--live);
}
.join[data-state="joined"] .join-form {
  display: none;
}
.join[data-state="joined"] .joined {
  display: flex;
}

/* ── Hero outcomes ─────────────────────────────────────────────────── */

.outcomes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}
.outcomes li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.outcomes svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
}

/* ── Sections ───────────────────────────────────────────────────────── */

.column.wide {
  max-width: 1000px;
}

h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.showcase {
  padding-block: 32px 72px;
}

.gets,
.close {
  position: relative;
}
.gets {
  padding-block: 56px 56px;
}
.gets::before,
.close::before {
  content: "";
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  border-top: 1px solid var(--border);
}
.gets-list {
  display: grid;
  gap: 26px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 720px) {
  .gets-list {
    grid-template-columns: repeat(3, 1fr);
  }
}
.gets-list h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 600;
}
.gets-list p {
  margin: 0;
  color: var(--text-secondary);
}
.private {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 32px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  font-size: 14px;
  color: var(--text-primary);
}
.private svg {
  flex: none;
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.close {
  padding-block: 64px 72px;
}
.close p {
  margin: 10px 0 24px;
  color: var(--text-secondary);
}

footer {
  padding: 24px 0 40px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}
footer .column {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ── Simple pages (/thanks/, /try-again/, 404) ──────────────────────── */

.simple {
  padding-block: 96px;
}
.simple p {
  margin: 12px 0 28px;
  color: var(--text-secondary);
}

@media (max-width: 560px) {
  .hero {
    padding-block: 44px 28px;
  }
  .join-row {
    flex-direction: column;
  }
  .join-row .field {
    flex: none;
    width: 100%;
  }
  .button {
    justify-content: center;
  }
  .outcomes {
    flex-direction: column;
  }
}
