/* Farm to Fork: components in the lightswitch.co.ke design language, applied to core blocks.
   Tokens come from theme.json (--wp--preset--*, --wp--custom--*). */

:root {
  --ink: var(--wp--preset--color--ink);
  --ink-soft: var(--wp--preset--color--ink-soft);
  --green: var(--wp--preset--color--green);
  --green-deep: var(--wp--preset--color--green-deep);
  --green-bright: var(--wp--preset--color--green-bright);
  --orange: var(--wp--preset--color--orange);
  --orange-text: var(--wp--preset--color--orange-text);
  --mist: var(--wp--preset--color--mist);
  --line: var(--wp--preset--color--line);
  --radius-s: var(--wp--custom--radius--s);
  --radius-m: var(--wp--custom--radius--m);
  --radius-l: var(--wp--custom--radius--l);
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
/* Sections meet edge to edge: no block gap between the header, the sections and the footer. */
.wp-site-blocks > * + *, main > * + *, main > .wp-block-group, main > section { margin-block-start: 0 !important; }
/* Signed-in editors: keep the sticky header below the WordPress admin bar. */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 4px; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: var(--radius-s); }
main.wp-block-group { margin-block: 0; }
main > .wp-block-group, main > section { margin-block-start: 0; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); transition: box-shadow .2s; }
.site-header.is-scrolled { box-shadow: 0 6px 20px -12px rgb(11 46 28 / .35); }
.site-header__inner { min-height: var(--header-h); gap: 1.5rem; }
.site-logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; flex: none; }
.site-logo img { width: 168px; height: auto; display: block; }
.site-logo__by { font: 500 .78rem/1.1 var(--wp--preset--font-family--body); color: var(--ink-soft); border-left: 1px solid var(--line); padding-left: .6rem; }
.site-nav { gap: 1.6rem !important; font-weight: 500; }
.site-nav a { color: var(--ink); text-decoration: none; }
.site-nav a:hover, .site-nav .is-active a, .site-nav a[aria-current] { color: var(--green-deep); text-decoration: underline; text-underline-offset: 6px; }
.site-header .wp-block-buttons { flex: none; }
.site-header .wp-block-button__link { padding: .6rem 1.1rem; min-height: 44px; }
@media (max-width: 1080px) { .site-header__nav-wrap .site-nav { display: none; } }
@media (max-width: 600px) {
  .site-logo img { width: 140px; }
  .site-logo__by { display: none; }
  .site-header .is-style-outline { display: none; }
}

/* ---------- Buttons ---------- */
.wp-element-button, .wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px;
  transition: transform .15s, background-color .15s, color .15s; text-decoration: none; }
