:root {
  --bg: #071327;
  --bg-elevated: rgba(10, 24, 50, 0.78);
  --surface: rgba(12, 24, 50, 0.7);
  --surface-strong: rgba(11, 22, 44, 0.92);
  --surface-soft: rgba(255, 255, 255, 0.05);
  --text: #eff4ff;
  --muted: #b6c1da;
  --line: rgba(255, 255, 255, 0.1);
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  --accent-start: #4e87ff;
  --accent-end: #3fd7cf;
  --accent: linear-gradient(135deg, var(--accent-start) 0%, var(--accent-end) 100%);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

html[data-theme="light"] {
  --bg: #f4f8ff;
  --bg-elevated: rgba(255, 255, 255, 0.9);
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: rgba(255, 255, 255, 0.98);
  --surface-soft: rgba(15, 28, 54, 0.06);
  --text: #0d1c35;
  --muted: #58657f;
  --line: rgba(13, 28, 53, 0.12);
  --shadow: 0 18px 40px rgba(38, 65, 112, 0.12);
  --accent-start: #3f79ff;
  --accent-end: #2cc5d8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(92, 122, 255, 0.19), transparent 28%),
    radial-gradient(circle at 85% 14%, rgba(49, 214, 203, 0.12), transparent 24%),
    radial-gradient(circle at 52% 68%, rgba(62, 104, 255, 0.08), transparent 28%),
    var(--bg);
  min-height: 100vh;
  transition: background-color .25s ease, color .25s ease;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
.container { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.section { padding: 42px 0; }
.eyebrow {
  margin: 0 0 12px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-text {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg-elevated) 84%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav-wrap {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: var(--accent);
  color: white;
  box-shadow: var(--shadow);
}
.brand strong { display: block; font-size: 1.1rem; }
.brand small { display:block; color: var(--muted); font-size: .95rem; margin-top: 2px; }
.nav-links {
  display: flex;
  gap: 28px;
  font-weight: 600;
  color: var(--muted);
}
.nav-links a:hover { color: var(--text); }
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.theme-toggle-label { font-weight: 700; }
.theme-toggle-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  font-size: 1rem;
}
.icon-sun { display: none; }
html[data-theme="dark"] .icon-moon { display: inline-grid; color: #ffffff; }
html[data-theme="dark"] .icon-sun { display: none; }
html[data-theme="light"] .icon-moon { display: none; }
html[data-theme="light"] .icon-sun { display: inline-grid; color: #f5c542; }

.hero { padding: 46px 0 24px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .92fr);
  gap: 42px;
  align-items: center;
}
.hero-copy h1 {
  margin: 0;
  max-width: 8.2ch;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: .96;
  letter-spacing: -.05em;
}
.hero-text {
  margin: 20px 0 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.75;
}
.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
}
.button-primary { background: var(--accent); color: white; box-shadow: var(--shadow); }
.button-secondary { background: var(--surface); border-color: var(--line); }
.hero-stats {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.hero-stats li {
  padding: 16px 16px 15px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.hero-stats strong { display: block; font-size: 1.02rem; }
.hero-stats span { display: block; margin-top: 6px; color: var(--muted); font-size: .94rem; }
.visual-panel {
  position: relative;
  min-height: 480px;
  border-radius: 32px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17,31,63,0.72), rgba(8,18,39,0.88));
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 26px;
}
html[data-theme="light"] .visual-panel {
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(243,247,255,.98));
}
.visual-panel::before {
  content: "";
  position: absolute;
  inset: auto -16% -26% -16%;
  height: 54%;
  background: radial-gradient(circle, rgba(63, 214, 208, .24), transparent 44%);
}
.hero-shot-wrap {
  position: absolute;
  inset: 30px 28px 110px 28px;
  border-radius: 28px;
  background: color-mix(in srgb, var(--surface-strong) 84%, transparent);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.main-shot {
  width: min(74%, 310px);
  object-fit: contain;
  filter: drop-shadow(0 24px 36px rgba(0,0,0,.18));
}
.visual-badge {
  position: absolute;
  left: 20px;
  bottom: 20px;
  z-index: 2;
  padding: 14px 16px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface-strong) 88%, transparent);
  border: 1px solid var(--line);
}
.visual-badge span { display: block; color: var(--muted); font-size: .88rem; }
.visual-badge strong { display: block; margin-top: 4px; font-size: 1.35rem; }
.hero-mini-list {
  position: absolute;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 10px;
  z-index: 2;
}
.hero-mini-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  min-width: 182px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface-strong) 88%, transparent);
  border: 1px solid var(--line);
}
.hero-mini-card img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
}
.hero-mini-card span {
  font-size: .95rem;
  font-weight: 700;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.section-head h2, .about-panel h2, .contact-copy h2 {
  margin: 0;
  font-size: clamp(1.85rem, 4.5vw, 3rem);
  line-height: 1.05;
  letter-spacing: -.04em;
}
.cards-grid, .library-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.library-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.app-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  min-width: 0;
}
.app-card h3 { margin: 0; font-size: 1.35rem; letter-spacing: -.03em; }
.app-card p { margin: 0; color: var(--muted); line-height: 1.65; }
.card-top {
  display: flex;
  align-items: center;
  gap: 14px;
}
.app-icon {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  object-fit: cover;
  flex: 0 0 auto;
}
.app-icon.placeholder {
  display: grid;
  place-items: center;
  background: var(--accent);
  color: white;
  font-weight: 800;
}
.app-tag {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: .86rem;
  font-weight: 600;
}
.store-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
}
.store-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  font-weight: 700;
}
.store-link:hover { background: var(--surface); }
.about-panel {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 28px;
  padding: 28px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.about-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.8;
}
.contact-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 20px;
  align-items: stretch;
}
.contact-copy, .contact-form {
  padding: 28px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.contact-copy p {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.75;
}
.contact-points {
  margin: 20px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.85;
}
.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.contact-form label span { font-weight: 700; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-strong) 80%, transparent);
  color: var(--text);
  outline: none;
}
html[data-theme="light"] .contact-form input,
html[data-theme="light"] .contact-form textarea {
  background: rgba(244, 247, 253, 0.95);
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(90, 157, 255, .6);
  box-shadow: 0 0 0 4px rgba(79, 137, 255, .12);
}
.full-width { grid-column: 1 / -1; }
.submit-button { justify-self: start; }
.form-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
}
.hidden-field { position: absolute; left: -9999px; }
.site-footer {
  padding: 22px 0 34px;
  border-top: 1px solid var(--line);
  margin-top: 22px;
}
.footer-wrap {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}
.footer-wrap p { margin: 8px 0 0; color: var(--muted); }
.footer-links { display: flex; gap: 20px; color: var(--muted); font-weight: 600; }

