/* clarityapps.info — one identity for the whole site.
 *
 * Before this file the site was five hand-written pages with five inline
 * <style> blocks and three different identities: the home, support and terms
 * pages were near-black with a system sans, privacy was cream with a serif, and
 * the channel landing pages were a fourth near-miss of privacy. Two legal
 * documents did not match each other. There was no shared system, so every page
 * was a fresh invention and drift was guaranteed.
 *
 * The tokens below are lifted from the privacy page, which was the one already
 * wearing Divinity's own colours. Everything else was moved onto it.
 *
 * Edit this file, not a page. scripts/site/restyle.mjs re-emits every page and
 * asserts their visible TEXT is unchanged, so presentation can be reworked
 * without risking a word of the legal copy.
 */

:root {
  --paper:        #FDF6E3;
  --paper-sunk:   #F5EDE0;
  --rule:         #E8D9C0;
  --ink:          #2C1A0E;
  --ink-body:     #3D2B1A;
  --ink-soft:     #5C3D1E;
  --ink-muted:    #7A6652;
  --gold:         #8B5E2F;
  --gold-light:   #C8A97A;
  --serif: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  /* Store-badge lettering only. Apple and Google both set their badge wordmarks
     in a grotesque, and a serif "App Store" reads as a knock-off. */
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
  font-family: var(--serif);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.75;
  padding: 0 16px 64px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: 680px; margin: 0 auto; }

/* A centred page — the channel landings and the home page — fills the screen
   and centres its content; a document page just flows. Both share everything
   else, which is the point. */
body.centered { display: flex; flex-direction: column; min-height: 100vh; padding-bottom: 32px; }
body.centered .wrap { flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
/* Measured: an absolutely-positioned footer overlapped the store buttons at
   844x390, a phone held sideways. It stays in normal flow. */
body.centered footer { flex: 0 0 auto; padding-top: 56px; }

header {
  text-align: center;
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 40px;
}
body.centered header { border-bottom: 0; padding: 0 0 8px; margin-bottom: 0; }

.cross { display: inline-block; font-size: 28px; color: var(--gold-light); margin-bottom: 12px; }
.mark { width: 72px; height: 72px; margin-bottom: 24px; }

header h1 { font-size: 28px; font-weight: bold; color: var(--ink); margin-bottom: 6px; letter-spacing: 0.3px; }
header p  { font-size: 14px; color: var(--ink-muted); font-style: italic; }

h1 { font-size: 28px; font-weight: bold; color: var(--ink); letter-spacing: 0.3px; }
h2 {
  font-size: 18px;
  color: var(--ink);
  margin: 36px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--rule);
}
h3 { font-size: 16px; color: var(--ink); margin: 24px 0 8px; }

p  { font-size: 15px; color: var(--ink-body); margin-bottom: 14px; }
ul, ol { margin: 0 0 14px 20px; }
li { font-size: 15px; color: var(--ink-body); margin-bottom: 6px; }
strong { color: var(--ink); }

a { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--ink-soft); }

.highlight {
  background: var(--paper-sunk);
  border-left: 3px solid var(--gold-light);
  padding: 18px 20px;
  margin: 0 0 32px;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 15px;
}

/* support/ and terms/ carried these as dark panels. Same structure, paper tone. */
.card, .faq-item {
  background: var(--paper-sunk);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 20px 22px;
  margin-bottom: 16px;
}
.card h2, .faq-item h2 { margin-top: 0; border-bottom: 0; padding-bottom: 0; }
.card p:last-child, .faq-item p:last-child { margin-bottom: 0; }

.logo {
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-family: var(--sans);
}
.subtitle { font-size: 14px; color: var(--ink-muted); font-style: italic; }

table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 14px; }
th, td { text-align: left; padding: 9px 12px; border: 1px solid var(--rule); color: var(--ink-body); }
th { background: var(--paper-sunk); color: var(--ink); font-weight: bold; }

/* A page whose job is one decision states it big; a document page does not. */
.headline { font-size: clamp(32px, 6.5vw, 46px); line-height: 1.15; letter-spacing: -0.5px; margin-bottom: 16px; max-width: 14ch; }
.lede { font-size: clamp(16px, 2.2vw, 19px); color: var(--ink-soft); max-width: 32ch; margin-bottom: 36px; }

.buttons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn {
  padding: 13px 26px;
  border-radius: 10px;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid var(--rule);
  transition: opacity 0.15s ease;
}
.btn:hover { opacity: 0.85; text-decoration: none; }
.btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-primary:hover { color: var(--paper); }
.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-ghost:hover { color: var(--ink); }

.stores { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.store {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* They stack on a phone, where two different widths read as a mistake. */
  min-width: 196px;
  gap: 11px;
  background: #241A0E;
  color: #FFFFFF;
  text-decoration: none;
  padding: 13px 22px;
  border-radius: 11px;
  transition: transform 0.12s ease, opacity 0.12s ease;
}
.store:hover { opacity: 0.9; transform: translateY(-1px); color: #FFFFFF; text-decoration: none; }
.store svg { flex: 0 0 auto; }
.store .lines { text-align: left; line-height: 1.15; font-family: var(--sans); }
.store .top { display: block; font-size: 10px; letter-spacing: 0.6px; text-transform: uppercase; opacity: 0.75; }
.store .bottom { display: block; font-size: 18px; font-weight: 600; }

footer {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  text-align: center;
  font-size: 13px;
  color: var(--ink-muted);
}
body.centered footer { border-top: 0; margin-top: 0; }
footer a { color: var(--ink-muted); text-decoration: none; }
footer a:hover { color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
  .store, .btn { transition: none; }
}
