/* ======================================================
   OCOP Vietnam Landing Page — Mobile-First Stylesheet
   ====================================================== */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Work+Sans:wght@300;400;500;600;700&display=swap');

/* ============================
   CSS Custom Properties
   ============================ */
:root {
  /* Typography */
  --font-heading: 'Playfair Display', 'Georgia', serif;
  --font-body: 'Work Sans', 'Segoe UI', sans-serif;

  /* Spacing */
  --section-padding: 64px 20px;
  --container-max: 1200px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.35s cubic-bezier(.4,0,.2,1);
  --transition-slow: 0.6s cubic-bezier(.4,0,.2,1);
}

/* --- Light Theme (Default) --- */
[data-theme="light"] {
  --bg-primary: #f7f3ec;
  --bg-secondary: #eee8dc;
  --bg-card: #ffffff;
  --bg-card-hover: #faf8f4;
  --bg-hero-overlay: linear-gradient(180deg, rgba(247,243,236,0.25) 0%, rgba(247,243,236,0.92) 100%);
  --bg-header: rgba(247,243,236,0.85);

  --text-primary: #1a1208;
  --text-secondary: #5c4d3a;
  --text-muted: #8a7b68;

  --accent: #2c5926;
  --accent-light: #3d7a35;
  --accent-surface: rgba(44,89,38,0.08);
  --gold: #b8922d;
  --gold-light: #d4ad3c;
  --gold-surface: rgba(184,146,45,0.1);

  --border-color: rgba(0,0,0,0.08);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.1);

  --star-3: #6b8f65;
  --star-4: #c9a84c;
  --star-5: #d4763a;

  --glass-bg: rgba(255,255,255,0.6);
  --glass-border: rgba(255,255,255,0.4);
}

/* --- Dark Theme --- */
[data-theme="dark"] {
  --bg-primary: #0c1408;
  --bg-secondary: #151f10;
  --bg-card: #1c2a16;
  --bg-card-hover: #243320;
  --bg-hero-overlay: linear-gradient(180deg, rgba(12,20,8,0.3) 0%, rgba(12,20,8,0.92) 100%);
  --bg-header: rgba(12,20,8,0.88);

  --text-primary: #f0ede6;
  --text-secondary: #b8b0a0;
  --text-muted: #7a7264;

  --accent: #5cb950;
  --accent-light: #7ad470;
  --accent-surface: rgba(92,185,80,0.1);
  --gold: #d4b44a;
  --gold-light: #e8ca62;
  --gold-surface: rgba(212,180,74,0.12);

  --border-color: rgba(255,255,255,0.07);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.25);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.35);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.45);

  --star-3: #7aba72;
  --star-4: #e0c15a;
  --star-5: #e88a50;

  --glass-bg: rgba(28,42,22,0.6);
  --glass-border: rgba(255,255,255,0.08);
}

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

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

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: background-color var(--transition-base), color var(--transition-base);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================
   Header
   ============================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 14px 20px;
  background: var(--bg-header);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--container-max);
  margin: 0 auto;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
}

.logo-icon span {
  color: #fff;
  font-weight: 700;
  font-family: var(--font-body);
  font-size: 11px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  background: var(--accent-surface);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: all var(--transition-fast);
  color: var(--text-primary);
}

.theme-toggle:hover {
  background: var(--accent);
  color: #fff;
  transform: rotate(20deg);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-moon { display: inline; }
[data-theme="dark"] .theme-toggle .icon-sun { display: inline; }

.btn-shop {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-xl);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-shop:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(44,89,38,0.3);
}

.btn-shop .material-icons {
  font-size: 18px;
}

/* ============================
   Hero Section
   ============================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: 120px 20px 60px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--bg-hero-overlay);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--gold-surface);
  border: 1px solid var(--gold);
  border-radius: var(--radius-xl);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero h1 .highlight {
  color: var(--accent);
  font-style: italic;
}

.hero p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
  max-width: 480px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-xl);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(44,89,38,0.35);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all var(--transition-fast);
}

.btn-outline:hover {
  background: var(--accent-surface);
  border-color: var(--accent);
  color: var(--accent);
}

.hero-stat {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
  padding: 14px 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
}

.hero-stat .stat-number {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold);
}

.hero-stat .stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ============================
   Section Shared Styles
   ============================ */
.section {
  padding: var(--section-padding);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-label .material-icons {
  font-size: 16px;
}

.section-title {
  font-size: 1.6rem;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 40px;
}

/* ============================
   About Section
   ============================ */
.about {
  background: var(--bg-secondary);
}

.about-grid {
  display: grid;
  gap: 32px;
}

.about-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  position: relative;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.about-image:hover img {
  transform: scale(1.04);
}

.about-text .section-desc {
  margin-bottom: 24px;
}

/* ============================
   Star Rating Section
   ============================ */
.stars-section {
  background: var(--bg-primary);
}

.stars-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 48px;
}

.star-card {
  position: relative;
  padding: 28px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  overflow: hidden;
}

.star-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  border-radius: 4px 0 0 4px;
}

.star-card.star-3::before { background: var(--star-3); }
.star-card.star-4::before { background: var(--star-4); }
.star-card.star-5::before { background: var(--star-5); }

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

