/* The showcase page: warm paper and PT Serif and PT Sans (ParaType's, made for Cyrillic), short text beside the app's
   clips, the clips as the app's dark screens. Mobile first: one column on a phone; from 48rem, the hero,
   the steps, the clips, the AI section and joining sit side by side. */
:root {
  color-scheme: light;
  --paper: #f6f4ef;
  --ink: #1e1c19;
  --ink-soft: #4b463f;
  --muted: #6b6358;
  --line: #dcd8cf;
  --accent: #2b5a86;
  --serif: "PT Serif", Georgia, serif;
  --sans: "PT Sans", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 18px/1.55 var(--serif);
  -webkit-text-size-adjust: 100%;
}
a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
img { display: block; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
h1 { font-size: 2.125rem; line-height: 1.12; }
h2 { font-size: 1.625rem; line-height: 1.2; }
h3 { font: 700 1.125rem/1.3 var(--sans); }
ul { padding-left: 1.25rem; }
li + li { margin-top: 0.375rem; }

/* The content's width: 20px gutters on a phone, 64rem at most, with text kept to lines that read comfortably */
.wrap { width: min(100% - 40px, 64rem); margin-inline: auto; }
section[id] { scroll-margin-top: 5rem; } /* below the pinned header */
main > section { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 4rem; }
main > section > p, .faq-list { max-width: 40rem; }

/* The header stays at the top while the page scrolls, on the paper, with a thin line under it */
.top { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); }
.top-inner { display: flex; align-items: center; justify-content: space-between; padding-block: 0.875rem;
             font-family: var(--sans); }
.logo { font-family: var(--sans); font-weight: 700; font-size: 1.25rem; color: var(--ink); text-decoration: none; }
/* The page's languages, as flags, the one shown marked; then joining */
.top-links { display: flex; align-items: center; gap: 1.25rem; }
.langs { display: flex; align-items: center; gap: 0.5rem; }
.lang { display: block; padding-bottom: 4px; border-bottom: 2px solid transparent; opacity: 0.45; }
.lang:hover { opacity: 0.8; }
.lang[aria-current="page"] { border-bottom-color: var(--ink); opacity: 1; }
.lang img { border-radius: 2px; box-shadow: 0 0 0 1px var(--line); }

/* The hero: what it is and the button, then the clip */
main > .hero { gap: 2rem; margin-top: 1.5rem; }
.hero-text { display: flex; flex-direction: column; gap: 1.25rem; }
.lede { font-size: 1.1875rem; color: var(--ink-soft); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; font-family: var(--sans); }
.button.primary { padding: 0.75rem 1.25rem; border-radius: 6px; background: var(--ink); color: var(--paper);
                  font: 700 1.0625rem/1.3 var(--sans); text-decoration: none; }
.button.primary:hover { background: var(--accent); }

/* Why I made it: a few lines, the rest a tap away, and two of my own lines as they were heard */
.story-text { display: flex; flex-direction: column; gap: 1rem; max-width: 40rem; }
.more summary { width: fit-content; cursor: pointer; color: var(--accent); font: 700 1rem/1.4 var(--sans); }
.more p { margin-top: 0.75rem; }
.photo { display: flex; flex-direction: column; gap: 0.5rem; }
.photo img { width: 100%; height: auto; border-radius: 4px; }
.photo figcaption { color: var(--muted); font-size: 0.9375rem; font-style: italic; }
/* My first-lessons mistake: what I wrote, then what I meant */
.anecdote { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 0.5rem; padding: 1.25rem;
            border: 1px solid var(--line); border-radius: 10px; }
.anecdote .note { color: var(--muted); font: 0.9375rem/1.45 var(--sans); }
.anecdote dl { margin: 0; }
.anecdote dt { color: var(--muted); font: 700 0.8125rem/1.4 var(--sans); letter-spacing: 0.04em; text-transform: uppercase; }
.anecdote dd { margin: 0.125rem 0 0.875rem; color: var(--ink-soft); }
.anecdote dd strong { display: block; color: var(--ink); font-size: 1.375rem; }
.homework { display: flex; flex-direction: column; gap: 0.5rem; }
.homework img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 4px; }
.homework figcaption { color: var(--muted); font-size: 0.9375rem; font-style: italic; line-height: 1.45; }
.signature { font-style: italic; font-size: 1.25rem; }

