@import url("tokens/fonts.css");
@import url("tokens/colors.css");
@import url("tokens/typography.css");
@import url("tokens/spacing.css");

/* ============================================================
   mewni.app — site layout
   Built on the app's own design tokens (tokens/*.css) so the
   website and the iOS app read as the same product.
   ============================================================ */

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

html {
  color-scheme: light dark;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--text-body);
  background: var(--surface-canvas);
}

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

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

.container {
  max-width: var(--container-lg);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

/* ---- Header ---- */
.site-header {
  border-bottom: var(--border-w-thin) solid var(--border-soft);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-4);
  padding-bottom: var(--space-4);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: var(--fs-lg);
  color: var(--text-strong);
}
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: var(--radius-sm); }

.site-nav {
  display: flex;
  gap: var(--space-5);
  font-weight: var(--fw-medium);
  font-size: var(--fs-sm);
}
.site-nav a { color: var(--text-body); }
.site-nav a:hover { color: var(--brand-strong); }

/* ---- Hero ---- */
.hero {
  padding: var(--space-10) 0 var(--space-9);
  text-align: center;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: var(--fw-extrabold);
  font-size: var(--text-hero-size);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--text-strong);
  margin: 0 0 var(--space-4);
}
.hero p.lede {
  font-size: var(--fs-md);
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto var(--space-7);
}
.hero-icon {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  margin: 0 auto var(--space-6);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-pill);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
  border: var(--border-w) solid transparent;
}
.btn:hover { text-decoration: none; }
.btn-brand {
  background: var(--brand);
  color: var(--on-brand);
}
.btn-brand:hover { background: var(--brand-strong); }
.btn-ghost {
  background: transparent;
  color: var(--text-strong);
  border-color: var(--border-default);
}
.btn-ghost:hover { border-color: var(--border-strong); }
.btn[aria-disabled="true"] {
  opacity: 0.6;
  cursor: default;
  pointer-events: none;
}

/* ---- Feature grid ---- */
.features {
  padding: var(--space-8) 0 var(--space-10);
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-5);
}
.feature-card {
  background: var(--surface-card);
  border: var(--border-w-thin) solid var(--border-soft);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}
.feature-card .emoji {
  font-size: var(--fs-2xl);
  margin-bottom: var(--space-3);
}
.feature-card h3 {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  color: var(--text-strong);
  margin: 0 0 var(--space-2);
}
.feature-card p {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin: 0;
}

/* ---- Generic content page (about / support / privacy / terms) ---- */
.page {
  padding: var(--space-8) 0 var(--space-10);
}
.page h1 {
  font-family: var(--font-display);
  font-size: var(--text-display-size);
  color: var(--text-strong);
  margin: 0 0 var(--space-2);
}
.page .updated {
  color: var(--text-subtle);
  font-size: var(--fs-xs);
  margin: 0 0 var(--space-7);
}
.page h2 {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  color: var(--text-strong);
  margin: var(--space-7) 0 var(--space-3);
}
.page p, .page li { color: var(--text-body); }
.page .prose { max-width: 720px; }

.notice {
  background: var(--status-stale-bg);
  color: var(--status-stale);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-6);
}

/* ---- Cat gallery (about page) ---- */
.cat-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-4);
  margin: var(--space-6) 0;
}
.cat-gallery figure {
  margin: 0;
  background: var(--surface-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: var(--border-w-thin) solid var(--border-soft);
}
.cat-gallery img { aspect-ratio: 1; object-fit: cover; }
.cat-gallery-placeholder {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-3xl);
  background: var(--surface-sunk);
  color: var(--text-subtle);
}
.cat-gallery figcaption {
  padding: var(--space-2) var(--space-3);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* ---- Footer ---- */
.site-footer {
  border-top: var(--border-w-thin) solid var(--border-soft);
  padding: var(--space-6) 0;
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.site-footer nav {
  display: flex;
  gap: var(--space-4);
  font-size: var(--fs-sm);
}
.site-footer .copyright {
  font-size: var(--fs-xs);
  color: var(--text-subtle);
}

@media (max-width: 640px) {
  .site-header .container { flex-direction: column; gap: var(--space-3); }
  .hero { padding: var(--space-8) 0 var(--space-7); }
}
