/* hektai.com — one stylesheet, readable by a person.
   The app's grammar, on the web: a lavender-white ground, one purple accent,
   the wordmark centred at the top, a gold coin as the crown, pill buttons.
   Phone first: one column, full-width buttons, nothing scrolls sideways.
   Gold is for the coins only, never for text (DESIGN-UX.md, color grammar). */

:root {
  --ground: #FBF7FD;      /* the Android home's tinted white */
  --ink: #1C1B1F;
  --muted: #625B71;
  --accent: #6750A4;      /* the one purple */
  --link: #6750A4;
  --line: #E7E0EC;
  --on-accent: #FFFFFF;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #141218;
    --ink: #E6E1E5;
    --muted: #CAC4D0;
    --link: #D0BCFF;      /* the accent, lightened only so link text stays readable */
    --line: #3A3740;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #FBF7FD; color: #1C1B1F;   /* literal first: browsers without var() (old IE) still get the palette */
  background: var(--ground);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro", Roboto, "Segoe UI", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.5;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; }

/* The top: the wordmark, then the three doors, like the app's title row. */
header {
  padding: 1rem;
  text-align: center;
}
header nav a {
  display: inline-block;
  padding: .5rem .25rem;   /* a 44px-tall target even at the default size */
  color: #6750A4; color: var(--link);
  text-decoration: none;
}
header nav a:first-child {
  color: var(--ink);
  font-weight: 600;
  font-size: 1.25rem;
}
header nav a:hover, header nav a:focus, footer a:hover, footer a:focus { text-decoration: underline; }

main {
  display: block;          /* old IE does not know <main> is a block */
  max-width: 40rem;
  margin: 0 auto;
  padding: 0 1.25rem 2rem;
}

/* The crown: the Pan stater at its true 20mm, as on the phone's home screen. */
.crest { display: block; margin: .5rem auto 1.25rem; }
.stater { width: 20mm; height: 20mm; }
.hekte { width: 14mm; height: 14mm; }

h1, h2, h3 {
  font-family: ui-rounded, -apple-system, BlinkMacSystemFont, "SF Pro Rounded", Roboto, "Segoe UI", system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.2;
  margin: 2rem 0 .5rem;
}
h1 { font-size: 2rem; margin-top: .5rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }
p { margin: .5rem 0 1rem; }
.hero { text-align: center; }
.hero h1 { font-size: 2.25rem; }
a { color: #6750A4; color: var(--link); }
code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .95em; word-break: break-all; }
.file { font-variant-numeric: tabular-nums; color: var(--muted); }
ol { padding-left: 1.5rem; }
ol li { margin: .5rem 0; }

/* Pill buttons: the filled primary and the outlined secondary, as in the app.
   Full width on a phone, at least 48px tall, hittable at any text size. */
.button {
  display: block;
  min-height: 3rem;
  padding: .75rem 1.5rem;
  margin: 1.25rem 0;
  border: 2px solid #6750A4; border-color: var(--accent);
  border-radius: 999px;
  background: #6750A4; background: var(--accent);
  color: #FFFFFF; color: var(--on-accent);
  font-weight: 600;
  font-size: 1.0625rem;
  text-align: center;
  text-decoration: none;
}
.button.secondary { background: transparent; color: var(--link); }
.button:focus-visible { outline: 3px solid var(--link); outline-offset: 3px; }

footer {
  max-width: 40rem;
  margin: 2rem auto 0;
  padding: 1.5rem 1.25rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .9375rem;
  text-align: center;
}
footer p { margin: .25rem 0; }
footer a { display: inline-block; padding: .5rem; color: var(--link); }

/* Desktop is the same page with more margin, not a second design. */
@media (min-width: 40rem) {
  header { padding-top: 1.5rem; }
  .button { display: inline-block; min-width: 16rem; }
  .hero .button { margin-left: auto; margin-right: auto; }
}
