/*
Theme Name: Horta Eco Raiz
Theme URI: https://hortaecoraiz.com.br
Author: Horta Eco Raiz
Author URI: https://hortaecoraiz.com.br
Description: Tema institucional one-page para a Horta Eco Raiz — agricultura familiar ecológica em Mogi Mirim. Compatível com Safari, Chrome, Firefox e Edge.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: horta-eco-raiz
*/

/* ============ Reset & Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: #1f2a23;
  background: #fbfaf6;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif; font-weight: 600; margin: 0; line-height: 1.15; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }

/* ============ Theme Tokens ============ */
:root {
  --primary: #2f4a30;
  --primary-soft: rgba(47,74,48,0.08);
  --primary-fg: #f7f5ee;
  --accent: #c97f3a;
  --accent-fg: #fff4e6;
  --bg: #fbfaf6;
  --card: #ffffff;
  --border: #e6e2d6;
  --muted: #6b6f63;
  --text: #1f2a23;
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 50px rgba(0,0,0,0.18);
}

/* ============ Layout ============ */
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.section-tight { padding: 56px 0; }

/* ============ Header (Safari-safe sticky + backdrop) ============ */
.site-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(251,250,246,0.92);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid rgba(230,226,214,0.6);
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { height: 44px; width: auto; max-width: 180px; object-fit: contain; flex-shrink: 0; }
.brand-fallback { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 20px; color: var(--primary); }
.brand-fallback em { color: var(--accent); font-style: normal; }

