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

:root {
  color-scheme: light;
  --blue-1000: #0d1217;
  --blue-900: #1b252f;
  --blue-800: #283746;
  --blue-700: #36495d;
  --blue-500: #516e8c;
  --blue-400: #5e80a3;
  --text: #0d1217;
  --muted: #516e8c;
  --card: #ffffff;
  --border: rgba(54, 73, 93, 0.2);
  --radius: 16px;
  --page-width: 940px;
}

body {
  margin: 0;
  font-family: "Lato", sans-serif;
  color: var(--text);
  background: #f7f9fb;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 36px 24px 48px;
}

.site-header {
  display: flex;
  justify-content: flex-start;
}

.back {
  font-weight: 600;
  color: var(--muted);
}

.hero {
  text-align: center;
  margin-top: 36px;
  display: grid;
  gap: 16px;
  justify-items: center;
}

.screenshots {
  margin-top: 48px;
  padding: 28px 32px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: 0 20px 45px rgba(13, 18, 23, 0.06);
  display: grid;
  gap: 12px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.section-heading {
  margin: 0;
  text-align: center;
  padding-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 6px;
  justify-items: center;
  margin: 0;
}

.screenshot-grid figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.screenshot-grid img {
  width: 100%;
  max-width: 220px;
  height: auto;
  border-radius: 14px;
  display: block;
}

.hero .app-icon {
  width: 120px;
  height: 120px;
  border-radius: 24px;
}

.app-store-badge {
  height: 64px;
  display: block;
  transition: transform 0.2s ease;
}

.app-store-badge:hover {
  transform: scale(1.02);
}

.app-store-badge:active {
  transform: scale(0.98);
}

h1 {
  font-size: clamp(2.4rem, 3vw, 3.2rem);
  margin: 0;
}

.lead {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.05rem;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 6px;
}

.meta span {
  background: #eef2f6;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--blue-700);
}

.details {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.details div {
  background: var(--card);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.details h2 {
  font-size: 1.3rem;
  margin: 0 0 8px;
  color: var(--blue-900);
}

.details p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.feature-grid {
  margin-top: 32px;
  display: grid;
  gap: 24px;
}

/* iOS Segmented Control */
.segmented-control {
  display: flex;
  background: rgba(118, 118, 128, 0.12);
  border-radius: 10px;
  padding: 2px;
  margin: 64px auto 32px;
  max-width: 600px;
  user-select: none;
}

.segmented-control button {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 4px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.segmented-control button.active {
  background: var(--card);
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}

.feature-cards-container {
  position: relative;
  min-height: 400px;
}

.feature-card.toggle-card {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.feature-card.toggle-card.active {
  display: flex;
}

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

.feature-card {
  background: var(--card);
  padding: 48px;
  border-radius: 32px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(13, 18, 23, 0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  overflow: hidden;
}

.feature-card.reverse {
  flex-direction: row-reverse;
}

.feature-info {
  flex: 1;
  max-width: 440px;
}

.feature-info h2 {
  font-size: 1.8rem;
  margin: 0 0 16px;
  color: var(--blue-900);
}

.feature-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.1rem;
}

.feature-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.feature-image img {
  width: 100%;
  max-width: 190px;
  height: auto;
  border-radius: 20px;
  display: block;
  box-shadow: 0 15px 40px rgba(13, 18, 23, 0.12);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.feature-card.compact-card {
  padding: 24px;
  border-radius: 20px;
  box-shadow: none;
  background: rgba(118, 118, 128, 0.05);
}

.feature-card.compact-card h2 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.feature-card.compact-card p {
  font-size: 0.95rem;
  line-height: 1.5;
}

@media (max-width: 850px) {
  .feature-card, .feature-card.reverse {
    flex-direction: column;
    padding: 32px;
    gap: 32px;
    text-align: center;
  }
  
  .feature-info {
    max-width: 100%;
  }
  
  .feature-image img {
    max-width: 170px;
  }
}

.site-footer {
  margin-top: 56px;
  text-align: center;
  color: var(--muted);
}

.footer-links {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 18px;
  font-weight: 600;
  color: var(--blue-700);
}

.footer-links a:hover {
  color: var(--blue-900);
}

.legal {
  margin: 48px auto 0;
  max-width: 760px;
  background: var(--card);
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 16px;
}

.legal h1 {
  text-align: left;
  margin-bottom: 8px;
}

.legal .meta-line {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 24px;
}

.legal h2 {
  margin: 24px 0 10px;
  font-size: 1.3rem;
  color: var(--blue-900);
}

.legal h3 {
  margin: 18px 0 8px;
  font-size: 1.05rem;
  color: var(--blue-700);
}

.legal p,
.legal ul {
  color: var(--muted);
  line-height: 1.7;
}

.legal ul {
  padding-left: 20px;
  margin: 0 0 16px;
}

@media (max-width: 720px) {
  .hero .app-icon {
    width: 100px;
    height: 100px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --text: #f4f6fe;
    --muted: #c3ccdf;
    --card: #0b1529;
    --border: rgba(255, 255, 255, 0.2);
    --blue-700: #9db2d5;
    --blue-900: #f5f6fa;
  }

  body {
    background: radial-gradient(circle at top, #0a152c 0%, #030712 70%, #01030a 100%);
    color: var(--text);
  }

  .meta span {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
  }

  .details div {
    background: #0b1222;
    border-color: rgba(255, 255, 255, 0.08);
  }

  .details h2,
  .legal h2,
  .legal h3 {
    color: var(--blue-900);
  }

  .legal p,
  .legal ul,
  .lead {
    color: var(--muted);
  }

  .site-footer,
  .footer-links {
    color: var(--muted);
  }

  .footer-links a:hover {
    color: var(--blue-900);
  }
}

.screenshot-grid.dark-grid {
  display: none;
}

@media (prefers-color-scheme: dark) {
  .screenshot-grid.light-grid {
    display: none;
  }

  .screenshot-grid.dark-grid {
    display: grid;
  }
}

.lato-thin {
  font-family: "Lato", sans-serif;
  font-weight: 100;
  font-style: normal;
}

.lato-light {
  font-family: "Lato", sans-serif;
  font-weight: 300;
  font-style: normal;
}

.lato-regular {
  font-family: "Lato", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.lato-bold {
  font-family: "Lato", sans-serif;
  font-weight: 700;
  font-style: normal;
}

.lato-black {
  font-family: "Lato", sans-serif;
  font-weight: 900;
  font-style: normal;
}

.lato-thin-italic {
  font-family: "Lato", sans-serif;
  font-weight: 100;
  font-style: italic;
}

.lato-light-italic {
  font-family: "Lato", sans-serif;
  font-weight: 300;
  font-style: italic;
}

.lato-regular-italic {
  font-family: "Lato", sans-serif;
  font-weight: 400;
  font-style: italic;
}

.lato-bold-italic {
  font-family: "Lato", sans-serif;
  font-weight: 700;
  font-style: italic;
}

.lato-black-italic {
  font-family: "Lato", sans-serif;
  font-weight: 900;
  font-style: italic;
}
