/* ============================================
   StylePick — Design System & Styles
   ============================================ */

/* ---------- Google Font ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@500;600;700&display=swap');

/* ---------- Custom Properties ---------- */
:root {
  /* Palette */
  --clr-bg:        #0f0f12;
  --clr-surface:   #1a1a22;
  --clr-surface-2: #24242e;
  --clr-border:    rgba(255, 255, 255, .06);
  --clr-text:      #e8e6e3;
  --clr-text-dim:  #9a9a9e;
  --clr-accent:    #c9a96e;
  --clr-accent-2:  #e2c48a;
  --clr-white:     #ffffff;

  /* Gradients */
  --grad-accent: linear-gradient(135deg, var(--clr-accent), var(--clr-accent-2));
  --grad-hero:   linear-gradient(160deg, rgba(15,15,18,.92) 40%, rgba(201,169,110,.18) 100%);

  /* Spacing */
  --sp-xs: .5rem;
  --sp-sm: 1rem;
  --sp-md: 1.5rem;
  --sp-lg: 2.5rem;
  --sp-xl: 4rem;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  /* Shadows */
  --shadow-card: 0 4px 30px rgba(0,0,0,.35);
  --shadow-glow: 0 0 40px rgba(201,169,110,.12);

  /* Transitions */
  --ease: cubic-bezier(.4,0,.2,1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ---------- Utility ---------- */
.container {
  width: min(1200px, 90%);
  margin-inline: auto;
}

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

.accent { color: var(--clr-accent); }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 2rem;
  border: none; border-radius: var(--radius-sm);
  font-family: inherit; font-weight: 600; font-size: .95rem;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}

.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: var(--grad-accent);
  color: var(--clr-bg);
  box-shadow: 0 4px 24px rgba(201,169,110,.25);
}

.btn--primary:hover {
  box-shadow: 0 6px 32px rgba(201,169,110,.4);
}

.btn--outline {
  background: transparent;
  color: var(--clr-accent);
  border: 1.5px solid var(--clr-accent);
}

.btn--outline:hover {
  background: rgba(201,169,110,.08);
}

.section-label {
  display: inline-block;
  font-size: .75rem; font-weight: 600;
  letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--clr-accent);
  margin-bottom: var(--sp-sm);
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--sp-md);
}

.section-desc {
  color: var(--clr-text-dim);
  font-size: 1.05rem;
  max-width: 580px;
}

/* ---------- Header ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: var(--sp-sm) 0;
  background: rgba(15,15,18,.72);
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  border-bottom: 1px solid var(--clr-border);
  transition: background .3s var(--ease);
}

.header__inner {
  display: flex; align-items: center; justify-content: space-between;
}

.header__logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem; font-weight: 700;
  letter-spacing: -0.5px;
}

.header__logo span { color: var(--clr-accent); }

.header__nav { display: flex; align-items: center; gap: var(--sp-lg); }

.header__links { display: flex; gap: var(--sp-md); }

.header__links a {
  font-size: .9rem; font-weight: 500;
  color: var(--clr-text-dim);
  transition: color .2s var(--ease);
  position: relative;
}

.header__links a::after {
  content: ''; position: absolute;
  bottom: -4px; left: 0; width: 0; height: 2px;
  background: var(--clr-accent);
  transition: width .3s var(--ease);
}

.header__links a:hover { color: var(--clr-white); }
.header__links a:hover::after { width: 100%; }

/* Mobile hamburger */
.hamburger {
  display: none; background: none; border: none;
  cursor: pointer; padding: .25rem;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--clr-text); margin: 5px 0;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  padding-top: 80px;
  overflow: hidden;
}

.hero__bg {
  position: absolute; inset: 0; z-index: 0;
}

.hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .3;
}

.hero__overlay {
  position: absolute; inset: 0;
  background: var(--grad-hero);
  z-index: 1;
}

.hero__content {
  position: relative; z-index: 2;
  max-width: 640px;
}

