:root {
  color-scheme: dark;
  --background: #101116;
  --surface: #17181f;
  --surface-raised: #1d1e29;
  --text: #f3f2f7;
  --muted: #b1b1c1;
  --accent: #c7baff;
  --line: #32333e;
  --grid: rgb(188 180 255 / 8%);
  --glow: rgb(112 81 234 / 24%);
  --blue-glow: rgb(75 111 223 / 14%);
  --hero-wash: rgb(117 82 239 / 11%);
  --shadow: rgb(0 0 0 / 25%);
  --gutter: clamp(1.125rem, 5vw, 4rem);
  --width: 71rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  line-height: 1.5;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --background: #f7f7fb;
    --surface: #fff;
    --surface-raised: #eeedf7;
    --text: #191823;
    --muted: #58576a;
    --accent: #5137ba;
    --line: #d7d5e3;
    --grid: rgb(67 50 142 / 12%);
    --glow: rgb(112 81 234 / 17%);
    --blue-glow: rgb(75 111 223 / 10%);
    --hero-wash: rgb(117 82 239 / 8%);
    --shadow: rgb(43 33 80 / 11%);
  }
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--text); }
p, h1, h2, h3, figure, ul, ol, dl, dd { margin: 0; }
img { display: block; max-inline-size: 100%; block-size: auto; }
a { color: inherit; }
a:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.wrap { width: min(calc(100% - 2 * var(--gutter)), var(--width)); margin-inline: auto; }
.skip {
  position: fixed;
  z-index: 5;
  inset: .75rem auto auto .75rem;
  padding: .625rem 1rem;
  border-radius: .5rem;
  background: var(--surface);
  transform: translateY(-160%);
}
.skip:focus { transform: translateY(0); }

.site-header { border-bottom: 1px solid var(--line); }
.header-content {
  min-height: 4.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 1.125rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  gap: .65rem;
  font-size: 1.0625rem;
  font-weight: 650;
  letter-spacing: -.035em;
  text-decoration: none;
}
.brand-mark {
  position: relative;
  flex: 0 0 1rem;
  inline-size: 1rem;
  block-size: 1rem;
  color: var(--accent);
  border: 1px solid;
  border-radius: 3px;
  transform: rotate(45deg);
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid;
  border-radius: 1px;
}
.header-nav { display: flex; flex-wrap: wrap; column-gap: 1.4rem; }
.header-nav a, .footer-links a, .contact-channels a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 550;
  text-decoration: none;
}
.header-nav a:hover, .footer-links a:hover, .contact-channels a:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: .24em;
}

.home-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 81% 45%, var(--hero-wash), transparent 57%),
    radial-gradient(ellipse at 100% 105%, var(--blue-glow), transparent 42%);
}
.hero-content {
  position: relative;
  display: grid;
  align-content: center;
  min-height: clamp(20rem, 35vw, 29rem);
  padding-block: clamp(3.5rem, 8vw, 6rem);
}
.home-title {
  font-size: clamp(4.375rem, 13.3vw, 9.5rem);
  font-weight: 650;
  letter-spacing: -.062em;
  line-height: .92;
}
.home-intro {
  margin-block-start: 1.5rem;
  max-inline-size: 26ch;
  color: var(--muted);
  font-size: clamp(1.125rem, 2.1vw, 1.55rem);
  letter-spacing: -.022em;
}
.hero-art {
  position: absolute;
  z-index: -1;
  inset-block-start: 50%;
  inset-inline-end: clamp(-12rem, -12vw, -2rem);
  inline-size: clamp(22rem, 55vw, 43rem);
  aspect-ratio: 1;
  transform: translateY(-50%);
  background:
    radial-gradient(ellipse at center, var(--glow) 0, transparent 57%),
    repeating-linear-gradient(0deg, var(--grid) 0 1px, transparent 1px 30px),
    repeating-linear-gradient(90deg, var(--grid) 0 1px, transparent 1px 30px);
  mask-image: radial-gradient(ellipse at center, #000 14%, transparent 69%);
}
.hero-art::before, .hero-art::after, .hero-art span {
  content: "";
  position: absolute;
  inset: 25%;
  border: 1px solid var(--grid);
  border-block-start-color: var(--accent);
  border-inline-start-color: var(--accent);
  border-radius: 19%;
  opacity: .4;
  transform: rotate(45deg);
}
.hero-art::after { inset: 32%; opacity: .56; }
.hero-art span { inset: 39%; opacity: .84; box-shadow: 0 0 2.5rem var(--glow), inset 0 0 2rem var(--glow); }

.catalog { padding-block: clamp(2.75rem, 5.5vw, 4.75rem) clamp(3.5rem, 7vw, 6rem); }
.section-title {
  margin-block-end: 1.25rem;
  font-size: clamp(1.5rem, 3.2vw, 2.25rem);
  font-weight: 640;
  letter-spacing: -.048em;
  line-height: 1.15;
}
.app-grid { display: grid; gap: .875rem; }
.app-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  gap: 1rem;
  padding: clamp(1.125rem, 3vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: radial-gradient(ellipse at 12% 0%, var(--hero-wash), transparent 58%), var(--surface);
}
.app-card:focus-within { border-color: var(--accent); }
.app-icon { border-radius: 23%; box-shadow: 0 .5rem 1.5rem var(--shadow); }
.app-card .app-icon { width: 4.5rem; }
.card-name {
  font-size: 1.25rem;
  line-height: 1.22;
  font-weight: 650;
  letter-spacing: -.034em;
}
.card-name a { text-decoration: none; }
.card-name a:hover { text-decoration: underline; text-underline-offset: .15em; }
.card-summary { color: var(--muted); margin-block-start: .45rem; text-wrap: pretty; }
.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .25rem 1rem;
  margin-block-start: auto;
}
.store-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: .56rem .95rem;
  color: var(--text);
  background: var(--surface-raised);
  border: 1px solid var(--line);
  border-radius: .55rem;
  font-size: .875rem;
  font-weight: 620;
  text-decoration: none;
}
.store-button:hover { border-color: var(--accent); color: var(--accent); }
.store-button.primary { color: #fff; background: #603fda; border-color: #7454ef; }
.store-button.primary:hover { color: #fff; background: #5233c3; }
.detail-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--accent);
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
}
.detail-link:hover { text-decoration: underline; text-underline-offset: .2em; }