.star-card .star-icons {
  display: flex;
  gap: 2px;
  margin-bottom: 12px;
}

.star-card.star-3 .star-icons { color: var(--star-3); }
.star-card.star-4 .star-icons { color: var(--star-4); }
.star-card.star-5 .star-icons { color: var(--star-5); }

.star-card .star-icons .material-icons {
  font-size: 20px;
}

.star-card h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.star-card .star-subtitle {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.star-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Core Values */
.values-grid {
  display: grid;
  gap: 16px;
}

.value-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

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

.value-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--accent-surface);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.value-icon .material-icons {
  font-size: 24px;
  color: var(--accent);
}

.value-card h4 {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.value-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================
   Process Section
   ============================ */
.process {
  background: var(--bg-primary);
}

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

.process-header .section-desc {
  margin-left: auto;
  margin-right: auto;
}

.process-steps {
  display: grid;
  gap: 20px;
  counter-reset: step-counter;
}

.step-card {
  counter-increment: step-counter;
  position: relative;
  padding: 28px 24px 28px 76px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}

.step-card::before {
  content: counter(step-counter, decimal-leading-zero);
  position: absolute;
  left: 24px;
  top: 28px;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.5;
}

.step-card:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
}

.step-card:hover::before {
  opacity: 1;
}

.step-card h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.step-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================
   Pillars Section
   ============================ */
.pillars {
  background: var(--bg-secondary);
}

.pillars-grid {
  display: grid;
  gap: 20px;
}

.pillar-card {
  padding: 32px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.pillar-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transform: scaleX(0);
  transition: transform var(--transition-base);
}

.pillar-card:hover::after {
  transform: scaleX(1);
}

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

.pillar-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  background: var(--accent-surface);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pillar-icon .material-icons {
  font-size: 28px;
  color: var(--accent);
}

.pillar-card h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.pillar-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ============================
   CTA Section
   ============================ */
.cta-section {
  padding: 80px 20px;
  text-align: center;
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 140%;
  height: 200%;
  background: radial-gradient(ellipse at center, var(--accent-surface) 0%, transparent 70%);
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 1;
}

.cta-section h2 {
  font-size: 1.6rem;
  margin-bottom: 16px;
}

.cta-section p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 32px;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #fff;
  border-radius: var(--radius-xl);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 20px rgba(44,89,38,0.3);
}

.btn-cta:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 32px rgba(44,89,38,0.45);
}

.btn-cta .material-icons {
  font-size: 22px;
  transition: transform var(--transition-fast);
}

.btn-cta:hover .material-icons {
  transform: translateX(4px);
}

/* ============================
   Footer
   ============================ */
.site-footer {
  padding: 48px 20px 32px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
}

.footer-top {
  margin-bottom: 32px;
}

.footer-brand {
  margin-bottom: 16px;
}

.footer-brand .logo {
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  max-width: 320px;
  line-height: 1.7;
}

.footer-socials {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.social-link {
  width: 40px;
  height: 40px;
  background: var(--accent-surface);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  color: var(--text-secondary);
}

.social-link:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-3px);
}

.social-link .material-icons {
  font-size: 20px;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-bottom p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

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

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children animation */
.stagger-children .animate-on-scroll:nth-child(1) { transition-delay: 0.1s; }
.stagger-children .animate-on-scroll:nth-child(2) { transition-delay: 0.2s; }
.stagger-children .animate-on-scroll:nth-child(3) { transition-delay: 0.3s; }
.stagger-children .animate-on-scroll:nth-child(4) { transition-delay: 0.4s; }
.stagger-children .animate-on-scroll:nth-child(5) { transition-delay: 0.5s; }
.stagger-children .animate-on-scroll:nth-child(6) { transition-delay: 0.6s; }

/* ============================
   Responsive: Tablet (≥768px)
   ============================ */
@media (min-width: 768px) {
  :root {
    --section-padding: 80px 40px;
  }

  .hero {
    padding: 140px 40px 80px;
    min-height: 90vh;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .hero p {
    font-size: 1.05rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .about-grid {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 48px;
  }

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

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

  .process-steps {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

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

  .cta-section h2 {
    font-size: 2rem;
  }

  .footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .logo {
    font-size: 1.35rem;
  }
}

/* ============================
   Responsive: Desktop (≥1024px)
   ============================ */
@media (min-width: 1024px) {
  :root {
    --section-padding: 100px 60px;
  }

  .site-header {
    padding: 16px 40px;
  }

  .hero {
    padding: 160px 60px 100px;
    min-height: 100vh;
    align-items: center;
  }

  .hero h1 {
    font-size: 3.4rem;
  }

  .hero p {
    font-size: 1.1rem;
  }

  .section-title {
    font-size: 2.4rem;
  }

  .about-grid {
    gap: 72px;
  }

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

  .step-card {
    padding: 32px 28px 32px 80px;
  }

  .cta-section h2 {
    font-size: 2.6rem;
  }

  .cta-section p {
    font-size: 1.05rem;
  }

  .btn-cta {
    padding: 18px 44px;
    font-size: 1.05rem;
  }

  .logo {
    font-size: 1.5rem;
  }

  .logo-icon {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
}

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