/*
 * E-Farmer brand layer — loaded last (see src/app/layout.tsx).
 *
 * Colours come from the desktop app (smartfarm-app-desktop/apps/renderer/src/styles):
 * primary brown #5D4037, leaf green #43A047, warm neutrals, Inter type.
 * The template's --thm-* variables are remapped here so every legacy section turns light and warm;
 * `html:root` beats the plain `:root` declarations in the template files whatever their load order.
 */

html:root {
  /* Brand palette */
  --ef-brown: #5d4037;
  --ef-brown-rgb: 93, 64, 55;
  --ef-brown-dark: #3e2723;
  --ef-brown-soft: #77574d;
  --ef-brown-tint: #ffdbd0;
  --ef-leaf: #43a047;
  --ef-leaf-rgb: 67, 160, 71;
  --ef-leaf-dark: #2e7d32;
  --ef-leaf-tint: #e3f4e1;
  --ef-sun: #f4b942;
  --ef-sky: #8ccbe8;

  /* Surfaces & text (Material neutral palette from the desktop theme) */
  --ef-bg: #fff8f6;
  --ef-surface: #ffffff;
  --ef-surface-2: #faf2f0;
  --ef-surface-3: #f4ecea;
  --ef-outline: #e6d8d3;
  --ef-outline-strong: #d4c3be;
  --ef-ink: #1e1b1a;
  --ef-ink-rgb: 30, 27, 26;
  --ef-muted: #625d5c;
  --ef-muted-2: #827470;

  /* Roles. Use these rather than raw colours so both themes work. */
  --ef-on-brown: #ffffff; /* text on a --ef-brown background */
  --ef-brown-hover: #3e2723; /* --ef-brown buttons on hover */
  --ef-on-leaf: #ffffff; /* text on a --ef-leaf background */
  --ef-deep: #3e2723; /* always-dark brand bands (footer, AI band): white text on top in both themes */
  --ef-contrast: #1e1b1a; /* inverted chips (store badges, toasts) … */
  --ef-on-contrast: #ffffff; /* … and their text */
  --ef-header-bg: rgba(255, 248, 246, 0.82);
  --ef-text-body: #3a3533; /* long-form reading text (articles, legal) */
  --ef-logo-tile: #fffbf5; /* cream tile behind the logo artwork, same in both themes */
  --ef-chip-bg: rgba(255, 255, 255, 0.92); /* labels laid over images */
  --ef-warn-bg: #fdf0d3;
  --ef-warn-border: #f1d9a0;
  --ef-warn-ink: #8a5a00;
  --ef-danger: #ba1a1a;
  --ef-danger-bg: #ffdad6;
  --ef-danger-ink: #93000a;
  --ef-success-ink: #24452a;
  --ef-skel-a: #efe3df;
  --ef-skel-b: #f8f0ed;
  --ef-shadow-rgb: 62, 39, 35;

  --ef-gradient: linear-gradient(160deg, #5d4037 0%, #3e2723 70%, #2e7d32 140%);
  --ef-radius-sm: 14px;
  --ef-radius-md: 18px;
  --ef-radius-lg: 22px;
  --ef-shadow-sm: 0 1px 2px rgba(var(--ef-shadow-rgb), 0.06), 0 2px 8px rgba(var(--ef-shadow-rgb), 0.05);
  --ef-shadow-md: 0 10px 30px rgba(var(--ef-shadow-rgb), 0.1);
  --ef-shadow-lg: 0 24px 60px rgba(var(--ef-shadow-rgb), 0.16);
  color-scheme: light;

  /* Template variables, remapped. In the original dark template "white" is the foreground colour
     and "black"/"main-bg" are surfaces, so they keep those roles here. */
  --thm-white: var(--ef-ink);
  --thm-white-rgb: var(--ef-ink-rgb);
  --thm-gray: var(--ef-muted);
  --thm-gray-rgb: 98, 93, 92;
  --thm-black: var(--ef-ink);
  --thm-black-rgb: var(--ef-ink-rgb);
  --thm-primary: var(--ef-brown);
  --thm-primary-rgb: var(--ef-brown-rgb);
  --thm-base: var(--ef-leaf-dark);
  --thm-base-rgb: 46, 125, 50;
  --thm-extra: var(--ef-leaf);
  --thm-extra-rgb: var(--ef-leaf-rgb);
  --thm-gray-bg: var(--ef-surface-3);
  --thm-gray-bg-rgb: 244, 236, 234;
  --thm-bdr-color: var(--ef-outline);
  --thm-bdr-color-rgb: 230, 216, 211;
  --thm-body-bg: var(--ef-bg);
  --thm-main-bg: var(--ef-surface);
  --thm-border-radius: var(--ef-radius-sm);
  --thm-gradient-color1: var(--ef-brown);
  --thm-gradient-color2: var(--ef-leaf-dark);
  --thm-gradient: var(--ef-gradient);
  --thm-text: var(--ef-muted);

  --bs-primary: var(--ef-brown);
  --bs-primary-rgb: var(--ef-brown-rgb);
  --background: var(--ef-bg);
  --foreground: var(--ef-ink);
}

/* ---------- Dark theme ----------
   Set by the script in src/app/layout.tsx: <html data-theme="dark">, from the visitor's choice or their
   system setting. Same roles, warm near-black surfaces, and lighter brand tones so text stays readable
   (Material dark tones of the desktop app's palette). */
html:root[data-theme='dark'] {
  --ef-brown: #e2b6a8;
  --ef-brown-rgb: 226, 182, 168;
  --ef-brown-dark: #ffdbd0;
  --ef-brown-soft: #caa397;
  --ef-brown-tint: #50352c;
  --ef-leaf: #6fcf6b;
  --ef-leaf-rgb: 111, 207, 107;
  --ef-leaf-dark: #8fd98b;
  --ef-leaf-tint: #1c331d;

  --ef-bg: #141110;
  --ef-surface: #1d1918;
  --ef-surface-2: #231f1e;
  --ef-surface-3: #2c2726;
  --ef-outline: #3a3432;
  --ef-outline-strong: #524a47;
  --ef-ink: #f3ebe8;
  --ef-ink-rgb: 243, 235, 232;
  --ef-muted: #c8bebb;
  --ef-muted-2: #9b918e;

  --ef-on-brown: #2c160e;
  --ef-brown-hover: #ffdbd0;
  --ef-on-leaf: #06260a;
  --ef-deep: #2a1b17;
  --ef-contrast: #f3ebe8;
  --ef-on-contrast: #1e1b1a;
  --ef-header-bg: rgba(20, 17, 16, 0.82);
  --ef-text-body: #e0d7d4;
  --ef-chip-bg: rgba(29, 25, 24, 0.9);
  --ef-warn-bg: #3a2c0c;
  --ef-warn-border: #5e4818;
  --ef-warn-ink: #f6cf7a;
  --ef-danger: #ffb4ab;
  --ef-danger-bg: #5c1611;
  --ef-danger-ink: #ffdad6;
  --ef-success-ink: #cdeccb;
  --ef-skel-a: #2a2524;
  --ef-skel-b: #36302e;
  --ef-shadow-rgb: 0, 0, 0;

  --ef-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
  --ef-shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
  --ef-shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  --thm-gray-rgb: 200, 190, 187;
  --thm-gray-bg-rgb: 44, 39, 38;
  --thm-bdr-color-rgb: 58, 52, 50;
  --thm-base-rgb: 143, 217, 139;
  color-scheme: dark;
}

/* ---------- Base ---------- */

/* next/font defines --font-inter on <body>, so the font tokens are declared here, not on :root. */
html body {
  --ef-font: var(--font-inter), 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --thm-font: var(--ef-font);
  --thm-font-two: var(--ef-font);
  background: var(--ef-bg);
  color: var(--ef-muted);
  font-family: var(--ef-font);
}

body.body-bg-color,
.page-wrapper {
  background-color: var(--ef-bg);
}

/* The template and globals.css use overflow: hidden here to stop sideways scrolling, which turns
   these elements into scroll containers and breaks position: sticky (header, legal contents).
   overflow: clip cuts off the overflow the same way without creating a scroll container. */
html:root,
html body,
html .page-wrapper {
  overflow-x: clip;
  overflow-y: visible;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--ef-font);
  color: var(--ef-ink);
  letter-spacing: -0.02em;
}

