@font-face {
  font-family: 'CMU Sans Serif';
  src: url('/fonts/cmu.sans-serif-medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --bg: #fff;
  --fg: #111;
  --fg-secondary: #212121;
  --fg-muted: #888;
  --border: #ddd;
  --border-hover: #999;
  --surface: #f0f0f0;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', 'SF Mono', 'Fira Code', monospace;
  --max-width: 860px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --fg: #e8e8e8;
    --fg-secondary: #aaa;
    --fg-muted: #666;
    --border: #222;
    --border-hover: #555;
    --surface: #151515;
  }
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--fg);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

/* Header */
header {
  padding: 48px 0 0;
}

header nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-decoration: none;
  color: var(--fg);
  text-transform: lowercase;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-muted);
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--fg);
}

/* Main */
main {
  flex: 1;
  padding: 100px 0 80px;
}

/* Hero */
.hero {
  margin-bottom: 80px;
}

.hero h1 {
  font-family: 'CMU Sans Serif', var(--font-mono);
  font-size: clamp(28px, 5vw, 56px);
  font-weight: 500;
  font-variant: small-caps;
  letter-spacing: 1px;
  line-height: 1.1;
  margin-bottom: 40px;
  text-align: center;
}

.hero-description {
  font-size: 17px;
  color: var(--fg-secondary);
  max-width: 560px;
  line-height: 1.7;
}

.hero-description a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--fg-muted);
  transition: border-color 0.2s ease;
}

.hero-description a:hover {
  border-color: var(--fg);
}

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 80px;
  padding-top: 0;
}

.info-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.info-label {
  font-family: 'CMU Sans Serif', var(--font-mono);
  font-size: 16px;
  font-weight: 500;
  color: var(--fg);
}

.info-values {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.info-value {
  grid-column-gap: 0px;
  grid-row-gap: 0px;
  color: #20252a80;
  cursor: pointer;
  background-color: #f8f8f8;
  border: 1px #000;
  border-radius: 9px;
  margin-top: 0;
  margin-left: 0;
  margin-right: auto;
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  display: inline;
}

.info-value a {
  color: #20252a80;
  text-decoration: none;
}

.info-value a:hover {
  color: #20252a80;
}

/* Section */
.section {
  margin-bottom: 64px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--fg-muted);
  margin-bottom: 20px;
}

.section p {
  font-family: 'CMU Sans Serif', var(--font-mono);
  font-size: 18px;
  line-height: 1.7;
  color: var(--fg-secondary);
}

.section p + p {
  margin-top: 18px;
}

/* Links */
a.inline-link {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--fg-muted);
  padding-bottom: 1px;
  transition: border-color 0.2s ease, color 0.2s ease;
}

a.inline-link:hover {
  border-color: var(--fg);
}

/* App Card */
.app-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--fg);
  transition: border-color 0.2s ease;
}

.app-card:hover {
  border-color: var(--border-hover);
}

.app-icon {
  width: 56px;
  height: 56px;
  background: var(--fg);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.app-icon svg {
  width: 28px;
  height: 28px;
  fill: var(--bg);
}

.app-info h3 {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}

.app-info p {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-muted);
}

/* App Page - Hero */
.app-hero {
  text-align: center;
  margin-bottom: 80px;
}

.app-hero .app-icon-large {
  width: 88px;
  height: 88px;
  background: var(--fg);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 32px;
  overflow: hidden;
}

.app-hero .app-icon-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
}

.app-hero .app-icon-large svg {
  width: 44px;
  height: 44px;
  fill: var(--bg);
}

.app-hero h1 {
  font-family: var(--font-mono);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 600;
  font-variant: small-caps;
  letter-spacing: 1px;
  line-height: 1.1;
  margin-bottom: 16px;
}

.app-hero .tagline {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--fg-muted);
  margin-bottom: 32px;
}

.app-store-badge {
  display: inline-block;
  transition: opacity 0.2s ease;
}

.app-store-badge:hover {
  opacity: 0.7;
}

.app-store-badge img {
  height: 44px;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 64px;
  margin-bottom: 80px;
}

.feature h3 {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-bottom: 8px;
}

.feature p {
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.6;
}

/* Legal / Prose */
.legal h1 {
  font-family: var(--font-mono);
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 600;
  font-variant: small-caps;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.legal .last-updated {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-muted);
  margin-bottom: 48px;
}

.legal h2 {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
  margin-top: 40px;
  margin-bottom: 12px;
}

.legal p,
.legal li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--fg-secondary);
}

.legal p + p {
  margin-top: 12px;
}

.legal ul {
  margin-top: 8px;
  margin-bottom: 8px;
  padding-left: 20px;
}

.legal li {
  margin-bottom: 6px;
}

/* Divider */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 64px 0;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

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

footer p {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-muted);
  letter-spacing: 0.3px;
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-muted);
  text-decoration: none;
  letter-spacing: 0.3px;
  transition: color 0.2s ease;
}

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

/* Fade in animation */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeUp 0.5s ease-out both;
}

.fade-in:nth-child(2) {
  animation-delay: 0.08s;
}

.fade-in:nth-child(3) {
  animation-delay: 0.16s;
}

.fade-in:nth-child(4) {
  animation-delay: 0.24s;
}

.fade-in:nth-child(5) {
  animation-delay: 0.32s;
}

/* Apps list page */
.apps-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Responsive */
@media (max-width: 600px) {
  .container {
    padding: 0 20px;
  }

  header {
    padding: 32px 0 0;
  }

  main {
    padding: 64px 0;
  }

  .hero {
    margin-bottom: 56px;
  }

  .hero-description {
    font-size: 15px;
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 56px;
  }

  .app-hero h1 {
    font-size: 28px;
  }

  .features {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .app-card {
    padding: 20px;
  }

  .nav-links {
    gap: 20px;
  }

  footer .container {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}