.steps { display: grid; gap: 1.5rem; padding: 0; list-style: none; counter-reset: step; }
.steps li { display: flex; flex-direction: column; gap: 0.375rem; margin: 0; counter-increment: step; }
.steps li::before { content: counter(step); color: var(--accent); font: 700 1.75rem/1 var(--serif); }
.steps p { color: var(--ink-soft); }
.extras { display: grid; gap: 2rem; margin-top: 1rem; }

/* The clips, each a phone's dark screen: it plays and pauses with a tap anywhere on it, a play icon showing while
   paused, and its sound goes on and off with the button in its corner */
.clip-figure { display: flex; flex-direction: column; gap: 0.75rem; width: min(100%, 22rem); margin-inline: auto; }
.clip-figure figcaption { color: var(--ink-soft); font-size: 1rem; line-height: 1.5; }
.clip-figure figcaption strong { color: var(--ink); font-family: var(--sans); }
.clip-frame { position: relative; }
.clip { display: block; width: 100%; aspect-ratio: 4 / 5; border-radius: 14px; background: #0b0d11;
        box-shadow: 0 10px 28px #1e1c1929; }
.clip-toggle { position: absolute; inset: 0; display: grid; place-items: center; border: 0; border-radius: 14px;
               background: none; cursor: pointer; }
.clip-toggle::after { content: ""; width: 64px; height: 64px; border-radius: 50%; opacity: 0; transition: opacity 0.2s;
                      background: #0b0d11b3 url("media/icons/play.svg") 55% 50% / 26px no-repeat; }
.clip-frame.paused .clip-toggle::after { opacity: 1; }
.clip-sound { position: absolute; right: 0.75rem; bottom: 0.75rem; display: grid; place-items: center; width: 44px;
              height: 44px; border-radius: 50%; border: 1px solid #2a3947; background: #0b0d11b3; cursor: pointer; }

.ai-note { color: var(--ink-soft); font-size: 1.0625rem; font-style: italic; }
.ai-columns { display: grid; gap: 1.25rem; }
.ai-columns > div { display: flex; flex-direction: column; gap: 0.75rem; }

/* The form in a Tally theme of the page's colours (site/README.md, "The form"): its embed is transparent, so it sits
   on the paper, in a thin border that says where it starts and ends */
.join-text { display: flex; flex-direction: column; gap: 1rem; }
/* What the answers are for and how long they're kept, said where they're given */
.join-note { color: var(--ink-soft); font-size: 0.9375rem; line-height: 1.5; }
.form-card { padding: 1rem 0.8rem 0.5rem; border: 1px solid var(--line); border-radius: 10px; }
.form-card iframe { display: block; border: 0; }

.faq-list { border-top: 1px solid var(--line); }
.faq-list details { padding-block: 0.875rem; border-bottom: 1px solid var(--line); }
.faq-list summary, .more summary { list-style: none; }
.faq-list summary::-webkit-details-marker, .more summary::-webkit-details-marker { display: none; }
.faq-list summary { display: flex; justify-content: space-between; gap: 1rem; cursor: pointer;
                    font: 700 1.0625rem/1.4 var(--sans); }
.faq-list summary::after, .more summary::after { content: " +"; flex: none; color: var(--muted); font-weight: 400; }
.faq-list details[open] summary::after, .more[open] summary::after { content: " −"; }
.faq-list details p { margin-top: 0.5rem; color: var(--ink-soft); }

.foot { margin-top: 5rem; border-top: 1px solid var(--line); }
.foot-inner { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem 1.5rem; padding-block: 1.5rem 2.5rem;
              color: var(--muted); font: 0.9375rem/1.4 var(--sans); }
.foot .logo { font-size: 1.0625rem; }
.foot a { color: var(--muted); }

@media (min-width: 48rem) {
  h1 { font-size: 3rem; }
  h2 { font-size: 2rem; }
  main > section { margin-top: 6rem; }
  main > .hero { display: grid; grid-template-columns: 1fr 25.5rem; align-items: center; gap: 4rem; margin-top: 3rem; }
  .story { display: grid; grid-template-columns: 1fr 22rem; align-items: start; gap: 4rem; }
  .story-text { gap: 1.25rem; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
  .extras { grid-template-columns: 1fr 1fr; gap: 3rem; margin-top: 2rem; }
  .extras .clip-figure { width: min(100%, 23rem); }
  .hero .clip-figure { width: 100%; }
  .ai-columns { grid-template-columns: 1fr 1fr; gap: 3rem; }
  #join { display: grid; grid-template-columns: 18rem 1fr; align-items: start; gap: 4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .clip-toggle::after { transition: none; }
}
