/* Kwéyòl Dictionary website: colours match the iOS app */
:root {
  --bg: #e0f2ff;
  --header: #1261a8;
  --accent: #1261a8;
  --card: #ffffff;
  --text: #0d1b2a;
  --muted: #55657a;
  --border: rgba(18, 97, 168, 0.14);
  --shadow: 0 6px 24px rgba(13, 41, 71, 0.08);
  --radius: 18px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1724;
    --header: #0d2947;
    --accent: #4da3ff;
    --card: #172636;
    --text: #e8f1fa;
    --muted: #9fb2c6;
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

img { max-width: 100%; height: auto; display: block; }

/* Header */
.site-header {
  background: var(--header);
  color: #fff;
}
.site-header .inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
}
.brand img { width: 40px; height: 40px; border-radius: 10px; }
.site-nav { display: flex; gap: 18px; flex-wrap: wrap; font-size: 0.95rem; }
@media (max-width: 560px) {
  body { font-size: 16px; }
  .brand img { width: 34px; height: 34px; border-radius: 8px; }
  .card { padding: 22px; }
  .hero-logo { width: 120px; }
}
.site-nav a { color: #fff; text-decoration: none; font-weight: 500; opacity: 0.9; }
.site-nav a:hover, .site-nav a[aria-current="page"] { opacity: 1; text-decoration: underline; }

/* Layout */
main { flex: 1; width: 100%; }
.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 760px; }

/* Hero with the Pitons */
.hero {
  position: relative;
  overflow: hidden;
  padding: 44px 0 300px;
  text-align: center;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 280px;
  background: url("/assets/img/pitons.svg") center bottom / cover no-repeat;
  pointer-events: none;
}
@media (prefers-color-scheme: dark) { .hero::after { opacity: 0.55; } }
.hero .container { position: relative; z-index: 1; }
.hero-logo { width: 150px; margin: 0 auto 12px; }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  .logo-light { display: none; }
  .logo-dark { display: block; }
}
.hero h1 { font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.15; margin: 8px 0; }
.tagline { color: var(--muted); font-size: 1.15rem; margin: 0 auto 22px; max-width: 560px; }
.flags { font-size: 0.95rem; color: var(--muted); }

/* Cards and sections */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  padding: 28px;
  margin: 0 0 24px;
}
.card h2 { margin-top: 0; font-size: 1.45rem; line-height: 1.25; }
.card h3 { font-size: 1.1rem; margin: 22px 0 6px; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.overlap { margin-top: -120px; position: relative; z-index: 2; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin: 0 0 24px;
}
.feature { padding: 22px; margin: 0; }
.feature .icon { font-size: 1.6rem; line-height: 1; }
.feature h3 { margin: 10px 0 4px; font-size: 1.05rem; }
.feature p { margin: 0; color: var(--muted); font-size: 0.97rem; }

.screens {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 8px 0 0;
}
.screens img { border-radius: 22px; box-shadow: var(--shadow); border: 1px solid var(--border); }
@media (max-width: 560px) {
  .screens { grid-template-columns: repeat(3, 70%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; }
  .screens img { scroll-snap-align: center; }
}

.developer { display: flex; gap: 22px; align-items: flex-start; }
.developer .avatar {
  flex: none;
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--header);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.5rem;
}
@media (max-width: 560px) { .developer { flex-direction: column; } }
.role { color: var(--muted); margin-top: -8px; }

.steps { padding-left: 1.2em; }
.steps li { margin-bottom: 6px; }

blockquote.reference {
  margin: 14px 0;
  padding: 14px 18px;
  border-left: 4px solid var(--accent);
  background: rgba(18, 97, 168, 0.08);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  border-radius: 0 12px 12px 0;
  font-style: italic;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
}
.button:hover { filter: brightness(1.08); }
.button.secondary { background: transparent; color: var(--accent); border: 2px solid var(--accent); }
.button-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* Privacy policy */
.policy h2 { font-size: 1.25rem; margin: 30px 0 8px; }
.policy h2:first-of-type { margin-top: 10px; }
.updated { color: var(--muted); font-size: 0.95rem; }
.summary {
  background: var(--bg);
  background: color-mix(in srgb, var(--accent) 9%, var(--card));
  border-radius: 14px;
  padding: 16px 20px;
  font-weight: 500;
}
.page-title { padding: 40px 0 12px; }
.page-title h1 { margin: 0; font-size: clamp(1.8rem, 4.5vw, 2.4rem); }

/* Error pages */
.error-page { text-align: center; padding: 56px 0 230px; position: relative; overflow: hidden; }
.error-page::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 240px;
  background: url("/assets/img/pitons.svg") center bottom / cover no-repeat;
}
@media (prefers-color-scheme: dark) { .error-page::after { opacity: 0.55; } }
.error-page .container { position: relative; z-index: 1; }
.error-code { font-size: clamp(4rem, 14vw, 6.5rem); font-weight: 800; color: var(--accent); line-height: 1; margin: 18px 0 4px; }
.error-page h1 { margin: 6px 0; font-size: 1.6rem; }
.error-page .kweyol { color: var(--muted); font-style: italic; margin: 0 0 6px; }
.error-page p { max-width: 520px; margin: 8px auto 22px; }
.error-page img { width: 88px; margin: 0 auto; border-radius: 20px; }

/* Footer */
.site-footer {
  background: var(--header);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.92rem;
}
.site-footer .inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 22px 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.site-footer a { color: #fff; }
