/* =====
   DINKOMART — For Farmers (D47, compact since D48): the hero of two cut
   panels and the application as one card. Loaded after store.css and
   pages.css (the field, the robot check). Semantic tokens only.
   ===== */

/* A 236x56 pill in a 266x86 notch at a panel's foot-left (the form card's
   notch, mirrored); the same notch at the foot-right holds the send. */
:root {
  --cut-pill-bl: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='266' height='86'%3E%3Cg transform='matrix(-1 0 0 1 266 0)'%3E%3Cpath d='M0 0H266A22 22 0 0 1 244 22H58A36 36 0 0 0 22 58V64A22 22 0 0 1 0 86Z'/%3E%3C/g%3E%3C/svg%3E");
  --cut-pill-br: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='266' height='86'%3E%3Cpath d='M0 0H266A22 22 0 0 1 244 22H58A36 36 0 0 0 22 58V64A22 22 0 0 1 0 86Z'/%3E%3C/svg%3E");
}
/* The page carries its own WhatsApp three times: the floating one would
   only sit over the tiles and the send. */
.page-farmers .wa { display: none; }

/* ===== THE HERO
   Compact (owner, 2026-10-17: "why this much big"): about half the first
   screen, the words and the ranges side by side, nothing in between. */
.fhero {
  --stage-top: 6px; --hgap: 12px;
  --fh-h: clamp(330px, 50svh, 390px);
  position: relative; isolation: isolate;
  padding-bottom: clamp(1rem, 2vw, 1.5rem);
  background: var(--bg);
}
.fhero__grid {
  display: grid; gap: var(--hgap);
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  min-height: var(--fh-h);
}

/* ----- the words */
.fhero__words {
  --cut: var(--cut-pill-bl); --cut-w: 266px; --cut-h: 86px;
  --cutbox-bg: var(--surface-sunk);
  display: flex; flex-direction: column; min-width: 0; border-radius: 30px;
  padding: 20px clamp(22px, 2.8vw, 40px) calc(86px + 12px);
}
[data-theme='dark'] .fhero__words { --cutbox-bg: var(--stage-2); }
/* Its lights: the logo's emerald and gold drifting under the words, and
   the ploughed field at its foot — cut with the panel. */
.fhero__lights { position: absolute; inset: 0; z-index: -1; overflow: hidden; border-radius: inherit; pointer-events: none; }
.fhero__lights i { position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; }
.fhero__lights i:first-child {
  left: -20%; top: -46%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 20%, transparent), transparent);
  animation: fhDriftA 17s ease-in-out infinite alternate;
}
.fhero__lights i:nth-child(2) {
  right: -18%; bottom: -52%; width: 62%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 18%, transparent), transparent);
  animation: fhDriftB 21s ease-in-out infinite alternate;
}
[data-theme='dark'] .fhero__lights i:first-child { background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 30%, transparent), transparent); }
@keyframes fhDriftA { to { transform: translate(34%, 28%) scale(1.15); } }
@keyframes fhDriftB { to { transform: translate(-30%, -24%) scale(.88); } }
.fhero__lights .floor { height: 50%; opacity: .7; }
@media (prefers-reduced-motion: reduce) {
  .fhero__lights i { animation: none; }
}

/* The crumbs at the head; the words centred in what is left. */
.fhero__copy { display: grid; justify-items: start; margin-block: auto; padding-block: 10px; }
.fhero__title {
  margin-top: 10px;
  font-size: clamp(2.2rem, .8rem + 2.9vw, 3.6rem);
  font-weight: 800; line-height: .94; letter-spacing: -.048em;
  color: var(--fg); text-wrap: balance;
}
/* THE MARK: the last word underlined by hand in the gold, wiped in once
   the words have landed (a translate, on the compositor — of the HTML
   wrapper: an animated <svg> runs on the page's thread), in the word's
   own foot room, inside its mask. */
