/* Rapha Tea - Global Styles */
:root {
  --color-bg: #f5f7f2;
  --color-surface: #ffffff;
  --color-primary: #8aaf64;
  --color-primary-600: #729351;
  --color-secondary: #b4c89d;
  --color-accent: #ffcc66;
  --color-text: #2a3d26;
  --color-muted: #6a7b63;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --max-w: 1200px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  margin: 0;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ambient faint circles overlay */
body::before {
  content: "";
  position: fixed;
  inset: -10% -10% -10% -10%;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(120px 120px at 10% 15%, rgba(138,175,100,0.12), transparent 60%),
    radial-gradient(140px 140px at 80% 12%, rgba(180,200,157,0.10), transparent 60%),
    radial-gradient(90px 90px at 15% 70%, rgba(207,226,188,0.12), transparent 55%),
    radial-gradient(110px 110px at 85% 75%, rgba(180,200,157,0.10), transparent 60%),
    radial-gradient(80px 80px at 45% 20%, rgba(255,204,102,0.10), transparent 60%),
    radial-gradient(100px 100px at 50% 90%, rgba(138,175,100,0.08), transparent 60%);
  transform: translate3d(0, 0, 0);
  animation: ambient-drift 32s ease-in-out infinite alternate;
}

@keyframes ambient-drift {
  0% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -18px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--max-w); padding: 0 20px; margin: 0 auto; }
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.section-lg { padding: 120px 0; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 16px; }
.lead { font-size: 1.125rem; color: var(--color-muted); }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px; border: 0; cursor: pointer;
  font-weight: 600; transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-primary { background: linear-gradient(135deg, var(--color-primary), var(--color-secondary)); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: linear-gradient(135deg, var(--color-primary-600), var(--color-primary)); box-shadow: var(--shadow-md); }
.btn-ghost { background: rgba(138,175,100,0.12); color: var(--color-primary-600); }
.btn-ghost:hover { background: rgba(138,175,100,0.22); }

/* Navbar */
.navbar {
  position: sticky; top: 0; z-index: 1000;
  backdrop-filter: saturate(140%) blur(10px);
  background: rgba(245, 247, 242, 0.7);
  border-bottom: 1px solid rgba(42,61,38,0.06);
}
.navbar-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.brand img { height: 44px; width: auto; }
.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links a { color: var(--color-muted); font-weight: 600; padding: 10px 14px; border-radius: 10px; }
.nav-links a.active, .nav-links a:hover { color: var(--color-text); background: rgba(138,175,100,0.12); }

.nav-toggle { display: none; background: transparent; border: 0; padding: 8px; }
.nav-toggle i { font-size: 22px; color: var(--color-text); }

/* Hero */
.hero {
  background: radial-gradient(1000px 600px at 20% -10%, #dfead7 0%, transparent 60%),
              radial-gradient(900px 500px at 100% 10%, #e9f0e2 0%, transparent 60%),
              linear-gradient(180deg, #f7faf4 0%, #f2f6ee 100%);
  position: relative; overflow: hidden;
}
.hero .container { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 4vw + 1rem, 3.5rem); }
.hero .lead { margin-bottom: 24px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.blob { position: absolute; border-radius: 50%; filter: blur(40px); opacity: 0.35; pointer-events: none; }
.blob.b1 { width: 380px; height: 380px; background: #b4c89d; top: -80px; left: -60px; }
.blob.b2 { width: 420px; height: 420px; background: #cfe2bc; bottom: -120px; right: -100px; }

.hero-card {
  background: var(--color-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  padding: 18px; transform: rotate(-2deg);
}
/* Floating animation for hero card (disabled on mobile below) */
.hero-card { animation: hero-float 9s ease-in-out infinite; will-change: transform; }
@keyframes hero-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-10px) rotate(-2deg); }
}

.hero-image { border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); position: relative; }
/* Crossfade overlay inside hero image */
.hero-image .fade-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
}

/* Features */
.features { background: #f0f5ea; }
.features-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.feature { background: var(--color-surface); border: 1px solid rgba(42,61,38,0.06); border-radius: var(--radius-md); padding: 24px; box-shadow: var(--shadow-sm); }
.feature i { color: var(--color-primary); font-size: 28px; margin-bottom: 8px; }
/* Tilt + gentle float for each feature card */
.feature { will-change: transform; transform: rotate(var(--feature-tilt, 0.6deg)); animation: feature-float 7s ease-in-out infinite; }
@keyframes feature-float {
  0%, 100% { transform: translateY(0) rotate(var(--feature-tilt, 0deg)); }
  50% { transform: translateY(-8px) rotate(var(--feature-tilt, 0deg)); }
}
/* Vary tilt and phase per position */
.features-grid .feature:nth-child(3n+1), .grid-3 .feature:nth-child(3n+1) { --feature-tilt: -1.2deg; animation-delay: 0s; }
.features-grid .feature:nth-child(3n+2), .grid-3 .feature:nth-child(3n+2) { --feature-tilt: 0.8deg; animation-delay: .6s; }
.features-grid .feature:nth-child(3n+3), .grid-3 .feature:nth-child(3n+3) { --feature-tilt: -0.6deg; animation-delay: 1.2s; }

/* Products */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.card { background: var(--color-surface); border-radius: var(--radius-md); overflow: hidden; border: 1px solid rgba(42,61,38,0.06); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.card .thumb { aspect-ratio: 4/3; background-size: cover; background-position: center; }
.card .body { padding: 18px; display: grid; gap: 6px; }
.card .meta { color: var(--color-muted); font-size: 0.95rem; }

/* CTA Banner */
.cta {
  background: linear-gradient(135deg, var(--color-secondary), var(--color-primary)); color: #fff;
  border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-md);
}
.cta .row { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; }

/* Footer */
.footer { background: #eaf1e4; border-top: 1px solid rgba(42,61,38,0.08); }
.footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.footer h4 { margin-bottom: 10px; }
.footer a { color: var(--color-muted); }
.footer a:hover { color: var(--color-text); }
.social { display: flex; gap: 14px; }
.social a { font-size: 20px; color: #6f7e66; }

/* Pages */
.page-hero { background: #f0f5ea; border-bottom: 1px solid rgba(42,61,38,0.06); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.card-muted { background: #f7faf4; border: 1px dashed rgba(42,61,38,0.12); }

.faq-item { background: var(--color-surface); border: 1px solid rgba(42,61,38,0.06); border-radius: var(--radius-md); overflow: hidden; }
.faq-q { width: 100%; background: transparent; border: 0; text-align: left; padding: 18px; font-weight: 600; cursor: pointer; }
.faq-a { padding: 0 18px 18px; color: var(--color-muted); display: none; }
.faq-item.open .faq-a { display: block; }

/* Responsive */
@media (max-width: 992px) {
  .hero .container { grid-template-columns: 1fr; }
  .features-grid, .cards, .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .nav-links { display: none; position: absolute; top: 72px; left: 0; right: 0; background: rgba(245,247,242,0.9); backdrop-filter: blur(10px); padding: 12px; border-bottom: 1px solid rgba(42,61,38,0.06); }
  .nav-links.open { display: flex; flex-direction: column; }
  .nav-toggle { display: inline-flex; }
  .features-grid, .cards, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .cta .row { grid-template-columns: 1fr; }
  /* Disable hero float on mobile, keep tilt */
  .hero-card { animation: none; }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .feature, .hero-card, body::before { animation: none !important; }
  .hero-image .fade-overlay { transition: none !important; }
}