:root {
  --ink: #102050;
  --ink-strong: #0a1634;
  --muted: #4b5a7a;
  --accent: #205090;
  --accent-strong: #1a3f72;
  --accent-bright: #4080d0;
  --accent-soft: #a0e0f0;
  --surface: #ffffff;
  --surface-muted: #f0f0f0;
  --line: rgba(16, 32, 80, 0.12);
  --shadow: 0 22px 44px rgba(16, 32, 80, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: radial-gradient(circle at 12% 10%, rgba(160, 224, 240, 0.6), transparent 55%),
    radial-gradient(circle at 88% 6%, rgba(64, 128, 208, 0.35), transparent 52%),
    linear-gradient(160deg, #c7d0df, #e2e8f3 55%, #f7f9fc 100%);
  font-family: "Avenir Next", "Avenir", "Gill Sans", "Trebuchet MS", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(16, 32, 80, 0.08) 0.5px, transparent 0.5px);
  background-size: 20px 20px;
  opacity: 0.3;
}

a {
  color: var(--accent-bright);
  text-decoration: none;
  border-bottom: 1px solid rgba(64, 128, 208, 0.35);
  transition: color 0.2s ease, border-color 0.2s ease;
}

a:hover {
  color: var(--accent-strong);
  border-color: rgba(26, 63, 114, 0.5);
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px 12px;
  max-width: 1180px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.brand img {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.brand-name {
  display: block;
  font-size: 1.22rem;
  color: var(--ink-strong);
  font-weight: 700;
  letter-spacing: 0.8px;
}

.brand-subtitle {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}

.topnav {
  display: flex;
  gap: 18px;
  font-size: 0.95rem;
}

.topnav a {
  color: var(--ink);
  border-bottom: 1px solid transparent;
}

.topnav a:hover {
  color: var(--accent);
  border-color: rgba(32, 80, 144, 0.4);
}

.page {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 32px 72px;
}

.apps-section {
  display: grid;
  gap: 28px;
  padding-top: 52px;
}

.apps-intro {
  display: grid;
  gap: 12px;
  max-width: 680px;
  animation: fade-in 0.8s ease both;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.72rem;
  color: var(--accent-strong);
  font-weight: 600;
}

h1 {
  margin: 0;
  font-size: clamp(2.4rem, 4.8vw, 3.4rem);
  font-family: "Iowan Old Style", "Palatino Linotype", "Palatino", serif;
  letter-spacing: 0.6px;
  line-height: 1.05;
}


.subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.contact-card {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 0.95rem;
}

.contact-label {
  font-weight: 600;
  color: var(--ink-strong);
}

.contact-email {
  border-bottom: none;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.app-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.app-title-block {
  display: grid;
  gap: 6px;
}

.app-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  width: 100%;
}

.app-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 22px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: rise 0.7s ease both;
}

.app-card > * {
  position: relative;
  z-index: 1;
}

.app-details {
  display: grid;
  gap: 14px;
}

.app-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(140deg, rgba(160, 224, 240, 0.35), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.app-card:nth-child(2) {
  animation-delay: 0.12s;
}

.app-icon {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  padding: 10px;
  background: rgba(160, 224, 240, 0.35);
  box-shadow: inset 0 0 0 1px rgba(64, 128, 208, 0.2);
  position: relative;
  z-index: 1;
}

.app-info {
  display: grid;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.app-title {
  margin: 0;
  font-family: inherit;
  font-size: 1.4rem;
  color: var(--ink-strong);
}

.app-subtitle {
  margin: 0;
  color: var(--accent-strong);
  font-weight: 600;
}

.app-version {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

.gallery-grid {
  margin-top: 12px;
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
}

.gallery-item {
  display: block;
  flex: 0 0 220px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: var(--shadow);
  scroll-snap-align: start;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.2s ease;
}

.gallery-item:hover img {
  transform: scale(1.02);
}

.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(16, 32, 80, 0.78);
  z-index: 100;
}

.lightbox:target {
  display: flex;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
}

.lightbox-content {
  position: relative;
  background: #ffffff;
  border-radius: 18px;
  padding: 14px;
  box-shadow: var(--shadow);
  max-width: min(1100px, 94vw);
  max-height: 86vh;
  display: grid;
  gap: 12px;
}

.lightbox-content img {
  width: 100%;
  height: auto;
  max-height: 75vh;
  object-fit: contain;
  display: block;
}

.lightbox-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lightbox-nav,
.lightbox-close {
  font-size: 0.9rem;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  text-decoration: none;
}

.app-overview {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.6;
}

.app-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.app-card .app-actions {
  justify-content: flex-end;
}

.app-actions-stack {
  flex-direction: column;
  align-items: flex-end;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button.primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 16px 30px rgba(32, 80, 144, 0.25);
}

.button.ghost {
  border-color: rgba(32, 80, 144, 0.3);
  color: var(--accent);
  background: rgba(255, 255, 255, 0.8);
}

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

.section {
  margin-top: 48px;
}

.section-title {
  margin: 0 0 12px;
  font-size: 1.6rem;
  color: var(--ink-strong);
}

.section-lead {
  margin: 0;
  color: var(--muted);
}

.support-callout {
  margin-top: 64px;
  padding: 28px 32px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.support-text {
  display: grid;
  gap: 8px;
}

.support-callout .app-actions {
  justify-content: flex-end;
}

.footer {
  margin-top: 50px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.doc .page {
  max-width: 980px;
}

.doc-header {
  margin-top: 16px;
  margin-bottom: 22px;
  display: grid;
  gap: 8px;
}

.doc-surface {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 26px;
  box-shadow: var(--shadow);
  animation: fade-in 0.8s ease both;
  margin-bottom: 24px;
}

.doc-content h2 {
  margin: 22px 0 10px;
  font-size: 1.4rem;
  color: var(--ink-strong);
}

.doc-content p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.6;
}

.doc-content ul {
  margin: 8px 0 16px 20px;
  color: var(--muted);
}

.doc-content li {
  margin: 6px 0;
}

.doc-content .lead {
  font-weight: 600;
  color: var(--accent-strong);
  font-size: 1.05rem;
}

.contact-line {
  font-weight: 600;
  color: var(--ink-strong);
}

.signature {
  font-weight: 600;
  color: var(--ink-strong);
}

.app-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
  margin-bottom: 24px;
}

.app-hero-media {
  display: grid;
  gap: 16px;
  justify-items: start;
  flex: 0 0 auto;
}

.app-hero-content {
  display: grid;
  gap: 10px;
  text-align: left;
  flex: 1 1 320px;
}

.app-hero-head {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.app-hero-text {
  display: grid;
  gap: 8px;
}

.app-store-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
}

.app-store-badge img {
  height: 44px;
  width: auto;
  display: block;
}

.app-icon-large {
  width: 120px;
  height: 120px;
  border-radius: 26px;
  padding: 12px;
  background: rgba(160, 224, 240, 0.4);
  box-shadow: var(--shadow);
}

.lead {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .page {
    padding: 12px 20px 56px;
  }

  .app-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .app-card {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .app-card .app-actions {
    justify-content: flex-start;
  }

  .app-actions-stack {
    align-items: flex-start;
  }

  .support-callout .app-actions {
    justify-content: flex-start;
  }

  .support-callout {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .gallery-grid {
    gap: 12px;
  }

  .lightbox {
    padding: 16px;
  }

  .lightbox-content {
    padding: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .apps-intro,
  .app-card,
  .doc-surface {
    animation: none;
  }
}
