/* ============================================================
   Behold — shared base styles
   Used by: index.html, privacy/index.html, changelog/index.html
   ============================================================ */

/* Light palette, sampled from the app's own Vellum theme rather than invented,
   so the site and the product are the same object. Every pair below clears WCAG
   AA against BOTH grounds (--bg and --surface), which is this project's standing
   rule: text 11.2:1 / 12.7:1, muted 5.1 / 5.8, accent 5.1 / 5.8, white on accent
   5.9. Do not lighten the accent — #975133 is the floor that keeps it readable
   as link text on the warm ground. */
:root {
  --bg: #F8F5EF;
  --bg-alt: #EFE7D8;
  --surface: #FFFDF8;
  --raised: #FFFFFF;
  --text: #3A3026;
  --text-muted: #6D6351;
  --border: #E5DBC9;
  --accent: #975133;
  --accent-dark: #7C412A;
  --accent-soft: #F3E5DC;
  --accent-contrast: #FFFFFF;

  /* Three radii, as Niiza's site uses. The app's "one radius" rule governs the
     app, not this page. */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 28px;
  --radius: var(--radius-md);

  /* Warm-tinted shadows -- neutral black reads grey and dirty on parchment. */
  --shadow-sm: 0 2px 8px rgba(58, 48, 38, 0.06);
  --shadow-md: 0 12px 32px rgba(58, 48, 38, 0.10);
  --shadow-lg: 0 30px 80px rgba(58, 48, 38, 0.16);
}

html {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 16px;
  color: var(--text);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============ NAV ============ */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  background: rgba(244, 238, 226, 0.88);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 1120px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand:hover {
  text-decoration: none;
}

/* The nav mark is the APP icon, not a themed glyph: Vellum's ground with the
   illuminated initial, so the chip in the tab bar matches the launcher icon on
   the phone. Niiza's nav does the same with its own icon. The chip supplies the
   ground and clips the corners, which is what a launcher mask does; the mark
   itself carries the frame, the flourishes and the letter, in its own colours. */
.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  overflow: hidden;
  background: #F8F5EF;
  box-shadow: 0 4px 12px rgba(58, 48, 38, 0.22);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* The letter alone, inline so no extra image asset is needed — the same outline
   the launcher icon carries, emitted by tools/generate_icon.py. This one is
   tintable, which is why it is the letter and not the framed mark: a two-colour
   mark cannot be recoloured by a single `fill`. */
.behold-mark path {
  fill: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 600;
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

/* ============ EYEBROW ============ */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius);
  letter-spacing: 0.01em;
  margin-bottom: 16px;
}

/* ============ BUTTONS ============ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast) !important;
  box-shadow: 0 6px 16px rgba(151, 81, 51, 0.26);
}

.btn-primary:hover {
  background: var(--accent-dark);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(151, 81, 51, 0.30);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--surface);
  text-decoration: none;
}

/* Coming-soon pill in nav — no link, the app isn't on Play yet */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: default;
  user-select: none;
}

/* The same pill once a store link exists. It is then the page's one primary
   action, so it takes the accent instead of the muted outline it wore while it
   could only say "coming". White on the accent is 5.93:1.

   Scoped under `.nav` on purpose. As an <a> the pill is also matched by
   `.nav-links a` and `.nav-drawer a`, which would repaint it as an ordinary
   nav link (muted text, 15-16px, a bottom rule, a chevron); the extra class in
   the selector is what outranks them. */
.nav a.nav-cta {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: var(--accent-contrast);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  cursor: pointer;
  user-select: auto;
  text-decoration: none;
}

.nav a.nav-cta:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--accent-contrast);
}

/* ============ BURGER / MOBILE DRAWER ============ */

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  flex-shrink: 0;
}

.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition:
    transform 0.22s ease,
    opacity 0.22s ease;
}

.nav-drawer {
  display: none;
  flex-direction: column;
  padding: 8px 20px;
  border-bottom: 1px solid var(--border);
}

.nav-drawer a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 600;
  padding: 13px 8px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}

.nav-drawer a::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--accent);
  border-top: 2px solid var(--accent);
  transform: rotate(45deg);
  flex-shrink: 0;
  transition: border-color 0.15s ease;
  opacity: 0.5;
}

.nav-drawer a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-drawer a:hover::after {
  border-color: var(--accent);
}

.nav-drawer a:last-child {
  border-bottom: none;
}

.nav-drawer .nav-cta {
  margin: 14px 8px 4px;
  text-align: center;
  justify-content: center;
}

/* In the drawer the pill is the last child, so `.nav-drawer a:last-child`
   would strip its bottom border, and `.nav-drawer a::after` would hang a
   chevron on it. Both are for list rows, not for a button. */
.nav-drawer a.nav-cta {
  border: 1px solid var(--accent);
  padding: 12px 16px;
  font-size: 15px;
}

.nav-drawer a.nav-cta::after {
  content: none;
}

/* Open state */
.nav.open .nav-drawer {
  display: flex;
}

.nav.open .nav-burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav.open .nav-burger span:nth-child(2) {
  opacity: 0;
}

.nav.open .nav-burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 720px) {
  .nav-links {
    gap: 14px;
    margin-left: auto;
    margin-right: 16px;
  }

  .nav-links a:not(.btn),
  .nav-links .nav-cta {
    display: none;
  }

  .nav-burger {
    display: flex;
  }
}

/* ============ LAYOUT ============ */

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ FOOTER ============ */

footer {
  padding: 40px 0 48px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 14px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

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

.footer-links a:hover {
  color: var(--accent);
  text-decoration: none;
}