::selection {
  background: var(--ef-brown-tint);
  color: var(--ef-brown-dark);
}

/* The template's custom cursor and dark preloader don't fit the new look. */
.cursor,
.cursor-follower {
  display: none !important;
}

/* ---------- Scrollbars ---------- */

/* Chromium and Safari: a rounded brown thumb inset in a cream track. The transparent border plus
   background-clip draws the thumb narrower than the bar, like the desktop app. */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
  background: transparent;
}

::-webkit-scrollbar-track {
  background: var(--ef-bg);
}

::-webkit-scrollbar-corner {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  min-height: 48px;
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(var(--ef-brown-rgb), 0.35) padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background-color: rgba(var(--ef-brown-rgb), 0.6);
}

::-webkit-scrollbar-thumb:active {
  background-color: var(--ef-brown);
}

::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

/* Inner scroll areas (menus, panels, chat, tables) get a slimmer bar on a clear track. */
body *::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

body *::-webkit-scrollbar-track {
  background: transparent;
}

body *::-webkit-scrollbar-thumb {
  min-height: 32px;
  border-width: 2px;
}

/* Firefox only understands colours and width. Set them only there: in Chromium 121+ the standard
   properties would replace the rounded thumb above. */
@supports (-moz-appearance: none) {
  html {
    scrollbar-color: rgba(var(--ef-brown-rgb), 0.45) var(--ef-bg);
  }

  body * {
    scrollbar-width: thin;
    scrollbar-color: rgba(var(--ef-brown-rgb), 0.4) transparent;
  }
}

