/* Light is the base palette; only the tokens change in dark. */
:root {
  --bg: #f6f6fb;
  --panel: #ffffff;
  --text: #17172b;
  --muted: #5a5a72;
  --line: #e2e2ee;
  --accent: #4a45c9;
  --accent-soft: #ecebfa;
  --shadow: 0 1px 2px rgba(20, 20, 50, 0.06), 0 8px 24px rgba(20, 20, 50, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101018;
    --panel: #1a1a26;
    --text: #f0f0f6;
    --muted: #a6a6bd;
    --line: #2c2c3d;
    --accent: #a8a4ff;
    --accent-soft: #23223a;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

/* index.html splits the column around the full-width panorama. */
.wrap-head { padding-bottom: 0; }
.wrap-body { padding-top: 0; }

header.site {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

header.site a.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

header.site nav { margin-left: auto; display: flex; gap: 1.25rem; }
header.site nav a { color: var(--muted); text-decoration: none; font-size: 0.925rem; }
header.site nav a:hover { color: var(--accent); }

h1 {
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.2rem;
  letter-spacing: -0.01em;
  margin: 2.5rem 0 0.75rem;
}

h3 { font-size: 1rem; margin: 1.75rem 0 0.4rem; }

p, li { color: var(--text); }
.lede { font-size: 1.075rem; color: var(--muted); margin-top: 0; }
.updated { color: var(--muted); font-size: 0.875rem; margin: 0 0 2rem; }

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

ul { padding-left: 1.25rem; }
li { margin: 0.4rem 0; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  box-shadow: var(--shadow);
  margin: 1.25rem 0;
}

.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

.callout {
  background: var(--accent-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}
.callout p { margin: 0; }

.tiles { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-top: 2rem; }
@media (min-width: 34rem) { .tiles { grid-template-columns: 1fr 1fr; } }

a.tile {
  display: block;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
}
a.tile:hover { border-color: var(--accent); }
a.tile strong { display: block; margin-bottom: 0.2rem; }
a.tile span { color: var(--muted); font-size: 0.925rem; }

/* Contact form */
label { display: block; font-weight: 600; font-size: 0.925rem; margin: 1rem 0 0.35rem; }
.hint { font-weight: 400; color: var(--muted); }

input[type="text"], input[type="email"], textarea, select {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
}
input:focus, textarea:focus, select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: transparent;
}
textarea { min-height: 9rem; resize: vertical; }

/* Bot trap: off-screen rather than display:none, which some bots skip. */
.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

button {
  font: inherit;
  font-weight: 600;
  margin-top: 1.25rem;
  padding: 0.7rem 1.4rem;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}
button:hover { filter: brightness(1.08); }
button[disabled] { opacity: 0.55; cursor: default; }

@media (prefers-color-scheme: dark) { button { color: #16162a; } }

.status { margin-top: 1rem; padding: 0.85rem 1rem; border-radius: 10px; display: none; }
.status.show { display: block; }
.status.ok { background: var(--accent-soft); border: 1px solid var(--accent); }
.status.err { background: var(--accent-soft); border: 1px solid var(--line); }

footer.site {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}
footer.site a { color: var(--muted); }


/* App icon: one black-on-white mark in both themes rather than a light/dark
   pair, so it reads the same way everywhere. White sits very close to the light
   page background, so a hairline keeps its edge visible there; the radius
   approximates the iOS squircle. */
.logo {
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 22.4%;
  border: 1px solid var(--line);
}

/* Panorama.
   The six App Store panels join into one continuous picture, so it is shown as
   one image rather than a grid of tiles — a grid would put gaps through the
   wave and mascots that run across the seams.

   It sits OUTSIDE the prose column as its own full-width section. Spanning the
   viewport from inside that column would need `calc(50% - 50vw)` margins, and
   `100vw` counts the vertical scrollbar that the layout width excludes — so the
   element overhangs the left edge by the scrollbar width, which then makes the
   whole page scroll sideways and drift off centre. No vw units, no drift. */
.panorama {
  margin: 2.5rem 0;
  padding: 0;
}

.panorama-scroll {
  display: flex;
  padding: 0 1.25rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

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

/* The auto margins belong on <picture>, because that is the element the flex
   container lays out — the <img> is its child, so auto margins there have no
   free space to distribute and the picture stays pinned to the start.

   `margin: auto` and not `justify-content: center`: the latter clips whatever
   spills past the left edge of a scroll container and puts it out of reach.
   This centres the picture when it fits and leaves it reachable when it does
   not. */
.panorama-scroll > picture {
  display: block;
  margin: auto;
}

.panorama-scroll img {
  display: block;
  height: 340px;
  width: auto;
  max-width: none;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

@media (max-width: 40rem) {
  .panorama-scroll img { height: 220px; }
}

