:root {
  /* Backgrounds */
  --night: #2E1E2A;
  --plum: #402A36;
  --wood: #8A5834;
  --wood-light: #BA7E4C;
  --parchment: #FFF4DC;
  --parchment-dark: #E2D2B6;

  /* Text */
  --text-dark-bg: #FFF0D6;
  --text-dark-bg-2: #C5AC98;
  --text-light-bg: #43291F;
  --text-light-bg-2: #795D45;
  --heading-gold: #F2C675;

  /* Accents */
  --gold: #FFD24A;
  --gold-dark: #C88A1C;
  --button-face: #F4E4C2;
  --brass: #9C6A24;
  --potion-blue: #4696EC;
  --potion-violet: #AA5ADC;

  --radius: 18px;
  --heading-shadow: 0 2px 4px rgba(26, 12, 16, 0.67);
  --font-heading: "Bree Serif", Georgia, "Times New Roman", serif;
  --font-body: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-dark-bg);
  background-color: var(--night);
  background-image:
    radial-gradient(ellipse 60% 45% at 15% -5%, rgba(170, 90, 220, 0.22), transparent 70%),
    radial-gradient(ellipse 55% 40% at 90% 5%, rgba(70, 150, 236, 0.16), transparent 70%);
  background-attachment: fixed;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
}

a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--heading-gold); }

.wrap { width: 100%; max-width: 900px; margin: 0 auto; padding: 0 20px; }

/* Header */
header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(46, 30, 42, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(186, 126, 76, 0.25);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; padding-block: 14px;
}
.brand {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--heading-gold);
  text-shadow: var(--heading-shadow);
  text-decoration: none;
  display: flex; align-items: center; gap: 10px;
}
.brand:hover { color: var(--gold); }
.brand .logo { font-size: 1.5rem; }
nav { display: flex; flex-wrap: wrap; gap: 4px; }
nav a {
  color: var(--text-dark-bg-2);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 6px 12px;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}
nav a:hover { color: var(--text-dark-bg); background: var(--plum); }
nav a[aria-current="page"] { color: var(--night); background: var(--gold); }

main { flex: 1; padding: 32px 0 72px; }

/* Hero */
.hero { text-align: center; padding: 56px 0 24px; }
.hero .icon {
  font-size: 4.5rem;
  display: inline-grid; place-items: center;
  width: 128px; height: 128px;
  border-radius: 32px;
  background: linear-gradient(160deg, var(--plum), var(--night));
  border: 3px solid var(--wood);
  box-shadow: inset 0 0 0 2px var(--wood-light), 0 12px 32px rgba(26, 12, 16, 0.5);
}
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  margin: 24px 0 10px;
  color: var(--heading-gold);
  text-shadow: var(--heading-shadow);
}
.hero p {
  color: var(--text-dark-bg-2);
  font-size: 1.2rem;
  max-width: 560px;
  margin: 0 auto;
}

.actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 14px;
  text-decoration: none;
  transition: transform 0.15s, background 0.15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--text-light-bg);
  background: var(--gold);
  border: 2px solid var(--gold-dark);
  box-shadow: 0 3px 0 var(--gold-dark);
}
.btn-primary:hover { color: var(--text-light-bg); background: var(--heading-gold); }
.btn-secondary {
  font-weight: 700;
  color: var(--text-light-bg);
  background: var(--button-face);
  border: 2px solid var(--brass);
  box-shadow: 0 3px 0 var(--brass);
}
.btn-secondary:hover { color: var(--text-light-bg); background: var(--parchment); }

/* Feature cards */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin-top: 56px;
}
.card {
  background: var(--parchment);
  color: var(--text-light-bg);
  border-radius: var(--radius);
  padding: 24px;
  border: 2px solid var(--wood-light);
  box-shadow: 0 10px 28px rgba(26, 12, 16, 0.35);
}
.card h3 { margin: 0 0 8px; font-size: 1.3rem; color: var(--text-light-bg); }
.card p { margin: 0; color: var(--text-light-bg-2); font-weight: 500; }
.card .emoji {
  display: inline-grid; place-items: center;
  width: 48px; height: 48px; margin-bottom: 14px;
  border-radius: 14px; font-size: 1.6rem;
  background: var(--parchment-dark);
}

