/* ==========================================================================
   MURMELI — shared stylesheet for index.html and privacy.html
   ========================================================================== */

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

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

body,
h1,
h2,
h3,
p,
ul,
figure {
  margin: 0;
}

ul {
  padding: 0;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---- Design tokens -------------------------------------------------------
   Light palette lives on bare :root. Dark palette is redefined twice:
   once for the OS-level "system" preference, once for an explicit
   data-theme="dark" override, so a future theme toggle would win either way.
   -------------------------------------------------------------------------- */
:root {
  /* brand */
  --accent: #da291c;
  --accent-strong: #b71f14;
  --accent-text: #da291c;
  --accent-contrast: #fffbf5;

  /* surfaces */
  --bg: #fffbf5;
  --surface: #ffffff;
  --surface-tint: #fff3e6;
  --border: #eee0cd;

  /* text */
  --text: #271b13;
  --text-muted: #6b5d50;

  /* shadow */
  --shadow-color: 25deg 45% 30%;
  --shadow-sm: 0 1px 2px hsl(var(--shadow-color) / 0.08);
  --shadow-md: 0 8px 24px hsl(var(--shadow-color) / 0.12);
  --shadow-lg: 0 20px 48px hsl(var(--shadow-color) / 0.16);

  /* type */
  --font-display: 'Baloo 2', ui-rounded, system-ui, sans-serif;
  --font-body:
    system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --fs-h1: clamp(2.15rem, 1.55rem + 2.6vw, 3.4rem);
  --fs-h2: clamp(1.55rem, 1.3rem + 1.1vw, 2.15rem);
  --fs-h3: clamp(1.1rem, 1.02rem + 0.35vw, 1.3rem);
  --fs-lead: clamp(1.05rem, 0.98rem + 0.3vw, 1.2rem);
  --fs-body: 1rem;
  --fs-small: 0.9rem;
  --fs-eyebrow: 0.85rem;

  /* spacing scale */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4.5rem;
  --sp-9: 6.5rem;

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --container-w: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --accent: #e4432f;
    --accent-strong: #ff7a57;
    --accent-text: #ff8567;
    --accent-contrast: #fff6ec;

    --bg: #1c130e;
    --surface: #271c15;
    --surface-tint: #32241a;
    --border: #40301f;

    --text: #f7ead9;
    --text-muted: #cab39d;

    --shadow-color: 20deg 60% 3%;
    --shadow-sm: 0 1px 2px hsl(var(--shadow-color) / 0.4);
    --shadow-md: 0 8px 24px hsl(var(--shadow-color) / 0.45);
    --shadow-lg: 0 20px 48px hsl(var(--shadow-color) / 0.55);

    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --accent: #e4432f;
  --accent-strong: #ff7a57;
  --accent-text: #ff8567;
  --accent-contrast: #fff6ec;

  --bg: #1c130e;
  --surface: #271c15;
  --surface-tint: #32241a;
  --border: #40301f;

  --text: #f7ead9;
  --text-muted: #cab39d;

  --shadow-color: 20deg 60% 3%;
  --shadow-sm: 0 1px 2px hsl(var(--shadow-color) / 0.4);
  --shadow-md: 0 8px 24px hsl(var(--shadow-color) / 0.45);
  --shadow-lg: 0 20px 48px hsl(var(--shadow-color) / 0.55);

  color-scheme: dark;
}

/* ---- Base ---------------------------------------------------------------- */
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.55;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: var(--sp-5);
}

@media (max-width: 400px) {
  .container {
    padding-inline: var(--sp-4);
  }

  .lang-btn {
    padding: var(--sp-1) var(--sp-2);
    font-size: 0.72rem;
  }

  .logo-word {
    font-size: 1.05rem;
  }
}

/* language toggling: elements are duplicated per language, one per data-lang */
.i18n-hidden {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---- Focus & skip link ---------------------------------------------------- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: var(--sp-4);
  z-index: 1000;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: var(--sp-4);
}

/* ---- Header ---------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-4);
  padding-block: var(--sp-3);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
}

.logo-mark {
  border-radius: 7px;
}

.logo-word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  color: var(--text);
}

.site-nav {
  display: none;
  align-items: center;
  gap: var(--sp-6);
  margin-inline: auto;
}

.nav-link {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--text-muted);
  padding: var(--sp-1) 0;
  border-bottom: 2px solid transparent;
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
}

a.nav-link:hover {
  color: var(--text);
  border-color: var(--border);
}

.nav-current {
  color: var(--accent-text);
}

.lang-switch {
  display: flex;
  gap: 2px;
  background: var(--surface-tint);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 3px;
  flex-shrink: 0;
}

.lang-btn {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-pill);
  transition:
    background-color 0.15s ease,
    color 0.15s ease;
}

.lang-btn:hover {
  color: var(--text);
}

.lang-btn.is-active {
  background: var(--accent);
  color: var(--accent-contrast);
}

@media (min-width: 760px) {
  .site-nav {
    display: flex;
  }
}

/* ---- Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-weight: 700;
  font-size: var(--fs-body);
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--accent-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent-text);
}

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-text);
}

/* ---- Hero ---------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: var(--sp-8) var(--sp-7);
  overflow: clip;
}

.hero::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 640px;
  background: radial-gradient(
    ellipse at 50% 0%,
    color-mix(in srgb, var(--accent) 16%, transparent),
    transparent 65%
  );
  z-index: -1;
}

.hero-grid {
  display: grid;
  gap: var(--sp-7);
  align-items: center;
}

.eyebrow {
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: var(--sp-3);
}

.hero-headline {
  font-size: var(--fs-h1);
  margin-bottom: var(--sp-4);
}

.hero-sub {
  font-size: var(--fs-lead);
  color: var(--text-muted);
  max-width: 46ch;
  margin-bottom: var(--sp-6);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.hero-platforms {
  font-size: var(--fs-small);
  color: var(--text-muted);
  font-weight: 600;
}

.hero-media {
  display: flex;
  justify-content: center;
}

.hero-img {
  width: min(340px, 72vw);
  filter: drop-shadow(var(--shadow-lg));
}

@media (min-width: 860px) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .hero-media {
    justify-content: flex-end;
  }

  .hero-img {
    width: min(400px, 100%);
  }
}

/* ---- Section shared ---------------------------------------------------------- */
section {
  padding-block: var(--sp-8);
}

