/*
Theme Name: Prism
Theme URI: https://prism.athleticedgeofficial.co
Author: Athletic Edge
Author URI: https://athleticedgeofficial.co
Description: Curated elite gear and services for serious athletes. Prism is the affiliate marketplace arm of Athletic Edge — focused on high-performance equipment, wearables, recovery tools, and coaching services that pass the Edge Filter.
Version: 0.2.0
License: Proprietary
Text Domain: prism
Tags: dark, mobile-first, affiliate, marketplace
*/

/* ==========================================================================
   1. Design Tokens (CSS Custom Properties)
   ========================================================================== */

:root {
  /* Brand colors */
  --prism-navy: #0A1628;
  --prism-navy-light: #142339;
  --prism-navy-lighter: #1d2f4a;
  --prism-gold: #F5A623;
  --prism-gold-bright: #FFB835;
  --prism-gold-dim: #c98914;

  /* Neutrals */
  --prism-white: #ffffff;
  --prism-off-white: #f5f7fa;
  --prism-text: #e8ecf2;
  --prism-text-dim: #9aa3b3;
  --prism-text-faint: #5e6878;
  --prism-border: #2a3950;

  /* Status */
  --prism-success: #22c55e;
  --prism-warning: #f59e0b;
  --prism-danger: #ef4444;

  /* Typography */
  --prism-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --prism-font-mono: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 80px;
  --space-12: 120px;

  /* Layout */
  --max-width: 1200px;
  --max-width-narrow: 800px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.5);
  --shadow-gold: 0 0 24px rgba(245, 166, 35, 0.25);

  /* Transitions */
  --t-fast: 120ms ease;
  --t-normal: 200ms ease;
  --t-slow: 360ms ease;
}

/* ==========================================================================
   2. Reset & Base
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--prism-font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--prism-text);
  background: var(--prism-navy);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--prism-gold);
  text-decoration: none;
  transition: color var(--t-fast);
}

a:hover { color: var(--prism-gold-bright); }

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ==========================================================================
   3. Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--prism-white);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p { line-height: 1.7; }
p + p { margin-top: var(--space-4); }

.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--prism-gold);
}

/* ==========================================================================
   4. Layout & Containers
   ========================================================================== */

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

.container--narrow { max-width: var(--max-width-narrow); }

.section { padding: var(--space-8) 0; }
.section--lg { padding: var(--space-9) 0; }

/* ==========================================================================
   5. Site Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 22, 40, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--prism-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  max-width: var(--max-width);
  margin: 0 auto;
}

.back-to-app {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--prism-text-dim);
  border-radius: var(--radius-sm);
  transition: all var(--t-fast);
}

.back-to-app:hover {
  color: var(--prism-gold);
  background: var(--prism-navy-light);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: 0.04em;
  color: var(--prism-white);
}

.site-brand__mark {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--prism-gold) 0%, var(--prism-gold-dim) 100%);
  border-radius: var(--radius-sm);
  color: var(--prism-navy);
  font-weight: 900;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.site-nav a {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--prism-text-dim);
}

.site-nav a:hover, .site-nav a.is-active {
  color: var(--prism-white);
}

@media (max-width: 720px) {
  .site-nav { display: none; }
}

/* ==========================================================================
   6. Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.02em;
  border-radius: var(--radius-md);
  transition: all var(--t-fast);
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
}

.btn--primary {
  background: var(--prism-gold);
  color: var(--prism-navy);
}

.btn--primary:hover {
  background: var(--prism-gold-bright);
  color: var(--prism-navy);
  transform: translateY(-1px);
  box-shadow: var(--shadow-gold);
}

.btn--ghost {
  background: transparent;
  border-color: var(--prism-border);
  color: var(--prism-text);
}

.btn--ghost:hover {
  border-color: var(--prism-gold);
  color: var(--prism-gold);
}

.btn--lg {
  padding: var(--space-4) var(--space-6);
  font-size: 1rem;
}

/* ==========================================================================
   7. Hero
   ========================================================================== */

.hero {
  padding: var(--space-9) 0 var(--space-8);
  background: radial-gradient(ellipse at top, var(--prism-navy-light) 0%, var(--prism-navy) 60%);
  text-align: center;
}

.hero__eyebrow { margin-bottom: var(--space-3); }
.hero__title { margin-bottom: var(--space-5); max-width: 18ch; margin-left: auto; margin-right: auto; }
.hero__title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--prism-gold) 0%, var(--prism-gold-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero__lede {
  font-size: 1.125rem;
  color: var(--prism-text-dim);
  max-width: 56ch;
  margin: 0 auto var(--space-6);
}

/* ==========================================================================
   8. Product Cards
   ========================================================================== */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-5);
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--prism-navy-light);
  border: 1px solid var(--prism-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--t-normal);
}

.product-card:hover {
  border-color: var(--prism-gold);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.product-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--prism-navy);
  overflow: hidden;
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}

.product-card:hover .product-card__media img { transform: scale(1.04); }

.product-card__media--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--prism-text-faint);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
}

.edge-score-badge {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  background: var(--prism-gold);
  color: var(--prism-navy);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.edge-score-badge__value {
  font-size: 1rem;
  letter-spacing: 0;
}

.product-card__body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card__brand {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--prism-text-faint);
  margin-bottom: var(--space-2);
}

.product-card__title {
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--prism-white);
  margin-bottom: var(--space-3);
}