/* ---------- Buttons ---------- */

.ef-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--ef-font);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.ef-btn:hover {
  transform: translateY(-1px);
}

.ef-btn:focus-visible {
  outline: 3px solid rgba(var(--ef-leaf-rgb), 0.45) !important;
  outline-offset: 2px;
}

.ef-btn--primary {
  background: var(--ef-brown);
  color: var(--ef-on-brown) !important;
  box-shadow: 0 8px 20px rgba(var(--ef-brown-rgb), 0.25);
}

.ef-btn--primary:hover {
  background: var(--ef-brown-hover);
  color: var(--ef-on-brown) !important;
}

.ef-btn--leaf {
  background: var(--ef-leaf);
  color: var(--ef-on-leaf) !important;
  box-shadow: 0 8px 20px rgba(var(--ef-leaf-rgb), 0.28);
}

.ef-btn--leaf:hover {
  background: var(--ef-leaf-dark);
  color: var(--ef-on-leaf) !important;
}

.ef-btn--ghost {
  background: transparent;
  border-color: var(--ef-outline-strong);
  color: var(--ef-ink) !important;
}

.ef-btn--ghost:hover {
  border-color: var(--ef-brown);
  color: var(--ef-brown) !important;
}

.ef-btn--light {
  background: #fff;
  color: #3e2723 !important;
}

.ef-btn--light:hover {
  background: #fff8f6;
  color: #3e2723 !important;
}

.ef-btn--sm {
  min-height: 40px;
  padding: 0 18px;
  font-size: 14px;
}

.ef-btn[aria-disabled='true'] {
  opacity: 0.55;
  pointer-events: none;
  box-shadow: none;
}

