/* ============================================
   Mây's Farm — Design System & Shared Styles
   ============================================ */

/* --- Design Tokens --- */
:root {
  --green-deep: #1a5c2a;
  --green-primary: #2d7a3f;
  --green-medium: #3d9950;
  --green-light: #5cb870;
  --green-pale: #e8f5e9;
  --green-mist: #f0f9f1;
  --cream: #fdfcf7;
  --orange-accent: #e8833a;
  --orange-light: #fff3e0;
  --text-dark: #1a2e1a;
  --text-body: #2c3e2c;
  --text-muted: #5a6e5a;
  --white: #ffffff;
  --shadow-soft: 0 2px 16px rgba(26,92,42,0.08);
  --shadow-card: 0 4px 24px rgba(26,92,42,0.10);
  --shadow-hover: 0 8px 32px rgba(26,92,42,0.16);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --transition: all 0.3s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Be Vietnam Pro', sans-serif;
  background: var(--cream);
  color: var(--text-body);
  line-height: 1.7;
  overflow-x: hidden;
}

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

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  color: var(--green-deep);
  line-height: 1.3;
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 700; }
h3 { font-size: clamp(1.2rem, 3vw, 1.6rem); font-weight: 700; }
h4 { font-size: 1.1rem; font-weight: 600; }

p { margin-bottom: 1rem; }

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

/* --- Layout --- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-pale);
  color: var(--green-primary);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(253,252,247,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(45,122,63,0.08);
  transition: var(--transition);
}

.navbar.scrolled {
  box-shadow: var(--shadow-soft);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--green-deep);
}

.nav-brand .brand-icon { font-size: 1.4rem; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-body);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--green-primary);
  background: var(--green-pale);
}

.nav-cta {
  background: linear-gradient(135deg, var(--green-primary), var(--green-light)) !important;
  color: var(--white) !important;
  padding: 8px 20px !important;
  border-radius: 50px !important;
  font-weight: 600 !important;
}

.nav-cta:hover {
  box-shadow: 0 4px 16px rgba(45,122,63,0.3) !important;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--green-deep);
  border-radius: 2px;
  transition: var(--transition);
}

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

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, var(--green-deep) 0%, var(--green-primary) 40%, var(--green-medium) 100%);
  position: relative;
  padding: 140px 24px 100px;
  text-align: center;
  overflow: hidden;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 80%, rgba(255,255,255,0.06) 0%, transparent 50%),
    radial-gradient(circle at 85% 20%, rgba(255,255,255,0.08) 0%, transparent 40%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0; right: 0;
  height: 60px;
  background: var(--cream);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.hero-leaf {
  position: absolute;
  font-size: 2.5rem;
  opacity: 0.12;
  animation: floatLeaf 8s ease-in-out infinite;
}

.hero-leaf:nth-child(1) { top: 10%; left: 5%; }
.hero-leaf:nth-child(2) { top: 50%; right: 4%; animation-delay: 2s; font-size: 2rem; }
.hero-leaf:nth-child(3) { top: 22%; right: 10%; animation-delay: 4s; font-size: 3rem; }
.hero-leaf:nth-child(4) { bottom: 28%; left: 10%; animation-delay: 1s; font-size: 2.2rem; }
.hero-leaf:nth-child(5) { top: 65%; left: 20%; animation-delay: 3s; font-size: 1.8rem; }
.hero-leaf:nth-child(6) { top: 15%; right: 25%; animation-delay: 5s; font-size: 2rem; }

@keyframes floatLeaf {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-16px) rotate(10deg); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero .brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50px;
  padding: 8px 22px;
  margin-bottom: 20px;
  animation: fadeDown 0.6s ease-out;
}

.hero .brand-badge span {
  color: white;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.hero h1 {
  color: white;
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  margin-bottom: 16px;
  animation: fadeDown 0.7s ease-out 0.1s both;
  text-shadow: 0 2px 16px rgba(0,0,0,0.15);
}

.hero-sub {
  color: rgba(255,255,255,0.88);
  font-size: 1.1rem;
  font-weight: 300;
  max-width: 560px;
  margin: 0 auto 32px;
  animation: fadeDown 0.7s ease-out 0.2s both;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeDown 0.7s ease-out 0.3s both;
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Page Hero (inner pages) --- */
.page-hero {
  background: linear-gradient(135deg, var(--green-deep) 0%, var(--green-primary) 40%, var(--green-medium) 100%);
  position: relative;
  padding: 130px 24px 70px;
  text-align: center;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 80%, rgba(255,255,255,0.06) 0%, transparent 50%),
    radial-gradient(circle at 85% 20%, rgba(255,255,255,0.08) 0%, transparent 40%);
  pointer-events: none;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0; right: 0;
  height: 50px;
  background: var(--cream);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.page-hero .hero-leaf {
  font-size: 2rem;
  opacity: 0.1;
}

.page-hero h1 {
  color: white;
  position: relative;
  z-index: 1;
  animation: fadeDown 0.7s ease-out;
  text-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.page-hero p {
  color: rgba(255,255,255,0.85);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 12px auto 0;
  position: relative;
  z-index: 1;
  animation: fadeDown 0.7s ease-out 0.1s both;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--green-primary), var(--green-light));
  color: white;
  box-shadow: 0 4px 16px rgba(45,122,63,0.25);
}

