/*
Theme Name: GreenGold Sourcing
Theme URI: https://example.com
Author: GreenGold Sourcing
Description: A WordPress theme for a rice and feed additives sourcing business, with a self-rotating photo hero banner, a full-color palette, and content that's editable entirely from wp-admin (Pages, a Hero Slides screen, and a Sourcing Products screen) — no code required. Elementor-friendly.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: greengold-sourcing
*/

/* ================= Color palette ================= */
:root {
  --teal-900: #0F3D33;
  --teal-700: #1C5C4C;
  --gold-600: #C9972E;
  --gold-300: #E8C468;
  --cream-100: #FBF7EE;
  --sage-100: #E9EEE3;
  --ink-900: #1B241F;
  --header-bg: #0F3D33;
  --header-text: #FBF7EE;
  --footer-bg: #0F3D33;
  --footer-text: #FBF7EE;
}

/* ================= Base ================= */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background: var(--cream-100); color: var(--ink-900); margin: 0; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
.font-display { font-family: 'Fraunces', serif; }
.font-mono { font-family: 'IBM Plex Mono', monospace; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-sm { padding: 56px 0; }
h1, h2, h3 { font-family: 'Fraunces', serif; color: var(--teal-900); line-height: 1.2; }

/* ================= Textures ================= */
.grain-bg {
  background-image: radial-gradient(circle at 20% 30%, rgba(15,61,51,0.07) 0, rgba(15,61,51,0.07) 2px, transparent 2px),
                     radial-gradient(circle at 70% 60%, rgba(15,61,51,0.07) 0, rgba(15,61,51,0.07) 2px, transparent 2px);
  background-size: 140px 140px, 180px 180px;
}
.sack-bg {
  background-image: repeating-linear-gradient(135deg, rgba(201,151,46,0.08) 0px, rgba(201,151,46,0.08) 2px, transparent 2px, transparent 26px);
}
.ticket-card { clip-path: polygon(22px 0, 100% 0, 100% 100%, 0 100%, 0 22px); }
.cert-chip { border: 1px solid rgba(232,196,104,0.4); white-space: nowrap; display: inline-block; border-radius: 999px; padding: 4px 12px; }

/* ================= Certification bar ================= */
.cert-bar { background: #0A2A22; color: var(--gold-300); padding: 8px 0; overflow-x: auto; white-space: nowrap; }
.cert-bar .container { display: flex; gap: 10px; font-size: 11px; letter-spacing: 0.05em; }

/* ================= Header / nav (dark) ================= */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); border-bottom: 1px solid rgba(232,196,104,0.15); }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; height: 80px; display: flex; align-items: center; justify-content: space-between; }
.site-logo { font-family: 'Fraunces', serif; font-size: 24px; font-weight: 600; color: var(--header-text); }
.site-logo .accent { color: var(--gold-300); }
.site-logo .brand-tag { font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--header-text); opacity: 0.5; margin-left: 6px; vertical-align: top; }

#primary-menu { list-style: none; display: flex; gap: 32px; margin: 0; padding: 0; font-weight: 500; font-size: 14px; align-items: center; }
#primary-menu li { position: relative; }
#primary-menu > li > a { display: block; padding: 6px 0; color: var(--header-text); opacity: 0.85; }
#primary-menu li:hover > a, #primary-menu li.current-menu-item > a { color: var(--gold-300); opacity: 1; }
#primary-menu .sub-menu { display: none; position: absolute; top: 100%; left: 0; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,0.18); border-radius: 10px; padding: 8px 0; min-width: 200px; list-style: none; margin: 0; }
#primary-menu li.menu-item-has-children:hover > .sub-menu { display: block; }
#primary-menu .sub-menu a { padding: 10px 18px; font-size: 14px; color: var(--ink-900); display: block; }
#primary-menu .sub-menu a:hover { background: var(--sage-100); }
.nav-cta { background: var(--gold-600) !important; color: var(--ink-900) !important; padding: 10px 22px; border-radius: 999px; opacity: 1 !important; }
.nav-cta:hover { background: var(--gold-300) !important; }

.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; color: var(--header-text); }
#mobile-menu { display: none; background: var(--header-bg); border-top: 1px solid rgba(232,196,104,0.15); padding: 16px 24px; }
#mobile-menu.open { display: block; }
#mobile-menu ul { list-style: none; margin: 0; padding: 0; }
#mobile-menu li { padding: 8px 0; }
#mobile-menu a { color: var(--header-text); opacity: 0.85; }
#mobile-menu .sub-menu { padding-left: 16px; }

@media (max-width: 900px) {
  #primary-menu { display: none; }
  .menu-toggle { display: block; }
}

