/* ============================================
   MachuCoffee — Premium CSS
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Jost:wght@300;400;500;600&display=swap');

:root {
  --green-dark: #1a3a2a;
  --green-mid: #2d5a40;
  --green-light: #3d7a55;
  --gold: #c8a96e;
  --gold-light: #e2c896;
  --cream: #f5f0e8;
  --cream-dark: #ede5d5;
  --white: #ffffff;
  --text-dark: #1a1a1a;
  --text-mid: #4a4a4a;
  --text-light: #8a8a8a;
  --shadow-sm: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.12);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.18);
  --radius: 4px;
  --radius-lg: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Jost', sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4 { font-family: 'Playfair Display', serif; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.1; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p { font-size: 1rem; color: var(--text-mid); }

/* ── HEADER ── */
#site-header {
  background: var(--green-dark);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem 0.5rem;
  border-bottom: 1px solid rgba(200,169,110,0.2);
}

.logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  text-decoration: none;
}

.logo-img { height: 56px; object-fit: contain; }

.logo-text { text-align: center; }
.logo-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  color: var(--gold);
  letter-spacing: 0.12em;
  font-weight: 700;
}
.logo-tagline {
  font-size: 0.62rem;
  color: var(--gold-light);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.85;
}

nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.6rem 2rem;
  flex-wrap: wrap;
}

nav a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-radius: var(--radius);
  transition: var(--transition);
  position: relative;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%; right: 50%;
  height: 1px;
  background: var(--gold);
  transition: var(--transition);
}

nav a:hover { color: var(--gold); }
nav a:hover::after { left: 0.5rem; right: 0.5rem; }
nav a.active { color: var(--gold); }
nav a.active::after { left: 0.5rem; right: 0.5rem; }

.nav-icons { display: flex; gap: 0.5rem; }
.nav-icon {
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.4rem;
  transition: var(--transition);
}
.nav-icon:hover { color: var(--gold); }

/* Mobile hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  position: absolute;
  right: 1rem;
  top: 1rem;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gold);
  margin: 5px 0;
  transition: var(--transition);
}

/* ── HERO ── */
#hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  transition: transform 8s ease;
}

#hero:hover .hero-bg { transform: scale(1); }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,30,18,0.35) 0%,
    rgba(10,30,18,0.5) 50%,
    rgba(10,30,18,0.7) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  padding: 2rem;
  animation: heroFadeIn 1.2s ease forwards;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-content h1 {
  color: var(--white);
  text-shadow: 0 2px 20px rgba(0,0,0,0.4);
  margin-bottom: 0.4rem;
}

.hero-subtitle {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  color: var(--gold-light);
  margin-bottom: 1rem;
}

.hero-desc {
  color: rgba(255,255,255,0.88);
  font-size: 1rem;
  letter-spacing: 0.04em;
  margin-bottom: 2rem;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── BUTTONS ── */
.btn-primary {
  display: inline-block;
  background: var(--green-dark);
  color: var(--white);
  padding: 0.85rem 2.2rem;
  font-family: 'Jost', sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid var(--green-dark);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--green-mid);
  border-color: var(--green-mid);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26,58,42,0.35);
}

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--white);
  padding: 0.85rem 2.2rem;
  font-family: 'Jost', sans-serif;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid rgba(255,255,255,0.75);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--white);
  transform: translateY(-2px);
}

.btn-gold {
  display: inline-block;
  background: var(--gold);
  color: var(--green-dark);
  padding: 0.9rem 2.4rem;
  font-family: 'Jost', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.btn-gold:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200,169,110,0.4);
}

/* ── BADGES STRIP ── */
#badges {
  background: var(--white);
  border-bottom: 1px solid var(--cream-dark);
}

.badges-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.badge-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-mid);
  letter-spacing: 0.04em;
}

.badge-item .icon { font-size: 1.3rem; }

/* ── SECTIONS COMMON ── */
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title h2 {
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: var(--gold);
  margin: 1rem auto 0;
}

/* ── PRODUCTS ── */
#products { background: var(--cream); }

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
}

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

.product-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--gold);
  color: var(--green-dark);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  z-index: 1;
}

.product-img-wrap {
  background: var(--cream);
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 240px;
}

.product-img-wrap img {
  max-height: 180px;
  object-fit: contain;
  transition: var(--transition);
}

.product-card:hover .product-img-wrap img {
  transform: scale(1.05);
}

.product-info {
  padding: 1.5rem;
}

.product-info h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--text-dark);
  margin-bottom: 0.2rem;
}

.product-flavor {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.product-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 1rem;
}

.product-info .btn-primary {
  width: 100%;
  text-align: center;
  font-size: 0.78rem;
  padding: 0.75rem;
}

/* ── STORY ── */
#story {
  background: var(--green-dark);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

#story::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/assets/img/farmer.jpg') center/cover no-repeat;
  opacity: 0.18;
}

.story-inner {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.story-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.story-img img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}

.story-text h2 {
  color: var(--white);
  margin-bottom: 1rem;
  font-style: italic;
}

.story-text .lead {
  color: var(--gold-light);
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.story-text p {
  color: rgba(255,255,255,0.78);
  line-height: 1.8;
  margin-bottom: 2rem;
}

/* ── BENEFITS ── */
#benefits { background: var(--cream-dark); }

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

.benefit-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border-bottom: 3px solid transparent;
}

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

.benefit-icon { font-size: 2.4rem; margin-bottom: 1rem; }
.benefit-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}
.benefit-card p { font-size: 0.88rem; }

/* ── SUBSCRIPTION ── */
#subscription { background: var(--white); }

.subscription-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.subscription-text h2 {
  font-style: italic;
  margin-bottom: 0.75rem;
}

.subscription-text > p {
  color: var(--text-mid);
  margin-bottom: 1.75rem;
}

.perks-list { list-style: none; margin-bottom: 2rem; }
.perks-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  font-size: 0.95rem;
  color: var(--text-mid);
  border-bottom: 1px solid var(--cream-dark);
}
.perks-list li::before {
  content: '✓';
  color: var(--green-mid);
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.subscription-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: relative;
}

.subscription-img img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}

.subscription-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26,58,42,0.15), transparent);
  border-radius: var(--radius-lg);
}

/* ── FOOTER ── */
footer {
  background: var(--green-dark);
  color: rgba(255,255,255,0.75);
  padding: 2rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-links { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; }
.footer-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition);
}
.footer-links a:hover { color: var(--gold); }
.footer-divider { color: rgba(255,255,255,0.3); }

.footer-legal { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-legal a {
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  font-size: 0.78rem;
  transition: var(--transition);
}
.footer-legal a:hover { color: var(--gold); }

/* ── SCROLL ANIMATIONS ── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav { display: none; }
  nav.open { display: flex; flex-direction: column; padding: 1rem; }
  .hamburger { display: block; }

  .story-inner,
  .subscription-inner { grid-template-columns: 1fr; gap: 2rem; }
  .story-img { order: -1; }
  .story-img img, .subscription-img img { height: 280px; }

  .badges-inner { gap: 1.2rem; }
  .section-inner { padding: 3.5rem 1.25rem; }

  .hero-btns { flex-direction: column; align-items: center; }
}

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