.app-hero {
  padding-block: clamp(2rem, 6vw, 5.25rem);
  border-block-end: 1px solid var(--line);
  background: radial-gradient(ellipse at 24% 1%, var(--hero-wash), transparent 65%);
}
.app-overview { display: grid; align-items: center; gap: 1.75rem; }
.app-lead .app-icon { width: clamp(4.5rem, 9vw, 6rem); }
.app-title {
  margin-block-start: .95rem;
  font-size: clamp(2.375rem, 6.25vw, 5.25rem);
  font-weight: 650;
  letter-spacing: -.05em;
  line-height: .98;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.app-subtitle {
  margin-block-start: .8rem;
  color: var(--accent);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 620;
}
.app-description {
  max-width: 50ch;
  margin-block: .9rem 1.35rem;
  color: var(--muted);
  font-size: clamp(1.0625rem, 2.25vw, 1.25rem);
  text-wrap: pretty;
}
.feature-panel {
  padding: 1.2rem clamp(1rem, 3.5vw, 1.75rem);
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
}
.feature-panel h2 { font-size: 1.125rem; font-weight: 650; letter-spacing: -.03em; }
.feature-list { padding-inline-start: 0; list-style: none; }
.feature-list > li { padding-block: .75rem; }
.feature-list > li + li { border-top: 1px solid var(--line); }
.feature-list > li:last-child { padding-block-end: 0; }
.feature-list strong { display: block; font-weight: 640; }
.feature-list p { color: var(--muted); font-size: .9375rem; text-wrap: pretty; }

.screenshots { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(72%, 19rem);
  gap: clamp(.75rem, 2vw, 1.5rem);
  overflow-x: auto;
  padding: 0 0 .75rem;
  scroll-snap-type: x mandatory;
  scrollbar-color: var(--muted) var(--surface);
}
.gallery figure { min-width: 0; scroll-snap-align: start; }
.gallery img { width: 100%; border: 1px solid var(--line); border-radius: .875rem; background: var(--surface); }
.download-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem clamp(1rem, 4vw, 2rem);
  margin-block-end: clamp(2.75rem, 6vw, 4.75rem);
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: radial-gradient(ellipse at 0% 0%, var(--hero-wash), transparent 80%), var(--surface);
}
.download-panel .section-title { margin: 0; font-size: clamp(1.25rem, 3vw, 1.65rem); }

.contact-hero { border-block-end: 0; }
.contact-hero .app-title { margin-block-start: 0; }
.contact-hero .app-description:last-child { margin-block-end: 0; }
.contact-channels { display: grid; }
.contact-channels h2 { margin-block-end: .5rem; }
.contact-channels a { color: var(--accent); font-size: 1rem; }
.contact-channels a + a { border-block-start: 1px solid var(--line); }

.site-footer { border-block-start: 1px solid var(--line); }
.footer-content {
  display: grid;
  align-items: start;
  gap: .875rem 2rem;
  padding-block: 1.5rem 1.25rem;
}
.footer-content h2 { font-size: .9375rem; font-weight: 640; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 1.15rem; }
.footer-copyright { color: var(--muted); font-size: .875rem; }
.footer-end {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 1rem;
  padding-block-start: .35rem;
  border-block-start: 1px solid var(--line);
}

.footer-end [aria-current="page"] { color: var(--text); }

@media (min-width: 42rem) {
  .hero-art { inset-inline-end: -1.5rem; }
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery { grid-auto-columns: minmax(0, 1fr); padding-block-end: 0; }
  .footer-content { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 59rem) {
  .app-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .app-card { grid-column: span 2; }
  .app-card:nth-child(n + 4) { grid-column: span 3; }
  .app-overview { grid-template-columns: minmax(0, 1.22fr) minmax(0, .78fr); gap: clamp(1.75rem, 6vw, 5rem); }
  .gallery { grid-auto-columns: minmax(0, 20.5rem); justify-content: space-between; }
  .footer-with-privacy {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .9fr) minmax(0, 1.1fr);
  }
}

@media (max-width: 41.99rem) {
  .hero-art { opacity: .52; }
}

@media (hover: hover) {
  .app-card:hover { border-color: var(--accent); box-shadow: 0 .5rem 1.75rem var(--glow); }
}

@media (prefers-reduced-motion: no-preference) {
  .app-card { transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease; }
  .store-button { transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease; }
  .reveal { animation: enter 420ms ease-out both; }
  @keyframes enter {
    from { opacity: .56; translate: 0 .6rem; }
    to { opacity: 1; translate: 0; }
  }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .app-card:hover { transform: translateY(-3px); }
}