/* Document pages (support / privacy / terms) */
.doc {
  background: var(--parchment);
  color: var(--text-light-bg);
  border-radius: 24px;
  border: 3px solid var(--wood);
  box-shadow: inset 0 0 0 2px var(--wood-light), 0 16px 40px rgba(26, 12, 16, 0.45);
  padding: clamp(24px, 5vw, 48px);
}
.doc h1 { font-size: clamp(2rem, 5vw, 2.6rem); margin: 0 0 4px; color: var(--text-light-bg); }
.doc .updated { color: var(--text-light-bg-2); font-weight: 500; margin-top: 0; }
.doc h2 {
  margin-top: 36px; font-size: 1.35rem; color: var(--text-light-bg);
  padding-bottom: 6px; border-bottom: 2px solid var(--parchment-dark);
}
.doc h3 { font-size: 1.15rem; margin-top: 26px; color: var(--text-light-bg); }
.doc p, .doc li { color: var(--text-light-bg); }
.doc strong { font-weight: 800; }
.doc a { color: var(--brass); font-weight: 600; }
.doc a:hover { color: var(--wood); }
.doc .card {
  background: var(--parchment-dark);
  border: none;
  box-shadow: none;
}
.doc .card p { color: var(--text-light-bg); }

/* Footer */
footer.site {
  background: var(--plum);
  border-top: 3px solid var(--wood);
  padding: 24px 0;
  color: var(--text-dark-bg-2);
  font-size: 0.92rem;
  font-weight: 500;
}
footer.site .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
footer.site a { color: var(--text-dark-bg-2); margin-right: 16px; text-decoration: none; }
footer.site a:hover { color: var(--heading-gold); }
.doc .card h3 { margin-top: 0; }

@media (max-width: 560px) {
  header.site .wrap { justify-content: center; }
  nav a { padding: 6px 10px; font-size: 0.9rem; }
  .doc { border-radius: 18px; }
}

.doc .card { margin-top: 24px; }

/* App icon */
.brand img.logo { width: 34px; height: 34px; border-radius: 9px; display: block; border: 2px solid var(--wood); }
.hero img.icon {
  display: block;
  width: 136px; height: 136px;
  margin: 0 auto;
  border-radius: 30px;
  border: 3px solid var(--wood);
  box-shadow: 0 0 0 2px var(--wood-light), 0 14px 36px rgba(26, 12, 16, 0.55), 0 0 60px rgba(170, 90, 220, 0.35);
}

/* Tags */
.tags {
  list-style: none; padding: 0; margin: 24px auto 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  max-width: 600px;
}
.tags li {
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--heading-gold);
  background: var(--plum);
  border: 1px solid var(--wood);
}

/* Home page content */
.intro { text-align: center; max-width: 680px; margin: 56px auto 0; }
.intro h2 {
  font-family: "Bree Serif", Georgia, serif; font-weight: 400;
  font-size: clamp(1.5rem, 3.6vw, 2rem); line-height: 1.25;
  color: var(--heading-gold); text-shadow: 0 2px 4px rgba(26, 12, 16, 0.67);
  margin: 0 0 12px;
}
.intro p { color: var(--text-dark-bg); font-size: 1.08rem; margin: 0; }

.features { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.features .card p + p { margin-top: 10px; }
.features .card:last-child { grid-column: 1 / -1; }
.boosters { margin: 10px 0; padding-left: 0; list-style: none; }
.boosters li {
  color: var(--text-light-bg); padding: 6px 10px; margin-bottom: 6px;
  background: var(--parchment-dark); border-radius: 10px; font-size: 0.95rem;
}

.love {
  margin-top: 56px; padding: clamp(24px, 4vw, 40px);
  background: var(--plum); border: 2px solid var(--wood); border-radius: 24px;
}
.love h2 {
  font-family: "Bree Serif", Georgia, serif; font-weight: 400; margin: 0 0 18px;
  color: var(--heading-gold); text-shadow: 0 2px 4px rgba(26, 12, 16, 0.67); text-align: center;
}
.love ul {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px 24px;
}
.love li { position: relative; padding-left: 28px; color: var(--text-dark-bg); }
.love li::before { content: "✦"; position: absolute; left: 4px; color: var(--gold); }
.love > p { text-align: center; color: var(--text-dark-bg-2); margin: 22px 0 0; }

.closing { text-align: center; margin-top: 56px; }
.closing .motto {
  font-family: "Bree Serif", Georgia, serif; font-size: clamp(1.6rem, 4vw, 2.2rem);
  color: var(--heading-gold); text-shadow: 0 2px 4px rgba(26, 12, 16, 0.67); margin: 0 0 6px;
}
.closing p { color: var(--text-dark-bg-2); margin: 0; font-size: 1.1rem; }

/* Store badges */
.store-badges { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.store-badges a { display: block; transition: transform 0.15s; }
.store-badges a:hover { transform: translateY(-2px); }
.store-badges img { display: block; height: 72px; width: auto; }
.closing .store-badges { margin-top: 18px; }
.store-badges { align-items: center; }
.store-badges .badge-apple img { height: 48px; }
