/* ═══════════════════════════════════════════
   Small & Sorted — Design System
   Modern, warm, animated affiliate site
   ═══════════════════════════════════════════ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Inter:wght@400;500;600&display=swap');

/* --- Tokens --- */
:root {
  --cream: #f5ebe0;
  --cream-light: #faf6f1;
  --sand: #e6d5c3;
  --terra: #c17a5a;
  --terra-dark: #a0613f;
  --sage: #8a9a7b;
  --sage-light: #d4dccf;
  --brown: #4a3c2e;
  --brown-light: #7a6a58;
  --taupe: #b8a898;
  --white: #fff;
  --mauve: #b0889a;
  --slate: #7e93a6;
  --ochre: #c79a4e;
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(74,60,46,.06);
  --shadow-md: 0 4px 20px rgba(74,60,46,.08);
  --shadow-lg: 0 8px 40px rgba(74,60,46,.10);
  --shadow-hover: 0 12px 48px rgba(74,60,46,.14);
  --transition: .32s cubic-bezier(.4,0,.2,1);
  --transition-slow: .6s cubic-bezier(.4,0,.2,1);
}

/* --- Reset & base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--brown);
  background: var(--cream-light);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--terra); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--terra-dark); }

/* --- Scroll-triggered animations --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(.92); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes slideLeft {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideRight {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}
.reveal { opacity: 0; }
.reveal.visible { animation: fadeUp .7s var(--transition) forwards; }
.reveal-scale.visible { animation: scaleIn .6s var(--transition) forwards; }
.reveal-left.visible { animation: slideLeft .7s var(--transition) forwards; }
.reveal-right.visible { animation: slideRight .7s var(--transition) forwards; }
.delay-1 { animation-delay: .1s !important; }
.delay-2 { animation-delay: .2s !important; }
.delay-3 { animation-delay: .3s !important; }
.delay-4 { animation-delay: .4s !important; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-scale, .reveal-left, .reveal-right { opacity: 1 !important; animation: none !important; }
}

/* --- Layout --- */
.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section--alt { background: var(--cream); }

/* --- Nav --- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250,246,241,.85);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--sand);
  transition: box-shadow var(--transition);
}
.nav.scrolled { box-shadow: var(--shadow-md); }
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1120px; margin: 0 auto; padding: 14px 24px;
}
.nav__logo { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-size: 1.25rem; color: var(--brown); }
.nav__logo img { width: 42px; height: 42px; border-radius: 50%; }
.nav__links { display: flex; gap: 28px; list-style: none; }
.nav__links a {
  font-size: .85rem; font-weight: 500; text-transform: uppercase; letter-spacing: .08em;
  color: var(--brown-light); position: relative; padding-bottom: 2px;
}
.nav__links a::after {
  content: ''; position: absolute; left: 0; bottom: -2px;
  width: 0; height: 2px; background: var(--terra);
  transition: width var(--transition);
}
.nav__links a:hover, .nav__links a.active { color: var(--terra); }
.nav__links a:hover::after, .nav__links a.active::after { width: 100%; }
.nav__burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav__burger span { display: block; width: 22px; height: 2px; background: var(--brown); margin: 5px 0; transition: var(--transition); border-radius: 2px; }

/* --- Hero --- */
.hero {
  min-height: 85vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 100px 24px 80px;
  background: linear-gradient(165deg, var(--cream-light) 0%, var(--cream) 50%, var(--sage-light) 100%);
  position: relative; overflow: hidden;
}
.hero__bg-shape {
  position: absolute; border-radius: 50%; opacity: .12; pointer-events: none;
}
.hero__bg-shape--1 { width: 500px; height: 500px; background: var(--sage); top: -120px; right: -100px; }
.hero__bg-shape--2 { width: 340px; height: 340px; background: var(--terra); bottom: -80px; left: -60px; }
.hero__bg-shape--3 { width: 200px; height: 200px; background: var(--taupe); top: 30%; left: 10%; }
.hero__content { position: relative; z-index: 2; max-width: 720px; }
.hero__eyebrow {
  font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .18em;
  color: var(--sage); margin-bottom: 16px;
  animation: fadeIn .8s ease forwards;
}
.hero h1 {
  font-family: var(--font-display); font-size: clamp(2.6rem, 6vw, 4.2rem);
  line-height: 1.12; color: var(--brown); margin-bottom: 20px;
  animation: fadeUp .9s ease .15s both;
}
.hero__sub {
  font-size: 1.15rem; color: var(--brown-light); max-width: 540px; margin: 0 auto 36px;
  animation: fadeUp .9s ease .3s both;
}
.hero__cta-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; animation: fadeUp .9s ease .45s both; }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: 50px; font-weight: 600; font-size: .9rem;
  transition: all var(--transition); cursor: pointer; border: none;
}
.btn--primary { background: var(--terra); color: var(--white); }
.btn--primary:hover { background: var(--terra-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--white); }
.btn--outline { background: transparent; border: 2px solid var(--brown); color: var(--brown); }
.btn--outline:hover { background: var(--brown); color: var(--cream-light); transform: translateY(-2px); }