.fhero__title .w { position: relative; }
.fhero__mark { position: absolute; left: -.02em; right: -.04em; bottom: .02em; height: .14em; overflow: clip; overflow-clip-margin: 4px; pointer-events: none; }
.fhero__mark > span { display: block; height: 100%; }
.fhero__mark svg { display: block; width: 100%; height: 100%; overflow: visible; }
.fhero__mark path { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; vector-effect: non-scaling-stroke; }
html.reveal-on .fhero__title:not(.is-in) .fhero__mark > span { translate: -102% 0; }
.fhero__title.is-in .fhero__mark > span { animation: fhWipe .7s var(--ease-out) .75s backwards; }
@keyframes fhWipe { from { translate: -102% 0; } }
@media (prefers-reduced-motion: reduce) {
  .fhero__title .fhero__mark > span { animation: none; translate: none; }
}
.fhero__lede { margin-top: var(--s-3); max-width: 44ch; font-size: 1.02rem; line-height: 1.5; color: var(--fg-muted); }
.fhero__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.fhero__wa .ico { width: 19px; height: 19px; color: #1DAA57; }

/* The number, in the notch: ink on the page, its phone in the emerald. */
.fhero__call {
  position: absolute; left: 0; bottom: 0; z-index: 2;
  display: flex; align-items: center; gap: 10px;
  width: 236px; height: 56px; padding: 0 16px 0 8px; border-radius: var(--r-full);
  background: var(--fg); color: var(--bg); text-decoration: none;
  transition: background-color .3s var(--ease), scale var(--dur-press) var(--ease-out);
}
.fhero__call:hover { color: var(--bg); }
.fhero__call:active { scale: .97; }
.fhero__call-ico {
  display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: var(--brand); color: var(--on-brand);
}
.fhero__call-ico .ico { width: 18px; height: 18px; }
.fhero__call-txt { display: grid; gap: 3px; min-width: 0; }
.fhero__call-txt small { font: 600 var(--fs-label)/1 var(--font-mono); text-transform: uppercase; letter-spacing: .14em; opacity: .66; }
.fhero__call-txt b { font: 700 1.02rem/1.05 var(--font-display); letter-spacing: -.01em; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) {
  .fhero__call:hover { background-color: var(--brand-ink); }
}

/* WHAT STANDS BEHIND IT, in the band beside the notch: three of the farm
   side's photographs overlapping, their count and their maker. */
.fhero__proof {
  position: absolute; left: calc(266px + 14px); right: 16px; bottom: 0; height: 56px;
  display: flex; align-items: center; gap: 12px; min-width: 0;
}
.fhero__pics { display: flex; flex: none; }
.fhero__pics img {
  width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: #fff;
  box-shadow: 0 0 0 3px var(--cutbox-bg), 0 6px 12px -6px rgba(17, 21, 18, .4);
}
.fhero__pics img + img { margin-left: -12px; }
.fhero__proof-txt { display: grid; gap: 2px; min-width: 0; font-size: .82rem; line-height: 1.25; color: var(--fg-muted); }
.fhero__proof-txt b { font: 600 .84rem/1.2 var(--font-mono); letter-spacing: -.01em; color: var(--fg); }

/* ----- the screen: one tile per farm range, each photograph whole */
.fhero__screen { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--hgap); min-width: 0; }
.ftile {
  --cut: var(--cut-go-tr); --cut-w: 70px; --cut-h: 70px;
  position: relative; isolation: isolate; min-width: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 18px 20px; border-radius: 30px;
  color: #fff; text-decoration: none;
  transition: translate .5s var(--ease-out), scale var(--dur-press) var(--ease-out);
}
/* The scrim the words stand on: the tile's own ground, over its picture. */
.ftile.cutbox { --cutbox-bg: linear-gradient(180deg, transparent 34%, rgba(4, 14, 8, .5) 58%, rgba(4, 14, 8, .88)); }
.ftile.is-soon::before {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: linear-gradient(180deg, transparent 34%, rgba(4, 14, 8, .88));
}
/* The picture in its own frame: the frame is cut and clips, so the
   picture may move inside it and never spill past the notch. */
.ftile__pic {
  position: absolute; inset: 0; z-index: -2; overflow: hidden;
  border-radius: inherit; background: #0B0F0C;
}
.ftile__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%;
  scale: 1.07; transition: scale .9s var(--ease-out);
}
/* A scene breathes: the camera drifting across it, and a few motes of
   light lifting off the ground (transforms and opacity; paused off the
   screen, data-live). */
