/* Wreath's pages: system fonts, light and dark, no framework. */

:root {
  color-scheme: light dark;

  --bg: #fbfbfa;
  --bg-alt: #f2f2ef;
  --surface: #ffffff;
  --text: #1d1d1f;
  --muted: #5e5e63;
  --line: #dcdcd7;
  --accent: #2c6a4c;
  --accent-text: #ffffff;
  --accent-soft: #e3efe8;
  --focus: #1f6feb;
  --danger: #c5221f;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 8px 24px rgb(0 0 0 / 0.06);

  --radius: 12px;
  --wrap: 68rem;
  --narrow: 44rem;

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161617;
    --bg-alt: #1d1d1f;
    --surface: #232325;
    --text: #f2f2f0;
    --muted: #a3a3a8;
    --line: #3a3a3d;
    --accent: #7cc6a0;
    --accent-text: #0f2a1d;
    --accent-soft: #1f3329;
    --focus: #6aa8ff;
    --danger: #ff8a80;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px rgb(0 0 0 / 0.3);
  }
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  overflow-wrap: break-word;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

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

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

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

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.1rem); text-align: center; margin-bottom: 1.25em; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 0.9em; }

kbd {
  font: inherit;
  font-size: 0.9em;
  display: inline-block;
  min-width: 1.6em;
  padding: 0 0.35em;
  margin: 0 0.08em;
  text-align: center;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--surface);
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: var(--narrow); }
@media (min-width: 40rem) { .wrap { padding: 0 24px; } }

.skip {
  position: absolute;
  left: 8px;
  top: -3rem;
  padding: 0.5rem 0.9rem;
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  z-index: 10;
}
.skip:focus { top: 8px; }

/* Header and footer */

.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  min-height: 3.25rem;
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.site-header ul, .site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}
.site-header nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.site-header nav a:hover { color: var(--text); }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.site-footer a { color: var(--muted); }
.site-footer p { margin: 0; }

/* Buttons */

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.12s ease;
}
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.button:disabled, .button[aria-disabled="true"] {
  cursor: default;
  transform: none;
  background: var(--bg-alt);
  border-color: var(--line);
  color: var(--muted);
}

/* Hero */

.hero { padding: clamp(2.5rem, 6vw, 5rem) 0 2rem; text-align: center; }
.hero h1 { font-size: clamp(2.6rem, 2rem + 3vw, 4rem); margin-bottom: 0.25em; }
.promise {
  font-size: clamp(1.15rem, 1rem + 0.8vw, 1.5rem);
  color: var(--muted);
  max-width: 34rem;
  margin: 0 auto 1.5rem;
}
.hero .actions { justify-content: center; }
.fineprint { color: var(--muted); font-size: 0.9rem; }
.hero .fineprint { margin-top: 1rem; }
.hero-art { margin: 2.5rem auto 0; max-width: 46rem; }

/* How it works */

.how { padding: 3.5rem 0; background: var(--bg-alt); border-block: 1px solid var(--line); }
.feature { margin: 0 auto 3rem; max-width: var(--narrow); }
.feature:has(.feature-art) {
  max-width: none;
  display: grid;
  gap: 1.5rem;
  align-items: center;
}
@media (min-width: 52rem) {
  .feature:has(.feature-art) { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .feature:nth-of-type(4n) .feature-art { order: 2; }
}
.feature-art { margin: 0; }
.feature-text p { color: var(--muted); }

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  margin-bottom: 2rem;
}
.feature.small {
  margin: 0;
  max-width: none;
  padding: 1.25rem 1.25rem 0.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.feature.small h3 { font-size: 1.05rem; }
.feature.small p { color: var(--muted); font-size: 0.95rem; }
.note { text-align: center; color: var(--muted); font-size: 0.92rem; max-width: var(--narrow); margin: 0 auto; }

/* Privacy */

.privacy-line { padding: 2.5rem 0; text-align: center; }
.privacy-line p { margin: 0 auto; max-width: var(--narrow); font-size: 1.1rem; }

/* Pricing */

.pricing { padding: 3rem 0 3.5rem; }
.price-card {
  max-width: 26rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  text-align: center;
}
.price { font-size: 1.6rem; font-weight: 700; margin-bottom: 0.4rem; }
.price .was { color: var(--muted); font-weight: 500; font-size: 0.75em; margin-right: 0.35em; }
.price .currency { color: var(--muted); font-weight: 500; font-size: 0.55em; margin-left: 0.2em; }
.price .saving {
  display: block;
  font-size: 0.55em;
  font-weight: 600;
  color: var(--accent);
  margin-top: 0.2em;
}
.price .tax { display: block; font-size: 0.5em; font-weight: 400; color: var(--muted); }
.terms-line { color: var(--muted); }
.checks { list-style: none; padding: 0; margin: 1.25rem 0 1.5rem; text-align: left; display: inline-block; }
.checks li { padding-left: 1.6rem; position: relative; margin: 0.35rem 0; }
.checks li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.45em;
  width: 0.7rem;
  height: 0.4rem;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.price-card .actions { justify-content: center; }
.price-card .fineprint { margin: 1rem 0 0; }

/* FAQ */

.faq { padding: 3rem 0 4rem; background: var(--bg-alt); border-top: 1px solid var(--line); }
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 0.6rem;
}
.faq summary {
  cursor: pointer;
  padding: 0.9rem 1.1rem;
  font-weight: 600;
  list-style-position: outside;
  margin-left: 1rem;
}
.faq summary:focus-visible { outline-offset: -3px; }
.faq details > p { padding: 0 1.1rem; color: var(--muted); }
.faq details > p:last-child { padding-bottom: 0.3rem; }

/* Text pages: terms, privacy, refunds, thanks */

.page { padding: clamp(2rem, 5vw, 4rem) 0 4rem; }
.page h1 { font-size: clamp(2rem, 1.6rem + 2vw, 2.6rem); }
.page h2 { text-align: left; font-size: 1.25rem; margin: 2em 0 0.5em; }
.page .updated { color: var(--muted); font-size: 0.92rem; }
.page li { margin: 0.35rem 0; }
.page .actions { margin: 1.5rem 0; }

/* Thanks: the licence key */

.preparing { color: var(--muted); }
.licence-key {
  margin: 0 0 0.5rem;
  padding: 0.9rem 1rem;
  font: 0.9rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
  word-break: break-all;
  user-select: all;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.page .licence-key + .actions { margin-top: 0.75rem; }
.key-status { color: var(--muted); min-height: 1.55em; margin: -0.75rem 0 0.9rem; }
.key-status:empty { display: none; }