/* --- Cluster cards (homepage) --- */
.clusters { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.cluster-card {
  background: var(--white); border-radius: var(--radius-xl); padding: 40px 32px;
  text-align: center; transition: all var(--transition);
  border: 1px solid var(--sand); position: relative; overflow: hidden;
}
.cluster-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); border-color: transparent; }
.cluster-card__icon {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--transition);
}
.cluster-card:hover .cluster-card__icon { transform: scale(1.08) rotate(-3deg); }
.cluster-card__icon svg { width: 36px; height: 36px; }
.cluster-card h3 { font-family: var(--font-display); font-size: 1.35rem; margin-bottom: 10px; }
.cluster-card p { font-size: .9rem; color: var(--brown-light); line-height: 1.6; margin-bottom: 20px; }
.cluster-card__link {
  font-weight: 600; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em;
  color: var(--terra); display: inline-flex; align-items: center; gap: 6px;
}
.cluster-card__link svg { transition: transform var(--transition); }
.cluster-card:hover .cluster-card__link svg { transform: translateX(4px); }

/* --- Product grid (cluster pages) --- */
.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }
.product-card {
  background: var(--white); border-radius: var(--radius-xl); overflow: hidden;
  border: 1px solid var(--sand); transition: all var(--transition);
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: transparent; }
.product-card__badge {
  position: absolute; top: 16px; left: 16px;
  background: var(--terra); color: var(--white);
  font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  padding: 5px 14px; border-radius: 50px; z-index: 2;
}
.product-card__img-wrap {
  position: relative; background: var(--cream); padding: 40px 32px;
  display: flex; align-items: center; justify-content: center; min-height: 200px;
}
.product-card__icon { opacity: .2; }
.product-card__icon svg { width: 80px; height: 80px; stroke: var(--brown); }
.product-card__body { padding: 28px; flex: 1; display: flex; flex-direction: column; }
.product-card__tier {
  font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 8px;
}
.product-card h3 { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: 8px; line-height: 1.3; }
.product-card p { font-size: .88rem; color: var(--brown-light); line-height: 1.6; margin-bottom: 20px; flex: 1; }
.product-card__price { font-family: var(--font-display); font-size: 1.6rem; color: var(--terra); margin-bottom: 16px; }
.product-card__cta { margin-top: auto; }

/* --- Page header (cluster pages) --- */
.page-header {
  padding: 120px 24px 60px; text-align: center;
  position: relative; overflow: hidden;
}
.page-header__bg {
  position: absolute; inset: 0; opacity: .08;
  background: radial-gradient(ellipse at 30% 50%, var(--terra), transparent 70%),
              radial-gradient(ellipse at 70% 50%, var(--sage), transparent 70%);
}
.page-header h1 {
  font-family: var(--font-display); font-size: clamp(2.2rem, 5vw, 3.4rem);
  position: relative; z-index: 2; margin-bottom: 16px;
}
.page-header p { font-size: 1.1rem; color: var(--brown-light); position: relative; z-index: 2; max-width: 600px; margin: 0 auto; }

/* --- Disclosure --- */
.disclosure {
  background: var(--cream); border-radius: var(--radius-sm); padding: 16px 20px;
  font-size: .8rem; color: var(--brown-light); line-height: 1.6;
  border-left: 3px solid var(--terra); margin: 32px 0;
}

/* --- Newsletter --- */
.newsletter {
  background: var(--brown); color: var(--cream-light); border-radius: var(--radius-xl);
  padding: 56px 48px; text-align: center; margin: 60px auto; max-width: 680px;
}
.newsletter h2 { font-family: var(--font-display); font-size: 1.8rem; margin-bottom: 12px; color: var(--cream); }
.newsletter p { font-size: .95rem; color: var(--taupe); margin-bottom: 28px; }
.newsletter__form { display: flex; gap: 12px; max-width: 440px; margin: 0 auto; }
.newsletter__input {
  flex: 1; padding: 14px 20px; border: none; border-radius: 50px;
  font-size: .9rem; background: rgba(255,255,255,.12); color: var(--cream-light);
  outline: none; transition: background var(--transition);
}
.newsletter__input::placeholder { color: var(--taupe); }
.newsletter__input:focus { background: rgba(255,255,255,.18); }

/* --- Footer --- */
.footer {
  background: var(--cream); border-top: 1px solid var(--sand);
  padding: 48px 24px 32px; text-align: center;
}
.footer__logo { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 16px; }
.footer__logo img { width: 36px; height: 36px; border-radius: 50%; }
.footer__logo span { font-family: var(--font-display); font-size: 1.1rem; color: var(--brown); }
.footer__links { display: flex; gap: 24px; justify-content: center; margin-bottom: 16px; flex-wrap: wrap; }
.footer__links a { font-size: .82rem; color: var(--brown-light); font-weight: 500; }
.footer__copy { font-size: .75rem; color: var(--taupe); }

/* --- Responsive --- */
@media (max-width: 768px) {
  .nav__links { display: none; }
  .nav__links.open {
    display: flex; flex-direction: column; position: absolute;
    top: 100%; left: 0; right: 0; background: var(--cream-light);
    padding: 24px; gap: 20px; border-bottom: 1px solid var(--sand);
    box-shadow: var(--shadow-md);
  }
  .nav__burger { display: block; }
  .hero { min-height: 70vh; padding: 80px 20px 60px; }
  .hero h1 { font-size: 2.2rem; }
  .section { padding: 56px 0; }
  .clusters { grid-template-columns: 1fr; }
  .products { grid-template-columns: 1fr; }
  .newsletter { padding: 40px 24px; margin: 40px 16px; }
  .newsletter__form { flex-direction: column; }
}
