:root {
  --accent: #6495ED;
  /* Nudged from #3f74d8 so links and the button clear WCAG AA (4.5:1)
     on white; visually identical. */
  --accent-dark: #3e72d5;
  /* Hover color for links/button: must still pass AA in each scheme. */
  --accent-hover: #3a6cce;
  --btn-text: #ffffff;
  --accent-soft: rgba(100, 149, 237, 0.12);
  --text: #1c1c1e;
  --text-dim: #6a6a70;
  --rule: #e6e6ea;
  --bg: #ffffff;
  --card: #f7f8fa;
  --card-border: #ebecf0;
  --shadow: rgba(20, 30, 60, 0.1);
  --max: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent: #7ea6f0;
    --accent-dark: #6495ED;
    --accent-hover: #7ea6f0;
    /* Cornflower is too light for white text (3:1); the app's own Add
       button uses dark text on this blue, so match it. */
    --btn-text: #131316;
    --accent-soft: rgba(126, 166, 240, 0.16);
    --text: #ececee;
    --text-dim: #9a9aa2;
    --rule: #2a2a2f;
    --bg: #131316;
    --card: #1c1c20;
    --card-border: #29292f;
    --shadow: rgba(0, 0, 0, 0.4);
  }
}

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

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

/* iOS Safari lets you pan sideways with overflow-x: hidden on body alone;
   clip on both elements actually locks the width. */
html,
body {
  overflow-x: clip;
}

body {
  margin: 0;
  padding: 0 1.25rem 4rem;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
    Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
}

a {
  color: var(--accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--accent-hover);
  text-decoration-thickness: 2px;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  text-align: center;
  padding: 4.5rem 0 0;
}

/* Soft accent wash behind the icon — the one bit of color on the page. */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40rem;
  max-width: 100vw;
  height: 24rem;
  background: radial-gradient(
    ellipse 50% 50% at 50% 40%,
    var(--accent-soft),
    transparent 70%
  );
  pointer-events: none;
  z-index: -1;
}

.hero img.icon {
  width: 132px;
  height: 132px;
  border-radius: 29px;
  display: block;
  margin: 0 auto 1.5rem;
  box-shadow: 0 10px 34px -6px var(--shadow);
}

h1 {
  font-size: 3rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 0.625rem;
}

.tagline {
  font-size: 1.3125rem;
  line-height: 1.45;
  color: var(--text-dim);
  margin: 0 auto;
  /* Wide enough to sit on one line on desktop; wraps on narrow screens, where
     text-wrap keeps the two lines evenly weighted instead of orphaning a word. */
  max-width: 34rem;
  text-wrap: balance;
}

/* ---------- Download ---------- */

.download {
  text-align: center;
  padding: 1.75rem 0 3rem;
}

/* The tagline and the button are one unit; keep them close. */
.hero + .download {
  padding-top: 1.5rem;
}

.btn {
  display: inline-block;
  background: var(--accent-dark);
  color: var(--btn-text);
  font-size: 1.0625rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.8125rem 2.25rem;
  border-radius: 999px;
  box-shadow: 0 4px 14px -4px var(--shadow);
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  background: var(--accent-hover);
  color: var(--btn-text);
  transform: translateY(-1px);
}

.btn[aria-disabled="true"] {
  background: var(--card);
  color: var(--text-dim);
  border: 1px solid var(--card-border);
  box-shadow: none;
  cursor: default;
}

.btn[aria-disabled="true"]:hover {
  transform: none;
  background: var(--card);
  color: var(--text-dim);
}

.requirements {
  margin: 1rem 0 0;
  font-size: 0.9375rem;
  color: var(--text-dim);
}

/* ---------- Sections ---------- */

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

h2 {
  font-size: 1.625rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0 0 1rem;
}

p {
  margin: 0 0 1.125rem;
}

strong {
  font-weight: 600;
}

/* ---------- Kinds: emoji medallion + text ---------- */

.kinds {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0.5rem;
}

.kinds li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 0.9375rem 0;
  border-bottom: 1px solid var(--rule);
}

.kinds li:last-child {
  border-bottom: 0;
}

/* Echoes the app's emoji medallion. */
.medallion {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.375rem;
  line-height: 1;
}

.kinds .body {
  flex: 1 1 auto;
  min-width: 0;
  padding-top: 0.125rem;
}

.kinds .label {
  font-weight: 600;
  display: block;
}

.kinds .desc {
  color: var(--text-dim);
  display: block;
}

/* ---------- Feature grid (icon cards) ---------- */

.features {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0.5rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.875rem;
}

.features li {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1.125rem 1.25rem;
}

.features svg {
  width: 22px;
  height: 22px;
  stroke: var(--accent-dark);
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 0.625rem;
  display: block;
}

.features .label {
  font-weight: 600;
  display: block;
  margin-bottom: 0.125rem;
}

.features .desc {
  color: var(--text-dim);
  font-size: 0.9375rem;
  line-height: 1.5;
  display: block;
}

/* ---------- Code block ---------- */

pre {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.125rem 1.25rem;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.55;
  margin: 0 0 1.125rem;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

p code {
  background: var(--card);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  font-size: 0.9em;
}

.footnote {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-dim);
  margin: -0.375rem 0 1.375rem;
}

/* ---------- Screenshots ---------- */

.shots {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  margin: 2rem 0 1rem;
}

.shots img {
  width: 220px;
  max-width: 100%;
  height: auto;
  border-radius: 26px;
  border: 1px solid var(--card-border);
  box-shadow: 0 12px 32px -10px var(--shadow);
}

@media (max-width: 34rem) {
  /* Two up on a phone rather than one huge shot per row. */
  .shots img {
    width: calc(50% - 0.5rem);
  }
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--rule);
  margin-top: 3rem;
  padding-top: 1.75rem;
  text-align: center;
  font-size: 0.9375rem;
  color: var(--text-dim);
}

footer p {
  margin: 0 0 0.5rem;
}

/* ---------- Small screens ---------- */

@media (max-width: 34rem) {
  .hero {
    padding-top: 3rem;
  }

  h1 {
    font-size: 2.25rem;
  }

  .tagline {
    font-size: 1.1875rem;
  }

  h2 {
    font-size: 1.4375rem;
  }

  .features {
    grid-template-columns: 1fr;
  }
}
