/* =====================================================================
   Pure Glow Cosmetics — css/home.css
   Sections that exist ONLY on the home page. Uses tokens from style.css.

   CONTENTS
   1. Animations
   2. Hero
   3. Category ticker (scrolling words)
   4. Store benefits strip
   5. Categories & shared card style (tilt + highlight)
   6. Brands
   7. Products + filters
   8. Reviews
   9. Newsletter
   ===================================================================== */

/* 1. ANIMATIONS ------------------------------------------------------ */
@keyframes rise     { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes archrise { from { opacity: 0; transform: translateY(60px); } to { opacity: 1; transform: none; } }
@keyframes float    { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes drift    { from { transform: translate(0, 0) scale(1); } to { transform: translate(60px, 40px) scale(1.15); } }
@keyframes blurIn   { from { opacity: 0; filter: blur(10px); transform: translateY(24px); } to { opacity: 1; filter: blur(0); transform: none; } }
@keyframes ticker   { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes shift    { from { background-position: 0% 30%; } to { background-position: 100% 70%; } }

/* 2. HERO ------------------------------------------------------------ */
.hero {
  position: relative; overflow: hidden;
  padding: 72px var(--gutter);
  background: var(--gradient-burgundy);
  background-size: 170% 170%;
  animation: shift 18s ease-in-out infinite alternate;
  color: var(--text-on-dark);
}
.hero__grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 48px; align-items: center;
}
.hero__title {
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 58px); font-weight: 600; line-height: 1.08;
}
.hero__title span { display: inline-block; animation: blurIn .9s var(--ease) both; }
.hero__title span:nth-child(1) { animation-delay: .15s; }
.hero__title span:nth-child(2) { animation-delay: .24s; }
.hero__title span:nth-child(3) { animation-delay: .33s; }
.hero__title span:nth-child(4) { animation-delay: .42s; }
.hero__title span:nth-child(5) { animation-delay: .51s; }
.hero__title span:nth-child(6) { animation-delay: .60s; }
.hero__title span:nth-child(7) { animation-delay: .69s; }
.hero__title span:nth-child(8) { animation-delay: .78s; }

.hero__lead {
  margin: 0 0 36px; max-width: 480px;
  font-size: 18px; line-height: 1.7; color: var(--text-on-dark-muted);
  animation: rise .9s var(--ease) .5s backwards;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; animation: rise .9s var(--ease) .65s backwards; }

/* Decorative background: two soft blobs + the golden glow that follows the mouse */
.hero__blob {
  position: absolute; z-index: 0; width: 420px; height: 420px; border-radius: 50%;
  filter: blur(90px); opacity: .4; pointer-events: none;
  animation: drift 20s ease-in-out infinite alternate;
}
.hero__blob--gold { top: -140px; left: -100px; background: var(--gold); }
.hero__blob--rose { bottom: -160px; right: -80px; background: var(--rose); animation-delay: -8s; }

.hero__spot {                       /* position is set by js/home.js */
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0; transition: opacity .5s ease;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%),
              rgba(198,163,106,.26), rgba(198,163,106,.09) 45%, transparent 70%);
}
.hero.has-spot .hero__spot { opacity: 1; }

.hero__arches { display: flex; align-items: flex-end; justify-content: center; gap: 16px; }
.arch {
  border-radius: 999px 999px 24px 24px;
  animation: archrise 1.1s var(--ease) backwards, float 7s ease-in-out 1.3s infinite;
}
.arch--1 { width: 30%; height: 300px; background: var(--g-rose); animation-delay: .3s, 1.3s; }
.arch--2 { width: 36%; height: 420px; background: var(--g-blend); box-shadow: 0 24px 48px rgba(0,0,0,.3); animation-delay: .15s, 2s; animation-duration: 1.1s, 8s; }
.arch--3 { width: 30%; height: 340px; background: var(--g-champagne); animation-delay: .45s, 2.6s; animation-duration: 1.1s, 6.5s; }

/* 3. TICKER ---------------------------------------------------------- */
.ticker {
  overflow: hidden; padding: 18px 0;
  background: var(--rose-light);
  border-block: 1px solid rgba(198,163,106,.5);
}
.ticker__track { display: flex; width: max-content; animation: ticker 38s linear infinite; }
.ticker__track span {
  padding: 0 26px; white-space: nowrap;
  font-family: var(--font-display); font-style: italic; font-size: 30px; color: var(--burgundy);
}
.ticker__track i { padding-left: 12px; font-style: normal; color: var(--gold); }

/* 4. STORE BENEFITS -------------------------------------------------- */
.benefits { padding: 36px var(--gutter); background: var(--grey); }
.benefits__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; }
.benefit { display: flex; align-items: center; gap: 14px; }
.benefit svg { width: 28px; height: 28px; flex-shrink: 0; color: var(--burgundy); }
.benefit strong { color: var(--burgundy); }
.benefit span { display: block; font-size: 13px; color: var(--text-muted); }

