:root {
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --bg-elev: #ffffff;
  --text: #0f1720;
  --text-muted: #5b6776;
  --accent: #1f3a5f;
  --accent-hover: #16294a;
  --border: #e4e7eb;
  --shadow: 0 1px 2px rgba(15, 23, 32, 0.04), 0 8px 24px rgba(15, 23, 32, 0.06);
  --radius: 12px;
  --radius-sm: 8px;
  --max-w: 1100px;
  --content-w: 760px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1218;
    --bg-alt: #141a23;
    --bg-elev: #1a2230;
    --text: #e7ecf2;
    --text-muted: #9aa6b4;
    --accent: #6fa8e0;
    --accent-hover: #92bdec;
    --border: #232c39;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.4);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-top: 0;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.container--narrow {
  max-width: var(--content-w);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

@media (prefers-color-scheme: dark) {
  .site-header {
    background: rgba(14, 18, 24, 0.85);
  }
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  font-size: 1.05rem;
}

.brand:hover {
  color: var(--text);
  text-decoration: none;
}

.brand__mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.95rem;
}

.brand__sub {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.85rem;
  margin-left: 0.25rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav a:hover,
.nav a.is-active {
  color: var(--text);
  text-decoration: none;
}

@media (max-width: 720px) {
  .brand__sub {
    display: none;
  }
  .nav {
    gap: 0.9rem;
  }
  .nav a {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .site-header__inner {
    height: auto;
    padding: 0.75rem 0;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .nav {
    width: 100%;
    justify-content: flex-start;
    gap: 1rem;
    border-top: 1px solid var(--border);
    padding-top: 0.6rem;
  }
}

/* Hero */
.hero {
  padding: 4.5rem 0 3rem;
  background:
    radial-gradient(ellipse at top right, rgba(31, 58, 95, 0.08), transparent 60%),
    radial-gradient(ellipse at bottom left, rgba(31, 58, 95, 0.05), transparent 50%);
}

@media (prefers-color-scheme: dark) {
  .hero {
    background:
      radial-gradient(ellipse at top right, rgba(111, 168, 224, 0.12), transparent 60%),
      radial-gradient(ellipse at bottom left, rgba(111, 168, 224, 0.06), transparent 50%);
  }
}

.hero__eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(31, 58, 95, 0.08);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

@media (prefers-color-scheme: dark) {
  .hero__eyebrow {
    background: rgba(111, 168, 224, 0.12);
  }
}

.hero__lead {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0;
}

/* Sections */
.section {
  padding: 3.5rem 0;
}

.section--alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section__title {
  margin: 0 0 0.5rem;
}

.section__subtitle {
  color: var(--text-muted);
  margin: 0 0 2rem;
}

/* App cards */
.apps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.app-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 23, 32, 0.08), 0 12px 32px rgba(15, 23, 32, 0.1);
}

.app-card__head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.app-card__icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.app-card__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.app-card__meta {
  margin: 0.15rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.app-card__body {
  color: var(--text-muted);
  flex: 1;
  margin-bottom: 1.25rem;
}

.app-card__actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn--ghost:hover {
  background: var(--bg-alt);
  color: var(--text);
}

/* Page header (subpages) */
.page-header {
  padding: 3rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.page-header h1 {
  margin-bottom: 0.25rem;
}

.page-header__lead {
  color: var(--text-muted);
  margin: 0;
  font-size: 1.1rem;
}

/* Prose */
.prose {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 1rem 0 4rem;
}

.prose h2 {
  font-size: 1.4rem;
  margin-top: 2.5rem;
}

.prose h3 {
  font-size: 1.1rem;
}

.prose ul,
.prose ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.prose strong {
  color: var(--text);
}

/* Screenshots gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.gallery img {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-alt);
}

/* App Store badge */
.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  background: #000;
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.15s ease;
}

.appstore-badge:hover {
  background: #000;
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.appstore-badge svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.appstore-badge__small {
  font-size: 0.7rem;
  font-weight: 400;
  display: block;
  line-height: 1;
  margin-bottom: 2px;
  opacity: 0.85;
}

.appstore-badge__big {
  font-size: 1.05rem;
  line-height: 1;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 2.5rem 0;
  margin-top: 4rem;
  font-size: 0.9rem;
}

.site-footer__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.site-footer__nav {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.site-footer__nav a {
  color: var(--text-muted);
}

.site-footer__nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.site-footer__copy {
  color: var(--text-muted);
  margin: 0;
}

/* Contact */
.contact-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  max-width: 540px;
  margin: 1.5rem auto 0;
}

.contact-card a {
  font-weight: 600;
}