/* Legacy template buttons take the brand colours. */
.thm-btn,
.thm-btn-two {
  background: var(--ef-brown) !important;
  color: var(--ef-on-brown) !important;
  border-radius: 999px !important;
  font-family: var(--ef-font) !important;
  border: none !important;
}

.thm-btn::before,
.thm-btn::after,
.thm-btn-two::before,
.thm-btn-two::after {
  background: var(--ef-brown-hover) !important;
}

.thm-btn:hover,
.thm-btn-two:hover {
  color: var(--ef-on-brown) !important;
}

/* ---------- Section heading helpers ---------- */

.ef-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--ef-leaf-tint);
  color: var(--ef-leaf-dark);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.ef-eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ef-leaf);
}

/* ---------- Layout ---------- */

.ef-container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 575px) {
  .ef-container {
    padding: 0 16px;
  }
}

/* ---------- Logo ---------- */

.ef-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ef-ink);
  text-decoration: none;
}

.ef-logo__mark {
  flex: none;
  border-radius: 22%;
  background: var(--ef-logo-tile);
  box-shadow: 0 0 0 1px rgba(var(--ef-brown-rgb), 0.12);
  object-fit: cover;
}

.ef-logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.ef-logo__name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ef-brown);
}

.ef-logo__dash {
  color: var(--ef-leaf);
}

.ef-logo__tagline {
  margin-top: 3px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ef-muted-2);
}

.ef-logo--inverted .ef-logo__name {
  color: #fff;
}

.ef-logo--inverted .ef-logo__dash {
  color: #8fd18b;
}

.ef-logo--inverted .ef-logo__tagline {
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- Header ---------- */

.ef-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--ef-header-bg);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.ef-header--scrolled {
  border-bottom-color: var(--ef-outline);
  box-shadow: 0 6px 24px rgba(var(--ef-shadow-rgb), 0.06);
}

.ef-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 76px;
}

.ef-header__nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ef-header__link {
  position: relative;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ef-muted);
  font-size: 15px;
  font-weight: 500;
  transition:
    color 0.15s ease,
    background-color 0.15s ease;
}

.ef-header__link:hover {
  color: var(--ef-ink);
  background: rgba(var(--ef-brown-rgb), 0.06);
}

.ef-header__link.is-active {
  color: var(--ef-brown);
  background: rgba(var(--ef-brown-rgb), 0.09);
  font-weight: 600;
}

.ef-header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ef-auth-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ef-auth-links--stacked {
  flex-direction: column;
  align-items: stretch;
}

.ef-auth-links--stacked .ef-btn {
  min-height: 48px;
}

.ef-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--ef-outline-strong);
  background: transparent;
  color: var(--ef-ink);
  font-size: 18px;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    transform 0.2s ease;
}

.ef-theme-toggle:hover {
  border-color: var(--ef-brown);
  color: var(--ef-brown);
}

.ef-theme-toggle:active {
  transform: scale(0.94);
}

.ef-theme-toggle__icon {
  display: inline-flex;
}

.ef-theme-toggle--labelled {
  width: auto;
  padding: 0 16px;
  font-size: 15px;
  font-weight: 600;
}

.ef-theme-toggle--block {
  width: 100%;
  min-height: 48px;
  margin-bottom: 10px;
  border-radius: 999px;
}

.ef-header__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 11px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid var(--ef-outline-strong);
  cursor: pointer;
}

.ef-header__toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--ef-contrast);
}

@media (max-width: 1099px) {
  .ef-header__nav,
  .ef-header__auth {
    display: none;
  }

  .ef-header__toggle {
    display: flex;
  }

  .ef-header__inner {
    height: 68px;
  }
}

/* ---------- Mobile drawer ---------- */

.ef-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000; /* above the chatbot launcher (9998) */
  background: rgba(30, 27, 26, 0.45);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease;
}