@media (prefers-reduced-motion: no-preference) {
  .ftile--photo .ftile__img { animation: fhPan 19s ease-in-out infinite alternate; }
}
@keyframes fhPan { from { translate: 1.6% 1.2%; } to { translate: -1.6% -1.8%; } }
.ftile__motes { position: absolute; inset: 0; pointer-events: none; }
.ftile__motes i {
  position: absolute; bottom: 36%; left: var(--x); width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 233, 160, .95), rgba(253, 216, 2, .35) 45%, transparent);
  opacity: 0;
}
.ftile__motes i:nth-child(1) { --x: 46%; --dx: -12px; --d: 0s; }
.ftile__motes i:nth-child(2) { --x: 58%; --dx: 14px; --d: 1.7s; }
.ftile__motes i:nth-child(3) { --x: 38%; --dx: 8px; --d: 3.1s; }
.ftile__motes i:nth-child(4) { --x: 64%; --dx: -6px; --d: 4.4s; }
@media (prefers-reduced-motion: no-preference) {
  .ftile__motes i { animation: fhMote 6.2s cubic-bezier(.2, .6, .35, 1) var(--d) infinite; }
}
@keyframes fhMote {
  0% { opacity: 0; translate: 0 0; scale: .5; }
  18% { opacity: .95; }
  100% { opacity: 0; translate: var(--dx) -150px; scale: 1; }
}

/* A machine shot on white stands whole in a studio light: its white melts
   into the light (multiply), a shadow on the floor under its feet (the
   photograph's own foot room is 8.5% of it), and a light crossing it now
   and then. The words are ink on the light, in either theme — the studio
   is lit in both, as the shop's wells are. */
