/* Hopworld website: the app's "Sunny Sticker" style (hopworld-style-spec.md).
   Fonts are served from this site (no third-party font services), so visitors' IP
   addresses aren't shared with anyone. */

@font-face {
  font-family: "Lilita One";
  src: url("/assets/fonts/LilitaOne-Regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/Nunito-Variable.ttf") format("truetype");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --ink: #0E2A47;
  --outline: #0E2A47;
  --ink-on-bright: #0E2A47;
  --ground: #EAF6FF;
  --ground-dot: #C9E0F5;
  --surface: #FFFFFF;
  --surface-bottom: #F1F8FF;
  --sky: #0A6FD6;
  --sky-top: #2E8DF0;
  --sky-tint: #DDEFFF;
  --sun: #FFC93C;
  --sun-top: #FFDA6B;
  --heart: #F04438;
  --correct: #2BB673;
  --muted: #3D5A78;
  --body2: #2B4866;
  --link: #0A6FD6;
  --radius-card: 24px;
  --radius-button: 18px;
  --border: 3px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #EAF4FF;
    --outline: #6C8FB5;
    --ground: #0B1A2C;
    --ground-dot: #18304D;
    --surface: #142B45;
    --surface-bottom: #10253D;
    --sky-tint: #15416F;
    --muted: #A3BBD4;
    --body2: #C6D7E9;
    --link: #5AA7F5;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: "Nunito", system-ui, -apple-system, sans-serif;
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--ground);
  /* The dotted ground: 1.6px dots on a 22px grid. */
  background-image: radial-gradient(circle, var(--ground-dot) 0.8px, transparent 1px);
  background-size: 22px 22px;
}

a { color: var(--link); font-weight: 800; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 8px; }

h1, h2, h3 {
  font-family: "Lilita One", "Nunito", sans-serif;
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.1rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--surface); color: var(--ink); padding: 8px 14px; z-index: 10;
}
.skip-link:focus { left: 12px; top: 12px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* Header */
.site-header { padding: 18px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: "Lilita One", sans-serif; font-size: 1.6rem; color: var(--ink); text-decoration: none; font-weight: 400;
}
.brand img { width: 44px; height: 44px; border-radius: 11px; border: var(--border) solid var(--outline); }
.site-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.site-nav a {
  color: var(--ink); text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 900;
}
.site-nav a[aria-current="page"] { background: var(--sky-tint); }
.site-nav a:hover { background: var(--sky-tint); }

/* Sticker card */
.card {
  background: var(--surface);
  border: var(--border) solid var(--outline);
  border-radius: var(--radius-card);
  box-shadow: 0 6px 0 var(--outline);
  padding: 24px;
  margin-bottom: 22px;
}

/* Chunky button */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: "Lilita One", sans-serif; font-weight: 400; font-size: 1.3rem; letter-spacing: 0.04em;
  text-transform: uppercase; text-decoration: none; color: #fff;
  background: linear-gradient(var(--sky-top), var(--sky));
  border: var(--border) solid var(--outline);
  border-radius: var(--radius-button);
  box-shadow: inset 0 3px 0 rgba(255,255,255,0.4), 0 5px 0 var(--outline);
  padding: 14px 26px;
  text-shadow: 0 2px 0 rgba(14,42,71,0.45);
  transition: transform 0.07s ease-out, box-shadow 0.07s ease-out;
}
.button:active { transform: translateY(5px); box-shadow: inset 0 3px 0 rgba(255,255,255,0.4), 0 0 0 var(--outline); }
.button.is-disabled {
  background: #DCE6F0; color: #5B7590; border-color: #B3C4D6; box-shadow: 0 5px 0 #B3C4D6; text-shadow: none; cursor: default;
}

/* Hero */
.hero { padding: 24px 0 40px; }
.hero .wrap { display: grid; gap: 28px; align-items: center; grid-template-columns: 1.2fr 1fr; }
.hero p.lead { font-size: 1.25rem; color: var(--body2); max-width: 34em; }
.hero .orbi { width: min(320px, 70vw); justify-self: center; filter: drop-shadow(0 14px 0 rgba(14,42,71,0.10)); }
.hero .note { font-size: 0.95rem; color: var(--muted); margin-top: 14px; }
@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero .orbi { order: -1; width: 220px; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
}

/* Gentle hop (off with Reduce Motion) */
@media (prefers-reduced-motion: no-preference) {
  .hop { animation: hop 2.4s cubic-bezier(.45,0,.55,1) infinite; transform-origin: bottom center; }
  @keyframes hop {
    0%, 60%, 100% { transform: translateY(0) scale(1, 1); }
    70% { transform: translateY(-16px) scale(0.96, 1.05); }
    82% { transform: translateY(0) scale(1.06, 0.92); }
    90% { transform: translateY(0) scale(1, 1); }
  }
}

/* Feature grid */
.features { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 10px 0 30px; }
.features .card { margin: 0; }
.features img { width: 84px; height: auto; display: block; margin-bottom: 8px; }
.features p { color: var(--body2); margin: 0; }

.pills { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.pills li {
  background: var(--surface); border: var(--border) solid var(--outline); border-radius: 999px;
  box-shadow: 0 3px 0 var(--outline); padding: 6px 16px; font-weight: 900;
}

.section { padding: 26px 0; }
.section-title { text-align: center; margin-bottom: 18px; }

/* Long text pages */
.doc h2 { margin-top: 1.4em; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: 0.45em; }
.doc .updated { color: var(--muted); }
.doc table { width: 100%; border-collapse: collapse; margin: 0 0 1em; }
.doc th, .doc td { text-align: left; padding: 10px 8px; border-bottom: 2px solid var(--ground-dot); vertical-align: top; }
.doc th { font-weight: 900; }

/* FAQ */
details {
  background: var(--surface); border: var(--border) solid var(--outline); border-radius: 18px;
  box-shadow: 0 4px 0 var(--outline); padding: 14px 18px; margin-bottom: 14px;
}
summary { cursor: pointer; font-weight: 900; font-size: 1.1rem; }
details[open] summary { margin-bottom: 8px; }
details p:last-child { margin-bottom: 0; }

/* Footer */
.site-footer { padding: 34px 0 50px; color: var(--muted); font-size: 0.95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 24px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

/* Support page headings between FAQ groups, and the 404 page */
main > h2 { margin-top: 1.3em; }
.centred { text-align: center; }
.centred img { display: block; margin: 10px auto 18px; height: auto; }
