/* ==========================================================================
   riceguard.ai — Nais design (mockup approved 4 Aug 2026)
   CI tokens measured from the Pantone swatch files in
   "D:\Rice Guard\RiceGuard Sentinel Website\CI Color of RiceGuard":
     Lime Green Pantone            #a6bb52
     Metallic Shimmers 20-0038     #e9c54c
   ========================================================================== */

:root {
  --lime: #a6bb52;
  --lime-bright: #b7c95e;
  --gold: #e9c54c;
  --gold-deep: #b8912a;
  --olive: #5c7325;
  --ink: #1c1f18;
  --cream: #f2f0e9;
  --cream-2: #e9e6dd;
  --band-dark: #1b2810;
  --footer-dark: #162015;
  --hero-dark: #101c13;
  --text-on-dark: #e8e6da;
  --muted-on-dark: #a8ab97;
  --muted: #6c6a5e;

  --font-heading: "Source Serif 4", "Noto Serif Thai", Georgia, serif;
  --font-body: "Figtree", "Noto Sans Thai", system-ui, sans-serif;

  --radius: 14px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--cream);
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: var(--font-heading); font-weight: 600; margin: 0; }
.kicker {
  font-size: 13px; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 700; color: var(--gold-deep);
}
.on-dark .kicker { color: var(--gold); }

/* --- Nav ------------------------------------------------------------ */
.nav {
  position: absolute; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin: 0 auto; padding: 18px 24px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 42px; width: auto; }