.ef-drawer-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.ef-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  width: min(360px, 88vw);
  padding: 18px 20px 24px;
  background: var(--ef-bg);
  box-shadow: var(--ef-shadow-lg);
  transform: translateX(100%);
  visibility: hidden;
  transition:
    transform 0.3s ease,
    visibility 0.3s ease;
}

.ef-drawer.is-open {
  transform: none;
  visibility: visible;
}

.ef-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ef-outline);
}

.ef-drawer__close {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--ef-surface-3);
  color: var(--ef-ink);
  cursor: pointer;
}

.ef-drawer__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 0;
  overflow-y: auto;
}

.ef-drawer__link {
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--ef-ink);
  font-size: 16px;
  font-weight: 500;
}

.ef-drawer__link:hover {
  background: var(--ef-surface-3);
  color: var(--ef-ink);
}

.ef-drawer__link.is-active {
  background: rgba(var(--ef-brown-rgb), 0.09);
  color: var(--ef-brown);
  font-weight: 600;
}

.ef-drawer__foot {
  margin-top: auto;
}

.ef-drawer__user {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ef-drawer__user a {
  display: block;
  padding: 10px 14px;
  color: var(--ef-ink);
}

/* ---------- Footer ---------- */

/* Footer background (Stratix-style): brown gradient with green and sun glows, a faint dot grid fading
   downwards, a thin green-to-sun line on top and a farm silhouette (images/farm-silhouette.svg) at the
   bottom. Same in both themes. */
.ef-footer {
  position: relative;
  isolation: isolate;
  margin-top: 96px;
  padding: 0 0 28px;
  background:
    radial-gradient(55% 70% at 88% 0%, rgba(67, 160, 71, 0.3) 0%, transparent 62%),
    radial-gradient(45% 60% at 0% 100%, rgba(244, 185, 66, 0.16) 0%, transparent 62%),
    linear-gradient(160deg, #4e342e 0%, #3e2723 45%, #1c1210 100%);
  color: rgba(255, 255, 255, 0.72);
}

.ef-footer::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #43a047, #8fd18b 45%, #f4b942);
}

.ef-footer__dots {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1.2px, transparent 1.2px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 75%);
  mask-image: linear-gradient(to bottom, #000, transparent 75%);
  pointer-events: none;
}

.ef-footer__farm {
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 150px;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.03));
  -webkit-mask: url('/images/farm-silhouette.svg') bottom / 100% 100% no-repeat;
  mask: url('/images/farm-silhouette.svg') bottom / 100% 100% no-repeat;
  pointer-events: none;
}

@media (min-width: 768px) {
  .ef-footer__farm {
    height: 210px;
  }
}

.ef-footer__cta {
  position: relative;
  top: -48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: -8px;
  padding: 32px 40px;
  border-radius: var(--ef-radius-lg);
  background: var(--ef-gradient);
  box-shadow: var(--ef-shadow-lg);
}

.ef-footer__cta-title {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
}

.ef-footer__cta-text {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
}

.ef-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.5fr;
  gap: 40px;
  padding-bottom: 40px;
}

.ef-footer__about p {
  max-width: 340px;
  margin: 18px 0 20px;
  font-size: 15px;
  line-height: 1.65;
}

.ef-footer__social {
  display: flex;
  gap: 10px;
}

.ef-footer__social a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: background-color 0.2s ease;
}

.ef-footer__social a:hover {
  background: var(--ef-leaf);
  color: var(--ef-on-leaf);
}

.ef-footer__col h3 {
  margin: 4px 0 18px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
}

.ef-footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ef-footer__col li + li {
  margin-top: 10px;
}

.ef-footer__col a {
  color: rgba(255, 255, 255, 0.72);
  font-size: 15px;
  transition: color 0.15s ease;
}

.ef-footer__col a:hover {
  color: #fff;
}

.ef-footer__newsletter p {
  margin: 0 0 14px;
  font-size: 15px;
}