/* 5. CATEGORIES ------------------------------------------------------ */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px; }

.card {                              /* shared by category, brand, product and review cards */
  --rx: 0deg; --ry: 0deg; --lift: 0px;   /* tilt + lift: --rx/--ry are set by js/effects.js */
  position: relative; display: block; overflow: hidden;
  background: var(--white); border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(var(--lift));
  transition: transform .6s var(--ease), box-shadow .3s;
}
.card:hover { --lift: -6px; box-shadow: var(--shadow-lift); }
.card.is-tilting { transition: transform .18s ease-out, box-shadow .3s; }   /* quick while following the cursor */

/* Soft highlight that follows the cursor across a tilting card */
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  opacity: 0; transition: opacity .3s;
  background: radial-gradient(280px circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.28), transparent 60%);
}
.card.is-tilting::after { opacity: 1; }

.thumb { transition: transform .7s var(--ease); }
.card:hover .thumb { transform: scale(1.07); }
.thumb--rose      { background: var(--g-rose); }
.thumb--blend     { background: var(--g-blend); }
.thumb--champagne { background: var(--g-champagne); }
.thumb--burgundy  { background: var(--g-burgundy); }

.category-card .thumb { aspect-ratio: 4 / 5; }
.category-card__info { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px 24px; }
.category-card h3 { margin: 0; font-family: var(--font-display); font-size: 26px; color: var(--burgundy); }
.category-card p { margin: 4px 0 0; font-size: 14px; color: var(--text-muted); }
.category-card__arrow {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--burgundy); color: var(--text-on-dark);
  transition: transform .3s var(--ease), background .3s, color .3s;
}
.card:hover .category-card__arrow { transform: translateX(5px); background: var(--gold); color: var(--burgundy-deep); }

/* 6. BRANDS ---------------------------------------------------------- */
.brands__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 20px; }
.brand-tile {
  display: flex; align-items: center; justify-content: center;
  min-height: 120px; padding: 24px;
}
.brand-tile span { font-family: var(--font-display); font-size: 22px; letter-spacing: .08em; color: var(--burgundy); }
.brands__more { margin-top: 40px; text-align: center; }

/* 7. PRODUCTS + FILTERS ---------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.filter {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px;
  border: 1.5px solid var(--rose); border-radius: var(--radius-pill);
  background: transparent; color: var(--burgundy);
  font: 500 14px var(--font-body); cursor: pointer;
  transition: background .25s, color .25s, transform .25s var(--ease);
}
.filter:hover { transform: translateY(-2px); background: var(--white); }
.filter.is-active { background: var(--burgundy); border-color: var(--burgundy); color: var(--text-on-dark); }

.products__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.product-card .thumb { position: relative; height: 260px; }
.product-card__badge {
  position: absolute; top: 16px; left: 16px;
  padding: 6px 12px; border-radius: var(--radius-pill);
  background: var(--burgundy); color: var(--text-on-dark); font-size: 12px;
}
.product-card__info { padding: 18px 22px 22px; }
.product-card__meta { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #8A5A6A; }
.product-card__meta strong { color: var(--burgundy); }
.product-card__name { margin: 6px 0 12px; font-family: var(--font-display); font-size: 19px; color: var(--burgundy); }
.product-card__buy { display: flex; justify-content: space-between; align-items: center; }

/* 8. REVIEWS --------------------------------------------------------- */
.review-card { margin: 0; padding: 32px; }
.review-card__stars { font-size: 18px; color: var(--gold); }
.review-card blockquote { margin: 14px 0 20px; font-family: var(--font-display); font-size: 20px; line-height: 1.5; color: var(--burgundy); }
.review-card cite { font-size: 14px; font-style: normal; color: var(--text-muted); }

/* 9. NEWSLETTER ------------------------------------------------------ */
.newsletter { text-align: center; }
.newsletter__title { margin: 14px 0 12px; font-family: var(--font-display); font-size: clamp(28px, 4vw, 40px); font-weight: 600; }
.newsletter__text { margin: 0 0 28px; color: var(--text-on-dark-muted); }
.newsletter__form { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.newsletter__form label { position: absolute; left: -9999px; }   /* visually hidden, still read by screen readers */
.newsletter__form input {
  width: 320px; max-width: 100%; min-height: 48px; padding: 0 24px;
  border: 1px solid var(--rose); border-radius: var(--radius-pill);
  background: var(--burgundy-deep); color: var(--text-on-dark);
  font: 15px var(--font-body);
  transition: border-color .25s, box-shadow .25s;
}
.newsletter__form input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(198,163,106,.35); }
