/* =========================================================
   JAXS Agri Tools: site styles
   Brand: red + white, with black for contrast (from the logo)
   ========================================================= */

:root {
  /* Colour tokens */
  --red: #E50A10;          /* brand red (logo) - white text passes AA */
  --red-hover: #C0070C;
  --red-text: #C0070C;     /* red for small text on white */
  --ink: #111111;
  --ink-soft: #1D1D1D;
  --paper: #FFFFFF;
  --tint: #F6F3F2;         /* warm off-white for alternating sections */
  --muted: #555555;
  --muted-light: #C9C9C9;  /* secondary text on dark */
  --line: #E4DEDC;

  /* Type */
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Spacing + shape */
  --radius: 18px;
  --radius-sm: 10px;
  --gap: 16px;
  --section-y: clamp(64px, 9vw, 112px);
  --container: 1200px;
  --header-h: 68px;

  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.08);
  --ease: cubic-bezier(.2,.7,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.1; text-wrap: balance; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 1000;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }

/* ---------- Icons ---------- */
.icon {
  width: 24px; height: 24px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.icon-lg { width: 32px; height: 32px; }

/* ---------- Type helpers ---------- */
.eyebrow {
  font-size: .8125rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--red-text); margin-bottom: 12px;
}
.eyebrow-light { color: rgba(255,255,255,.9); }

