/* ============================================================
   BuyModaReviews.com — Design System
   Tokens extracted from buymoda.net for brand consistency
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Fraunces:opsz,wght@9..144,500;9..144,700;9..144,800&display=swap');

/* ---------- Custom Properties ---------- */
:root {
  /* Ink / Dark surfaces */
  --c-ink:          #0b1221;
  --c-ink-2:        #162033;
  --c-ink-3:        #243347;

  /* Neutral palette */
  --c-slate:        #374151;
  --c-muted:        #9ca3af;
  --c-muted-light:  #d1d5db;
  --c-border:       #e5e7eb;
  --c-ghost:        #f8fafc;
  --c-white:        #ffffff;

  /* Brand accent */
  --c-amber:        #FF9900;
  --c-amber-dk:     #E88A00;
  --c-amber-glow:   rgba(255, 153, 0, 0.36);
  --c-amber-soft:   rgba(255, 153, 0, 0.10);

  /* Trust / Rating green */
  --c-tp-green:     #00b67a;
  --c-tp-green-dk:  #009e6a;
  --c-tp-green-glow:rgba(0, 182, 122, 0.20);

  /* Informational */
  --c-blue:         #2563eb;

  /* Status */
  --c-danger:       #ef4444;

  /* Typography */
  --f-display:      'Fraunces', Georgia, serif;
  --f-body:         'DM Sans', system-ui, -apple-system, sans-serif;

  /* Sizing */
  --w-max:          1140px;
  --w-narrow:       800px;

  /* Radii */
  --r-btn:          12px;
  --r-card:         16px;
  --r-pill:         100px;

  /* Shadows */
  --s-card:         0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
  --s-card-hover:   0 8px 30px rgba(0, 0, 0, 0.10);
  --s-hero:         0 20px 60px rgba(0, 0, 0, 0.3);

  /* Transition */
  --ease:           cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast:         0.2s;
  --t-mid:          0.35s;
}

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

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

body {
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--c-slate);
  background: var(--c-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--f-display);
  color: var(--c-ink);
  line-height: 1.2;
}

h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 700; }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); font-weight: 700; }
h4 { font-size: 1.125rem; font-weight: 600; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

.text-muted { color: var(--c-muted); }
.text-amber { color: var(--c-amber); }
.text-green { color: var(--c-tp-green); }
.text-white { color: var(--c-white); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--w-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

.section {
  padding: 4rem 0;
}

.section--alt {
  background: var(--c-ghost);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--r-btn);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
  white-space: nowrap;
}

.btn--amber {
  background: var(--c-amber);
  color: var(--c-white);
  box-shadow: 0 2px 8px var(--c-amber-glow);
}

.btn--amber:hover {
  background: var(--c-amber-dk);
  box-shadow: 0 4px 20px var(--c-amber-glow);
  transform: translateY(-1px);
}

.btn--outline {
  border: 2px solid var(--c-amber);
  color: var(--c-amber);
  background: transparent;
}

.btn--outline:hover {
  background: var(--c-amber-soft);
}

.btn--green {
  background: var(--c-tp-green);
  color: var(--c-white);
  box-shadow: 0 2px 8px var(--c-tp-green-glow);
}

.btn--green:hover {
  background: var(--c-tp-green-dk);
  transform: translateY(-1px);
}

.btn--sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}

.btn--lg {
  padding: 1rem 2.25rem;
  font-size: 1.05rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
  transition: box-shadow var(--t-fast) var(--ease);
}

.site-header.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  font-family: var(--f-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--c-ink);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.logo span {
  color: var(--c-amber);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.925rem;
  color: var(--c-slate);
  transition: color var(--t-fast) var(--ease);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--c-amber);
  transition: width var(--t-mid) var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--c-amber);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  margin-left: 0.5rem;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  z-index: 110;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--c-ink);
  border-radius: 2px;
  transition: all var(--t-fast) var(--ease);
}

.menu-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, #1f2937 0%, #0b1221 100%);
  color: var(--c-white);
  text-align: center;
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 140%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(255, 153, 0, 0.06) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 50%, rgba(0, 182, 122, 0.04) 0%, transparent 60%);
  pointer-events: none;
}

.hero h1 {
  color: var(--c-white);
  margin-bottom: 0.75rem;
}

.hero p {
  color: var(--c-muted-light);
  font-size: 1.1rem;
}