@media (max-width: 1120px) {
  .library-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .hero-grid,
  .about-panel,
  .contact-grid,
  .library-grid { grid-template-columns: 1fr; }
  .cards-grid { grid-template-columns: 1fr 1fr; }
  .nav-wrap { flex-wrap: wrap; padding: 14px 0; }
  .nav-links { order: 3; width: 100%; justify-content: center; gap: 20px; }
  .hero { padding-top: 32px; }
  .visual-panel { min-height: 420px; }
}

@media (max-width: 720px) {
  .container { width: min(100% - 24px, 1120px); }
  .section { padding: 32px 0; }
  .nav-wrap { gap: 14px; }
  .brand { min-width: 0; }
  .brand strong { font-size: 1rem; }
  .brand small { font-size: .84rem; }
  .nav-links {
    order: 3;
    overflow-x: auto;
    justify-content: flex-start;
    width: 100%;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .theme-toggle { margin-left: auto; }
  .hero-grid,
  .cards-grid,
  .hero-stats,
  .contact-form,
  .library-grid { grid-template-columns: 1fr; }
  .hero-copy h1 {
    max-width: none;
    font-size: clamp(2.35rem, 14vw, 3.6rem);
  }
  .hero-text { font-size: 1rem; }
  .visual-panel {
    min-height: 380px;
    padding: 18px;
  }
  .hero-shot-wrap { inset: 18px 18px 120px 18px; }
  .main-shot { width: min(78%, 250px); }
  .hero-mini-list {
    left: 18px;
    right: 18px;
    bottom: 18px;
    grid-template-columns: 1fr;
  }
  .hero-mini-card { min-width: 0; }
  .hide-mobile { display: none; }
  .footer-wrap { flex-direction: column; align-items: flex-start; }
}

.nav-links a[target="_blank"]::after, .footer-links a[target="_blank"]::after {
  content: " ↗";
  font-size: .84em;
}
