/* Matches the Binder Bounty app: sleeve greys, binder indigo, Young Serif titles, Onest text. */
:root {
  --background: #eef0f6;
  --surface: #ffffff;
  --border: #daddea;
  --text: #1b1f3b;
  --text-muted: #555b7e;
  --primary: #3b3fb6;
  --primary-strong: #2c2f93;
  --on-primary: #ffffff;
  --primary-soft: #e3e4f8;
  --gold-soft: #f6ebcb;
  --gold: #7a5a0e;
  --shadow: 0 12px 32px rgba(27, 31, 59, 0.12);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #121426;
    --surface: #1b1e36;
    --border: #2e3356;
    --text: #ecedf7;
    --text-muted: #a3a7c9;
    --primary: #a9acff;
    --primary-strong: #c5c7ff;
    --on-primary: #121426;
    --primary-soft: #2a2e5e;
    --gold-soft: #3a3120;
    --gold: #e8bf52;
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: 'Onest', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  /* The home page's hero band spans the full window width; this stops it adding a sideways scroll. */
  overflow-x: clip;
}

img {
  max-width: 100%;
}

.draft-banner {
  margin: 0;
  padding: 0.5rem 1rem;
  background: var(--gold-soft);
  color: var(--gold);
  font-weight: 600;
  font-size: 0.875rem;
  text-align: center;
}

/* Page widths: documents stay narrow for reading, the home page and the header and footer go wider. */
.site-header-inner,
.site-footer-inner,
main.home {
  max-width: 68rem;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

main.document {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  text-decoration: none;
  font-family: 'Young Serif', Georgia, serif;
  font-size: 1.375rem;
}

.brand img {
  border-radius: 10px;
}

.brand-small {
  font-size: 1.125rem;
  gap: 0.5rem;
}

.brand-small img {
  border-radius: 8px;
}

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.25rem;
}

nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

nav a:hover,
nav a[aria-current='page'] {
  color: var(--text);
  border-bottom-color: var(--primary);
}

nav a.nav-download {
  color: var(--on-primary);
  background: var(--primary);
  border: none;
  border-radius: 999px;
  padding: 0.375rem 1rem;
}

nav a.nav-download:hover {
  color: var(--on-primary);
  background: var(--primary-strong);
}

/* Text */

h1,
h2,
h3 {
  font-family: 'Young Serif', Georgia, serif;
  font-weight: 400;
  line-height: 1.25;
}

h1 {
  font-size: 2rem;
  margin: 0.5rem 0 1rem;
}

h2 {
  font-size: 1.375rem;
  margin: 2.25rem 0 0.5rem;
}

h3 {
  font-size: 1.125rem;
  margin: 0 0 0.375rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

li + li {
  margin-top: 0.25rem;
}

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

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Tables scroll sideways on narrow phones instead of widening the page. */
table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid var(--border);
  min-width: 9rem;
}

th {
  font-weight: 600;
  background: var(--primary-soft);
}

tr:last-child td {
  border-bottom: none;
}

/* Legal page list */

.document-list {
  list-style: none;
  padding: 0;
}

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

.document-list li + li {
  margin-top: 0.75rem;
}

.document-list a {
  font-weight: 600;
  text-decoration: none;
}

.document-list p {
  margin: 0.25rem 0 0;
  color: var(--text-muted);
}

/* Support questions */

details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 0.625rem;
}

summary {
  cursor: pointer;
  padding: 0.875rem 1.25rem;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: '+';
  color: var(--primary);
  font-size: 1.25rem;
  line-height: 1.2;
}

details[open] summary::after {
  content: '−';
}

details p {
  margin: 0;
  padding: 0 1.25rem 1rem;
  color: var(--text-muted);
}

/* Store badges */

.store-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0 1rem;
}

.store-badge {
  display: inline-flex;
}

.store-badge img {
  display: block;
  height: 50px;
  width: auto;
}

/* Google's badge has clear space built into the image, so it's drawn larger to look the same size. */
.store-badge img.google-play-badge {
  height: 74px;
  margin: -12px;
}

.store-badge-pending {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 0 1.125rem;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9375rem;
}

