/* ============================================================
   Midnight Dawg Labs — shared stylesheet
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,700&family=Inter:wght@400;500&display=swap');

/* --- Design tokens --- */
:root {
  --color-ink:         #15171c;
  --color-paper:       #faf8f4;
  --color-paper-shade: #f1eee5;
  --color-rule:        #e5e2d9;
  --color-muted:       #5a574f;
  --color-faint:       #9c998e;
  --color-dawn:        #e8a33d;
  --color-dawn-deep:   #d98a2b;

  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --gradient-signature: linear-gradient(
    90deg,
    var(--color-ink)       0%,
    var(--color-ink)      35%,
    var(--color-dawn-deep) 75%,
    var(--color-dawn)     100%
  );

  --max-width: 880px;
}

/* --- Reset & base --- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0;
}

a { color: inherit; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-dawn-deep);
  outline-offset: 2px;
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ============================================================
   Site header
   ============================================================ */
.site-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 0;
}

.site-header .inner {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 1rem;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--color-ink);
}

.site-nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  font-size: 13px;
  color: var(--color-muted);
  text-decoration: none;
}

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

/* ============================================================
   Site footer
   ============================================================ */
.site-footer {
  border-top: 0.5px solid var(--color-rule);
  margin-top: 4rem;
}

.site-footer .inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 12px;
  color: var(--color-faint);
}

.site-footer .links {
  display: flex;
  gap: 18px;
}

.site-footer .links a {
  color: var(--color-faint);
  text-decoration: none;
}

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

/* ============================================================
   Shared utilities
   ============================================================ */
.page-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.signature-rule {
  height: 2px;
  background: var(--gradient-signature);
  margin-bottom: 2.5rem;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-faint);
  margin: 0 0 1rem;
}

.badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-dawn-deep);
  background: var(--color-paper-shade);
  border: 0.5px solid var(--color-rule);
  border-radius: 100px;
  padding: 3px 9px;
  white-space: nowrap;
}

/* ============================================================
   Homepage
   ============================================================ */
.hero {
  padding: 3rem 0 2.5rem;
  max-width: 480px;
}

.hero h1 {
  font-size: 28px;
  margin: 0 0 16px;
}

.hero .lede {
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-muted);
  margin: 0;
}

.about {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding-bottom: 3rem;
}

.about-block h2 {
  font-size: 18px;
  margin: 0 0 0.75rem;
}

.about-block p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-muted);
  margin: 0;
}

.apps-section { padding-bottom: 2.5rem; }

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1px;
  background: var(--color-rule);
  border: 1px solid var(--color-rule);
}

/* ============================================================
   App card
   ============================================================ */
.app-card {
  background: var(--color-paper);
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: background 0.15s ease;
}

.app-card:hover { background: var(--color-paper-shade); }

.app-card .card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.app-card .icon,
.app-card .icon-fallback {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: block;
  flex-shrink: 0;
}

.app-card .card-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-ink);
  margin: 0 0 4px;
}

.app-card .card-tagline {
  font-size: 13px;
  color: var(--color-faint);
  margin: 0;
}

/* ============================================================
   App detail page
   ============================================================ */
.app-detail-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 0;
}

.back-link {
  display: inline-block;
  font-size: 13px;
  color: var(--color-muted);
  text-decoration: none;
  margin-bottom: 2rem;
}

.back-link:hover { color: var(--color-ink); }

.app-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 1.5rem;
}

.app-head .icon,
.app-head .icon-fallback {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  flex-shrink: 0;
}

.app-head .title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.app-head h1 { font-size: 30px; }

.app-head .tagline {
  font-size: 15px;
  color: var(--color-muted);
  margin: 0;
}

.store-link {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-dawn-deep);
  text-decoration: none;
  margin-bottom: 2rem;
}

.store-link:hover { text-decoration: underline; }

.screenshots {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  margin-bottom: 2.5rem;
}

.screenshots img {
  height: 420px;
  width: auto;
  border-radius: 12px;
  border: 0.5px solid var(--color-rule);
  flex-shrink: 0;
}

.app-content {
  max-width: 640px;
  padding-bottom: 3rem;
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-muted);
}

.app-content h2 {
  font-size: 20px;
  color: var(--color-ink);
  margin: 2.5rem 0 0.75rem;
}

.app-content h3 {
  font-size: 16px;
  color: var(--color-ink);
  margin: 1.5rem 0 0.25rem;
}

.app-content p { margin: 0 0 1rem; }

.app-content ul {
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}

.app-content li { margin-bottom: 0.4rem; }

.app-content a { color: var(--color-dawn-deep); }

/* ============================================================
   Privacy & Contact pages
   ============================================================ */
.prose-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 0;
}

.prose-main h1 {
  font-size: 30px;
  margin: 0 0 8px;
}

.prose-main .page-date {
  font-size: 13px;
  color: var(--color-faint);
  margin: 0 0 2rem;
}

.prose-content {
  max-width: 640px;
  padding-bottom: 3rem;
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-muted);
}

.prose-content h2 {
  font-size: 18px;
  color: var(--color-ink);
  margin: 2rem 0 0.75rem;
}

.prose-content p { margin: 0 0 1rem; }

.prose-content ul {
  padding-left: 1.25rem;
  margin: 0 0 1rem;
}

.prose-content li { margin-bottom: 0.4rem; }

.prose-content a { color: var(--color-dawn-deep); }

.prose-content strong {
  color: var(--color-ink);
  font-weight: 500;
}

.email-link {
  display: inline-block;
  font-size: 17px;
  font-weight: 500;
  color: var(--color-dawn-deep);
  text-decoration: none;
  margin: 0.5rem 0 2rem;
}

.email-link:hover { text-decoration: underline; }

.response-time {
  font-size: 13px;
  color: var(--color-faint);
  margin: 0;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 480px) {
  .hero h1 { font-size: 30px; }

  .site-nav ul { gap: 18px; }

  .screenshots img { height: 320px; }
}