.section-heading {
  font-size: var(--fs-h2);
  text-align: center;
  margin-bottom: var(--sp-7);
}

/* ---- Features ---------------------------------------------------------------- */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--surface-tint);
  color: var(--accent-text);
  margin-bottom: var(--sp-4);
}

.feature-icon svg {
  width: 26px;
  height: 26px;
}

.feature-title {
  font-size: var(--fs-h3);
  margin-bottom: var(--sp-2);
}

.feature-body {
  color: var(--text-muted);
  font-size: var(--fs-small);
}

@media (min-width: 640px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 980px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---- Pro ---------------------------------------------------------------- */
.pro {
  background: var(--surface-tint);
  border-block: 1px solid var(--border);
}

.pro-card {
  max-width: 620px;
  margin-inline: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-7) var(--sp-6);
  text-align: center;
  box-shadow: var(--shadow-md);
}

.pro-eyebrow {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-h3);
  color: var(--accent-text);
  margin-bottom: var(--sp-2);
}

.pro-subtitle {
  font-size: var(--fs-lead);
  color: var(--text-muted);
  margin-bottom: var(--sp-6);
}

.benefits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  text-align: left;
  max-width: 460px;
  margin-inline: auto;
  margin-bottom: var(--sp-6);
}

.benefits li {
  position: relative;
  padding-left: var(--sp-6);
  font-weight: 600;
}

.benefits li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E")
    center / 62% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E")
    center / 62% no-repeat;
}

.price-note {
  font-size: var(--fs-small);
  color: var(--text-muted);
  margin-bottom: var(--sp-6);
}

/* ---- Privacy teaser ---------------------------------------------------------------- */
.privacy-teaser-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-7);
  box-shadow: var(--shadow-sm);
}

.privacy-teaser-text h2 {
  font-size: var(--fs-h2);
  margin-bottom: var(--sp-3);
}

.privacy-teaser-text p {
  color: var(--text-muted);
  max-width: 60ch;
}

.privacy-teaser-inner .btn {
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

@media (min-width: 760px) {
  .privacy-teaser-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ---- Privacy page ---------------------------------------------------------------- */
.privacy-page {
  padding-block: var(--sp-7) var(--sp-9);
}

.privacy-content {
  max-width: 760px;
}

.privacy-content h1 {
  font-size: var(--fs-h1);
  margin-bottom: var(--sp-5);
}

.privacy-intro {
  font-size: var(--fs-lead);
  color: var(--text-muted);
  margin-bottom: var(--sp-7);
  padding-bottom: var(--sp-6);
  border-bottom: 1px solid var(--border);
}

.policy-section {
  padding-block: var(--sp-5);
  border-bottom: 1px solid var(--border);
}

.policy-section:last-of-type {
  border-bottom: none;
}

.policy-section h2 {
  font-size: var(--fs-h3);
  margin-bottom: var(--sp-2);
}

.policy-section p {
  color: var(--text-muted);
}

.last-updated {
  margin-top: var(--sp-6);
  font-size: var(--fs-small);
  color: var(--text-muted);
  font-style: italic;
}

/* ---- Footer ---------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: var(--sp-7);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  text-align: center;
}

.footer-tagline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-h3);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-2) var(--sp-6);
}

.footer-link {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: var(--accent-text);
}

.footer-copyright {
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.8;
}

@media (min-width: 760px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ---- Sources ---------------------------------------------------------------- */
.sources-intro,
.sources-note,
.sources-disclaimer {
  max-width: 62ch;
  margin-inline: auto;
  text-align: center;
  color: var(--text-muted);
}

.sources-note {
  font-size: var(--fs-small);
  margin-top: var(--sp-3);
}

.sources-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
  max-width: 70ch;
  margin: var(--sp-6) auto;
  padding: 0;
}

.sources-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-4) var(--sp-5);
  font-size: var(--fs-small);
}

.sources-abbrev {
  display: inline-block;
  min-width: 4.5rem;
  font-weight: 700;
}

.sources-link {
  color: var(--accent-text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sources-disclaimer {
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--border);
  font-size: var(--fs-small);
}

.footer-disclaimer {
  max-width: 60ch;
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.8;
}