.main-nav { display: none; gap: 28px; }
.main-nav a { font-size: 14px; color: rgba(31,42,35,0.78); transition: color .2s ease; }
.main-nav a:hover { color: var(--primary); }
@media (min-width: 768px) { .main-nav { display: inline-flex; } }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  -webkit-transition: -webkit-transform .2s ease, background-color .2s ease;
  transition: transform .2s ease, background-color .2s ease;
  white-space: nowrap;
}
.btn:hover { -webkit-transform: scale(1.02); transform: scale(1.02); }
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-accent { background: var(--accent); color: var(--accent-fg); box-shadow: var(--shadow-md); }
.btn-ghost { background: rgba(255,255,255,0.10); color: #fff; border-color: rgba(255,255,255,0.5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }

/* ============ Hero (Safari 100vh fix) ============ */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: -webkit-linear-gradient(top, rgba(47,74,48,0.88), rgba(47,74,48,0.72) 50%, rgba(47,74,48,0.60));
  background: linear-gradient(to bottom, rgba(47,74,48,0.88), rgba(47,74,48,0.72) 50%, rgba(47,74,48,0.60));
}
.hero-inner {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  min-height: 88vh;
  /* Safari mobile dynamic viewport */
  min-height: -webkit-fill-available;
  min-height: 88dvh;
  padding: 96px 0;
  color: #fff;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.12);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  color: #fff;
  text-shadow: 0 2px 18px rgba(0,0,0,0.35);
  max-width: 880px;
}
.hero h1 em { font-style: italic; color: #ffe6c8; }
.hero p.lead {
  margin-top: 22px;
  max-width: 640px;
  font-size: clamp(16px, 2vw, 19px);
  color: #fff;
  text-shadow: 0 1px 8px rgba(0,0,0,0.35);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ============ Value Props ============ */
.value-props { background: rgba(47,74,48,0.06); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.value-grid { display: grid; gap: 28px; grid-template-columns: 1fr; padding: 48px 0; }
@media (min-width: 700px) { .value-grid { grid-template-columns: repeat(3, 1fr); } }
.value-item { display: flex; gap: 16px; align-items: flex-start; }
.value-icon {
  flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 9999px;
  background: var(--primary-soft); color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
}
.value-item h3 { font-size: 20px; color: var(--primary); }
.value-item p { font-size: 14px; color: var(--muted); margin-top: 4px; }

/* ============ Section headings ============ */
.eyebrow-text { font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.section h2 { font-size: clamp(28px, 4vw, 44px); color: var(--primary); margin-top: 12px; }
.section .lead { color: var(--muted); margin-top: 14px; max-width: 640px; }

/* ============ About ============ */
.about-grid { display: grid; gap: 48px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 1fr 1fr; gap: 64px; } }
.about-grid img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-lg); aspect-ratio: 4 / 5; object-fit: cover; }
/* Safari < 15 fallback for aspect-ratio */
@supports not (aspect-ratio: 4 / 5) { .about-grid img { height: 520px; } }

/* ============ Team ============ */
.team { background: rgba(47,74,48,0.04); }
.team-grid { display: grid; gap: 28px; grid-template-columns: 1fr; margin-top: 40px; }
@media (min-width: 700px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
.team-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.team-card img { width: 100%; background: rgba(47,74,48,0.06); object-fit: contain; aspect-ratio: 3 / 4; }
@supports not (aspect-ratio: 3 / 4) { .team-card img { height: 460px; } }
.team-card .body { padding: 22px; }
.team-card h3 { font-size: 20px; color: var(--primary); margin-top: 6px; }

/* ============ Products ============ */
.cards-grid { display: grid; gap: 22px; grid-template-columns: 1fr; margin-top: 40px; }
@media (min-width: 700px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards-grid { grid-template-columns: repeat(3, 1fr); } }
.product-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; }
.product-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@supports not (aspect-ratio: 4 / 3) { .product-card img { height: 240px; } }
.product-card .body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.product-card h3 { font-size: 22px; color: var(--primary); margin-top: 8px; }
.product-card ul { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.product-card ul li::before { content: "•"; color: var(--accent); margin-right: 8px; }
.product-card .note { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); font-size: 12px; font-style: italic; color: var(--muted); }

.flowers-feature { margin-top: 32px; background: var(--card); border: 1px solid rgba(201,127,58,0.3); border-radius: var(--radius); overflow: hidden; display: grid; grid-template-columns: 1fr; }
@media (min-width: 900px) { .flowers-feature { grid-template-columns: 1fr 1fr; } }
.flowers-feature > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; height: 100%; }
.flowers-feature .body { padding: 32px; }
.flowers-mini { margin-top: 18px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.flowers-mini img { aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; }
@supports not (aspect-ratio: 1 / 1) { .flowers-mini img { height: 80px; } }

/* ============ B2B ============ */
.b2b { background: var(--primary); color: var(--primary-fg); }
.b2b-grid { display: grid; gap: 48px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .b2b-grid { grid-template-columns: 1.1fr 1fr; align-items: start; } }
.b2b h2 { color: #fff; }
.diff-grid { display: grid; gap: 22px; grid-template-columns: 1fr; margin-top: 36px; }
@media (min-width: 600px) { .diff-grid { grid-template-columns: repeat(3, 1fr); } }
.diff-item h3 { font-size: 17px; margin-top: 10px; }
.diff-item p { font-size: 13px; color: rgba(247,245,238,0.78); margin-top: 4px; }
.region-card { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.18); border-radius: var(--radius); overflow: hidden; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.region-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.region-card .body { padding: 28px; }
.region-pills { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.region-pills li { padding: 6px 14px; border-radius: 9999px; border: 1px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.1); font-size: 13px; }

/* ============ Region banner ============ */
.region-banner { position: relative; isolation: isolate; overflow: hidden; }
.region-banner img { width: 100%; height: 56vh; min-height: 320px; object-fit: cover; display: block; }
.region-banner::after {
  content: "";
  position: absolute; inset: 0;
  background: -webkit-linear-gradient(bottom, rgba(47,74,48,0.95), rgba(47,74,48,0.70) 60%, rgba(47,74,48,0.30));
  background: linear-gradient(to top, rgba(47,74,48,0.95), rgba(47,74,48,0.70) 60%, rgba(47,74,48,0.30));
}
.region-banner .caption {
  position: absolute; inset: 0; display: flex; align-items: flex-end;
  z-index: 1;
}
.region-banner .caption p {
  max-width: 720px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(22px, 3vw, 36px);
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.55);
  padding: 0 20px 56px;
  margin: 0 auto;
  width: 100%;
  max-width: 1120px;
}

/* ============ B2C ============ */
.b2c-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px; display: grid; gap: 32px; grid-template-columns: 1fr; align-items: center; box-shadow: var(--shadow-sm); }
@media (min-width: 900px) { .b2c-card { grid-template-columns: 2fr 1fr; padding: 56px; } }

/* ============ Mission/Vision/Values ============ */
.mvv { background: rgba(47,74,48,0.04); }
.mvv-grid { display: grid; gap: 22px; grid-template-columns: 1fr; margin-top: 40px; }
@media (min-width: 700px) { .mvv-grid { grid-template-columns: repeat(3, 1fr); } }
.mvv-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-sm); }
.mvv-card h3 { font-size: 22px; color: var(--primary); margin-top: 18px; }
.mvv-icon { width: 48px; height: 48px; border-radius: 9999px; background: rgba(201,127,58,0.15); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; }

/* ============ Footer ============ */
.site-footer { background: var(--primary); color: var(--primary-fg); }
.footer-grid { display: grid; gap: 40px; grid-template-columns: 1fr; padding: 64px 0; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-brand img { height: 56px; width: auto; max-width: 220px; object-fit: contain; }
.footer h4 { font-family: inherit; font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255,244,230,0.9); font-weight: 500; }
.footer ul { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; font-size: 14px; color: rgba(247,245,238,0.85); }
.footer a:hover { color: var(--accent-fg); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); padding: 22px 0; font-size: 12px; color: rgba(247,245,238,0.6); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }

/* ============ Utilities ============ */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.icon { width: 18px; height: 18px; flex-shrink: 0; }
.icon-sm { width: 14px; height: 14px; }
.icon-lg { width: 22px; height: 22px; }

/* WP admin bar safe */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
