:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f5f5f7;
  --surface-strong: #ececf1;
  --ink: #111114;
  --ink-soft: #646676;
  --line: #dfdfe7;
  --accent: #d91023;
  --accent-strong: #b80d1d;
  --accent-soft: #fff0f2;
  --cream: #ffd9b8;
  --shadow: 0 28px 70px rgba(17, 17, 20, 0.14);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --font-body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
  --bg: #050505;
  --surface: #0a0a0a;
  --surface-soft: #101010;
  --surface-strong: #17120f;
  --ink: #ffffff;
  --ink-soft: #9ea4b8;
  --line: #3d3029;
  --accent: #ffd1ad;
  --accent-strong: #f7bd91;
  --accent-soft: rgba(255, 209, 173, 0.12);
  --cream: #ffd1ad;
  --shadow: 0 32px 90px rgba(0, 0, 0, 0.58);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg) 0%, var(--surface-soft) 100%);
  line-height: 1.55;
  transition: background-color 0.22s ease, color 0.22s ease;
}

a { color: inherit; }

.topbar,
main,
.footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 13px;
  color: #ffffff;
  background: var(--accent);
  font-size: 0.95rem;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(217, 16, 35, 0.24);
}

html[data-theme="dark"] .brand-mark {
  color: #230d52;
  background: var(--cream);
  box-shadow: 0 16px 38px rgba(255, 209, 173, 0.2);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.02rem;
  line-height: 1.15;
}

.brand small {
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.nav {
  display: flex;
  gap: 20px;
}

.nav a {
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.nav a:hover { color: var(--ink); }

.topbar-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.language-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 10px 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--surface);
  font-size: 0.82rem;
  font-weight: 800;
}

.language-select span {
  color: var(--ink-soft);
}

.language-select select {
  min-width: 76px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  cursor: pointer;
  outline: none;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 10px 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
}

.toggle-track {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: var(--surface-strong);
}

.toggle-track span {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--accent);
  transition: transform 0.18s ease;
}

html[data-theme="dark"] .toggle-track span { transform: translateX(18px); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.88fr);
  gap: 44px;
  align-items: center;
  min-height: min(760px, calc(100vh - 82px));
  padding: 24px 0 54px;
}

.hero-copy { max-width: 640px; }

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.04;
}

h1 {
  font-size: clamp(2.45rem, 4.8vw, 4.15rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  font-weight: 800;
}

h3 {
  margin: 0 0 8px;
  font-size: 1.12rem;
}

.intro,
.section p,
.download p {
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.intro {
  max-width: 58ch;
  margin: 18px 0 0;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  color: #ffffff;
  background: #d91023;
  box-shadow: 0 18px 44px rgba(217, 16, 35, 0.26);
}

html[data-theme="dark"] .btn-primary {
  color: #260f58;
  background: var(--cream);
  box-shadow: 0 18px 44px rgba(255, 209, 173, 0.2);
}

.btn-secondary {
  border: 1px solid var(--line);
  background: var(--surface);
}

.summary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.summary-row span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--surface);
  font-size: 0.86rem;
  font-weight: 800;
}

.hero-visual {
  position: relative;
  display: grid;
  justify-items: center;
}

