/*
 * Rinava website — the only stylesheet.
 *
 * Plain CSS, no build step, no external fonts and no images: every page must
 * render correctly when opened straight from disk and when served by a static
 * host. Colours are defined once as custom properties and swapped for the dark
 * scheme, so a new page needs no colour decisions of its own.
 */

:root {
  color-scheme: light dark;

  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1b1a17;
  --muted: #5c584f;
  --border: #e4e0d6;
  --rule: #efece4;
  --accent: #14675a;
  /* The accent used for text carries more contrast than the accent used for fills. */
  --accent-text: #0f5449;
  --accent-soft: #e7f1ee;
  --shadow: 0 1px 2px rgba(27, 26, 23, 0.06);

  --measure: 44rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14151a;
    --surface: #1b1d23;
    --text: #eceae4;
    --muted: #a6a79f;
    --border: #2d3038;
    --rule: #262930;
    --accent: #6fc9b6;
    --accent-text: #8ad6c5;
    --accent-soft: #1d2b2a;
    --shadow: none;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    "Noto Sans", "Noto Sans SC", "Noto Sans CJK SC", "PingFang SC", "Microsoft YaHei", Arial,
    sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}

/* --- Skip link ------------------------------------------------------------ */

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.6rem 1rem;
  background: var(--surface);
  color: var(--accent-text);
  border: 1px solid var(--border);
  border-radius: 0 0 0.5rem 0;
  z-index: 10;
}

.skip:focus {
  left: 0;
}

/* --- Page frame ----------------------------------------------------------- */

.site-header,
.site-main,
.site-footer {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-block: 1.75rem 1.25rem;
}

.wordmark {
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.wordmark:hover {
  color: var(--accent-text);
}

.langs {
  font-size: 0.875rem;
  color: var(--muted);
}

.langs ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.langs a {
  color: var(--muted);
}

.langs a:hover {
  color: var(--accent-text);
}

.langs [aria-current="true"] {
  color: var(--text);
  font-weight: 600;
}

.site-main {
  padding-block: 0.5rem 3rem;
}

/* --- Typography ----------------------------------------------------------- */

h1 {
  margin: 0.5rem 0 0.75rem;
  font-size: 1.95rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h2 {
  margin: 2.5rem 0 0.6rem;
  font-size: 1.2rem;
  font-weight: 650;
  line-height: 1.35;
}

h3 {
  margin: 1.6rem 0 0.4rem;
  font-size: 1.02rem;
  font-weight: 650;
}

p,
ul,
ol,
dl {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.3rem;
}

li {
  margin-bottom: 0.35rem;
}

.lede {
  font-size: 1.1rem;
  color: var(--text);
}

.muted {
  color: var(--muted);
}

.meta {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

a {
  color: var(--accent-text);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--rule);
  padding: 0.1em 0.35em;
  border-radius: 0.25rem;
}

abbr {
  text-decoration: none;
}

/* --- Blocks --------------------------------------------------------------- */

.note {
  margin: 1.5rem 0;
  padding: 0.9rem 1.1rem;
  background: var(--accent-soft);
  border-radius: 0.6rem;
  color: var(--text);
  font-size: 0.95rem;
}

.note p:last-child {
  margin-bottom: 0;
}

.card {
  margin: 1.5rem 0;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: var(--shadow);
}

.card p:last-child,
.card ul:last-child {
  margin-bottom: 0;
}

.card h2 {
  margin-top: 0;
}

.cta {
  display: inline-block;
  margin: 0.25rem 0 0.75rem;
  padding: 0.7rem 1.35rem;
  font: inherit;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  background: var(--rule);
  color: var(--muted);
}

.store {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 0.5rem;
}

/* Apple's and Google's badges, unmodified and 48 px tall (docs/design/website/DESIGN.md). */
.store img {
  display: block;
  height: 48px;
  width: auto;
}

.cta[disabled] {
  cursor: not-allowed;
}

.scenarios {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}

.scenarios li {
  margin: 0;
  padding: 0.3rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.9rem;
}

/* Purpose / legal-basis pairs in the privacy policy. */
.basis {
  margin: 0 0 1.25rem;
}

.basis dt {
  font-weight: 600;
  margin-top: 0.75rem;
}

.basis dd {
  margin: 0.1rem 0 0;
  color: var(--muted);
}

/* --- Footer --------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: 1.5rem 3rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0 0 0.5rem;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--accent-text);
}

/* --- Wider screens -------------------------------------------------------- */

@media (min-width: 40rem) {
  body {
    font-size: 1.0625rem;
  }

  h1 {
    font-size: 2.3rem;
  }

  .site-header {
    padding-block: 2.5rem 1.5rem;
  }
}
