:root {
  color-scheme: light dark;
  --ink: #142033;
  --muted: #667085;
  --surface: #ffffff;
  --surface-soft: #f4f7fb;
  --surface-card: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.86);
  --surface-popover: rgba(255, 255, 255, 0.96);
  --surface-chip: rgba(255, 255, 255, 0.72);
  --line: #d9e2ec;
  --active-bg: #142033;
  --active-text: #ffffff;
  --blue: #2563eb;
  --green: #0f9f8f;
  --coral: #f9735b;
  --yellow: #f4b740;
  --shadow: 0 24px 80px rgba(20, 32, 51, 0.14);
  --shadow-soft: 0 12px 40px rgba(20, 32, 51, 0.06);
  --card-shadow: 0 12px 36px rgba(20, 32, 51, 0.10);
  --primary-bg: #142033;
  --primary-text: #ffffff;
  --phone-shell: #111827;
  --phone-screen: linear-gradient(180deg, #f8fbff, #e9f1f8);
  --phone-tile: rgba(255, 255, 255, 0.72);
  --featured-bg: linear-gradient(135deg, #ffffff, #f1f8f7);
  --callout-bg: linear-gradient(135deg, #eef7ff, #f8fafc 52%, #fff4ec);
  --control-bg: #ffffff;
  --control-text: #142033;
  --toggle-bg: rgba(255, 255, 255, 0.88);
  --radius: 8px;
  --max: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ink: #edf4ff;
    --muted: #aab8c9;
    --surface: #0b111c;
    --surface-soft: #121b2a;
    --surface-card: #111a28;
    --surface-glass: rgba(11, 17, 28, 0.86);
    --surface-popover: rgba(17, 26, 40, 0.97);
    --surface-chip: rgba(17, 26, 40, 0.78);
    --line: #263448;
    --active-bg: #edf4ff;
    --active-text: #0b111c;
    --blue: #78a7ff;
    --green: #45d6c4;
    --coral: #ff9b84;
    --yellow: #ffd166;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
    --shadow-soft: 0 12px 40px rgba(0, 0, 0, 0.22);
    --card-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
    --primary-bg: #edf4ff;
    --primary-text: #0b111c;
    --phone-shell: #020617;
    --phone-screen: linear-gradient(180deg, #172033, #0f1726);
    --phone-tile: rgba(255, 255, 255, 0.08);
    --featured-bg: linear-gradient(135deg, #111a28, #10241f);
    --callout-bg: linear-gradient(135deg, #102033, #101827 52%, #241713);
    --control-bg: #111a28;
    --control-text: #edf4ff;
    --toggle-bg: rgba(17, 26, 40, 0.9);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #edf4ff;
  --muted: #aab8c9;
  --surface: #0b111c;
  --surface-soft: #121b2a;
  --surface-card: #111a28;
  --surface-glass: rgba(11, 17, 28, 0.86);
  --surface-popover: rgba(17, 26, 40, 0.97);
  --surface-chip: rgba(17, 26, 40, 0.78);
  --line: #263448;
  --active-bg: #edf4ff;
  --active-text: #0b111c;
  --blue: #78a7ff;
  --green: #45d6c4;
  --coral: #ff9b84;
  --yellow: #ffd166;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --shadow-soft: 0 12px 40px rgba(0, 0, 0, 0.22);
  --card-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
  --primary-bg: #edf4ff;
  --primary-text: #0b111c;
  --phone-shell: #020617;
  --phone-screen: linear-gradient(180deg, #172033, #0f1726);
  --phone-tile: rgba(255, 255, 255, 0.08);
  --featured-bg: linear-gradient(135deg, #111a28, #10241f);
  --callout-bg: linear-gradient(135deg, #102033, #101827 52%, #241713);
  --control-bg: #111a28;
  --control-text: #edf4ff;
  --toggle-bg: rgba(17, 26, 40, 0.9);
}

:root[data-theme="light"] {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
}

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

a {
  color: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  width: min(var(--max), calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--surface-glass);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 750;
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--green));
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.24);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  min-height: 40px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 650;
  transition: color 180ms ease, background 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
  background: var(--surface-soft);
}

.language-switch {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-chip);
}

.language-switch a,
.language-switch span {
  min-height: 30px;
  min-width: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
  text-decoration: none;
}

.language-switch span {
  color: var(--active-text);
  background: var(--active-bg);
}

.language-switch a:hover,
.language-switch a:focus-visible {
  color: var(--ink);
  background: var(--surface-soft);
}

.nav-toggle {
  display: none;
}

.section-band,
.section {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.hero,
.app-hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
  align-items: center;
  gap: clamp(32px, 8vw, 96px);
  padding: 56px 0 84px;
}

.section {
  padding: 92px 0;
}

.eyebrow,
.mini-label {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

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

h1 {
  max-width: 860px;
  font-size: clamp(3rem, 7.6vw, 6.8rem);
}

h2 {
  font-size: clamp(2rem, 4.5vw, 4rem);
}

h3 {
  font-size: 1.25rem;
}

.hero-text,
.app-title p,
.section-heading p,
.split-section p,
.support-section p,
.privacy-section p {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.08rem;
}

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

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 750;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
}

.button.primary {
  color: var(--primary-text);
  border-color: var(--primary-bg);
  background: var(--primary-bg);
  box-shadow: 0 16px 44px rgba(20, 32, 51, 0.22);
}

.button.secondary {
  background: var(--control-bg);
  color: var(--control-text);
}

.device-stage {
  display: grid;
  place-items: center;
}

.phone-shell {
  width: min(100%, 370px);
  aspect-ratio: 0.5;
  padding: 14px;
  border-radius: 44px;
  background: var(--phone-shell);
  box-shadow: var(--shadow);
  transform: rotate(3deg);
}

.phone-screen {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  border-radius: 32px;
  background: var(--phone-screen);
  overflow: hidden;
}

.status-row,
.metric-grid {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.app-card {
  padding: 20px;
  border-radius: 8px;
  background: var(--surface-card);
  box-shadow: var(--card-shadow);
}

.app-card strong {
  display: block;
  font-size: 1.35rem;
  line-height: 1.16;
}

.accent-a {
  border-left: 5px solid var(--blue);
}

.accent-b {
  border-left: 5px solid var(--coral);
}

.metric-grid div {
  flex: 1;
  padding: 16px;
  border-radius: 8px;
  background: var(--phone-tile);
}

.metric-grid strong,
.metric-grid span {
  display: block;
}

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

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

.work-item,
.feature-grid article,
.store-panel,
.info-list,
.privacy-section {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-card);
  box-shadow: var(--shadow-soft);
}

.work-item.featured {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  background: var(--featured-bg);
}

.work-item p,
.feature-grid p,
.principle p,
.store-panel p,
.info-list dd {
  color: var(--muted);
}

.text-link {
  color: var(--blue);
  font-weight: 800;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.split-section {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: clamp(32px, 7vw, 80px);
  align-items: start;
}

.principles {
  display: grid;
  gap: 16px;
}

.principle {
  padding: 24px 0 24px 24px;
  border-left: 3px solid var(--line);
}

.principle span {
  color: var(--coral);
  font-weight: 850;
}

.capability-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.capability-list span {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--ink);
  font-weight: 720;
}

.contact-section,
.support-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 48px;
  border-radius: var(--radius);
  background: var(--callout-bg);
}

.app-hero {
  grid-template-columns: minmax(0, 1fr) 320px;
}

.app-title {
  display: flex;
  align-items: center;
  gap: 24px;
}

.app-title img {
  width: 112px;
  height: 112px;
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(20, 32, 51, 0.16);
}

.info-section {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: 28px;
}

.info-list {
  margin: 0;
  display: grid;
  gap: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.info-list div:last-child {
  border-bottom: 0;
}

.info-list dt {
  font-weight: 850;
}

.info-list dd {
  margin: 0;
}

.site-footer {
  width: min(var(--max), calc(100% - 32px));
  min-height: 88px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  color: var(--muted);
}

.footer-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 16px;
}

.theme-toggle {
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 30;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--toggle-bg);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 850;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: var(--green);
  transform: translateY(-2px);
}

.theme-toggle-icon {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--green));
}

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease, transform 600ms ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 860px) {
  .site-header {
    min-height: 64px;
  }

  .nav-toggle {
    width: 44px;
    height: 44px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--control-bg);
  }

  .nav-toggle span:not(.sr-only) {
    width: 18px;
    height: 2px;
    background: var(--ink);
  }

  .site-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    display: none;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-popover);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: grid;
  }

  .language-switch {
    width: 100%;
    justify-content: flex-start;
  }

  .hero,
  .app-hero,
  .split-section,
  .info-section {
    grid-template-columns: 1fr;
  }

  .hero,
  .app-hero {
    min-height: auto;
    padding-top: 44px;
  }

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

  .work-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .work-item.featured {
    grid-column: span 1;
  }

  .contact-section,
  .support-section {
    align-items: flex-start;
    flex-direction: column;
    padding: 32px 24px;
  }
}

@media (max-width: 560px) {
  .section-band,
  .section,
  .site-header,
  .site-footer {
    width: min(100% - 24px, var(--max));
  }

  .section {
    padding: 64px 0;
  }

  h1 {
    font-size: clamp(2.65rem, 15vw, 4.3rem);
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .work-item.featured,
  .app-title {
    grid-template-columns: 1fr;
    display: grid;
  }

  .info-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .site-footer {
    padding: 24px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .theme-toggle {
    max-width: calc(100vw - 32px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