.wp-block-button__link:hover { transform: translateY(-1px); }
.wp-block-button.is-style-secondary .wp-block-button__link { background: var(--green-deep); color: #fff; }
.wp-block-button.is-style-secondary .wp-block-button__link:hover { background: var(--ink); color: #fff; }
.wp-block-button.is-style-ghost .wp-block-button__link { background: transparent; color: #fff; border: 2px solid currentColor; }
.wp-block-button.is-style-ghost .wp-block-button__link:hover { background: rgb(255 255 255 / .1); }
.wp-block-button.is-style-outline .wp-block-button__link { background: transparent; color: var(--green-deep); border: 2px solid currentColor; }
.wp-block-button.is-style-outline .wp-block-button__link:hover { background: var(--mist); }
.text-link { font-weight: 700; color: var(--green-deep); text-decoration: none; }
.text-link::after { content: " →"; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Eyebrow (the Lightswitch "switch" pill) ---------- */
.is-style-eyebrow { display: inline-flex; align-items: center; gap: .6rem; margin: 0; font: 700 var(--wp--preset--font-size--small)/1 var(--wp--preset--font-family--body);
  letter-spacing: .12em; text-transform: uppercase; color: var(--orange-text); }
.is-style-eyebrow::before { content: ""; width: 24px; height: 13px; border-radius: 99px; flex: none;
  background: radial-gradient(circle at 17px 50%, var(--orange) 0 4.5px, transparent 5px) var(--green); }

/* ---------- Sections ---------- */
.section { padding-block: var(--wp--preset--spacing--2-xl); }
.section--tight { padding-block: var(--wp--preset--spacing--xl); }
.is-style-section-mist { background: var(--mist); }
.is-style-section-ink, .hero, .cta-band { background: var(--ink); color: #fff; }
.is-style-section-ink :where(h1, h2, h3, h4), .hero :where(h1, h2, h3), .cta-band :where(h1, h2, h3) { color: #fff; }
.is-style-section-ink :where(p, li), .hero :where(p, li), .cta-band :where(p, li) { color: rgb(255 255 255 / .86); }
.is-style-section-ink .is-style-eyebrow, .hero .is-style-eyebrow, .cta-band .is-style-eyebrow { color: var(--orange); }
.is-style-section-ink a:not(.wp-element-button), .hero a:not(.wp-element-button), .cta-band a:not(.wp-element-button) { color: #fff; }
.is-style-section-ink :focus-visible, .hero :focus-visible, .cta-band :focus-visible, .site-footer :focus-visible { outline-color: var(--orange); }
/* The heading block spans the content column (so it lines up with the grid below); its text stays readable width. */
.section-head { max-width: 1200px !important; margin-bottom: var(--wp--preset--spacing--l) !important; }
.section-head > * { max-width: 760px; }
.section-head > * + * { margin-top: .9rem; }
.section-head.has-text-align-center, .section-head--center { text-align: center; }
.section-head--center > * { margin-inline: auto; }
.section-head--center > .is-style-eyebrow { display: flex; justify-content: center; width: fit-content; }
/* Copy on dark sections: white text, whatever lighter rule (.lead, .section-head) would apply. */
.hero .lead, .cta-band .lead, .is-style-section-ink .lead, .cta-band .section-head p:not(.is-style-eyebrow) { color: rgb(255 255 255 / .86); }
.section-head .lead, .lead { font-size: var(--wp--preset--font-size--lead); line-height: 1.5; color: var(--ink-soft); max-width: 60ch; }
.section-head--center .lead { margin-inline: auto; }
.rule { width: 64px; height: 4px; border: 0; border-radius: 4px; background: var(--orange); margin: .9rem 0 0; }
.section-head--center .rule { margin-inline: auto; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: var(--wp--preset--spacing--xl) var(--wp--preset--spacing--2-xl);
  background:
    radial-gradient(60rem 30rem at 85% -10%, rgb(17 148 71 / .35), transparent 60%),
    radial-gradient(rgb(255 255 255 / .06) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--ink); }
.hero h1 { max-width: 16ch; font-size: clamp(2.07rem, 1.5rem + 2.6vw, 3.2rem); }
.hero .lead { font-size: clamp(1.1rem, 1rem + .4vw, 1.3rem); }
.hero__more { margin: .2rem 0 .6rem !important; }
.hero .lead { color: rgb(255 255 255 / .86); }
.hero__grid { gap: var(--wp--preset--spacing--l) !important; }
.hero__proof { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; padding: 0; margin: 0; list-style: none; font-size: var(--wp--preset--font-size--small); }
.hero__proof li { display: inline-flex; align-items: center; gap: .45rem; color: rgb(255 255 255 / .86); }
.hero__proof li::before { content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%;
  background: var(--green-bright) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%230B2E1C' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
.hero__visual img { width: 100%; height: auto; display: block; filter: drop-shadow(0 30px 40px rgb(0 0 0 / .35)); }
.hero .wp-block-buttons { margin-top: .4rem; }
.hero__more { font-weight: 700; }
.hero__more a { text-decoration: none; border-bottom: 2px solid var(--green-bright); }

/* ---------- Cards ---------- */
.card-grid { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: var(--wp--preset--spacing--m) !important; }
.card-grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
/* Five cards sit in one row on desktop, as on lightswitch.co.ke. */
.card-grid--5 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: var(--wp--preset--spacing--s) !important; }
.is-style-card, .card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-m); padding: var(--wp--preset--spacing--m) !important;
  display: flex; flex-direction: column; gap: .55rem; margin: 0 !important; }
.is-style-card > *, .card > * { margin: 0 !important; }
.is-style-card p, .card p { color: var(--ink-soft); }
.is-style-card h3, .card h3 { font-size: 1.15rem; }
.is-style-card .text-link, .card .text-link { margin-top: auto !important; padding-top: .4rem; }
.card__icon { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--mist); color: var(--green-deep); font: 700 1.1rem/1 var(--wp--preset--font-family--display); }
.is-style-section-ink .is-style-card { background: rgb(255 255 255 / .04); border-color: rgb(255 255 255 / .14); }
.is-style-section-ink .is-style-card p { color: rgb(255 255 255 / .8); }
.closing { font: 600 var(--wp--preset--font-size--lead)/1.4 var(--wp--preset--font-family--display); max-width: 40ch; margin: var(--wp--preset--spacing--l) auto 0 !important; text-align: center; }

/* ---------- How it works: a numbered stepper ---------- */
.steps { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: var(--wp--preset--spacing--m) !important; counter-reset: step; }
.step { position: relative; padding: var(--wp--preset--spacing--m) !important; padding-top: 3.6rem !important; border-radius: var(--radius-m);
  background: #fff; border: 1px solid var(--line); margin: 0 !important; counter-increment: step; }
.step::before { content: counter(step, decimal-leading-zero); position: absolute; top: 1.1rem; left: var(--wp--preset--spacing--m);
  font: 700 1.6rem/1 var(--wp--preset--font-family--display); color: var(--orange); }
.step > * { margin: 0 !important; }
.step > * + * { margin-top: .6rem !important; }
.step h3 { font-size: 1.15rem; }
.step ul { padding-left: 1.1rem; color: var(--ink-soft); font-size: var(--wp--preset--font-size--small); }

/* ---------- Feature modules (alternating) ---------- */
.feature-stack { display: grid; gap: var(--wp--preset--spacing--2-xl) !important; }
.feature { gap: var(--wp--preset--spacing--l) !important; margin: 0 !important; }
.feature > .wp-block-column:first-child > * + * { margin-top: .9rem; }
.feature h2 { font-size: var(--wp--preset--font-size--large); }
.feature .lead { font-size: var(--wp--preset--font-size--base); }
@media (min-width: 782px) { .feature--flip { flex-direction: row-reverse; } }
.check-list { display: grid; gap: .55rem; list-style: none; padding: 0 !important; margin: 1.1rem 0 0 !important; }
.check-list li { display: grid; grid-template-columns: 22px 1fr; gap: .6rem; align-items: start; margin: 0; }
.check-list li::before { content: ""; width: 22px; height: 22px; border-radius: 50%; margin-top: .15rem;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 15px no-repeat; }
.is-style-screen { margin: 0 !important; }
.is-style-screen img { width: 100%; height: auto; display: block; }
.is-style-screen figcaption, .feature figcaption { margin-top: .6rem; font-size: var(--wp--preset--font-size--small); color: var(--ink-soft); text-align: center; }

/* ---------- Stats strip ---------- */
.stats { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: var(--wp--preset--spacing--l) !important; }
.stat { display: grid; gap: .35rem; border-left: 3px solid var(--orange); padding-left: var(--wp--preset--spacing--s) !important; margin: 0 !important; }
.stat > * { margin: 0 !important; }
.stat__value { font: 700 var(--wp--preset--font-size--x-large)/1 var(--wp--preset--font-family--display) !important; white-space: nowrap; letter-spacing: -.03em; color: #fff !important; font-variant-numeric: tabular-nums; }
.stat__label { color: rgb(255 255 255 / .82) !important; font-size: var(--wp--preset--font-size--small); }

/* ---------- Comparison table ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-m); background: #fff; }
.compare { width: 100%; min-width: 640px; border-collapse: collapse; font-size: var(--wp--preset--font-size--small); }
.compare th, .compare td { padding: .9rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.compare thead th { font: 600 .95rem/1.25 var(--wp--preset--font-family--display); background: var(--mist); }
.compare thead th.is-us { background: var(--ink); color: #fff; }
.compare tbody th { font-weight: 600; position: sticky; left: 0; background: #fff; }
.compare td.is-us { background: #F6FBF7; font-weight: 600; }
.compare tr:last-child > * { border-bottom: 0; }
.yes, .no, .maybe { display: inline-flex; align-items: center; gap: .45rem; }
.yes::before, .no::before, .maybe::before { content: ""; width: 18px; height: 18px; border-radius: 50%; flex: none; }
.yes::before { background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat; }
.no::before { background: #C9D3CD url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 8l8 8M16 8l-8 8' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
.maybe::before { background: #E8C9A6; }
.footnote { font-size: var(--wp--preset--font-size--small); color: var(--ink-soft); margin-top: .8rem !important; }

/* ---------- FAQ (core/details) ---------- */
.faq { max-width: 860px; margin-inline: auto !important; border-top: 1px solid var(--line); }
.faq .wp-block-details { margin: 0 !important; padding: 0 !important; border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.15rem 0; cursor: pointer; list-style: none;
  font: 600 var(--wp--preset--font-size--lead)/1.3 var(--wp--preset--font-family--display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--mist); color: var(--green-deep); font: 600 1.3rem/1 var(--wp--preset--font-family--body); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > :not(summary) { margin: 0 0 1.15rem !important; color: var(--ink-soft); max-width: 70ch; }

/* ---------- Final call to action ---------- */
.cta-band { background:
    radial-gradient(50rem 26rem at 15% 120%, rgb(17 148 71 / .4), transparent 60%),
    var(--ink); }
.contact-grid { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: var(--wp--preset--spacing--m) !important; margin-top: var(--wp--preset--spacing--l) !important; }
.contact-card { display: flex; flex-direction: column; gap: .4rem; padding: var(--wp--preset--spacing--m); border-radius: var(--radius-m);
  background: rgb(255 255 255 / .05); border: 1px solid rgb(255 255 255 / .16); color: #fff; text-decoration: none; transition: border-color .15s, transform .15s; }
.contact-card:hover { border-color: var(--green-bright); transform: translateY(-2px); }
.contact-card strong { font: 600 1.1rem/1.2 var(--wp--preset--font-family--display); color: #fff; }
.contact-card span { color: rgb(255 255 255 / .8); font-size: var(--wp--preset--font-size--small); }
.contact-card--primary { background: var(--orange); border-color: var(--orange); }
.contact-card--primary strong, .contact-card--primary span { color: var(--ink); }
.reassure { font-size: var(--wp--preset--font-size--small); color: rgb(255 255 255 / .75) !important; margin-top: 1rem !important; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgb(255 255 255 / .82); padding-block: var(--wp--preset--spacing--xl) var(--wp--preset--spacing--m); font-size: var(--wp--preset--font-size--small); }
.site-footer a { color: rgb(255 255 255 / .86); text-decoration: none; }
.site-footer a:hover { color: var(--green-bright); text-decoration: underline; }
.site-footer__top { display: grid; gap: var(--wp--preset--spacing--l); grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.site-footer__brand { display: grid; gap: .9rem; align-content: start; }
.site-footer__brand img { width: 200px; height: auto; }
.site-footer__title { font: 600 1rem/1.2 var(--wp--preset--font-family--display); color: #fff; margin: 0 0 .8rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; margin-top: var(--wp--preset--spacing--l);
  padding-top: var(--wp--preset--spacing--m); border-top: 1px solid rgb(255 255 255 / .12); }

/* ---------- Mobile action bar and WhatsApp button (as on lightswitch.co.ke) ---------- */
.mobile-bar { position: fixed; inset: auto 0 0; z-index: 60; display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 1px;
  background: var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); box-shadow: 0 -6px 20px rgb(11 46 28 / .12); }
.mobile-bar a { display: flex; align-items: center; justify-content: center; gap: .4rem; min-height: 56px; background: #fff;
  color: var(--ink); font: 600 .95rem/1 var(--wp--preset--font-family--display); text-decoration: none; }
.mobile-bar svg { color: var(--green); }
.mobile-bar .mobile-bar__demo { background: var(--orange); color: var(--ink); }
.mobile-bar .mobile-bar__demo svg { color: var(--ink); }
.wa-float { display: none; position: fixed; right: 24px; bottom: 24px; z-index: 60; width: 60px; height: 60px; border-radius: 50%;
  place-items: center; background: var(--green); color: #fff; box-shadow: 0 12px 24px -8px rgb(11 46 28 / .5); }
.wa-float:hover { background: var(--green-deep); }
@media (max-width: 767px) { body { padding-bottom: 64px; } }
@media (min-width: 768px) { .mobile-bar { display: none; } .wa-float { display: grid; } .site-footer__bottom { padding-right: 88px; } }

/* ---------- Small screens ---------- */
@media (max-width: 781px) {
  .hero { padding-top: var(--wp--preset--spacing--l); }
  .hero__visual { margin-top: .5rem; }
  .feature .wp-block-column:last-child { order: 2; }
}