.hero--compact {
  padding: 3.5rem 0 2.5rem;
}

/* Aggregate score */
.aggregate {
  position: relative;
  z-index: 1;
}

.aggregate__score {
  font-family: var(--f-display);
  font-size: clamp(4rem, 8vw, 6.5rem);
  font-weight: 800;
  line-height: 1;
  color: var(--c-white);
  margin-bottom: 0.25rem;
}

.aggregate__of {
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--c-muted);
}

.aggregate__stars {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  margin: 1rem 0 0.75rem;
  font-size: 2rem;
}

.aggregate__stars .star {
  color: var(--c-tp-green);
  filter: drop-shadow(0 0 6px var(--c-tp-green-glow));
  animation: starPulse 2.5s ease-in-out infinite;
}

.aggregate__stars .star:nth-child(2) { animation-delay: 0.15s; }
.aggregate__stars .star:nth-child(3) { animation-delay: 0.3s; }
.aggregate__stars .star:nth-child(4) { animation-delay: 0.45s; }
.aggregate__stars .star:nth-child(5) { animation-delay: 0.6s; }

.aggregate__stars .star--partial {
  position: relative;
  color: var(--c-ink-3);
}

.aggregate__stars .star--partial::before {
  content: '★';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--c-tp-green);
  overflow: hidden;
  width: 80%;
  filter: drop-shadow(0 0 6px var(--c-tp-green-glow));
}

.aggregate__count {
  font-size: 1rem;
  color: var(--c-muted);
  margin-top: 0.5rem;
}

.aggregate__count strong {
  color: var(--c-white);
  font-weight: 600;
}

@keyframes starPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

/* Rating distribution */
.distribution {
  max-width: 380px;
  margin: 2rem auto 0;
}

.distribution__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.distribution__label {
  color: var(--c-muted-light);
  min-width: 28px;
  text-align: right;
  font-weight: 500;
}

.distribution__bar {
  flex: 1;
  height: 10px;
  background: var(--c-ink-3);
  border-radius: 100px;
  overflow: hidden;
  position: relative;
}

.distribution__fill {
  height: 100%;
  background: var(--c-tp-green);
  border-radius: 100px;
  transition: width 1.2s var(--ease);
  width: 0;
}

.distribution__fill.animated {
  /* widths set inline */
}

.distribution__pct {
  color: var(--c-muted);
  min-width: 36px;
  font-size: 0.8rem;
}

/* ---------- Review Cards ---------- */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}

.review-card {
  background: var(--c-ink);
  border: 1px solid var(--c-ink-3);
  border-radius: var(--r-card);
  padding: 1.75rem;
  transition: all var(--t-mid) var(--ease);
  position: relative;
}

.review-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--s-hero);
  border-color: rgba(255, 153, 0, 0.2);
}

.review-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.review-card__author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.review-card__avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-amber) 0%, var(--c-amber-dk) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: var(--c-white);
  flex-shrink: 0;
}

.review-card__name {
  font-weight: 600;
  color: var(--c-white);
  font-size: 0.95rem;
}

.review-card__date {
  font-size: 0.8rem;
  color: var(--c-muted);
}

.review-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  background: var(--c-tp-green-glow);
  border: 1px solid rgba(0, 182, 122, 0.25);
  border-radius: var(--r-pill);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--c-tp-green);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.review-card__stars {
  display: flex;
  gap: 0.15rem;
  margin-bottom: 0.85rem;
  font-size: 1.15rem;
  color: var(--c-tp-green);
}

.review-card__stars .star--empty {
  color: var(--c-ink-3);
}

.review-card__text {
  color: var(--c-muted-light);
  font-size: 0.925rem;
  line-height: 1.65;
}

/* ---------- Review Form ---------- */
.form-section {
  background: linear-gradient(180deg, var(--c-ghost) 0%, var(--c-white) 100%);
}

.review-form {
  max-width: 620px;
  margin: 0 auto;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-card);
  padding: 2.5rem;
  box-shadow: var(--s-card);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--c-ink);
}

.form-group label .optional {
  font-weight: 400;
  color: var(--c-muted);
  font-size: 0.825rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-btn);
  background: var(--c-ghost);
  font-size: 0.925rem;
  color: var(--c-ink);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

.form-input:focus {
  border-color: var(--c-amber);
  box-shadow: 0 0 0 3px var(--c-amber-soft);
  background: var(--c-white);
}