.ftile--studio { color: #111512; }
.ftile--studio.cutbox { --cutbox-bg: none; }
.ftile--studio .ftile__pic {
  background: radial-gradient(120% 90% at 50% 24%, #FFFFFF 0 30%, #EBE9E2 100%);
  box-shadow: inset 0 0 0 1px rgba(17, 21, 18, .05);
}
[data-theme='dark'] .ftile--studio .ftile__pic { background: radial-gradient(120% 90% at 50% 24%, #F1F0EC 0 28%, #D3D0C6 100%); }
.ftile--studio .ftile__img {
  inset: 6% 10% 38%; width: 80%; height: 56%;
  object-fit: contain; object-position: 50% 100%; scale: 1;
  mix-blend-mode: multiply;
}
.ftile__floor {
  position: absolute; left: 24%; right: 24%; bottom: 40.5%; height: 5%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(17, 21, 18, .26), transparent);
}
.ftile__sweep {
  position: absolute; top: -20%; bottom: -20%; left: -50%; width: 38%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent);
  rotate: 14deg; opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .ftile__sweep { animation: fhSweep 8s var(--ease-out) 2.2s infinite; }
}
@keyframes fhSweep {
  0% { opacity: 0; translate: 0 0; }
  6% { opacity: 1; }
  32%, 100% { opacity: 0; translate: 520% 0; }
}

.ftile__body { position: relative; display: grid; justify-items: start; gap: 6px; min-width: 0; }
.ftile__name { font: 800 clamp(1.25rem, .9rem + .8vw, 1.6rem)/1 var(--font-display); letter-spacing: -.03em; text-wrap: balance; }
.ftile__blurb {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  max-width: 32ch; font-size: .84rem; line-height: 1.4; color: rgba(255, 255, 255, .86);
}
.ftile--studio .ftile__blurb { color: #4A504B; }
.ftile__count {
  margin-top: 2px; padding: 6px 10px; border-radius: var(--r-full);
  background: #F4B400; color: #241900;
  font: 700 var(--fs-label)/1 var(--font-mono); text-transform: uppercase; letter-spacing: .1em;
}
.ftile--studio .ftile__count { background: #111512; color: #fff; }
.ftile__go { position: absolute; top: 0; right: 0; }
a.ftile:hover { color: #fff; }
a.ftile--studio:hover { color: #111512; }
a.ftile:active { scale: .985; }
.ftile.is-soon .ftile__img { filter: grayscale(.5); }
@media (hover: hover) and (pointer: fine) {
  a.ftile:hover { translate: 0 -5px; }
  a.ftile:hover .ftile__go { rotate: 0deg; background-color: var(--brand); color: var(--on-brand); }
  a.ftile--photo:hover .ftile__img { scale: 1.13; }
  a.ftile--studio:hover .ftile__img { scale: 1.04; }
}

/* ===== THE APPLICATION — ONE CARD (D48)
   An emerald band with its name and the numbers to call; three rows of
   fields, each row's number filling as it is filled in and ticked when
   all are in (pages.js); the robot check; the send in the card's notch.
   About half the height of the three cards it replaced. */
.apply { padding-top: clamp(1.75rem, 3.6vw, 3rem); }
.apply__prose { margin-bottom: var(--s-6); }
.apply__card {
  --cut: var(--cut-pill-br); --cut-w: 266px; --cut-h: 86px;
  position: relative; display: grid; border-radius: 28px;
  scroll-margin-top: calc(var(--top-h, 72px) + 16px);
}
.apply__card:not(.cutbox) { background: var(--surface); }

.apply__band {
  position: relative; isolation: isolate; overflow: hidden; overflow: clip;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px;
  padding: 16px clamp(18px, 2.2vw, 28px) 16px clamp(20px, 2.4vw, 32px);
  border-radius: 28px 28px 0 0;
  background: linear-gradient(115deg, var(--forest-500), var(--forest-700) 88%);
  color: #fff;
}
[data-theme='dark'] .apply__band { background: linear-gradient(115deg, #14432A, #0A1D12 88%); }
.apply__lights { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.apply__lights i {
  position: absolute; right: -6%; top: -160%; width: 46%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(253, 200, 2, .26), transparent);
}
.apply__lights .floor { --line: rgba(255, 255, 255, .08); height: 140%; }
.apply__title { font: 800 clamp(1.35rem, 1.05rem + .8vw, 1.85rem)/1 var(--font-display); letter-spacing: -.03em; color: #fff; }
.apply__reach { display: flex; flex-wrap: wrap; gap: 8px; }
.apply__chip {
  display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 5px 14px 5px 5px; border-radius: 14px;
  background: rgba(255, 255, 255, .1); color: #fff; text-decoration: none;
  transition: background-color .3s var(--ease), scale var(--dur-press) var(--ease-out);
}
.apply__chip > .ico { box-sizing: content-box; flex: none; width: 17px; height: 17px; padding: 9px; border-radius: 11px; background: #fff; color: var(--forest-600); }
.apply__chip span { display: grid; gap: 2px; min-width: 0; }
.apply__chip small { font: 600 var(--fs-label)/1 var(--font-mono); text-transform: uppercase; letter-spacing: .12em; color: rgba(255, 255, 255, .7); }
.apply__chip b { font: 700 .98rem/1.15 var(--font-display); white-space: nowrap; }
.apply__chip:hover { color: #fff; background: rgba(255, 255, 255, .18); }
.apply__chip:active { scale: .98; }

.apply__body { display: grid; min-width: 0; padding: 4px clamp(20px, 2.4vw, 32px) 20px; }
.apply__body .errsum { margin: 16px 0 2px; }
.apply__body.sent { padding-block: clamp(24px, 3vw, 36px); }

/* A row: its label in the first column (the legend floated into the
   grid, out of the fieldset's border), its fields in the second. */
.apply__row {
  display: grid; grid-template-columns: 158px minmax(0, 1fr); align-items: start; column-gap: 24px;
  min-width: 0; margin: 0; padding: 16px 0; border: 0;
}
.apply__row + .apply__row, .apply__foot { border-top: 1px solid var(--hairline); }
.apply__label {
  float: left; grid-column: 1; display: flex; align-items: center; gap: 12px;
  min-height: 46px; margin-top: 25px; padding: 0;
}
.apply__n {
  position: relative; display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%;
  background: var(--fg); color: var(--bg); font-size: .74rem; font-weight: 600;
  transition: background-color .35s var(--ease), color .35s var(--ease);
}
.apply__n > * { grid-area: 1 / 1; transition: opacity .3s var(--ease), scale .45s var(--ease-out); }
.apply__n .ico { width: 17px; height: 17px; opacity: 0; scale: .4; }
.apply__label.is-done .apply__n { background: var(--brand); color: var(--on-brand); }
.apply__label.is-done .apply__n span { opacity: 0; scale: .4; }
.apply__label.is-done .apply__n .ico { opacity: 1; scale: 1; }
.apply__what { display: grid; gap: 7px; min-width: 0; }
.apply__what b { font: 700 1rem/1.15 var(--font-display); letter-spacing: -.01em; color: var(--fg); }
.apply__bar { width: 64px; height: 3px; overflow: hidden; border-radius: 3px; background: var(--hairline); }
[data-theme='dark'] .apply__bar { background: var(--border); }
.apply__bar i {
  display: block; height: 100%; border-radius: inherit; transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--brand), #FDB802);
  scale: var(--p, .0001) 1; transition: scale .55s var(--ease-out);
}
.apply__label.is-on .apply__what b { color: var(--brand-ink); }

.apply__fields { display: grid; gap: 14px 16px; min-width: 0; grid-column: 2; }
.apply__fields--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.apply__fields--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: dense; }
.apply__wide { grid-column: span 2; }
.apply__all { grid-column: 1 / -1; }

/* The fields, a size down from the store's: one card, not a page. */
.apply .field { gap: 6px; }
.apply .field label, .apply .field legend { font-size: .84rem; }
.apply .field input:not([type='radio'], [type='checkbox']), .apply .field textarea { min-height: 46px; padding: 10px 14px; border-radius: 12px; }
.apply .field textarea { min-height: 74px; }
.apply .field .field__box > input { padding-left: 64px; }
.apply .field__pre { padding: 0 11px 0 14px; font-size: .9rem; }
.field__req { color: var(--err); font-weight: 700; }

/* Yes / No as one switch: two halves in one field's frame. */
.apply .yesno__opts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; height: 46px; padding: 4px;
  border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface);
}
.apply .yesno__opt { display: grid; }
.apply .yesno__opt span {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 0; min-height: 0; padding: 0 8px; border: 0; border-radius: 8px; font-size: .92rem;
}
.apply .yesno__opt span i { width: 14px; height: 14px; }
.apply .yesno__opt input:checked + span { background: var(--brand-soft); color: var(--brand-ink); }
.apply .yesno__opt input:checked + span i { border-width: 4px; }
@media (hover: hover) and (pointer: fine) {
  .apply .yesno__opt input:not(:checked):hover + span { background: var(--surface-2); }
}

/* The foot: the robot check in the fields' column, the send in the
   card's notch beside it. */
.apply__foot { display: grid; grid-template-columns: 158px minmax(0, 1fr); column-gap: 24px; min-height: 86px; padding-top: 16px; }
.apply__foot :is(.captcha, .bcheck) { grid-column: 2; }
.apply__card .form__go { position: absolute; right: 0; bottom: 0; width: 236px; min-width: 0; height: 56px; }

/* ===== RESPONSIVE */
@media (max-width: 1080px) {
  /* The hero stacks: the words, then the ranges under them. */
  .fhero__grid { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .fhero__words { min-height: 320px; }
  .fhero__screen { height: clamp(300px, 44vw, 420px); }
  .apply__row, .apply__foot { grid-template-columns: 132px minmax(0, 1fr); column-gap: 18px; }
  .apply__fields--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  /* A row's label over its fields. */
  .apply__row, .apply__foot { grid-template-columns: minmax(0, 1fr); }
  .apply__label { min-height: 0; margin: 0 0 14px; }
  .apply__what { grid-auto-flow: column; align-items: center; justify-content: start; gap: 12px; }
  .apply__fields, .apply__foot :is(.captcha, .bcheck) { grid-column: 1; }
}
@media (max-width: 640px) {
  .fhero__words { min-height: 0; padding: 18px 18px calc(86px + 16px); border-radius: 26px; }
  .fhero__copy { padding-block: 18px 6px; }
  .fhero__cta .btn { flex: 1 1 auto; }
  /* Beside the notch there is no room: the proof joins the words. */
  .fhero__proof { position: static; height: auto; margin-top: 16px; }
  .fhero__screen { height: clamp(280px, 84vw, 340px); }
  .ftile { padding: 14px; border-radius: 24px; }
  .ftile__name { font-size: 1.15rem; }
  .ftile__blurb { font-size: .78rem; }
  .ftile__count { padding: 5px 8px; }
  .ftile--studio .ftile__img { inset: 6% 8% 46%; width: 84%; height: 48%; }
  .ftile__floor { bottom: 48.5%; left: 20%; right: 20%; }
  .apply__card { border-radius: 24px; }
  .apply__band { border-radius: 24px 24px 0 0; }
  .apply__reach { width: 100%; }
  .apply__chip { flex: 1 1 200px; }
  .apply__foot { padding-bottom: calc(86px - 20px + 10px); }
}
@media (max-width: 420px) {
  /* Name and number one under the other; the short fields stay two to a
     row (village and taluk, district and pin code, land and the card). */
  .apply__fields--2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 340px) {
  .apply__fields--4 { grid-template-columns: minmax(0, 1fr); }
  .apply__wide { grid-column: auto; }
}
