:root {
  --bg: #eaf5f6;
  --bg-soft: #d8ecee;
  --text: #0b3540;
  --text-soft: #3f6b74;
  --accent: #c9962a;
  --card-shadow: 0 12px 30px rgba(10, 50, 60, 0.08);
  --border: rgba(10, 50, 60, 0.08);
  color-scheme: light;
}

:root[data-palette="navy"] {
  --bg: #eaf5f6;
  --bg-soft: #d8ecee;
  --text: #0b3540;
  --text-soft: #3f6b74;
  --accent: #c9962a;
  --card-shadow: 0 12px 30px rgba(10, 50, 60, 0.08);
  --border: rgba(10, 50, 60, 0.08);
}

:root[data-palette="sand"] {
  --bg: #faf6ec;
  --bg-soft: #f1e9d3;
  --text: #3a2f1d;
  --text-soft: #7a6b4d;
  --accent: #b9762f;
  --card-shadow: 0 12px 30px rgba(60, 45, 15, 0.08);
  --border: rgba(60, 45, 15, 0.08);
}

:root[data-palette="coral"] {
  --bg: #fdf0ee;
  --bg-soft: #fbdedb;
  --text: #3a1f1c;
  --text-soft: #8a4a43;
  --accent: #c2503f;
  --card-shadow: 0 12px 30px rgba(120, 40, 30, 0.08);
  --border: rgba(120, 40, 30, 0.08);
}

:root[data-palette="seafoam"] {
  --bg: #eafaf5;
  --bg-soft: #d7f2e8;
  --text: #0e3a2c;
  --text-soft: #3f7a63;
  --accent: #2f9c74;
  --card-shadow: 0 12px 30px rgba(10, 70, 50, 0.08);
  --border: rgba(10, 70, 50, 0.08);
}

/* Dark mode: one tinted variant per palette */
:root[data-theme="dark"] {
  --bg: #0a1c22;
  --bg-soft: #12262e;
  --text: #eaf5f6;
  --text-soft: #9fc2c9;
  --card-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  --border: rgba(255, 255, 255, 0.08);
  color-scheme: dark;
}

:root[data-theme="dark"][data-palette="navy"] {
  --bg: #0a1c22;
  --bg-soft: #12262e;
  --text: #eaf5f6;
  --text-soft: #9fc2c9;
  --accent: #d8ab48;
  --card-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  --border: rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"][data-palette="sand"] {
  --bg: #201a10;
  --bg-soft: #2b2317;
  --text: #f6efdf;
  --text-soft: #cabb96;
  --accent: #d3944a;
  --card-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  --border: rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"][data-palette="coral"] {
  --bg: #241412;
  --bg-soft: #301c19;
  --text: #fbe6e2;
  --text-soft: #cf9b93;
  --accent: #e07a58;
  --card-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  --border: rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"][data-palette="seafoam"] {
  --bg: #0c221a;
  --bg-soft: #133024;
  --text: #e4f7ef;
  --text-soft: #9fcdb8;
  --accent: #48c290;
  --card-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  --border: rgba(255, 255, 255, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1c22;
    --bg-soft: #12262e;
    --text: #eaf5f6;
    --text-soft: #9fc2c9;
    --card-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    --border: rgba(255, 255, 255, 0.08);
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: "SF Pro Rounded", ui-rounded, "Nunito", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: background 0.2s ease, color 0.2s ease;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

header.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem clamp(1.25rem, 5vw, 3rem);
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: "Space Grotesk", ui-rounded, sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--text);
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  border: none;
  background: none;
  color: var(--text);
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, color 0.15s ease;
}

.icon-btn:hover {
  transform: translateY(-1px) scale(1.05);
  color: var(--accent);
}

.icon-btn svg {
  width: 22px;
  height: 22px;
}

[data-theme-toggle] .icon-sun {
  display: none;
}

:root[data-theme="dark"] [data-theme-toggle] .icon-sun {
  display: block;
}

:root[data-theme="dark"] [data-theme-toggle] .icon-moon {
  display: none;
}

.lang-switch {
  position: relative;
}

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 0.4rem;
  display: none;
  min-width: 140px;
  z-index: 20;
}

.lang-menu.open {
  display: block;
}

.lang-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.7rem;
  border: none;
  background: none;
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
}

.lang-menu button:hover,
.lang-menu button[aria-current="true"] {
  background: var(--bg-soft);
}

main.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem clamp(1.25rem, 6vw, 3rem) 2rem;
  gap: 1.75rem;
}

.hero-icon {
  width: clamp(96px, 20vw, 148px);
  height: clamp(96px, 20vw, 148px);
  border-radius: 26%;
  box-shadow: var(--card-shadow);
}

h1.title {
  font-family: "Space Grotesk", ui-rounded, sans-serif;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
}

p.tagline {
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  color: var(--text-soft);
  max-width: 34rem;
  margin: 0;
  line-height: 1.5;
}

.pill-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
}

.pill {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  color: var(--text-soft);
}

.cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.65rem 1.15rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}

.cta-btn:hover {
  transform: translateY(-2px) scale(1.03);
  background: var(--accent);
  color: #fff;
}

.cta-btn svg {
  width: 22px;
  height: 22px;
}

.cta-btn.appstore-btn {
  background: none;
  border: none;
  padding: 0;
}

.cta-btn.appstore-btn:hover {
  background: none;
  color: inherit;
}

.appstore-btn img {
  display: block;
  height: 44px;
  width: auto;
}

.appstore-btn .appstore-badge-dark {
  display: none;
}

:root[data-theme="dark"] .appstore-btn .appstore-badge-light {
  display: none;
}

:root[data-theme="dark"] .appstore-btn .appstore-badge-dark {
  display: block;
}

footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.4rem clamp(1.25rem, 5vw, 3rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-soft);
}

.footer-links {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  align-items: center;
}

.footer-links a {
  color: var(--text-soft);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

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

main.doc hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* Privacy page */
main.doc {
  flex: 1;
  padding: 1rem clamp(1.25rem, 6vw, 3rem) 3rem;
  max-width: 42rem;
  margin: 0 auto;
  width: 100%;
}

main.doc h1 {
  font-size: 1.9rem;
  margin-bottom: 0.2rem;
}

main.doc .updated {
  color: var(--text-soft);
  font-size: 0.85rem;
  margin-bottom: 2rem;
}

main.doc h2 {
  font-size: 1.15rem;
  margin-top: 2rem;
}

main.doc p, main.doc li {
  color: var(--text-soft);
  line-height: 1.65;
}

main.doc a {
  color: var(--text);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
  color: var(--text-soft);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.lang-note {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}