.brand-name { font-family: var(--font-heading); letter-spacing: .12em; }
.brand-name b { display: block; color: #fff; font-size: 17px; font-weight: 600; }
.brand-name span { color: var(--gold); font-size: 10px; letter-spacing: .34em; }
.nav-links { display: flex; gap: 30px; font-size: 15px; color: var(--text-on-dark); }
.nav-links a.active { color: var(--gold); border-bottom: 2px solid var(--gold); padding-bottom: 4px; }
.nav-links a:hover { color: #fff; }

/* --- Hero ------------------------------------------------------------ */
.hero {
  position: relative; color: var(--text-on-dark);
  background: var(--hero-dark); overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; background: var(--hero-dark);
}
.hero-bg::before {
  content: ""; position: absolute; inset: 0;
  /* AI-extended from the approved Gen4 render (Gemini outpaint, RIC-446) — pending Nais CI review */
  background: url("../assets/hero-wide.jpg") center right / cover no-repeat;
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(13,22,15,.94) 0%, rgba(13,22,15,.82) 34%, rgba(13,22,15,.42) 58%, rgba(13,22,15,.08) 82%, rgba(13,22,15,.15) 100%),
    linear-gradient(0deg, rgba(13,22,15,.6) 0%, rgba(13,22,15,0) 32%),
    linear-gradient(180deg, rgba(13,22,15,.45) 0%, rgba(13,22,15,0) 18%);
}
.hero-inner { position: relative; padding: 150px 24px 40px; max-width: var(--maxw); margin: 0 auto; }
.hero h1 {
  font-size: clamp(38px, 5vw, 58px); line-height: 1.12; color: #fff;
  max-width: 12em; margin: 14px 0 20px;
}
.hero h1 em { font-style: normal; color: var(--lime-bright); }
.hero p.lead { max-width: 34em; font-size: 17px; color: var(--muted-on-dark); margin: 0 0 30px; }
.hero-cta { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.btn-pill {
  display: inline-flex; align-items: center; gap: 10px;
  background: #fff; color: var(--ink); font-weight: 600;
  border-radius: 999px; padding: 13px 26px; font-size: 15px;
}
.btn-pill svg { color: var(--olive); }
.link-arrow { color: var(--gold); font-weight: 600; font-size: 15px; }
.link-arrow:hover { color: #fff; }

/* benefit bar */
.benefits {
  position: relative; margin: 56px auto 0; max-width: var(--maxw);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(24, 36, 20, .72); border: 1px solid rgba(166,187,82,.25);
  border-radius: var(--radius); backdrop-filter: blur(4px);
}
.benefit { padding: 26px 18px; text-align: center; }
.benefit + .benefit { border-left: 1px solid rgba(166,187,82,.18); }
.benefit svg { color: var(--lime); margin: 0 auto 12px; }
.benefit b { display: block; color: #fff; font-size: 14.5px; margin-bottom: 6px; font-weight: 600; }
.benefit small { color: var(--muted-on-dark); font-size: 12.5px; line-height: 1.45; display: block; }

.hero-wave { position: relative; display: block; width: 100%; height: 88px; margin-top: 46px; }

/* --- Feature section ------------------------------------------------- */
.section { padding: 92px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 50px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); margin: 12px 0 14px; }
.section-head h2 em { font-style: normal; color: var(--olive); }
.section-head p { color: var(--muted); margin: 0; }

.features { display: grid; grid-template-columns: repeat(5, 1fr); }
.feature { padding: 0 22px; text-align: center; }
.feature + .feature { border-left: 1px solid var(--cream-2); }
.icon-ring {
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%;
  border: 1.6px solid var(--lime); color: var(--olive);
  display: flex; align-items: center; justify-content: center;
}
.feature b { display: block; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.feature small { color: var(--muted); font-size: 13px; line-height: 1.5; display: block; }
.section-cta { text-align: center; margin-top: 46px; }
.btn-olive {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--olive); color: #fff; font-weight: 600;
  border-radius: 999px; padding: 13px 28px; font-size: 15px;
}
.btn-olive:hover { background: #4c601f; }

/* --- Steps ------------------------------------------------------------ */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; position: relative; }
.section-decor { position: relative; overflow: hidden; }
.section-decor > .texture {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: url("../assets/wave-texture.jpg") center / 1500px auto repeat;
  mix-blend-mode: multiply; opacity: .3;
}
.section-decor::before, .section-decor::after {
  content: ""; position: absolute; bottom: -30px; top: 12%; width: 230px;
  mix-blend-mode: multiply; opacity: .78; pointer-events: none; z-index: 0;
}
.section-decor::before { left: 0; background: url("../assets/stalk-left.jpg") bottom left / contain no-repeat; }
.section-decor::after  { right: 0; background: url("../assets/stalk-right.jpg") bottom right / contain no-repeat; }
.section-decor > .wrap { position: relative; z-index: 1; }
@media (max-width: 1180px) { .section-decor::before, .section-decor::after { display: none; } }
.step { text-align: center; padding: 0 14px; position: relative; }
.step .icon-ring { background: #fff; }
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 32px; left: calc(50% + 44px); right: calc(-50% + 44px);
  border-top: 2px dashed var(--olive); opacity: .5;
}
.step b { font-size: 15px; display: block; margin-bottom: 6px; font-family: var(--font-heading); }
.step small { color: var(--muted); font-size: 13px; display: block; }

/* --- Stats band ------------------------------------------------------- */
.stats-band {
  color: var(--text-on-dark); padding: 56px 0 60px;
  background:
    linear-gradient(rgba(27,40,16,.93), rgba(22,32,13,.95)),
    url("../assets/gen/section-paddy-bg.jpg") center / cover no-repeat;
}
.stats-band .kicker { text-align: center; display: block; margin-bottom: 36px; color: var(--lime); }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); }
.stat { display: flex; gap: 14px; align-items: flex-start; padding: 0 18px; }
.stat + .stat { border-left: 1px solid rgba(166,187,82,.18); }
.stat .icon-ring { width: 52px; height: 52px; flex: none; border-color: rgba(232,230,218,.5); color: #fff; margin: 0; }
.stat-num { font-family: var(--font-heading); font-size: 26px; color: var(--lime-bright); line-height: 1.1; }
.stat b { display: block; color: #fff; font-size: 14px; margin: 4px 0 4px; }
.stat small { color: var(--muted-on-dark); font-size: 12.5px; line-height: 1.45; display: block; }

/* --- Footer ------------------------------------------------------------ */
footer { background: var(--footer-dark); color: var(--muted-on-dark); padding: 60px 0 0; font-size: 14px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 36px; }
.foot-brand .brand-name b { font-size: 16px; }
.foot-brand p { margin: 14px 0; line-height: 1.6; }
.socials { display: flex; gap: 10px; }
.socials a {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(232,230,218,.3);
  display: flex; align-items: center; justify-content: center; color: var(--text-on-dark);
}
.socials a:hover { border-color: var(--lime); color: var(--lime); }
.foot-col b { display: block; color: #fff; margin-bottom: 14px; font-weight: 600; }
.foot-col a, .foot-col span { display: block; margin-bottom: 9px; }
.foot-col a:hover { color: var(--lime-bright); }
.foot-contact li { list-style: none; display: flex; gap: 10px; margin-bottom: 12px; align-items: flex-start; }
.foot-contact { margin: 0; padding: 0; }
.foot-contact svg { color: var(--gold); flex: none; margin-top: 2px; }
.foot-bottom {
  border-top: 1px solid rgba(232,230,218,.14); margin-top: 46px; padding: 20px 0;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px;
}
.foot-bottom a { margin-left: 22px; }

/* --- Responsive ------------------------------------------------------- */
@media (max-width: 1020px) {
  .benefits, .features, .stats { grid-template-columns: repeat(3, 1fr); row-gap: 26px; }
  .benefit:nth-child(4), .feature:nth-child(4), .stat:nth-child(4) { border-left: none; }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 34px; }
  .step:nth-child(2)::after { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) { .hero-wave { height: 48px; } }
@media (max-width: 680px) {
  .nav-links { display: none; }
  .hero-inner { padding-top: 120px; }
  .benefits, .features, .stats, .steps { grid-template-columns: 1fr 1fr; }
  .benefit + .benefit, .feature + .feature, .stat + .stat { border-left: none; }
  .step::after { display: none !important; }
  .foot-grid { grid-template-columns: 1fr; gap: 26px; }
}
@media (max-width: 460px) {
  .benefits, .features, .stats, .steps { grid-template-columns: 1fr; }
}

/* --- Nav right: lang switch + burger ---------------------------------- */
.nav-right { display: flex; align-items: center; gap: 16px; }
.lang-switch { display: flex; border: 1px solid rgba(232,230,218,.35); border-radius: 999px; overflow: hidden; }
.rg-lang-btn {
  background: none; border: none; color: var(--muted-on-dark);
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  padding: 6px 14px; cursor: pointer;
}
.rg-lang-btn.is-active { background: var(--lime); color: var(--ink); }
.burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.burger span { display: block; width: 22px; height: 2px; background: var(--text-on-dark); margin: 5px 0; transition: transform .25s, opacity .25s; }
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-backdrop { display: none; position: fixed; inset: 0; background: rgba(10,16,10,.6); z-index: 19; }
.mobile-backdrop.is-open { display: block; }
.mobile-menu {
  display: none; position: fixed; top: 0; right: 0; bottom: 0; z-index: 20;
  width: min(78vw, 320px); background: var(--hero-dark);
  border-left: 1px solid rgba(166,187,82,.3); padding: 84px 30px 30px;
  flex-direction: column; gap: 20px; font-size: 17px; color: var(--text-on-dark);
}
.mobile-menu.is-open { display: flex; }
.mobile-menu a:hover { color: var(--lime-bright); }

/* --- Scroll reveal ------------------------------------------------------ */
/* content is visible by default; only a JS-capable client opts into the animation,
   so a failed script or a full-page capture can never hide the page */
/* motion only — never opacity. Content must stay readable if the observer
   never fires (full-page capture, slow device, script error). */
.js .reveal { transform: translateY(16px); transition: transform .6s cubic-bezier(.2,.7,.3,1); }
.js .reveal.is-visible { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { transform: none; transition: none; }
}
@media (max-width: 680px) {
  .burger { display: block; z-index: 21; position: relative; }
  .lang-switch { margin-right: 2px; }
}
