/* Soil profile world. Colors are Munsell soil notations, dry and moist. */
:root {
  --ground: #e9e8e4;      /* N 9/ */
  --card: #f4f3f0;
  --ink: #2a2420;         /* 10YR 2/1 */
  --ink-2: #57504a;
  --line: #c9c6bf;

  --a: #4a3a2c;   --a-wet: #33271d;    /* 10YR 3/2 */
  --ab: #6b4e38;  --ab-wet: #4d3626;   /* 7.5YR 4/3 */
  --b: #934a2e;   --b-wet: #6e3420;    /* 2.5YR 4/6 latossolo */
  --bc: #9a5a33;  --bc-wet: #743f22;   /* 5YR 5/6 */
  --c: #a98a62;                        /* 10YR 6/4 */
  --r: #5e5d5a;                        /* N 4/ rock */
  --on-dark: #f2ede6;
  --on-dark-2: #d6cbbd;

  --ok: #3f6b3a;
  --water: #2c5f7a;
  --alarm: #e0a11b;

  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --mono: "Atkinson Hyperlegible Mono", ui-monospace, "Cascadia Mono", monospace;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
button, a, [role="button"], input[type=range] { touch-action: manipulation; }
button, .btn, .nav-login, .chips-nav a { user-select: none; -webkit-user-select: none; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 18px/1.6 var(--body); }
::selection { background: var(--b); color: var(--on-dark); }
:focus-visible { outline: 3px solid var(--water); outline-offset: 3px; border-radius: 2px; }
.band :focus-visible, footer :focus-visible { outline-color: var(--on-dark); }

h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.5rem, 6.2vw, 5.25rem); line-height: .98; font-variation-settings: "opsz" 96; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.08; margin-bottom: 1rem; }
h3 { font-size: 1.15rem; line-height: 1.25; letter-spacing: -0.01em; margin-bottom: .35rem; }
p { margin: 0 0 1rem; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
td, .num, .kpa { font-variant-numeric: tabular-nums; }

.wrap { max-width: 1200px; margin: 0 auto; padding-inline: 24px; }
.prose { max-width: 40rem; }
.lead-ink { font-size: 1.15rem; color: var(--ink-2); }

/* Nav */
.chips-nav { position: relative; z-index: 5; background: var(--ground); border-bottom: 1px solid var(--line); }
.chips-nav .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 64px; }
.brand { font: 700 1rem/1.2 var(--display); text-decoration: none; margin-right: auto; white-space: nowrap; }
.chips-nav ol { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; }
.chips-nav a {
  display: flex; align-items: center; gap: .5rem; padding: .55rem .75rem; border-radius: 4px;
  font-size: .92rem; text-decoration: none; white-space: nowrap; color: var(--ink-2);
  transition: background-color 150ms ease, color 150ms ease;
}
.chips-nav a i { width: 12px; height: 12px; border-radius: 2px; flex: none; }
.chips-nav a[aria-current] { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
@media (hover: hover) and (pointer: fine) { .chips-nav a:hover { background: var(--card); color: var(--ink); } }
.h-a { background: var(--a); } .h-ab { background: var(--ab); } .h-bw { background: var(--b); } .h-bc { background: var(--bc); } .h-c { background: var(--c); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .6rem; min-height: 48px; padding: .75rem 1.25rem;
  border-radius: 4px; border: 0; font: 700 1rem/1 var(--body); text-decoration: none; cursor: pointer;
  background: var(--ink); color: var(--on-dark);
  transition: transform 160ms var(--ease-out), background-color 150ms ease;
}
.btn:active { transform: scale(0.97); }
.btn svg, .arrow { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) and (pointer: fine) { .btn:hover { background: var(--b); } }

/* ---------- Story (index): pinned scene, scrolling steps ---------- */
.story { position: relative; }
.scene { position: sticky; top: 0; height: 100svh; overflow: hidden; background: #dfe2df; }
.scene svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.plants { color: #4f7d3f; transition: color 300ms ease; }
.drops circle { fill: var(--water); }
.drops.on circle { animation: drip 700ms linear infinite; }
.drops.on circle:nth-child(even) { animation-delay: 350ms; }
@keyframes drip { from { transform: translateY(0); opacity: 1; } to { transform: translateY(26px); opacity: 0; } }
.lamp { fill: #6d6a64; }
.lamp.on { fill: var(--alarm); animation: blink 900ms steps(2, jump-none) infinite; }
@keyframes blink { 50% { fill: #6d6a64; } }
.sway { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 4s var(--ease-in-out) infinite alternate; }
@keyframes sway { from { transform: rotate(-2deg); } to { transform: rotate(2deg); } }
.depth path { stroke: rgb(242 237 230 / .2); stroke-dasharray: 4 8; }
.depth text { fill: rgb(242 237 230 / .6); font: 500 15px var(--mono); text-anchor: end; }
.ripple circle { fill: none; stroke: #7fd36b; stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.ripple.on circle { animation: ring 2.4s var(--ease-out) infinite; }
.ripple.on circle:nth-child(2) { animation-delay: .8s; }
.ripple.on circle:nth-child(3) { animation-delay: 1.6s; }
@keyframes ring { from { transform: scale(1); opacity: .7; } to { transform: scale(4.5); opacity: 0; } }
.led { fill: #6d6a64; transition: fill 200ms ease; }
.led.on { fill: #7fd36b; }

.hud {
  position: absolute; right: clamp(16px, 4vw, 56px); bottom: clamp(16px, 5vh, 48px); width: 330px;
  background: rgb(244 243 240 / .96); border-radius: 6px; padding: 1rem 1.1rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / .18), 0 12px 32px rgb(20 10 0 / .22);
  opacity: 0; transform: translateY(12px); transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out);
}
.hud.on { opacity: 1; transform: none; }
.hud-top { display: flex; justify-content: space-between; align-items: baseline; color: var(--ink-2); font-size: .85rem; }
.hud-read { display: flex; align-items: baseline; gap: .35rem; margin: .2rem 0; }
.hud-read .kpa { font: 500 2.4rem/1 var(--mono); letter-spacing: -.02em; }
.status { font-weight: 700; font-size: .92rem; min-height: 2.6em; display: flex; align-items: flex-start; gap: .45rem; margin: 0; }
.status i { flex: none; width: 10px; height: 10px; margin-top: .4em; border-radius: 50%; background: var(--ok); transition: background-color 200ms ease; }
.status[data-s="seco"] i { background: var(--b); }
.status[data-s="agua"] i { background: var(--water); }
.status[data-s="falha"] i { background: var(--alarm); }
.gauge { position: relative; height: 14px; margin: .7rem 0 .2rem; border-radius: 3px; background: linear-gradient(90deg, #c9d7de, #e7e2d6 35%, #e3cfb6 70%, #d7a88a); overflow: hidden; }
.gauge .band { position: absolute; inset: 0 auto 0 0; width: 100px; transform-origin: left; background: rgb(63 107 58 / .45); opacity: 0; transition: opacity 300ms ease; }
.gauge .band.on { opacity: 1; }
.gauge .needle { position: absolute; top: -3px; bottom: -3px; left: 0; width: 3px; margin-left: -1px; background: var(--ink); border-radius: 2px; }
.gauge-ticks { position: relative; height: 1.1rem; font: 500 .68rem var(--mono); color: var(--ink-2); }
.gauge-ticks span { position: absolute; top: 0; transform: translateX(-50%); }
.gauge-ticks span:first-child { transform: none; }
.gauge-ticks span:last-child { transform: translateX(-100%); }
.meters { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: .8rem; padding-top: .7rem; border-top: 1px solid var(--line); }
.meters div { font-size: .8rem; color: var(--ink-2); transition: opacity 300ms ease; }
.meters b { display: block; font: 500 1.15rem var(--mono); color: var(--ink); }
.meters .off { opacity: .8; }

.steps { position: relative; z-index: 2; margin-top: -100svh; pointer-events: none; }
/* Steps are scroll spacers only: 80svh per phase, the last one longer so the result holds. */
.step { height: 80svh; }
.step:last-child { height: 120svh; }
.cards { position: absolute; left: clamp(16px, 6vw, 96px); top: 14svh; width: min(25rem, calc(100% - 32px)); z-index: 2; }
.cards .result { width: min(34rem, calc(100vw - 32px)); }
.note-card {
  position: absolute; top: 0; left: 0; width: 100%; visibility: hidden;
  pointer-events: auto; max-width: 25rem; background: var(--ground); border-radius: 6px; padding: 1.4rem 1.5rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / .14), 0 14px 36px rgb(20 10 0 / .18);
  /* out fast, in after it: two texts never overlap */
  opacity: 0; transform: translateY(12px); transition: opacity 150ms ease, transform 150ms ease, visibility 0s 150ms;
}
.note-card.in { opacity: 1; transform: none; visibility: visible; transition: opacity 300ms var(--ease-out) 150ms, transform 300ms var(--ease-out) 150ms, visibility 0s 150ms; }
.note-card h2 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); }
.note-card p:last-child { margin: 0; }
.note-card .src { margin-top: .5rem; }
.result { pointer-events: auto; max-width: 34rem; background: var(--ink); color: var(--on-dark); }
.result .big { font: 700 clamp(3rem, 7vw, 5rem)/.95 var(--display); letter-spacing: -0.03em; color: #f0b27f; display: block; margin-bottom: .5rem; }
.result .src { color: var(--on-dark-2); }
.result .btn { background: var(--on-dark); color: var(--ink); margin-top: .5rem; }
@media (hover: hover) and (pointer: fine) { .result .btn:hover { background: #fff; } }
.result .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1rem; }

/* ---------- Page header bands ---------- */
.band { position: relative; color: var(--on-dark); padding: clamp(3.5rem, 11vh, 7rem) 0 clamp(3.5rem, 10vh, 6rem); overflow: hidden; }
.band h1 { max-width: 15ch; }
.band .lead { font-size: 1.2rem; color: var(--on-dark-2); max-width: 38rem; margin-top: 1.5rem; }
.band.h-c { color: var(--ink); } .band.h-c .lead { color: #33291f; }
.band.h-c :focus-visible { outline-color: var(--ink); }
.band h1, .band .lead { animation: rise 700ms var(--ease-out) both; }
.band .lead { animation-delay: 90ms; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* ---------- Content ---------- */
main section { padding: clamp(4rem, 10vh, 6.5rem) 0; }
main section + section { border-top: 1px solid var(--line); }

.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: 2rem 4rem; align-items: start; }
.split > .side { position: sticky; top: 2rem; }

.samples { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem 3rem; align-items: end; }
.sample .num { display: block; font: 700 clamp(2.6rem, 4.5vw, 3.6rem)/1 var(--display); letter-spacing: -0.03em; margin-bottom: .6rem; color: var(--b); }
.sample:first-child .num { font-size: clamp(4rem, 9vw, 7.5rem); }
.src { display: block; margin-top: .75rem; color: var(--ink-2); font-size: .8rem; }

.pull { font: 700 clamp(1.6rem, 3.4vw, 2.6rem)/1.12 var(--display); letter-spacing: -0.02em; max-width: 22ch; margin: 0; color: var(--b); }

.rows { margin: 0; }
.rows > div { display: grid; grid-template-columns: 14rem 1fr; gap: .25rem 2rem; padding: 1.15rem 0; border-top: 1px solid var(--line); }
.split .rows > div { grid-template-columns: 1fr; }
.rows dt { font: 700 1.1rem/1.35 var(--display); }
.rows dd { margin: 0; color: var(--ink-2); max-width: 42rem; }

.table-wrap { overflow-x: auto; margin-top: 1.5rem; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th { text-align: left; font-size: .78rem; font-weight: 700; color: var(--ink-2); border-bottom: 2px solid var(--ink); padding: .65rem .6rem; vertical-align: bottom; }
td { border-bottom: 1px solid var(--line); padding: .7rem .6rem; vertical-align: top; }
table.nums td { white-space: nowrap; }
td.yes { color: var(--ok); font-weight: 700; }
td.no { color: var(--b); }
.us { background: var(--card); }
th.us { color: var(--ink); }

/* Personas */
.sheets { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem 2.5rem; margin-top: 2rem; align-items: start; }
.sheet:nth-child(2) { margin-top: 5rem; }
.sheet { background: var(--card); border-radius: 4px; padding: 1.6rem; box-shadow: 0 1px 2px rgb(0 0 0 / .12); }
.sheet .who { color: var(--ink-2); font-size: .9rem; }
.sheet dl { margin: 1rem 0 1.25rem; display: grid; grid-template-columns: 6.5rem 1fr; border-top: 1px solid var(--line); }
.sheet dt, .sheet dd { margin: 0; padding: .55rem 0; border-bottom: 1px solid var(--line); }
.sheet dt { font-size: .85rem; font-weight: 700; color: var(--ink-2); }
.sheet blockquote { margin: 0; font: 700 1.2rem/1.3 var(--display); color: var(--b); }

/* Architecture drawing */
.drawing { margin: 2rem 0 0; background: var(--card); border-radius: 4px; padding: 1.5rem; box-shadow: 0 1px 2px rgb(0 0 0 / .12); overflow-x: auto; }
.drawing svg { width: 100%; min-width: 760px; height: auto; display: block; }
.drawing text { font-family: var(--body); fill: var(--ink); }
.drawing .t-2 { fill: var(--ink-2); }
.flowing { stroke-dasharray: 6 6; animation: flow 900ms linear infinite; }
@keyframes flow { to { stroke-dashoffset: -12; } }

/* Results bars */
.bars { margin-top: 2rem; display: grid; gap: 1.4rem; }
.bar-row { display: grid; grid-template-columns: 7rem 1fr; gap: .25rem 1.25rem; align-items: center; }
.bar-row h3 { margin: 0; }
.bar-pair { display: grid; gap: 5px; }
.bar { height: 26px; border-radius: 2px; display: flex; align-items: center; justify-content: flex-end; padding-right: .55rem; font: 500 .75rem var(--mono); color: var(--on-dark); min-width: 5rem; }
.bar.m { background: var(--ab); }
.bar.s { background: var(--b); }
.legend { display: flex; gap: 1.25rem; margin-top: 1.25rem; color: var(--ink-2); font-size: .85rem; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: .4rem; vertical-align: -1px; }

.note { background: var(--card); border-radius: 4px; padding: 1.25rem 1.4rem; }
.note p:last-child { margin: 0; }

.steps-list { list-style: none; padding: 0; margin: 0; }
.steps-list li { display: grid; grid-template-columns: 8rem 1fr; gap: .25rem 2rem; padding: 1.15rem 0; border-top: 1px solid var(--line); }
.steps-list .when { font-weight: 700; color: var(--b); }

/* Footer */
footer { background: var(--r); color: var(--on-dark); padding: 3rem 0 2.5rem; }
footer .foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1.5rem; }
footer .foot-grid + .foot-bottom { border-top: 1px solid rgb(242 237 230 / .15); margin-top: 2.5rem; padding-top: 1.5rem; }
footer .next { font: 700 clamp(1.4rem, 2.6vw, 2rem)/1.2 var(--display); text-decoration: none; }
footer .next svg { width: 24px; height: 24px; vertical-align: -.12em; margin-left: .3rem; transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { footer .next:hover svg { transform: translateX(4px); } }
footer small { color: #e6ddd1; font-size: .8rem; display: block; }
footer .next-label { color: #e6ddd1; font-weight: 400; }

/* Scroll reveal, only when JS runs */
.js .bars .bar { clip-path: inset(0 100% 0 0); transition: clip-path 1100ms var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms); }
.js .bars.in .bar { clip-path: inset(0 0 0 0); }

@media (max-width: 900px) {
  .split, .samples, .sheets { grid-template-columns: minmax(0, 1fr); }
  .split > .side { position: static; }
  .sheet:nth-child(2) { margin-top: 0; }
  .hud { left: 16px; right: 16px; top: 76px; bottom: auto; width: auto; padding: .7rem .9rem; }
  .hud-read .kpa { font-size: 1.8rem; }
  .status { min-height: 0; }
  .cards { top: auto; bottom: 16px; left: 16px; right: 16px; width: auto; }
  .cards .result { width: auto; }
  .note-card { top: auto; bottom: 0; max-width: none; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .chips-nav .brand { font-size: 0; gap: 0; }
  .wrap { padding-inline: 16px; }
  .rows > div, .steps-list li, .bar-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .note-card { transform: none; }
  .band h1, .band .lead { animation-name: fade; }
  .drops.on circle, .flowing, .sway, .ripple.on circle { animation: none; }
  .lamp.on { animation: none; }
  .js .bars .bar { transition-duration: 0ms; }
}
@keyframes fade { from { opacity: 0; } }

/* ---------- Brand-scale layer: photo hero, ticker, crop gallery, photo bands ---------- */
.logo { display: inline-flex; align-items: center; gap: .55rem; }
.logo svg { width: 26px; height: 26px; flex: none; }

.hero { position: relative; isolation: isolate; background: var(--a); min-height: calc(100svh - 65px); display: flex; flex-direction: column; justify-content: flex-end; color: var(--on-dark); overflow: hidden; }
.bg { position: absolute; inset: -12% 0 0; z-index: -2; will-change: transform; }
.bg img { width: 100%; height: 100%; object-fit: cover; display: block; animation: settle 2200ms var(--ease-out) both; }
@keyframes settle { from { transform: scale(1.14); } }
.hero::after, .band.photo::after, .cta::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero::after { background: linear-gradient(180deg, rgb(18 14 10 / .15) 0%, rgb(18 14 10 / .35) 40%, rgb(18 14 10 / .88) 100%); }
.hero-inner { padding-top: 18vh; padding-bottom: 2.5rem; }
.hero h1 { max-width: 13ch; font-size: clamp(2.8rem, 7.4vw, 6.4rem); }
.hero .lead { font-size: clamp(1.1rem, 1.5vw, 1.3rem); color: var(--on-dark-2); max-width: 36rem; margin-top: 1.5rem; animation: rise 700ms 500ms var(--ease-out) both; }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; margin-top: 2rem; animation: rise 700ms 620ms var(--ease-out) both; }
.btn.light { background: var(--on-dark); color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .btn.light:hover { background: #fff; } }
.link-light { color: var(--on-dark); font-weight: 700; display: inline-flex; align-items: center; gap: .45rem; }
.hero-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid rgb(242 237 230 / .25); padding-top: 1.25rem; padding-bottom: 1.75rem; gap: 1.5rem; animation: rise 700ms 760ms var(--ease-out) both; }
.hero-facts b { display: block; font: 700 1.05rem/1.3 var(--display); }
.hero-facts span { color: var(--on-dark-2); font-size: .9rem; }
.w { display: inline-block; animation: rise 800ms var(--ease-out) both; animation-delay: calc(var(--i) * 45ms + 120ms); }

.ticker { overflow: hidden; background: var(--ok); color: #eef3e6; border-block: 1px solid rgb(0 0 0 / .12); }
.ticker .track { display: flex; width: max-content; animation: marquee 48s linear infinite; }
.ticker span { display: inline-flex; align-items: center; gap: .9rem; padding: .95rem 0 .95rem 1.75rem; font: 700 1rem var(--display); white-space: nowrap; }
.ticker span svg { width: 16px; height: 16px; fill: #b9d48f; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (hover: hover) and (pointer: fine) { .ticker:hover .track { animation-play-state: paused; } }

.crops-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; margin-top: 2.5rem; }
.crop-card { position: relative; border-radius: 6px; overflow: hidden; background: var(--a); color: var(--on-dark); aspect-ratio: 3 / 4; display: flex; flex-direction: column; justify-content: flex-end; isolation: isolate; text-decoration: none; }
.crop-card:nth-child(even) { transform: translateY(2.5rem); }
.crop-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 700ms var(--ease-out); }
.crop-card::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 35%, rgb(18 14 10 / .85)); }
.crop-card div { padding: 1.1rem 1.15rem 1.2rem; }
.crop-card h3 { font-size: 1.5rem; }
.crop-card .kpa { font: 500 1rem var(--mono); color: #cfe3b0; }
.crop-card p { margin: .2rem 0 0; color: var(--on-dark-2); font-size: .9rem; }
@media (hover: hover) and (pointer: fine) { .crop-card:hover img { transform: scale(1.05); } }

.band.photo { isolation: isolate; background: var(--a); color: var(--on-dark); min-height: 62svh; display: flex; align-items: flex-end; }
.band.photo::after { background: linear-gradient(90deg, rgb(18 14 10 / .86) 0%, rgb(18 14 10 / .55) 55%, rgb(18 14 10 / .25) 100%); }
.band.photo .lead { color: var(--on-dark-2); }
.band.photo h1 { font-size: clamp(2.4rem, 5.6vw, 4.6rem); }

.cta { position: relative; isolation: isolate; background: var(--a); color: var(--on-dark); padding: clamp(5rem, 16vh, 9rem) 0; overflow: hidden; }
.cta::after { background: linear-gradient(90deg, rgb(18 14 10 / .85), rgb(18 14 10 / .4)); }
.cta h2 { font-size: clamp(2rem, 4.6vw, 3.6rem); max-width: 16ch; }
.cta p { color: var(--on-dark-2); max-width: 34rem; font-size: 1.15rem; }

@media (max-width: 900px) {
  .hero-facts { grid-template-columns: 1fr; gap: .75rem; }
  .crops-gallery { grid-template-columns: 1fr 1fr; }
  .crop-card:nth-child(even) { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .bg img, .w, .hero .lead, .hero .actions, .hero-facts { animation-name: fade; }
  .ticker .track { animation: none; }
  .ticker { overflow-x: auto; }
  .crop-card img { transition: none; }
}

/* ---------- Nav login, contact footer, admin login page ---------- */
.nav-login { margin-left: .5rem; padding: .5rem 1rem; border-radius: 4px; border: 1px solid var(--ink); font: 700 .9rem var(--body); color: var(--ink); text-decoration: none; white-space: nowrap; transition: background-color 150ms ease, color 150ms ease, transform 160ms var(--ease-out); }
.nav-login:active { transform: scale(0.97); }
.nav-login[aria-current] { background: var(--ink); color: var(--on-dark); }
@media (hover: hover) and (pointer: fine) { .nav-login:hover { background: var(--ink); color: var(--on-dark); } }

.contact { background: var(--ink); color: var(--on-dark); padding: clamp(3.5rem, 9vh, 6rem) 0; }
.contact .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2rem 4rem; align-items: center; }
.contact h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); max-width: 18ch; }
.contact p { color: var(--on-dark-2); max-width: 34rem; margin: 0; }
.contact-actions { display: grid; gap: .75rem; }
.contact-actions .btn { justify-content: flex-start; min-width: 16rem; }
.btn.wa { background: #25d366; color: #0b2e18; }
@media (hover: hover) and (pointer: fine) { .btn.wa:hover { background: #3be37a; } }
.btn.soon { background: transparent; color: var(--on-dark-2); box-shadow: inset 0 0 0 1px rgb(242 237 230 / .3); cursor: default; }
.btn.soon:active { transform: none; }
.btn .ico { width: 20px; height: 20px; fill: currentColor; stroke: none; }
footer .foot-nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: 0 0 .5rem; padding: 0; list-style: none; }
footer .foot-nav a { color: var(--on-dark); text-decoration: none; font-size: .9rem; }
footer .foot-nav a:hover { text-decoration: underline; }

.login-page { min-height: 100svh; display: flex; flex-direction: column; }
.login-main { position: relative; isolation: isolate; flex: 1; display: grid; place-items: center; padding: clamp(2rem, 8vh, 5rem) 16px; background: var(--a); overflow: hidden; }
.login-main::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgb(18 14 10 / .62); }
.login-card { width: min(100%, 30rem); background: var(--ground); border-radius: 8px; padding: 2rem; box-shadow: 0 2px 4px rgb(0 0 0 / .2), 0 24px 60px rgb(0 0 0 / .35); animation: rise 600ms var(--ease-out) both; }
.login-card h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin: 0; }
.wip { display: inline-flex; align-items: center; gap: .5rem; margin: 0; padding: .4rem .7rem; border-radius: 4px; background: #f4e6c3; color: #5a4300; font: 700 .85rem var(--body); }
.wip svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.login-card form { display: grid; gap: 1rem; margin-top: 1.5rem; }
.login-card label { display: grid; gap: .35rem; font: 700 .85rem var(--body); color: var(--ink-2); }
.login-card input { font: 1rem var(--body); padding: .75rem .85rem; border: 1px solid var(--line); border-radius: 4px; background: var(--card); color: var(--ink); }
.login-card input:disabled { opacity: .6; cursor: not-allowed; }
.form-note { margin: 0; min-height: 1.5em; color: var(--b); font-weight: 700; font-size: .95rem; }
.link-back { display: inline-flex; align-items: center; gap: .45rem; margin-top: 1.25rem; font-weight: 700; font-size: .95rem; }

@media (max-width: 760px) { .contact .wrap { grid-template-columns: 1fr; } .nav-login { padding: .45rem .75rem; } }

/* ---------- Footer grid, contact form, dashboard ---------- */
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem 3rem; }
.foot-grid p { color: #e6ddd1; font-size: .95rem; margin: .75rem 0 0; max-width: 28rem; }
.foot-h { font: 700 .8rem/1 var(--body); text-transform: uppercase; letter-spacing: .06em; color: #e6ddd1; margin: 0 0 .9rem !important; }
.foot-nav { display: grid; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.foot-nav a { color: var(--on-dark); text-decoration: none; font-size: .95rem; }
.foot-nav a:hover { text-decoration: underline; }
.foot-nav a.soon { color: #e6ddd1; opacity: .75; text-decoration: none; cursor: default; }
.btn.soon { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); cursor: default; }
.btn.soon:active { transform: none; }
.contact-form { display: grid; gap: 1rem; background: var(--card); border-radius: 8px; padding: 2rem; box-shadow: 0 1px 2px rgb(0 0 0 / .12); }
.contact-form h2 { margin: 0; }
.contact-form label { display: grid; gap: .35rem; font: 700 .85rem var(--body); color: var(--ink-2); }
.contact-form input, .contact-form textarea { font: 1rem var(--body); padding: .75rem .85rem; border: 1px solid var(--line); border-radius: 4px; background: var(--ground); color: var(--ink); resize: vertical; }

.dash { padding-bottom: 4rem; }
.dash-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem; margin: 1.25rem 0 2rem; }
.dash-head h1 { font-size: clamp(2rem, 4vw, 3rem); }
.dash-head p { margin: 0; }
.dash-head .mono { color: var(--ink-2); }
.dash-head .mono::first-letter { text-transform: uppercase; }
.dash > section { padding: 0; border-top: 0; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.tile { background: var(--card); border-radius: 6px; padding: 1.1rem 1.2rem 1rem; box-shadow: 0 1px 2px rgb(0 0 0 / .12); }
.tile header { display: flex; align-items: center; gap: .5rem; font: 700 .9rem var(--body); color: var(--ink-2); }
.tile header i { width: 12px; height: 12px; border-radius: 2px; }
.tile .num { display: block; font: 700 2.4rem/1.1 var(--display); letter-spacing: -0.03em; margin: .5rem 0 .35rem; }
.tile .num small { font: 500 1rem var(--mono); letter-spacing: 0; color: var(--ink-2); }
.tile p { margin: 0; font-weight: 700; font-size: .92rem; }
.tile .src { margin-top: .4rem; }
.state-ok { color: var(--ok); } .state-wet { color: #1b6d9a; } .state-bad { color: #b3321f; }
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 1.25rem; }
.chart { margin: 0; background: var(--card); border-radius: 6px; padding: 1.25rem 1.25rem 1rem; box-shadow: 0 1px 2px rgb(0 0 0 / .12); }
.chart h2 { font-size: 1.25rem; margin-bottom: .25rem; }
.chart figcaption p { font-size: .95rem; margin-bottom: 1rem; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { stroke: var(--ink-2); stroke-width: 1; }
.chart .ax { font: 500 11px var(--mono); fill: var(--ink-2); }
.chart details { margin-top: .75rem; font-size: .85rem; }
.chart summary { cursor: pointer; color: var(--ink-2); font-weight: 700; }
.chart table { margin-top: .5rem; font-size: .85rem; }
.events { margin-top: 1.25rem; background: var(--card); border-radius: 6px; padding: 1.25rem 1.5rem; box-shadow: 0 1px 2px rgb(0 0 0 / .12); }
.events h2 { font-size: 1.25rem; }
.event-list { list-style: none; margin: 0; padding: 0; }
.event-list li { display: grid; grid-template-columns: 7.5rem auto 1fr; gap: .75rem; align-items: start; padding: .8rem 0; border-top: 1px solid var(--line); font-size: .95rem; }
.event-list .mono { color: var(--ink-2); padding-top: .15rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; margin-top: .45rem; }
.dot.ok { background: var(--ok); } .dot.wet { background: #1b6d9a; } .dot.bad { background: #b3321f; }
@media (max-width: 900px) { .tiles { grid-template-columns: 1fr 1fr; } .charts { grid-template-columns: 1fr; } .foot-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .tiles { grid-template-columns: 1fr; } .event-list li { grid-template-columns: auto 1fr; } .event-list .mono { grid-column: 1 / -1; } }

/* ---------- Mobile/tablet menu: below 1100px the six labeled chips no longer fit ---------- */
.menu-btn { display: none; align-items: center; gap: .45rem; min-height: 44px; padding: 0 .9rem; border: 1px solid var(--line); border-radius: 4px; background: var(--card); color: var(--ink); font: 700 .95rem var(--body); cursor: pointer; transition: transform 160ms var(--ease-out); }
.menu-btn:active { transform: scale(0.97); }
.menu-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.menu-btn .x { display: none; }
.chips-nav.open .menu-btn .x { display: inline; }
.chips-nav.open .menu-btn .bars { display: none; }
@media (max-width: 1100px) {
  .chips-nav .wrap { position: relative; gap: .5rem; }
  .menu-btn { display: inline-flex; }
  .chips-nav ol {
    display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 20;
    flex-direction: column; gap: 0; padding: .5rem 16px 1rem; overflow: visible;
    background: var(--ground); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgb(20 10 0 / .12);
  }
  .chips-nav.open ol { display: flex; animation: menu-in 200ms var(--ease-out); }
  .chips-nav ol a { min-height: 48px; padding: .75rem .5rem; font-size: 1.05rem; border-radius: 4px; }
  .chips-nav ol a i { width: 14px; height: 14px; }
  .nav-login { min-height: 44px; display: inline-flex; align-items: center; }
}
@keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .chips-nav.open ol { animation: none; } }

/* ---------- Decision engine playground (solucao) ---------- */
.engine { background: var(--card); border-radius: 8px; padding: clamp(1.25rem, 3vw, 2rem); box-shadow: 0 1px 2px rgb(0 0 0 / .12); }
.engine fieldset { border: 0; margin: 0 0 1.25rem; padding: 0; }
.engine legend, .engine-range { font: 700 .85rem var(--body); color: var(--ink-2); }
.engine-crops { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; margin-top: .5rem !important; }
.engine-crops label { position: relative; }
.engine-crops input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.engine-crops span { display: flex; align-items: center; gap: .45rem; min-height: 44px; padding: .5rem .65rem; border: 1px solid var(--line); border-radius: 4px; background: var(--ground); font: 700 .9rem var(--body); color: var(--ink); transition: border-color 150ms ease, background-color 150ms ease; }
.engine-crops span i { width: 12px; height: 12px; border-radius: 2px; flex: none; }
.engine-crops input:checked + span { border-color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1px var(--ink); }
.engine-crops input:focus-visible + span { outline: 3px solid var(--water); outline-offset: 2px; }
.engine-range { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: .35rem 1rem; margin-top: 1rem; }
.engine-range output { font: 500 1.15rem var(--mono); color: var(--ink); }
.engine-range input { grid-column: 1 / -1; width: 100%; height: 44px; accent-color: var(--ink); cursor: pointer; }
.engine .gauge .needle { transition: transform 120ms var(--ease-out); }
.engine .gauge .band { transition: transform 250ms var(--ease-in-out), opacity 300ms ease; }
.decision { margin-top: 1.5rem; padding: 1.1rem 1.2rem; border-radius: 6px; background: var(--ground); border: 1px solid var(--line); }
.decision .status { font-size: 1.15rem; min-height: 0; margin-bottom: .35rem; }
.decision p:last-child { margin: 0; color: var(--ink-2); }
@media (max-width: 640px) { .engine-crops { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Live dashboard controls ---------- */
.sim-ctl { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.sim-ctl .mono { color: var(--ink-2); font-size: 1rem; }
.sim-btn { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: 0 .9rem; border: 1px solid var(--ink); border-radius: 4px; background: transparent; color: var(--ink); font: 700 .9rem var(--body); cursor: pointer; transition: transform 160ms var(--ease-out), background-color 150ms ease, color 150ms ease; }
.sim-btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .sim-btn:hover { background: var(--ink); color: var(--on-dark); } }
.tile .sim-btn { margin-top: .75rem; min-height: 40px; }
.tile .v { font-variant-numeric: tabular-nums; }
.state-warn { color: #7a5200; }
.dot.warn { background: var(--alarm); }

/* link to the v2 design, kept while the group compares both versions */
.ver2 { display: inline-block; margin-bottom: .75rem; color: inherit; }
