/* style.css — letterling.app
   Ink on ruled paper. The same four lines the app writes between. */

:root {
  --paper:   #F7F9FC;
  --card:    #FFFFFF;
  --ink:     #1A2430;
  --ink-2:   #4E5F70;
  --ink-3:   #7F8E9C;
  --rule:    #C9D9EC;
  --base:    #7FA3CB;
  --edge:    #E3EAF2;
  --pencil:  #BE7324;
  --pencil-soft: #FBF2E7;
  --go:      #2A7550;
  --go-soft: #E9F4EE;

  /* the app's own: its home screen is this purple, and the title letters
     run white, yellow, mint, the way they do on the device */
  --app-bg:    #6D3BD1;
  --app-white: #FFFFFF;
  --app-amber: #FFD93D;
  --app-mint:  #9BFFD9;

  --fun: "Baloo 2", "Chalkboard SE", "Comic Sans MS", system-ui, sans-serif;
  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --body: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #11161B; --card: #18202A; --ink: #E8EEF5; --ink-2: #A8B7C5;
    --ink-3: #748391; --rule: #27333F; --base: #43638C; --edge: #233039;
    --pencil: #E0A063; --pencil-soft: #241A10;
    --go: #6FC59B; --go-soft: #132420;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  padding-inline: 20px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 44rem; margin-inline: auto; padding-block: 2rem 5rem; }

/* ---------------- masthead ---------------- */

.masthead {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
  padding-block: 0.5rem 1.6rem;
}
.masthead a.home { text-decoration: none; }
.logo {
  font-family: var(--fun); font-weight: 800; font-size: 1.35rem;
  letter-spacing: -0.01em; color: var(--ink);
}
nav.top { display: flex; gap: 1.2rem; font-size: 0.92rem; }
nav.top a { color: var(--ink-2); text-decoration: none; }
nav.top a:hover, nav.top a[aria-current] { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

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

.hero { padding-block: 1rem 2rem; }

/* THE TITLE CARD IS THE APP'S HOME SCREEN. Two rows of letters sitting on a
   shared bottom edge, on the same purple, in the same colour rhythm — so the
   thing a parent sees here is the thing their child sees on the iPad. */
.titlecard {
  background: var(--app-bg);
  border-radius: 22px;
  padding: clamp(1.6rem, 6vw, 2.6rem) 1.5rem;
  margin-bottom: 1.8rem;
  display: flex; flex-direction: column; align-items: center;
}
.titlecard .trow { display: flex; align-items: flex-end; justify-content: center; }
.titlecard .trow span {
  display: block; font-family: var(--fun); font-weight: 800;
  line-height: 0.92; font-size: clamp(44px, 13vw, 78px);
  color: var(--app-white);
}
.titlecard .trow span:nth-child(2n) { color: var(--app-amber); }
.titlecard .trow span:nth-child(3n) { color: var(--app-mint); }
.hero p.lead {
  font-family: var(--display);
  font-size: clamp(1.3rem, 4.2vw, 1.75rem);
  line-height: 1.32;
  color: var(--ink);
  margin: 0 0 1rem;
  max-width: 30rem;
  text-wrap: balance;
}
.hero p.sub { color: var(--ink-2); margin: 0; max-width: 32rem; }

/* ---------------- ruled divider ---------------- */

.ruling { position: relative; height: 38px; margin-block: 2.4rem; }
.ruling::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(var(--rule), var(--rule)) 0 0     / 100% 1px   no-repeat,
    linear-gradient(var(--rule), var(--rule)) 0 33.3% / 100% 1px   no-repeat,
    linear-gradient(var(--base), var(--base)) 0 66.6% / 100% 1.5px no-repeat,
    linear-gradient(var(--rule), var(--rule)) 0 100%  / 100% 1px   no-repeat;
}

/* ---------------- type ---------------- */

h1 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(2rem, 6vw, 2.8rem); line-height: 1.1;
  letter-spacing: -0.015em; margin: 0 0 0.8rem; text-wrap: balance;
}
h2 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(1.35rem, 3.6vw, 1.65rem); line-height: 1.22;
  margin: 2.4rem 0 0.7rem; text-wrap: balance;
}
h2:first-child { margin-top: 0; }
h3 { font-size: 1rem; font-weight: 700; margin: 1.7rem 0 0.4rem; }
p { margin: 0 0 1.05rem; }
p:last-child { margin-bottom: 0; }
ul { padding-left: 1.2rem; margin: 0 0 1.05rem; }
li { margin-bottom: 0.5rem; }
li::marker { color: var(--ink-3); }
a { color: var(--pencil); text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:focus-visible { outline: 2px solid var(--pencil); outline-offset: 3px; border-radius: 3px; }
strong { font-weight: 700; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--pencil-soft); padding: 0.1em 0.35em; border-radius: 3px; }

.eyebrow {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-3); margin: 0 0 0.8rem;
}

/* ---------------- feature list ---------------- */

.points { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.4rem; }
.points li { margin: 0; }
.points h3 { margin: 0 0 0.25rem; }
.points p { margin: 0; color: var(--ink-2); font-size: 0.97rem; }

/* ---------------- callout ---------------- */

.card {
  background: var(--card); border: 1px solid var(--edge);
  border-radius: 8px; padding: 1.1rem 1.25rem; margin: 0 0 1.05rem;
}
.card p { font-size: 0.96rem; color: var(--ink-2); }
.card p strong { color: var(--ink); }

.badge {
  display: inline-block; font-family: var(--mono); font-size: 0.74rem;
  letter-spacing: 0.06em; background: var(--go-soft); color: var(--go);
  border: 1px solid var(--go); border-radius: 999px; padding: 0.3rem 0.75rem;
}

/* ---------------- faq ---------------- */

details {
  border-bottom: 1px solid var(--edge); padding-block: 0.85rem;
}
details summary {
  cursor: pointer; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
}
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--ink-3); font-weight: 400; font-size: 1.2rem; line-height: 1; }
details[open] summary::after { content: "\2013"; }
details summary:focus-visible { outline: 2px solid var(--pencil); outline-offset: 3px; border-radius: 3px; }
details > :not(summary) { margin-top: 0.7rem; color: var(--ink-2); font-size: 0.97rem; }

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

footer.site {
  margin-top: 3rem; padding-top: 1.3rem; border-top: 1px solid var(--edge);
  font-size: 0.86rem; color: var(--ink-3);
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; align-items: baseline;
}
footer.site a { color: var(--ink-2); }
footer.site .spacer { flex: 1 1 auto; }

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