:root {
  color-scheme: light dark;
  --background: #f6f2ea;
  --surface: #ffffff;
  --surface-soft: #fbfaf7;
  --surface-panel: rgba(255, 255, 255, 0.86);
  --surface-panel-soft: rgba(255, 255, 255, 0.82);
  --surface-link: rgba(255, 255, 255, 0.78);
  --surface-nav: rgba(255, 255, 255, 0.72);
  --header-background: rgba(246, 242, 234, 0.9);
  --text: #1c1f24;
  --muted: #5f6570;
  --accent: #2f7d6f;
  --accent-dark: #245f55;
  --blue: #38559a;
  --border: #ded8cb;
  --header-border: rgba(222, 216, 203, 0.78);
  --gradient-primary: rgba(47, 125, 111, 0.16);
  --gradient-secondary: rgba(56, 85, 154, 0.12);
  --shadow: 0 22px 70px rgba(31, 34, 40, 0.12);
  --card-shadow: 0 18px 44px rgba(31, 34, 40, 0.08);
  --store-icon-shadow: 0 10px 24px rgba(31, 34, 40, 0.16);
  --page-icon-shadow: 0 16px 36px rgba(31, 34, 40, 0.18);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #101418;
    --surface: #171d22;
    --surface-soft: #141a1f;
    --surface-panel: rgba(23, 29, 34, 0.9);
    --surface-panel-soft: rgba(23, 29, 34, 0.84);
    --surface-link: rgba(23, 29, 34, 0.82);
    --surface-nav: rgba(255, 255, 255, 0.08);
    --header-background: rgba(16, 20, 24, 0.9);
    --text: #f3f0e8;
    --muted: #b8c0c6;
    --accent: #5ec5b0;
    --accent-dark: #7ed8c5;
    --blue: #8ca5ff;
    --border: #303941;
    --header-border: rgba(48, 57, 65, 0.78);
    --gradient-primary: rgba(94, 197, 176, 0.14);
    --gradient-secondary: rgba(140, 165, 255, 0.12);
    --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
    --card-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
    --store-icon-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
    --page-icon-shadow: 0 16px 36px rgba(0, 0, 0, 0.36);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    linear-gradient(135deg, var(--gradient-primary), transparent 34%),
    linear-gradient(315deg, var(--gradient-secondary), transparent 32%),
    var(--background);
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 64px);
  border-bottom: 1px solid var(--header-border);
  background: var(--header-background);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 800;
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(31, 34, 40, 0.14);
}

.brand span {
  white-space: nowrap;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.site-nav a {
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--surface-nav);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-nav);
}

.lang-switch button {
  min-width: 36px;
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  background: transparent;
  cursor: pointer;
}

.lang-switch button[aria-pressed="true"] {
  color: #ffffff;
  background: var(--accent);
}

.hero {
  display: grid;
  min-height: calc(100vh - 77px);
  align-items: center;
  padding: clamp(48px, 9vw, 112px) clamp(20px, 5vw, 64px);
}

.hero-content,
.section,
.content-page {
  width: min(100%, 1120px);
  margin: 0 auto;
}

.hero-content {
  padding: clamp(32px, 7vw, 72px);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-panel);
  box-shadow: var(--shadow);
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}

.hero-brand img {
  width: clamp(56px, 9vw, 72px);
  height: clamp(56px, 9vw, 72px);
  flex: 0 0 auto;
  border-radius: 18px;
  box-shadow: var(--page-icon-shadow);
}

.hero-brand .eyebrow {
  margin: 0;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent-dark);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 0;
  font-size: clamp(2.55rem, 6vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.22rem;
}

.intro,
.section-heading p,
.page-heading p {
  max-width: 650px;
  color: var(--muted);
  font-size: clamp(1.04rem, 2vw, 1.22rem);
  line-height: 1.65;
}

.intro {
  margin: 28px 0 0;
}

.translation {
  display: none;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.98em;
  line-height: 1.65;
}