/* Home page */

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* The hero is a night-purple band in both themes, matching the app image so the picture fades into it. */
.hero-band {
  --hero-text: #f3f0ff;
  --hero-text-muted: #c9c3ec;
  --hero-accent: #c4b5ff;
  margin: 0 calc(50% - 50vw);
  padding: 0 calc(50vw - 50%);
  color: var(--hero-text);
  background:
    radial-gradient(ellipse 45% 70% at 78% 55%, rgba(124, 77, 255, 0.45), transparent 70%),
    linear-gradient(180deg, #1d1466 0%, #160e47 60%, #100a30 100%);
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 2.5rem;
  padding: 3rem 0 2.5rem;
}

.hero .eyebrow {
  color: var(--hero-accent);
}

.hero h1 {
  font-size: clamp(2.125rem, 5vw, 3.25rem);
  margin: 0 0 1rem;
}

.lead {
  font-size: 1.1875rem;
  color: var(--hero-text-muted);
  max-width: 34rem;
}

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

.hero .store-badge-pending {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.28);
  color: var(--hero-text);
}

.hero a:focus-visible {
  outline-color: var(--hero-accent);
}

/* The picture's edges fade out so it sits in the band rather than on top of it. */
.hero-visual img {
  display: block;
  width: 100%;
  max-width: 30rem;
  height: auto;
  margin: 0 auto;
  -webkit-mask-image:
    linear-gradient(to right, transparent, #000 14%, #000 86%, transparent),
    linear-gradient(to bottom, transparent, #000 12%, #000 84%, transparent);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent, #000 14%, #000 86%, transparent),
    linear-gradient(to bottom, transparent, #000 12%, #000 84%, transparent);
  mask-composite: intersect;
}

.section {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

.hero-band + .section {
  border-top: none;
}

.section h2 {
  font-size: clamp(1.625rem, 3.5vw, 2.125rem);
  margin: 0 0 1.5rem;
}

.section-lead {
  margin-top: -0.75rem;
  margin-bottom: 1.75rem;
  max-width: 40rem;
  color: var(--text-muted);
  font-size: 1.0625rem;
}

.section-note {
  margin: 1.5rem 0 0;
  max-width: 44rem;
  color: var(--text-muted);
}

.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.steps li {
  counter-increment: step;
  margin: 0;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.steps li::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.75rem;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
}

.steps p,
.feature p {
  margin: 0;
  color: var(--text-muted);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.feature {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.feature h3 {
  color: var(--primary);
}

/* Screenshots scroll sideways on phones. */
.screenshots {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.75rem;
}

.screenshots figure {
  flex: 0 0 min(15rem, 70%);
  margin: 0;
  scroll-snap-align: start;
}

.screenshots img {
  display: block;
  width: 100%;
  border-radius: 20px;
  border: 1px solid var(--border);
}

.screenshots figcaption {
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem 2rem;
  max-width: 60rem;
}

.check-list li {
  margin: 0;
  padding-left: 1.75rem;
  position: relative;
  color: var(--text-muted);
}

.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 600;
}

.check-list strong {
  color: var(--text);
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 52rem;
}

.plan {
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.plan-highlight {
  border: 2px solid var(--primary);
}

.plan-price {
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.plan ul {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--text-muted);
}

.download {
  margin: 1rem 0 3.5rem;
  padding: 2.5rem 1.25rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
}

.download img {
  border-radius: 20px;
}

.download h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin: 1rem 0 0.25rem;
}

.download p {
  color: var(--text-muted);
}

.download .store-badges {
  justify-content: center;
}

.download-help {
  margin: 0;
  font-size: 0.9375rem;
}

@media (max-width: 52rem) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 2rem;
  }

  .hero-visual img {
    max-width: 24rem;
  }

  .steps,
  .feature-grid,
  .check-list,
  .plan-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 52rem) and (max-width: 64rem) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.site-footer-inner {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.footer-columns {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-columns p {
  margin: 0.5rem 0 0;
}

.footer-columns h2 {
  font-family: 'Onest', system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  margin: 0 0 0.5rem;
}

.footer-columns ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-columns a:not(.brand) {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-columns a:not(.brand):hover {
  color: var(--primary);
  text-decoration: underline;
}

.footer-small {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
}

@media (max-width: 52rem) {
  .footer-columns {
    grid-template-columns: 1fr 1fr;
  }

  .footer-columns > div:first-child {
    grid-column: 1 / -1;
  }
}