.ef-footer__form {
  display: flex;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.ef-footer__form input {
  flex: 1;
  min-width: 0;
  padding: 0 14px;
  background: transparent;
  color: #fff;
  font-size: 15px;
}

.ef-footer__form input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.ef-footer__form button {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--ef-leaf);
  color: var(--ef-on-leaf);
  cursor: pointer;
}

.ef-footer__form button:disabled {
  opacity: 0.6;
}

.ef-footer__message {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
}

.ef-footer__message--success {
  background: rgba(var(--ef-leaf-rgb), 0.18);
  color: #c8f5c4;
}

.ef-footer__message--error {
  background: rgba(255, 84, 73, 0.16);
  color: #ffd2cd;
}

.ef-footer__company {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
}

.ef-footer__company img {
  flex-shrink: 0;
  border-radius: 8px;
}

.ef-footer__company p {
  margin: 0;
}

.ef-footer__company a {
  display: inline-flex;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.35);
}

.ef-footer__company a:hover {
  text-decoration-color: currentColor;
}

.ef-footer__bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
}

.ef-footer__bottom p {
  margin: 0;
}

@media (max-width: 991px) {
  .ef-footer__grid {
    grid-template-columns: 1fr 1fr;
  }

  .ef-footer__cta {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px;
  }
}

@media (max-width: 575px) {
  .ef-footer__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .ef-footer__cta-title {
    font-size: 22px;
  }
}

.ef-scroll-top {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 9990;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ef-surface);
  color: var(--ef-brown);
  border: 1px solid var(--ef-outline);
  box-shadow: var(--ef-shadow-md);
  cursor: pointer;
}

/* ---------- Legacy page headers (about, blog, career, contact, marketplace, legal) ---------- */

.page-title {
  background:
    radial-gradient(circle at 85% 20%, rgba(244, 185, 66, 0.2), transparent 35%),
    radial-gradient(circle at 10% 90%, rgba(var(--ef-leaf-rgb), 0.12), transparent 40%);
  border-bottom: 1px solid var(--ef-outline);
}

.page-title::before,
.page-title__shape-1 {
  display: none !important;
}

.page-title__inner {
  padding: 72px 0 64px;
}

.page-title__sub-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--ef-leaf-tint);
  color: var(--ef-leaf-dark);
  font-weight: 600;
  line-height: 1.2;
}

.page-title__title {
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--ef-brown-dark);
}

.page-title__text {
  color: var(--ef-muted);
  font-size: 17px;
  line-height: 1.6;
}

@media (max-width: 767px) {
  .page-title__inner {
    padding: 48px 0 44px;
  }

  .page-title__title {
    font-size: 34px;
  }
}

/* ---------- Pagination (blog, marketplace) ---------- */

.ef-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 48px 0 8px;
}

.ef-pagination__page,
.ef-pagination__step {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  background: var(--ef-surface);
  border: 1px solid var(--ef-outline);
  color: var(--ef-ink);
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease;
}

.ef-pagination__page:hover,
.ef-pagination__step:hover:not(:disabled) {
  border-color: var(--ef-brown);
  color: var(--ef-brown);
}

.ef-pagination__page.is-active {
  background: var(--ef-brown);
  border-color: var(--ef-brown);
  color: var(--ef-on-brown);
}

.ef-pagination__step:disabled {
  opacity: 0.4;
  cursor: default;
}

.ef-pagination__gap {
  padding: 0 4px;
  color: var(--ef-muted-2);
}

/* ---------- Cookie consent ---------- */

.ef-cookie {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 640px;
  padding: 16px 18px;
  border-radius: var(--ef-radius-md);
  background: var(--ef-surface);
  border: 1px solid var(--ef-outline);
  box-shadow: var(--ef-shadow-lg);
  animation: ef-cookie-in 0.3s ease-out;
}