.product-card__excerpt {
  font-size: 0.875rem;
  color: var(--prism-text-dim);
  line-height: 1.55;
  flex: 1;
  margin-bottom: var(--space-4);
}

.product-card__cta {
  margin-top: auto;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--prism-gold);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.04em;
}

.product-card__cta::after {
  content: '→';
  transition: transform var(--t-fast);
}

.product-card:hover .product-card__cta::after { transform: translateX(4px); }

/* ==========================================================================
   9. Single Product Page
   ========================================================================== */

.product-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  padding: var(--space-7) 0;
}

@media (min-width: 880px) {
  .product-detail {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
}

.product-detail__media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--prism-navy-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.product-detail__media img {
  width: 100%; height: 100%; object-fit: cover;
}

.product-detail__brand {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--prism-gold);
  margin-bottom: var(--space-3);
}

.product-detail__title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  margin-bottom: var(--space-4);
}

.product-detail__score {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--prism-navy-light);
  border: 1px solid var(--prism-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-5);
}

.product-detail__score-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--prism-text-dim);
}

.product-detail__score-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--prism-gold);
  line-height: 1;
}

.product-detail__review {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--prism-text);
  margin-bottom: var(--space-6);
}

.product-detail__review p + p { margin-top: var(--space-4); }

/* ==========================================================================
   10. Categories
   ========================================================================== */

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-4);
}

.category-card {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1.6 / 1;
  padding: var(--space-5);
  background: var(--prism-navy-light);
  border: 1px solid var(--prism-border);
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  color: var(--prism-white);
  transition: all var(--t-fast);
}

.category-card:hover {
  border-color: var(--prism-gold);
  color: var(--prism-gold);
  transform: translateY(-2px);
}

/* ==========================================================================
   11. Utility & Misc
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.section-head__title { margin: 0; }
.section-head__link { font-size: 0.875rem; font-weight: 700; }

/* Empty state used when no products exist yet */
.empty-state {
  text-align: center;
  padding: var(--space-8) var(--space-5);
  background: var(--prism-navy-light);
  border: 1px dashed var(--prism-border);
  border-radius: var(--radius-lg);
  color: var(--prism-text-dim);
}

.empty-state__title { color: var(--prism-white); margin-bottom: var(--space-2); }

/* ==========================================================================
   12. Athletic Edge Originals (Product Type Variants)
   ========================================================================== */

/* "By Athletic Edge" badge — used on Originals instead of Edge Score */
.origin-badge {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  background: linear-gradient(135deg, var(--prism-gold) 0%, var(--prism-gold-bright) 100%);
  color: var(--prism-navy);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  box-shadow: var(--shadow-gold);
}

.origin-badge__brand {
  font-size: 0.875rem;
  letter-spacing: 0.02em;
}

/* Card variant for Athletic Edge Originals */
.product-card--ae {
  border: 2px solid rgba(245, 166, 35, 0.4);
  box-shadow: 0 0 0 1px rgba(245, 166, 35, 0.15) inset;
}

.product-card--ae:hover {
  border-color: var(--prism-gold);
  box-shadow: var(--shadow-gold), var(--shadow-md);
}

/* Price display on product cards */
.product-card__price {
  margin: var(--space-2) 0 var(--space-3);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--prism-gold);
  letter-spacing: 0.01em;
}

/* "From Athletic Edge" section accent */
.section--ae {
  background: linear-gradient(180deg, rgba(245, 166, 35, 0.04) 0%, transparent 100%);
  border-top: 1px solid rgba(245, 166, 35, 0.18);
  border-bottom: 1px solid rgba(245, 166, 35, 0.18);
}

.section--ae .section-head__title {
  background: linear-gradient(135deg, var(--prism-white) 0%, var(--prism-gold-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   13. Footer (Brand + Links + FTC Disclosure)
   ========================================================================== */

.site-footer {
  margin-top: var(--space-12);
  padding: var(--space-10) 0 var(--space-6);
  background: rgba(0, 0, 0, 0.3);
  border-top: 1px solid var(--prism-border);
  color: var(--prism-text-dim);
  font-size: 0.875rem;
  line-height: 1.6;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* Brand */
.footer-brand__logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  margin-bottom: var(--space-3);
}

.footer-brand__mark {
  width: 28px;
  height: 28px;
  background: var(--prism-gold);
  color: var(--prism-navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1rem;
  border-radius: var(--radius-sm);
}

.footer-brand__wordmark {
  color: var(--prism-white);
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: 0.12em;
}

.footer-brand__tagline {
  max-width: 32ch;
  color: var(--prism-text-dim);
  margin: 0;
}

/* Columns */
.footer-col__title {
  color: var(--prism-white);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 var(--space-3);
}

.footer-col__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-col__list a {
  color: var(--prism-text-dim);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-col__list a:hover {
  color: var(--prism-gold);
}

/* FTC Disclosure */
.footer-ftc {
  padding: var(--space-5) 0;
  border-top: 1px solid var(--prism-border);
  border-bottom: 1px solid var(--prism-border);
  margin-bottom: var(--space-5);
}

.footer-ftc p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--prism-text-dim);
  line-height: 1.6;
  max-width: 80ch;
}

.footer-ftc a {
  color: var(--prism-gold);
  text-decoration: none;
}

.footer-ftc a:hover {
  text-decoration: underline;
}

/* Copyright */
.footer-copy {
  font-size: 0.8125rem;
  color: var(--prism-text-dim);
  opacity: 0.7;
}

.footer-copy p {
  margin: 0;
}
