/* PerleForge - shared styles */

:root {
  --bg: #0e0c14;
  --bg-card: #1a1726;
  --accent: #c084fc;
  --accent-dim: #7c3aed;
  --text: #f0eaf8;
  --text-muted: #9d8ec4;
  --border: #2e2848;
  --etsy-orange: #f1641e;
  --radius: 12px;
  --font: 'Segoe UI', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Nav */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.03em;
  text-decoration: none;
}

.nav-logo:hover { text-decoration: none; }

.nav-logo img {
  display: block;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  text-decoration: none;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  border: none;
}

.btn:hover { opacity: 0.85; text-decoration: none; }

.btn-primary {
  background: var(--accent);
  color: #0e0c14;
}

.btn-etsy {
  background: var(--etsy-orange);
  color: #0e0c14; /* dark label on brand orange = 6.1:1 (white was only 3.2:1, fails AA) */
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

footer a { color: var(--text-muted); }
footer a:hover { color: var(--text); }

/* ---- Shared page components (About, Products hub, product detail pages) ---- */
/* .page-hero (not .page-header - the colors gallery already defines its own
   .page-header inline; a distinct name avoids leaking styles into that page). */
.page-hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem 1rem;
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(1.8rem, 4.5vw, 2.6rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.page-hero p { color: var(--text-muted); font-size: 1.05rem; }

.section { padding: 2.5rem 2rem; max-width: 1100px; margin: 0 auto; }
.section-header { margin-bottom: 2rem; }
.section-header h2 { font-size: 1.75rem; font-weight: 700; margin-bottom: 0.5rem; }
.section-header p { color: var(--text-muted); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}
.product-card:hover { transform: translateY(-3px); border-color: var(--accent-dim); }
.product-card-img {
  width: 100%;
  aspect-ratio: 1;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.product-card-img img { width: 100%; height: 100%; object-fit: cover; }
.product-card-body { padding: 1rem; }
.product-card-body h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.35rem; }
.product-card-body p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem; }

.callout {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  text-align: center;
  max-width: 1100px;
  margin: 2rem auto 4rem;
}
.callout h2 { font-size: 1.6rem; margin-bottom: 0.75rem; }
.callout p { color: var(--text-muted); max-width: 520px; margin: 0 auto 1.75rem; }
.btn-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.about { padding: 3.5rem 2rem; max-width: 640px; margin: 0 auto; text-align: left; }
.about h1 { font-size: clamp(1.7rem, 4vw, 2.2rem); margin-bottom: 1.25rem; }
.about p { color: var(--text); font-size: 1.1rem; margin-bottom: 1rem; }
.about .btn-row { margin-top: 2rem; justify-content: flex-start; }

/* Product detail pages (StrataStack / Slider) */
.product-feature {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}
.product-feature-img {
  width: 100%;
  aspect-ratio: 1;
  background: var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  overflow: hidden;
}
.product-feature-img img { width: 100%; height: 100%; object-fit: cover; }
.product-feature h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); margin-bottom: 1rem; }
.product-feature p { color: var(--text); font-size: 1.1rem; margin-bottom: 1rem; }
.product-feature .btn-row { justify-content: flex-start; margin-top: 1.5rem; }
.product-note { color: var(--text-muted); font-size: 0.95rem; }

/* FAQ (kept in sync with the FAQPage JSON-LD on the product pages) */
.faq { max-width: 760px; margin: 0 auto; padding: 1rem 2rem 3rem; }
.faq h2 { font-size: 1.5rem; margin-bottom: 1.25rem; text-align: center; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 1rem 1.2rem;
  margin-bottom: 0.85rem;
}
.faq-item h3 { font-size: 1rem; font-weight: 650; margin-bottom: 0.35rem; }
.faq-item p { color: var(--text-muted); font-size: 0.95rem; }

.backlink { display: inline-block; margin: 1.5rem 2rem 0; color: var(--text-muted); font-size: 0.9rem; }

/* Visible marker for unconfirmed facts Kate still needs to fill before going live. */
.todo {
  background: rgba(241,100,30,0.14);
  border: 1px dashed var(--etsy-orange);
  color: #ffd0b8;
  border-radius: 6px;
  padding: 0 0.35rem;
  font-size: 0.92em;
}

/* Responsive nav - applies to every page */
@media (max-width: 600px) {
  nav {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
  }
  .nav-links {
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    font-size: 0.9rem;
  }
  footer { padding: 1.5rem 1rem; }

  .page-hero { padding: 2.5rem 1.25rem 1rem; }
  .section, .about, .faq { padding-left: 1.25rem; padding-right: 1.25rem; }
  .product-feature { grid-template-columns: 1fr; padding: 2rem 1.25rem; }
  .product-feature .btn-row { justify-content: center; }
  .callout { padding: 2.5rem 1.25rem; margin: 2rem 1.25rem; }
}

/* Honor the OS "reduce motion" setting (iOS/macOS "Reduce Motion", Windows animations
   off). Only affects visitors who have enabled it - everyone else is unchanged. Applies
   to every page that links this stylesheet, now and in the future. Near-zero durations
   (not "none") keep any animation/transition-end handlers firing. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
