/**
 * Component styles — "The Maker's Catalog"
 */

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: var(--space-4xl) 0 var(--space-3xl); }
.hero .eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 30px;
}
.hero-title {
  font-size: clamp(44px, 8vw, 84px);
  line-height: 1.02;
  letter-spacing: var(--display-tracking);
  color: var(--ink);
  max-width: 14ch;
}
.hero-title .soft { color: var(--ink-3); }
.hero-rule {
  width: 64px;
  height: 2px;
  background: var(--accent);
  margin: 34px 0 26px;
}
.hero-lede {
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 46ch;
}

/* ============================================================
   SECTION
   ============================================================ */
.section { padding: var(--space-3xl) 0; }
.section .section-label { margin-bottom: 0; }

/* ============================================================
   APP LIST (landing)
   ============================================================ */
.app-list { margin-top: 0; }

.app-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 36px;
  align-items: center;
  padding: 40px 28px;
  margin: 0 -28px;
  border-bottom: 1px solid var(--line-2);
  color: inherit;
  transition: background var(--transition);
}
.app-row:nth-child(even) { background: var(--square); }   /* board rhythm */
.app-row:hover { background: color-mix(in srgb, var(--accent) 4%, var(--paper)); }

.app-icon {
  width: 140px;
  height: 140px;
  border-radius: 31px;            /* iOS squircle approximation */
  object-fit: cover;
  background: var(--square);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 18px 40px -18px rgba(0, 0, 0, 0.35);
}

.app-meta { min-width: 0; }
.app-row-name {
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.1;
  margin-bottom: 8px;
  color: var(--ink);
}
.app-row-tagline {
  font-size: 18px;
  color: var(--ink-2);
  margin-bottom: 18px;
  max-width: 44ch;
}
.app-row-spec { margin-bottom: 22px; }
.app-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

/* No-JS / empty fallback */
.loading {
  padding: var(--space-3xl) 0;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================================
   CONTACT
   ============================================================ */
.section.contact .section-label { margin-bottom: 44px; }
.contact-title {
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.05;
  margin-bottom: 14px;
}
.contact-text {
  font-size: 19px;
  color: var(--ink-2);
  margin-bottom: 26px;
  max-width: 42ch;
}
.contact-mail {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--ink);
  border-bottom: 1.5px solid var(--accent);
  padding-bottom: 3px;
}
.contact-mail:hover { color: var(--accent-ink); }

/* ============================================================
   APP DETAIL PAGE
   ============================================================ */
.app-detail { max-width: var(--max-width); margin: 0 auto; }

.app-detail-header {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  padding-bottom: var(--space-2xl);
  margin-bottom: var(--space-3xl);
  border-bottom: 1px solid var(--line);
}
.app-detail-icon {
  width: 150px;
  height: 150px;
  min-width: 150px;
  border-radius: 33px;
  object-fit: cover;
  background: var(--square);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 18px 40px -18px rgba(0, 0, 0, 0.35);
}
.app-detail-header-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.app-detail-name {
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.05;
}
.app-detail-tagline {
  font-size: 19px;
  color: var(--ink-2);
}
.app-detail-categories {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: 2px;
}
.category-tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.app-detail-cta { margin-top: var(--space-md); }
.app-store-badge {
  height: 50px;
  width: auto;
  transition: transform var(--transition);
}
.app-store-badge:hover { transform: translateY(-2px); }

.app-detail-section { margin-bottom: var(--space-4xl); }
.app-detail-section h2 {
  font-size: 13px;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 14px;
  margin-bottom: var(--space-xl);
  border-bottom: 1px solid var(--line);
}
.app-detail-description {
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink-2);
  margin-bottom: var(--space-md);
  max-width: 62ch;
}

/* Feature / info cards */
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
}
.info-card {
  padding: var(--space-lg);
  background: var(--square);
  border: 1px solid var(--line-2);
  border-radius: 12px;
}
.info-card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.info-card-icon { font-size: 20px; }
.info-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
}
.info-card p a {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1.5px solid var(--accent);
  padding-bottom: 1px;
}

/* Screenshots */
.screenshots-gallery {
  display: flex;
  gap: var(--space-lg);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-md);
  margin: 0 -28px;
  padding-left: 28px;
  padding-right: 28px;
}
.screenshot {
  flex: 0 0 auto;
  width: 260px;
  height: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px -16px rgba(0, 0, 0, 0.3);
  scroll-snap-align: start;
  transition: transform var(--transition);
}
.screenshot:hover { transform: translateY(-4px); }

/* ============================================================
   LEGAL / PRIVACY PAGES
   ============================================================ */
.legal-content {
  max-width: 720px;
  margin: 0 auto;
}
.legal-content h1 {
  font-size: clamp(30px, 5vw, 40px);
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-xl);
  border-bottom: 2px solid var(--accent);
}
.legal-content h2 {
  font-size: 13px;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
}
.legal-content h3 { font-size: 18px; margin-top: var(--space-xl); margin-bottom: var(--space-sm); }
.legal-content p { margin-bottom: var(--space-md); line-height: 1.7; }
.legal-content ul,
.legal-content ol { margin: 0 0 var(--space-lg) var(--space-xl); }
.legal-content li { margin-bottom: var(--space-sm); color: var(--ink-2); line-height: 1.7; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 680px) {
  .hero { padding: var(--space-3xl) 0 var(--space-2xl); }
  .hero .eyebrow { margin-bottom: 22px; }

  .app-row {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 32px 20px;
    margin: 0 -20px;
  }
  .app-icon { width: 104px; height: 104px; border-radius: 23px; }

  .app-detail-header {
    flex-direction: column;
    gap: 24px;
  }
  .app-detail-icon { width: 120px; height: 120px; min-width: 120px; border-radius: 27px; }

  .screenshots-gallery { margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
  .screenshot { width: 220px; }
}