.section-title {
  font-size: clamp(2rem, 4vw, 2.875rem);
  font-weight: 850; font-stretch: 112%; font-style: italic; letter-spacing: -.01em;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.section-lead { font-size: 1.125rem; color: var(--muted); max-width: 56ch; }
.text-red { color: var(--red); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px;
  font: inherit; font-weight: 700; font-size: 1rem; text-decoration: none; text-align: center;
  border: 2px solid transparent; border-radius: 999px; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease);
  touch-action: manipulation;
}
.btn:active { transform: scale(.97); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-hover); }
.btn-ghost { background: rgba(0,0,0,.25); color: #fff; border-color: rgba(255,255,255,.85); backdrop-filter: blur(4px); }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-sm { min-height: 44px; padding: 8px 20px; font-size: .9375rem; }
.btn-lg { min-height: 54px; padding: 14px 30px; font-size: 1.0625rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.94); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand img { height: 38px; width: auto; }
.main-nav { display: none; margin-left: auto; gap: 4px; }
.main-nav a {
  text-decoration: none; font-weight: 600; font-size: .9688rem;
  padding: 10px 14px; border-radius: 999px; transition: background-color .2s var(--ease), color .2s var(--ease);
}
.main-nav a:hover { background: var(--tint); color: var(--red-text); }
.site-header .btn { margin-left: auto; }
@media (min-width: 900px) {
  .main-nav { display: flex; }
  .site-header .btn { margin-left: 8px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(88svh, 820px);
  display: flex; align-items: flex-end;
  color: #fff;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.05) 30%, rgba(0,0,0,.55) 65%, rgba(0,0,0,.85) 100%),
    url("/images/banner.jpg") center 40% / cover no-repeat;
}
.hero-inner { padding-top: 80px; padding-bottom: clamp(48px, 8vw, 96px); }
.hero-logo { width: clamp(220px, 34vw, 400px); height: auto; margin-bottom: 28px; filter: drop-shadow(0 4px 18px rgba(0,0,0,.45)); }
.hero-title {
  font-size: clamp(2.25rem, 5.6vw, 4.25rem);
  font-weight: 900; font-stretch: 115%; font-style: italic; text-transform: uppercase;
  letter-spacing: -.015em; line-height: 1; max-width: 18ch;
  text-shadow: 0 2px 24px rgba(0,0,0,.35);
  margin-bottom: 20px;
}
.hero-lead { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); max-width: 52ch; color: rgba(255,255,255,.92); margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Promise strip ---------- */
.promises { background: var(--red); color: #fff; }
.promise-grid { display: grid; gap: 4px; padding-top: 28px; padding-bottom: 28px; }
.promise { display: flex; gap: 16px; align-items: flex-start; padding: 12px 0; }
.promise .icon { width: 28px; height: 28px; margin-top: 2px; }
.promise h2 { font-size: 1.125rem; font-weight: 800; font-stretch: 110%; text-transform: uppercase; margin-bottom: 4px; }
.promise p { font-size: .9688rem; color: rgba(255,255,255,.92); }
@media (min-width: 800px) {
  .promise-grid { grid-template-columns: repeat(3, 1fr); gap: 32px; }
}

/* ---------- Sections ---------- */
.section { padding: var(--section-y) 0; }
.section-dark { background: var(--ink); color: #fff; }
.section-dark .section-lead { color: var(--muted-light); }
.section-dark .eyebrow { color: #FF4A4F; }
.section-tint { background: var(--tint); }

/* ---------- Bento grid (products) ---------- */
.bento {
  display: grid; gap: var(--gap);
  grid-template-columns: 1fr;
}
@media (max-width: 639px) {
  .product-media { flex: none; aspect-ratio: 16 / 10; }
  .tile-intro, .tile-cta { min-height: 240px; }
}
@media (min-width: 640px) {
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 340px; grid-auto-flow: dense; }
  .tile-wide, .tile-intro { grid-column: span 2; }
  .tile-tall { grid-row: span 2; }
}
@media (min-width: 1000px) {
  .bento { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 330px; }
}

.tile {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  padding: 28px;
  display: flex; flex-direction: column; justify-content: flex-end;
  text-decoration: none;
}
.tile-red { background: var(--red); color: #fff; }
.tile-dark { background: var(--ink); color: #fff; }
.tile-light { background: var(--tint); color: var(--ink); }

.tile-intro { justify-content: space-between; }
.tile-intro p:not(.eyebrow) { color: rgba(255,255,255,.92); max-width: 40ch; }
.tile-heading {
  font-size: clamp(1.75rem, 3.2vw, 2.5rem); font-weight: 900; font-stretch: 115%; font-style: italic;
  text-transform: uppercase; letter-spacing: -.01em; line-height: 1.02;
}
.tile-heading-sm { font-size: 1.375rem; font-weight: 800; font-stretch: 110%; text-transform: uppercase; margin: 14px 0 8px; }

.tile-cta { justify-content: flex-start; cursor: pointer; transition: background-color .25s var(--ease); }
.tile-cta .icon { color: var(--red); }
.tile-cta p { color: var(--muted-light); }
.tile-cta:hover { background: var(--ink-soft); }
.tile-link { margin-top: auto; font-weight: 700; color: #fff; display: inline-flex; gap: 6px; }

/* Product tile: photo on top, solid text panel below (side by side when wide) */
.product {
  padding: 0; justify-content: flex-start;
  color: #fff; background: var(--ink); cursor: pointer;
}
.product-media { position: relative; flex: 1 1 auto; min-height: 140px; overflow: hidden; background: #000; }
.product-media.is-light { background: #fff; }
.product-media img {
  position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); object-fit: contain;
  transition: transform .6s var(--ease);
}
.product-body { position: relative; padding: 18px 22px 20px; background: var(--ink); }
.product h3 { font-size: 1.25rem; font-weight: 800; font-stretch: 110%; text-transform: uppercase; margin-bottom: 6px; }
.product p { font-size: .9375rem; line-height: 1.45; color: var(--muted-light); margin-bottom: 10px; max-width: 46ch; }
@media (min-width: 640px) {
  .product.tile-wide { flex-direction: row; }
  .product.tile-wide .product-media { flex: 1 1 60%; min-height: 0; }
  .product.tile-wide .product-body { flex: 0 0 40%; display: flex; flex-direction: column; justify-content: flex-end; padding: 24px; }
  .product.tile-tall .product-body { padding: 24px; }
}
.product .tile-link { color: #fff; }
.product .tile-link span { transition: transform .2s var(--ease); display: inline-block; }
.product::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; z-index: 3;
  background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.product:hover .product-media img, .product:focus-visible .product-media img { transform: scale(1.04); }
.product:hover::after, .product:focus-visible::after { transform: scaleX(1); }
.product:hover .tile-link span { transform: translateX(4px); }

.bento-status { grid-column: 1 / -1; padding: 24px; border-radius: var(--radius); background: var(--tint); }

/* ---------- Beat a quote ---------- */
.beat { display: grid; gap: 48px; }
.beat-head .section-lead { margin-bottom: 28px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--gap); }
.step {
  background: var(--ink-soft); border: 1px solid #2c2c2c; border-radius: var(--radius); padding: 28px;
}
.step-num { display: block; font-size: 2.5rem; font-weight: 900; font-style: italic; font-stretch: 115%; color: var(--red); line-height: 1; margin-bottom: 14px; }
.step h3 { font-size: 1.25rem; font-weight: 800; text-transform: uppercase; font-stretch: 110%; margin-bottom: 8px; }
.step p { color: var(--muted-light); font-size: .9688rem; }
.fine-print { font-size: .875rem; color: var(--muted-light); border-top: 1px solid #2c2c2c; padding-top: 20px; margin: 0; }
@media (min-width: 800px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1000px) {
  .beat { grid-template-columns: 5fr 7fr; align-items: center; column-gap: 56px; }
  .fine-print { grid-column: 1 / -1; }
  .steps { grid-template-columns: 1fr; }
  .step { display: grid; grid-template-columns: 72px 1fr; column-gap: 12px; padding: 24px 28px; }
  .step-num { grid-row: span 2; margin: 0; }
}

/* ---------- About ---------- */
.about { display: grid; gap: 40px; }
.about-text p:not(.eyebrow) { font-size: 1.125rem; color: #333; max-width: 58ch; }
.about-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
.stat {
  border-radius: var(--radius); padding: 24px; min-height: 160px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 12px;
}
.stat-red { background: var(--red); color: #fff; }
.stat-dark { background: var(--ink); color: #fff; }
.stat-light { background: var(--tint); }
.stat-big { font-size: clamp(2.5rem, 5vw, 3.5rem); font-weight: 900; font-style: italic; font-stretch: 115%; line-height: 1; }
.stat-word { font-size: clamp(1.5rem, 3vw, 2rem); }
.stat-label { font-weight: 600; font-size: .9375rem; line-height: 1.35; }
@media (min-width: 1000px) {
  .about { grid-template-columns: 1fr 1fr; align-items: center; gap: 64px; }
}

/* ---------- Quote form ---------- */
.quote { display: grid; gap: 40px; }
@media (min-width: 1000px) {
  .quote { grid-template-columns: 4fr 7fr; gap: 56px; align-items: start; }
  .quote-side { position: sticky; top: calc(var(--header-h) + 32px); }
}
.callout {
  display: flex; gap: 14px; align-items: flex-start; margin-top: 28px;
  background: #fff; border-left: 5px solid var(--red); border-radius: var(--radius-sm); padding: 18px 20px;
  font-size: .9688rem;
}
.callout .icon { color: var(--red); margin-top: 2px; }

.quote-form {
  background: #fff; border-radius: var(--radius); padding: clamp(20px, 4vw, 40px);
  box-shadow: var(--shadow);
}
fieldset { border: 0; padding: 0; margin: 0 0 28px; min-width: 0; }
legend {
  font-weight: 800; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; font-stretch: 110%;
  padding: 0; margin-bottom: 16px; color: var(--ink);
}
.field-row { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field { margin-bottom: 18px; min-width: 0; }
.field label { display: block; font-weight: 600; font-size: .9375rem; margin-bottom: 6px; }
.req { color: var(--red-text); }
.opt { font-weight: 400; color: var(--muted); }
input[type="text"], input[type="tel"], input[type="email"], textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff; border: 1.5px solid #CFC8C6; border-radius: var(--radius-sm);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
textarea { resize: vertical; min-height: 96px; }
input::placeholder, textarea::placeholder { color: #8A8A8A; }
input:hover, textarea:hover { border-color: #9E9592; }
input:focus, textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(229,10,16,.18); }
.field.has-error input, .field.has-error textarea { border-color: var(--red); }
.field-error { display: flex; gap: 6px; align-items: center; color: var(--red-text); font-size: .875rem; font-weight: 600; margin: 6px 0 0; }
.help { font-size: .875rem; color: var(--muted); margin: 6px 0 0; }
.help.center { text-align: center; margin-top: 12px; }

.check {
  display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
  background: var(--tint); border-radius: var(--radius-sm); padding: 16px; font-size: .9688rem;
}
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--red); flex: none; cursor: pointer; }

.form-error-summary {
  border: 2px solid var(--red); border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 24px;
  background: #FFF4F4; color: var(--ink);
}
.form-error-summary ul { margin: 6px 0 0; padding-left: 20px; }
.form-error-summary a { color: var(--red-text); font-weight: 600; }

.form-success {
  margin-top: 24px; border-radius: var(--radius-sm); padding: 20px;
  background: #F1FAF3; border: 2px solid #2E8540;
}
.form-success h3 { font-size: 1.125rem; margin-bottom: 8px; }
.form-success a { color: var(--red-text); font-weight: 600; }
.beat-reminder { background: #fff; border-radius: 8px; padding: 10px 12px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: var(--gap); margin-top: 12px; }
@media (min-width: 640px) { .contact-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .contact-grid { grid-template-columns: repeat(4, 1fr); } }
.contact-card {
  display: flex; flex-direction: column; gap: 6px; min-height: 170px; justify-content: flex-end;
  border-radius: var(--radius); padding: 24px; text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.contact-card .icon { margin-bottom: auto; }
a.contact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.contact-red { background: var(--red); color: #fff; }
.contact-dark { background: var(--ink); color: #fff; }
.contact-dark .icon { color: var(--red); }
.contact-light { background: var(--tint); }
.contact-light .icon { color: var(--red); }
.contact-label { font-size: .8125rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.contact-value { font-size: 1.25rem; font-weight: 800; overflow-wrap: anywhere; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--muted-light); padding: 56px 0 96px; }
.footer-inner { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.footer-logo { width: 180px; height: auto; margin-bottom: 8px; }
.footer-small { font-size: .875rem; }
.site-footer a { color: #fff; }

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--red); color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.25);
  transition: transform .2s var(--ease), background-color .2s var(--ease);
}
.wa-float .icon { width: 26px; height: 26px; }
.wa-float:hover { transform: scale(1.06); background: var(--red-hover); }