.ef-cookie__icon {
  flex: none;
  width: 40px;
  height: 40px;
  padding: 9px;
  border-radius: 12px;
  background: var(--ef-warn-bg);
  color: var(--ef-warn-ink);
}

.ef-cookie__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ef-muted);
}

.ef-cookie__text a {
  color: var(--ef-brown);
  text-decoration: underline;
}

.ef-cookie__actions {
  display: flex;
  flex: none;
  gap: 8px;
}

@keyframes ef-cookie-in {
  from {
    transform: translateY(16px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .ef-cookie {
    left: 12px;
    right: 12px;
    bottom: 12px;
    flex-wrap: wrap;
  }

  .ef-cookie__icon {
    display: none;
  }

  .ef-cookie__actions {
    width: 100%;
  }

  .ef-cookie__actions .ef-btn {
    flex: 1;
  }
}

/* ---------- 404 ---------- */

.ef-not-found {
  padding: 80px 0 40px;
  background: radial-gradient(circle at 50% 30%, rgba(244, 185, 66, 0.18), transparent 45%);
}

.ef-not-found__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.ef-not-found__logo {
  border-radius: 28px;
  background: var(--ef-logo-tile);
  box-shadow: var(--ef-shadow-md);
}

.ef-not-found__code {
  margin: 28px 0 4px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--ef-leaf-dark);
}

.ef-not-found__title {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  color: var(--ef-brown-dark);
}

.ef-not-found__text {
  margin: 0 0 28px;
  font-size: 17px;
  color: var(--ef-muted);
}

.ef-not-found__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* Template section taglines & titles */
.section-title__tagline {
  color: var(--ef-leaf-dark) !important;
}

.section-title__title span {
  color: var(--ef-leaf-dark);
}

/* Blurred pink/purple glows from the template have no place in the brand. */
[class*='__shape-'][class*='zoom-fade'],
[class*='__shape-'].img-bounce {
  display: none !important;
}

/* ---------- Language switcher ---------- */

.ef-lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--ef-outline-strong);
  color: var(--ef-ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition:
    border-color 0.15s ease,
    color 0.15s ease;
}

.ef-lang:hover {
  border-color: var(--ef-brown);
  color: var(--ef-brown);
}

.ef-lang svg {
  font-size: 17px;
}

.ef-lang--labelled {
  letter-spacing: 0;
  font-weight: 600;
  font-size: 15px;
}

.ef-lang--block {
  width: 100%;
  min-height: 48px;
  margin-bottom: 10px;
  border-radius: 999px;
}

@media (max-width: 1099px) {
  .ef-header__lang {
    display: none;
  }
}

/* ---------- Card and button motion (Stratix-style) ----------
   Cards lift with a hard offset shadow on hover; buttons press in when clicked. */

.ef-card,
.bl-card:not(.bl-card--skeleton),
.ab-farm,
.ab-principle,
.ab-crop,
.ct-channel,
.dl-step,
.dl-card {
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

@media (hover: hover) {
  .ef-card:hover,
  .bl-card:not(.bl-card--skeleton):hover,
  .ab-farm:hover,
  .ab-principle:hover,
  .ab-crop:hover,
  .ct-channel:hover,
  .dl-step:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--ef-brown-rgb), 0.35);
    box-shadow:
      6px 6px 0 0 rgba(var(--ef-brown-rgb), 0.16),
      var(--ef-shadow-md);
  }
}

.ef-btn:active {
  transform: translate(1px, 1px);
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  .ef-card,
  .bl-card,
  .ab-farm,
  .ab-principle,
  .ab-crop,
  .ct-channel,
  .dl-step,
  .dl-card,
  .ef-btn {
    transition: none;
  }

  .ef-card:hover,
  .bl-card:hover,
  .ab-farm:hover,
  .ab-principle:hover,
  .ab-crop:hover,
  .ct-channel:hover,
  .dl-step:hover,
  .ef-btn:hover,
  .ef-btn:active {
    transform: none;
  }
}
