/* === Font Faces === */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/Inter-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/Inter-SemiBold.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/Inter-Bold.woff2') format('woff2');
}

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/SpaceGrotesk-Medium.woff2') format('woff2');
}

/* === Design System Custom Properties === */
:root {
  --color-primary: #6366F1;
  --color-primary-dark: #4F46E5;
  --color-primary-light: #818CF8;
  --color-accent: #10B981;
  --color-warning: #F59E0B;
  --color-bg: #F8FAFC;
  --color-surface: #FFFFFF;
  --color-text: #0F172A;
  --color-text-secondary: #475569;
  --color-text-muted: #94A3B8;
  --color-border: #E2E8F0;

  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;

  --container-max: 1200px;
  --container-padding: 1.5rem;
}

/* === CSS Reset === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  color: var(--color-primary-dark);
}

a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.125rem, 2vw, 1.5rem); }

/* === Utility === */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* === Site Header === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 0.75rem 0;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-text);
  text-decoration: none;
}

.site-logo:hover {
  color: var(--color-primary);
}

.site-logo img {
  width: 40px;
  height: 40px;
}

.site-header nav {
  display: flex;
  gap: 0.75rem;
}

.site-header nav a {
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
}

.site-header nav a:hover {
  color: var(--color-primary);
}

@media (min-width: 640px) {
  .site-header nav {
    gap: 1.5rem;
  }

  .site-header nav a {
    font-size: 0.9375rem;
  }
}

/* === Section Heading === */
.section-heading {
  text-align: center;
  margin-bottom: 3rem;
}

/* === Hero === */
.hero {
  padding: 4rem 0 3rem;
  background-color: var(--color-surface);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
  text-align: center;
}

.hero-content {
  max-width: 640px;
}

.hero-subtitle {
  margin-top: 1.25rem;
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

.hero-image img {
  width: 160px;
  height: 160px;
}

.store-badges {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.store-badge img {
  transition: opacity 0.2s;
}

.store-badge:hover img {
  opacity: 0.85;
}

@media (min-width: 768px) {
  .hero {
    padding: 6rem 0 5rem;
  }

  .hero-inner {
    flex-direction: row;
    text-align: left;
  }

  .hero-content {
    flex: 1;
  }

  .store-badges {
    justify-content: flex-start;
  }

  .hero-image img {
    width: 200px;
    height: 200px;
  }
}

/* === Features === */
.features {
  padding: 5rem 0;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.feature-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 2rem;
}

.feature-icon {
  margin-bottom: 1rem;
}

.feature-icon svg {
  display: inline-block;
}

.feature-card h3 {
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--color-text-secondary);
  line-height: 1.7;
}

@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* === Screenshots === */
.screenshots {
  padding: 5rem 0;
  background-color: var(--color-surface);
}

.screenshots-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  justify-items: center;
}

.screenshot {
  text-align: center;
}

.screenshot img {
  max-width: 270px;
  border-radius: 24px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.screenshot figcaption {
  margin-top: 1rem;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  font-weight: 500;
}

@media (min-width: 768px) {
  .screenshots-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* === Buttons === */
.btn-back {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.75rem 2rem;
  background-color: var(--color-primary);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}

.btn-back:hover {
  opacity: 0.85;
}

/* === CTA === */
.cta {
  padding: 5rem 0;
  text-align: center;
}

/* === Site Footer === */
.site-footer {
  background-color: var(--color-text);
  color: var(--color-text-muted);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
  font-size: 0.875rem;
  line-height: 1.7;
}

.footer-disclaimer {
  max-width: 720px;
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--color-text-muted);
}

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

.footer-copyright {
  color: var(--color-text-muted);
  opacity: 0.7;
}

/* === Legal Pages (Prose) === */
.prose-page {
  padding: 3rem 0;
  background-color: var(--color-surface);
}

.prose-page .container {
  max-width: 720px;
}

.prose-page .back-link {
  display: inline-block;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-primary);
}

.prose-page .back-link:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

.prose-page h1 {
  margin-bottom: 0.5rem;
}

.prose-page h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.prose-page h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.prose-page p {
  margin-bottom: 1rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
}

.prose-page ul,
.prose-page ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
}

.prose-page li {
  margin-bottom: 0.25rem;
}

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

.prose-page table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
}

.prose-page th,
.prose-page td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-secondary);
}

.prose-page th {
  font-weight: 600;
  color: var(--color-text);
}

.prose-page a {
  color: var(--color-primary);
}

.prose-page a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}