.phone-shell,
.mode-preview figure,
.shared-shot {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.phone-shell {
  width: min(100%, 258px);
  aspect-ratio: 9 / 20;
  border-radius: 30px;
}

.phone-shell img,
.mode-preview img,
.shared-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.day-card {
  position: absolute;
  right: 0;
  bottom: 4%;
  width: min(280px, 70%);
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(18px);
}

.day-card strong,
.day-card span {
  display: block;
}

.day-card strong { font-size: 1.15rem; }

.day-card span {
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.section { padding: 68px 0; }

.app-strip,
.split,
.download {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 42px;
  align-items: center;
}

.section-copy p,
.split p,
.download p {
  max-width: 58ch;
  margin: 18px 0 0;
}

.mode-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: end;
}

.mode-preview figure {
  aspect-ratio: 9 / 20;
  border-radius: 28px;
}

.mode-preview figure:first-child { transform: translateY(26px); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.feature-grid article {
  min-height: 210px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.feature-grid span {
  display: block;
  margin-bottom: 24px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
}

.feature-grid p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.shared-shot {
  width: min(100%, 330px);
  aspect-ratio: 9 / 20;
  justify-self: center;
  border-radius: 30px;
}

.download {
  margin-bottom: 34px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.store-btn {
  align-items: center;
  display: inline-flex;
  gap: 12px;
  min-height: 64px;
  justify-content: center;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: var(--surface-soft);
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.store-btn:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.store-btn span {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.15;
}

.store-btn img {
  aspect-ratio: 1;
  display: block;
  flex: 0 0 40px;
  height: 40px;
  object-fit: contain;
  width: 40px;
}

.redirect-note { min-height: 1.2em; }

.analytics-consent {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  width: min(720px, calc(100% - 40px));
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.analytics-consent strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.95rem;
  line-height: 1.2;
}

.analytics-consent p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.4;
}

.analytics-consent-actions {
  display: flex;
  gap: 8px;
}

.analytics-consent button {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: #ffffff;
  background: #d91023;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
}

html[data-theme="dark"] .analytics-consent button {
  color: #260f58;
  background: var(--cream);
  border-color: var(--cream);
}

.analytics-consent button[data-analytics-reject] {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-nav a { text-decoration: none; }

.footer-nav a:hover { color: var(--ink); }

.page-shell {
  min-height: 100vh;
  padding: 40px 20px 64px;
}

.back {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--ink-soft);
  text-decoration: none;
}

.legal-card {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
}

.legal-card p,
.legal-card li {
  color: var(--ink-soft);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

@media (max-width: 900px) {
  .nav { display: none; }

  .topbar {
    flex-wrap: wrap;
  }

  .hero,
  .app-strip,
  .split,
  .download {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    gap: 30px;
    padding-top: 20px;
  }

  .day-card { right: max(0px, calc(50% - 210px)); }

  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .mode-preview figure:first-child { transform: none; }
}

@media (max-width: 620px) {
  .topbar,
  main,
  .footer {
    width: min(1120px, calc(100% - 28px));
  }

  .topbar {
    align-items: flex-start;
    gap: 12px;
  }

  .topbar-controls {
    width: 100%;
    justify-content: space-between;
  }

  .brand small { display: none; }

  .theme-toggle { padding-left: 10px; }

  .theme-toggle span:first-child { display: none; }

  .language-select {
    max-width: calc(100% - 62px);
  }

  h1 {
    font-size: clamp(2.25rem, 11.2vw, 2.85rem);
    line-height: 1.05;
  }

  .intro {
    margin-top: 16px;
    font-size: 0.98rem;
    line-height: 1.48;
  }

  .hero-actions {
    margin-top: 22px;
  }

  .summary-row {
    gap: 8px;
    margin-top: 16px;
  }

  .summary-row span {
    min-height: 31px;
    padding: 0 10px;
    font-size: 0.78rem;
  }

  .phone-shell { width: min(100%, 230px); }

  .day-card {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    margin-top: 18px;
  }

  .mode-preview,
  .feature-grid,
  .store-grid {
    grid-template-columns: 1fr;
  }

  .mode-preview figure {
    width: min(100%, 300px);
    justify-self: center;
  }

  .download { padding: 24px; }

  .analytics-consent {
    right: 14px;
    bottom: 14px;
    grid-template-columns: 1fr;
    gap: 8px;
    width: calc(100% - 28px);
    padding: 10px 12px;
  }

  .analytics-consent strong {
    margin-bottom: 2px;
    font-size: 0.84rem;
  }

  .analytics-consent p {
    font-size: 0.76rem;
    line-height: 1.28;
  }

  .analytics-consent-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .analytics-consent button {
    width: 100%;
    min-height: 36px;
    padding: 0 10px;
    font-size: 0.82rem;
  }
}