.btn-primary:hover {
  box-shadow: 0 8px 28px rgba(45,122,63,0.35);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  color: white;
  border: 1px solid rgba(255,255,255,0.25);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.28);
  transform: translateY(-2px);
}

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

.btn-outline:hover {
  background: var(--green-primary);
  color: white;
  transform: translateY(-2px);
}

.btn-orange {
  background: linear-gradient(135deg, var(--orange-accent), #f09849);
  color: white;
  box-shadow: 0 4px 16px rgba(232,131,58,0.25);
}

.btn-orange:hover {
  box-shadow: 0 8px 28px rgba(232,131,58,0.35);
  transform: translateY(-2px);
}

/* --- Cards --- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(45,122,63,0.06);
  overflow: hidden;
  transition: var(--transition);
}

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

.card-body { padding: 28px; }

.card-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--green-pale), var(--green-mist));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

/* --- Stat Cards --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: -40px;
  position: relative;
  z-index: 2;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(45,122,63,0.08);
}

.stat-card .stat-icon { font-size: 1.8rem; margin-bottom: 8px; }
.stat-card .stat-value {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--green-deep);
}
.stat-card .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
}

/* --- Grid Layouts --- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

/* --- Info Chips --- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-pale);
  color: var(--green-primary);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 30px;
}

.chip-white {
  background: rgba(255,255,255,0.13);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.18);
  color: white;
}

/* --- Feature List --- */
.feature-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
}

.feature-list li::before {
  content: '✓';
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background: var(--green-pale);
  color: var(--green-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 2px;
}

/* --- Pricing Cards --- */
.pricing-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  box-shadow: var(--shadow-soft);
  border: 2px solid rgba(45,122,63,0.06);
  text-align: center;
  transition: var(--transition);
  position: relative;
}

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

.pricing-card.featured {
  border-color: var(--green-primary);
  box-shadow: var(--shadow-card);
}

.pricing-card.featured::before {
  content: '⭐ Phổ biến nhất';
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--orange-accent), #f09849);
  color: white;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 20px;
  border-radius: 50px;
  white-space: nowrap;
}

.pricing-card .price {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--green-deep);
  margin: 16px 0 4px;
}

.pricing-card .price-unit {
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
}

.pricing-card .price-period {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.pricing-features {
  text-align: left;
  margin-bottom: 28px;
}

.pricing-features li {
  padding: 8px 0;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px dashed rgba(45,122,63,0.1);
}

.pricing-features li:last-child { border-bottom: none; }

.pricing-features li .check {
  color: var(--green-primary);
  font-weight: 700;
  flex-shrink: 0;
}

/* --- Testimonial Cards --- */
.testimonial-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(45,122,63,0.06);
  transition: var(--transition);
}

.testimonial-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.testimonial-stars {
  color: #ffc107;
  font-size: 1rem;
  margin-bottom: 14px;
  letter-spacing: 2px;
}

.testimonial-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-body);
  margin-bottom: 20px;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-avatar {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--green-pale), var(--green-mist));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.testimonial-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-dark);
}

.testimonial-role {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* --- Steps --- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  counter-reset: step;
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--green-primary), var(--green-light));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: white;
  margin: 0 auto 16px;
  box-shadow: 0 4px 16px rgba(45,122,63,0.25);
}

.step h3 { margin-bottom: 8px; }

.step p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* --- Contact Form --- */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 14px 18px;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 0.92rem;
  border: 2px solid rgba(45,122,63,0.12);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text-body);
  transition: var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--green-primary);
  box-shadow: 0 0 0 4px rgba(45,122,63,0.1);
}

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

/* --- Footer --- */
.footer {
  background: linear-gradient(135deg, var(--green-deep), var(--green-primary));
  color: rgba(255,255,255,0.8);
  position: relative;
  padding: 60px 24px 32px;
}

.footer::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0; right: 0;
  height: 50px;
  background: var(--cream);
  clip-path: ellipse(55% 100% at 50% 0%);
}

.footer-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.footer-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
}

.footer-desc {
  font-size: 0.88rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.footer-social a {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.12);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
}

.footer-social a:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-2px);
}

.footer h4 {
  color: white;
  font-family: 'Be Vietnam Pro', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-links li { margin-bottom: 10px; }

.footer-links a {
  font-size: 0.88rem;
  transition: var(--transition);
}

.footer-links a:hover { color: white; }

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 24px;
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.6;
}

/* --- Scroll Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* --- Responsive --- */
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fdfcf7;
    z-index: 9999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 32px;
    padding-top: 80px;
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    font-size: 1.1rem;
    padding: 14px 24px;
    width: 100%;
    text-align: center;
  }

  .nav-toggle { display: flex; position: relative; z-index: 10000; }

  .hero { padding: 120px 20px 80px; min-height: 70vh; }
  .page-hero { padding: 110px 20px 60px; }

  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); margin-top: -28px; }

  .section { padding: 56px 0; }
  .section-header { margin-bottom: 32px; }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: center; }
  .steps { grid-template-columns: 1fr; gap: 24px; }
}