.hero__badge {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .45rem 1.1rem;
  background: rgba(201,169,110,.1);
  border: 1px solid rgba(201,169,110,.25);
  border-radius: 100px;
  font-size: .8rem; font-weight: 500;
  color: var(--clr-accent);
  margin-bottom: var(--sp-md);
  animation: fadeInUp .8s .2s both;
}

.hero__badge::before {
  content: ''; width: 6px; height: 6px;
  border-radius: 50%; background: var(--clr-accent);
  animation: pulse 2s infinite;
}

.hero__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: var(--sp-md);
  animation: fadeInUp .8s .35s both;
}

.hero__desc {
  font-size: 1.1rem;
  color: var(--clr-text-dim);
  line-height: 1.8;
  margin-bottom: var(--sp-lg);
  animation: fadeInUp .8s .5s both;
}

.hero__actions {
  display: flex; gap: var(--sp-sm); flex-wrap: wrap;
  animation: fadeInUp .8s .65s both;
}

/* ---------- Categories ---------- */
.categories {
  padding: var(--sp-xl) 0;
  padding-top: calc(var(--sp-xl) + 2rem);
}

.categories__header {
  text-align: center;
  margin-bottom: var(--sp-xl);
}

.categories__header .section-desc { margin-inline: auto; }

.categories__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sp-md);
}

.category-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  cursor: pointer;
  transition: transform .4s var(--ease);
}

.category-card:hover { transform: scale(1.02); }

.category-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}

.category-card:hover img { transform: scale(1.08); }

.category-card__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,15,18,.85) 0%, transparent 60%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: var(--sp-md);
}

.category-card__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem; font-weight: 600;
  margin-bottom: .25rem;
}

.category-card__count {
  font-size: .8rem; color: var(--clr-accent);
  font-weight: 500;
}

/* ---------- Featured Picks ---------- */
.featured {
  padding: var(--sp-xl) 0;
  background: var(--clr-surface);
  border-top: 1px solid var(--clr-border);
  border-bottom: 1px solid var(--clr-border);
}

.featured__header {
  display: flex; align-items: flex-end; justify-content: space-between;
  flex-wrap: wrap; gap: var(--sp-sm);
  margin-bottom: var(--sp-xl);
}

.featured__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-md);
}

.product-card {
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.product-card__img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.product-card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}

.product-card:hover .product-card__img img {
  transform: scale(1.06);
}

.product-card__body {
  padding: var(--sp-md);
}

.product-card__tag {
  display: inline-block;
  font-size: .7rem; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--clr-accent);
  margin-bottom: var(--sp-xs);
}

.product-card__title {
  font-size: 1.05rem; font-weight: 600;
  margin-bottom: .5rem;
  line-height: 1.4;
}

.product-card__price {
  font-size: 1.15rem; font-weight: 700;
  color: var(--clr-accent);
  margin-bottom: var(--sp-sm);
}

.product-card__price .original {
  font-size: .85rem; font-weight: 400;
  color: var(--clr-text-dim);
  text-decoration: line-through;
  margin-left: .5rem;
}

.product-card__cta {
  display: flex; align-items: center; gap: .4rem;
  font-size: .85rem; font-weight: 600;
  color: var(--clr-accent);
  transition: gap .3s var(--ease);
}

.product-card:hover .product-card__cta { gap: .7rem; }

/* ---------- How It Works ---------- */
.how-it-works {
  padding: var(--sp-xl) 0;
  padding-top: calc(var(--sp-xl) + 2rem);
}

.how-it-works__header {
  text-align: center;
  margin-bottom: var(--sp-xl);
}

.how-it-works__header .section-desc { margin-inline: auto; }

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--sp-md);
  counter-reset: step;
}

.step {
  position: relative;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: var(--sp-lg) var(--sp-md);
  text-align: center;
  counter-increment: step;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}

.step:hover {
  border-color: rgba(201,169,110,.2);
  box-shadow: var(--shadow-glow);
}

.step__number {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(201,169,110,.1);
  color: var(--clr-accent);
  font-weight: 700; font-size: 1.1rem;
  margin-bottom: var(--sp-sm);
}