/* ================= Hero slider ================= */
.hero-slider { position: relative; min-height: 580px; overflow: hidden; background: var(--teal-900); }
.hero-slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; z-index: 0; transition: opacity 1.2s ease; }
.hero-slide.active { opacity: 1; z-index: 1; }
.hero-slide.no-image { background: linear-gradient(135deg, var(--teal-900), var(--teal-700)); }
.hero-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,42,34,0.78) 0%, rgba(10,42,34,0.6) 100%); }
.hero-slide-content { position: relative; z-index: 2; max-width: 800px; margin: 0 auto; text-align: center; padding: 120px 24px 76px; color: var(--cream-100); }
.hero-eyebrow { font-family: 'IBM Plex Mono', monospace; font-size: 13px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--gold-300); margin-bottom: 20px; }
.hero-heading { font-family: 'Fraunces', serif; font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 600; line-height: 1.15; margin-bottom: 20px; color: var(--cream-100); }
.hero-sub { font-size: 17px; opacity: 0.9; margin-bottom: 36px; }
.hero-cta { display: inline-block; background: var(--gold-600); color: var(--ink-900); padding: 14px 32px; border-radius: 999px; font-weight: 600; }
.hero-cta:hover { background: var(--gold-300); }
.hero-dots { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 8px; }
.hero-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(251,247,238,0.4); border: none; cursor: pointer; padding: 0; }
.hero-dot.active { background: var(--gold-300); }
@media (prefers-reduced-motion: reduce) { .hero-slide { transition: none; } }

/* ================= Marquee ================= */
.marquee-wrap { background: #0A2A22; padding: 12px 0; overflow: hidden; }
.marquee-track { display: flex; white-space: nowrap; animation: marquee 28s linear infinite; font-family: 'IBM Plex Mono', monospace; font-size: 13px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold-300); }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ================= Buttons / cards ================= */
.btn { display: inline-block; padding: 14px 32px; border-radius: 999px; font-weight: 600; }
.btn-teal { background: var(--teal-900); color: var(--cream-100); }
.btn-teal:hover { background: var(--teal-700); }
.btn-gold { background: var(--gold-600); color: var(--ink-900); }
.btn-gold:hover { background: var(--gold-300); }
.card { background: #fff; border-top: 4px solid var(--teal-900); border-radius: 6px; padding: 28px; }
.card.gold-top { border-top-color: var(--gold-600); }
.card-media { height: 160px; border-radius: 4px; margin-bottom: 18px; background-size: cover; background-position: center; }
.card-media.placeholder { background: linear-gradient(135deg, var(--teal-900), var(--gold-600)); display: flex; align-items: center; justify-content: center; }

/* ================= Page content (native editor output) ================= */
.site-content { color: rgba(27,36,31,0.8); line-height: 1.8; font-size: 16px; }
.site-content h1 { font-size: 2.4rem; font-weight: 600; margin-bottom: 24px; }
.site-content h2 { font-size: 1.8rem; font-weight: 600; margin: 40px 0 16px; }
.site-content h3 { font-size: 1.3rem; font-weight: 600; margin: 28px 0 12px; color: var(--teal-700); }
.site-content p { margin: 0 0 16px; }
.site-content ul, .site-content ol { margin: 0 0 16px; padding-left: 22px; }

/* ================= Products (taxonomy archive + teaser) ================= */
.products-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.products-teaser-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media (max-width: 800px) { .products-grid, .products-teaser-grid, .why-us-grid { grid-template-columns: 1fr !important; } }
.why-us-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }

/* ================= Footer ================= */
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding: 56px 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-bottom { border-top: 1px solid rgba(232,196,104,0.15); padding-top: 24px; font-size: 12px; opacity: 0.7; }
.social-icons a { margin-right: 14px; opacity: 0.85; }
.social-icons a:hover { color: var(--gold-300); opacity: 1; }

/* ================= Fade in on scroll ================= */
.fade-in { opacity: 0; transform: translateY(16px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-in.visible { opacity: 1; transform: none; }

/* ================= Forms (native + Contact Form 7 / WPForms if used later) ================= */
input[type=text], input[type=email], input[type=tel], input[type=url], select, textarea,
.wpcf7-form input, .wpcf7-form select, .wpcf7-form textarea,
.wpforms-form input, .wpforms-form select, .wpforms-form textarea {
  width: 100%; border: 1px solid rgba(15,61,51,0.2); border-radius: 8px; padding: 11px 16px; background: #fff; font-family: inherit; box-sizing: border-box;
}
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--gold-600); outline-offset: 2px; }
.btn-submit, .wpcf7-submit, .wpforms-submit { background: var(--teal-900); color: var(--cream-100); padding: 13px 32px; border-radius: 999px; border: none; font-weight: 600; cursor: pointer; font-size: 15px; }
.btn-submit:hover, .wpcf7-submit:hover, .wpforms-submit:hover { background: var(--teal-700); }
.contact-card { background: #fff; border-radius: 16px; padding: 40px; box-shadow: 0 20px 50px rgba(0,0,0,0.15); max-width: 640px; margin: 0 auto; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }
.form-success { background: var(--sage-100); color: var(--teal-900); border-radius: 8px; padding: 14px 18px; margin-bottom: 20px; font-size: 14px; font-weight: 500; }
label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }

/* ================= Stamp / badge decoration ================= */
.stamp { border: 2px dashed var(--gold-600); border-radius: 50%; transform: rotate(-8deg); width: 170px; height: 170px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; }