html[data-lang="en"] .translation {
  display: block;
}

html[data-lang="en"] .fr-copy {
  display: none;
}

.bilingual-label {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

.button-primary {
  color: #ffffff;
  background: var(--accent);
}

.button-primary:hover {
  background: var(--accent-dark);
}

.button-secondary {
  color: var(--text);
  border-color: var(--border);
  background: var(--surface);
}

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

.section {
  padding: 72px clamp(20px, 5vw, 64px);
}

.section-heading {
  margin-bottom: 30px;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.app-card {
  display: grid;
  min-height: 320px;
  grid-template-rows: auto 1fr auto;
  gap: 22px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.muted-card {
  background: var(--surface-soft);
}

.app-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  font-weight: 900;
  background: var(--accent);
}

.store-icon {
  width: 58px;
  height: 58px;
  border-radius: 13px;
  object-fit: cover;
  box-shadow: var(--store-icon-shadow);
}

.app-icon-secondary {
  background: var(--blue);
}

.app-icon-green {
  background: #2f7d6f;
}

.app-icon-purple {
  background: #6b4bb8;
}

.app-icon-dark {
  background: #202633;
}

.app-icon-warm {
  background: #a85f32;
}

.status {
  margin-bottom: 8px;
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.app-card p:not(.status),
.qa-list p,
.legal-content p {
  color: var(--muted);
  line-height: 1.65;
}

.text-link {
  width: fit-content;
  color: var(--accent-dark);
  font-weight: 800;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.disabled-link {
  color: var(--muted);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.card-actions .button {
  min-height: 44px;
  padding-inline: 15px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 28px;
  align-items: start;
}

.link-panel {
  display: grid;
  gap: 12px;
}

.app-link-index {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 34px;
}

.link-panel a {
  display: grid;
  gap: 6px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-link);
  text-decoration: none;
}

.link-panel a:hover {
  border-color: var(--accent);
}

.link-panel span {
  color: var(--muted);
}

.content-page {
  padding: clamp(48px, 8vw, 92px) clamp(20px, 5vw, 64px);
}

.app-page {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: clamp(42px, 8vw, 92px) clamp(20px, 5vw, 64px);
}

.app-hero {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: clamp(24px, 5vw, 48px);
  align-items: center;
  padding: clamp(28px, 6vw, 62px);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-panel);
  box-shadow: var(--shadow);
}

.app-hero-icon,
.page-icon {
  width: 112px;
  height: 112px;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: var(--page-icon-shadow);
}

.page-icon {
  width: 74px;
  height: 74px;
  margin-bottom: 18px;
  border-radius: 16px;
}

.app-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-inline: 0;
}

.app-detail-grid article {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-panel-soft);
}

.app-detail-grid p {
  color: var(--muted);
  line-height: 1.65;
}

.page-heading {
  margin-bottom: 34px;
}

.qa-list,
.legal-content {
  display: grid;
  gap: 14px;
}

.qa-list article,
.legal-content article {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-panel-soft);
}

.qa-list a,
.legal-content a,
.site-footer a {
  color: var(--accent-dark);
  font-weight: 800;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 26px clamp(20px, 5vw, 64px);
  border-top: 1px solid var(--border);
  color: var(--muted);
}

@media (max-width: 760px) {
  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .brand img {
    width: 36px;
    height: 36px;
  }

  .hero {
    min-height: auto;
    padding-top: 34px;
  }

  .app-grid,
  .app-detail-grid,
  .app-link-index,
  .split-section {
    grid-template-columns: 1fr;
  }

  .app-hero {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 761px) and (max-width: 1020px) {
  .app-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .site-header {
    gap: 16px;
  }

  .site-nav a {
    padding: 8px 9px;
  }

  .hero-content {
    padding: 26px;
  }

  .hero-brand {
    gap: 14px;
  }

  .button {
    width: 100%;
  }

  .app-card,
  .qa-list article,
  .legal-content article {
    padding: 22px;
  }
}