.step__title {
  font-size: 1.1rem; font-weight: 600;
  margin-bottom: .5rem;
}

.step__desc {
  font-size: .9rem;
  color: var(--clr-text-dim);
  line-height: 1.7;
}

/* ---------- Newsletter ---------- */
.newsletter {
  padding: var(--sp-xl) 0;
  text-align: center;
}

.newsletter__card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-xl) var(--sp-lg);
  position: relative;
  overflow: hidden;
}

.newsletter__card::before {
  content: '';
  position: absolute;
  top: -60%; right: -20%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(201,169,110,.08), transparent 70%);
  pointer-events: none;
}

.newsletter__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  margin-bottom: var(--sp-sm);
}

.newsletter__desc {
  color: var(--clr-text-dim);
  margin-bottom: var(--sp-lg);
  max-width: 460px;
  margin-inline: auto;
}

.newsletter__form {
  display: flex; gap: .75rem;
  max-width: 460px; margin-inline: auto;
  flex-wrap: wrap; justify-content: center;
}

.newsletter__input {
  flex: 1; min-width: 200px;
  padding: .85rem 1.25rem;
  background: var(--clr-surface-2);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  color: var(--clr-text);
  font-family: inherit; font-size: .95rem;
  outline: none;
  transition: border-color .3s var(--ease);
}

.newsletter__input:focus {
  border-color: var(--clr-accent);
}

.newsletter__input::placeholder {
  color: var(--clr-text-dim);
}

/* ---------- Footer ---------- */
.footer {
  padding: var(--sp-lg) 0;
  border-top: 1px solid var(--clr-border);
}

.footer__inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: var(--sp-sm);
}

.footer__copy {
  font-size: .85rem; color: var(--clr-text-dim);
}

.footer__links { display: flex; gap: var(--sp-md); }

.footer__links a {
  font-size: .85rem; color: var(--clr-text-dim);
  transition: color .2s var(--ease);
}

.footer__links a:hover { color: var(--clr-accent); }

.footer__affiliate-note {
  width: 100%;
  text-align: center;
  font-size: .75rem;
  color: var(--clr-text-dim);
  margin-top: var(--sp-sm);
  opacity: .7;
}

/* ---------- Page-Specific: About & Privacy ---------- */
.page-hero {
  padding: calc(80px + var(--sp-xl)) 0 var(--sp-xl);
  text-align: center;
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border);
}

.page-content {
  padding: var(--sp-xl) 0;
}

.page-content .container {
  max-width: 760px;
}

.prose h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem; font-weight: 600;
  margin: var(--sp-lg) 0 var(--sp-sm);
  color: var(--clr-white);
}

.prose h3 {
  font-size: 1.15rem; font-weight: 600;
  margin: var(--sp-md) 0 var(--sp-xs);
}

.prose p {
  color: var(--clr-text-dim);
  margin-bottom: var(--sp-sm);
  line-height: 1.85;
}

.prose ul {
  padding-left: 1.5rem;
  margin-bottom: var(--sp-sm);
  list-style: disc;
}

.prose ul li {
  color: var(--clr-text-dim);
  margin-bottom: .4rem;
  line-height: 1.7;
}

.prose a {
  color: var(--clr-accent);
  border-bottom: 1px solid rgba(201,169,110,.3);
  transition: border-color .2s var(--ease);
}

.prose a:hover { border-color: var(--clr-accent); }

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .4; }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .header__links { display: none; }
  .hamburger { display: block; }

  /* Mobile nav open state */
  .header__nav.open .header__links {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(15,15,18,.96);
    backdrop-filter: blur(18px);
    padding: var(--sp-md) var(--sp-lg);
    border-bottom: 1px solid var(--clr-border);
  }

  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .hamburger.active span:nth-child(2) { opacity: 0; }
  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero__title { font-size: clamp(2rem, 6vw, 3rem); }

  .featured__header { flex-direction: column; align-items: flex-start; }

  .footer__inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .hero__actions { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .categories__grid { grid-template-columns: 1fr; }
}