.form-input::placeholder {
  color: var(--c-muted);
}

textarea.form-input {
  min-height: 120px;
  resize: vertical;
}

/* Star picker */
.star-picker {
  display: flex;
  gap: 0.35rem;
  font-size: 2rem;
  cursor: pointer;
}

.star-picker__star {
  color: var(--c-border);
  transition: color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  user-select: none;
}

.star-picker__star:hover {
  transform: scale(1.15);
}

.star-picker__star.active {
  color: var(--c-tp-green);
  filter: drop-shadow(0 0 4px var(--c-tp-green-glow));
}

.star-picker__star.hovered {
  color: var(--c-tp-green);
  opacity: 0.7;
}

.star-picker-hint {
  font-size: 0.8rem;
  color: var(--c-muted);
  margin-top: 0.35rem;
}

.form-note {
  font-size: 0.8rem;
  color: var(--c-muted);
  margin-top: 0.35rem;
}

.form-submit-row {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--c-ink);
  color: var(--c-muted);
  padding: 3rem 0 2rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.footer-logo {
  font-family: var(--f-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--c-white);
}

.footer-logo span {
  color: var(--c-amber);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-muted-light);
  transition: color var(--t-fast) var(--ease);
}

.footer-links a:hover {
  color: var(--c-amber);
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--c-muted);
  margin-top: 0.5rem;
}

/* ---------- About page ---------- */
.about-hero {
  text-align: center;
}

.about-content {
  max-width: var(--w-narrow);
  margin: 0 auto;
}

.about-content h2 {
  margin-bottom: 1rem;
  margin-top: 2.5rem;
}

.about-content h2:first-child {
  margin-top: 0;
}

.about-content p {
  color: var(--c-slate);
  font-size: 1.05rem;
}

.about-highlight {
  background: var(--c-amber-soft);
  border-left: 4px solid var(--c-amber);
  border-radius: 0 var(--r-btn) var(--r-btn) 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.about-highlight p {
  color: var(--c-ink);
  margin: 0;
}

.about-cta {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--c-border);
}

/* ---------- Privacy page ---------- */
.privacy-content {
  max-width: var(--w-narrow);
  margin: 0 auto;
}

.privacy-content h2 {
  margin-bottom: 1rem;
  margin-top: 2.5rem;
  font-size: 1.5rem;
}

.privacy-content h2:first-child {
  margin-top: 0;
}

.privacy-content p,
.privacy-content li {
  color: var(--c-slate);
  font-size: 1rem;
  line-height: 1.75;
}

.privacy-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.privacy-content li {
  margin-bottom: 0.4rem;
}

.privacy-content a {
  color: var(--c-amber);
  font-weight: 500;
  transition: color var(--t-fast) var(--ease);
}

.privacy-content a:hover {
  color: var(--c-amber-dk);
}

.privacy-updated {
  font-size: 0.875rem;
  color: var(--c-muted);
  font-style: italic;
  margin-bottom: 2rem;
}

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

.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--c-white);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.1);
    transition: right var(--t-mid) var(--ease);
    z-index: 105;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-cta {
    margin-left: 0;
  }

  .menu-toggle {
    display: flex;
  }

  .hero {
    padding: 3.5rem 0 3rem;
  }

  .aggregate__score {
    font-size: 4rem;
  }

  .aggregate__stars {
    font-size: 1.5rem;
  }

  .reviews-grid {
    grid-template-columns: 1fr;
  }

  .review-form {
    padding: 1.5rem;
  }

  .section {
    padding: 3rem 0;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .header-inner {
    height: 60px;
  }

  .distribution {
    max-width: 100%;
  }

  .review-card {
    padding: 1.25rem;
  }
}

/* ---------- Overlay for mobile menu ---------- */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 104;
  opacity: 0;
  transition: opacity var(--t-mid) var(--ease);
}

.nav-overlay.active {
  display: block;
  opacity: 1;
}

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

.fade-in-up {
  animation: fadeInUp 0.6s var(--ease) forwards;
  opacity: 0;
}

.fade-in-up:nth-child(1) { animation-delay: 0.05s; }
.fade-in-up:nth-child(2) { animation-delay: 0.15s; }
.fade-in-up:nth-child(3) { animation-delay: 0.25s; }
.fade-in-up:nth-child(4) { animation-delay: 0.35s; }
.fade-in-up:nth-child(5) { animation-delay: 0.45s; }
