/* Toberry Smart Farm · two ways to see the site (assets/pages.js, 2026-12-02): the chooser, a modal on the page's own
   ground, and the pieces only the per-section pages have: the home page's list of pages, the investors' proven
   technology, and the next page at each page's foot */

/* a per-section page stays hidden until pages.js has taken out the sections that are not its own */
html.pg-wait body > main, html.pg-wait body > footer, html.pg-wait body > .pager { visibility: hidden; }
html.choosing { overflow: hidden; }

/* a turn in the site per section never scrolls (Vario, 2026-12-03): the screen dims to the ground under this veil, the
   next page is put in place behind it, and it lifts (site.js). Under the top bar, the index and the hint, which stay */
.turnveil { position: fixed; inset: 0; z-index: 19; background: var(--ground); opacity: 0; pointer-events: none; transition: opacity 0.45s cubic-bezier(0.22, 0.61, 0.36, 1); }
.turnveil.is-on { opacity: 1; transition: opacity 0.22s cubic-bezier(0.55, 0, 0.75, 0.3); }

/* ---------- the chooser ---------- */
.choose { width: min(54rem, calc(100vw - 2 * var(--margin))); max-width: none; max-height: calc(100svh - 2rem); margin: auto; padding: 0; overflow: auto; border: 1px solid rgb(201 163 90 / 0.32); background: var(--ground); color: var(--ink); box-shadow: 0 30px 90px rgb(0 0 0 / 0.55), 0 0 70px rgb(201 163 90 / 0.07); }
.choose::backdrop { background: rgb(7 16 12 / 0.74); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.choose.is-lock::backdrop { background: var(--ground); } /* (over the lock: the lock's own dark ground) */
.choose__box { position: relative; padding: clamp(1.75rem, 3.5vw, 3rem); }
.choose__kicker { font-size: var(--step-small); line-height: 1.45; letter-spacing: 0.04em; color: var(--accent); }
.choose__title { margin-top: 0.5rem; font-size: var(--step-lead); line-height: 1.2; font-weight: 500; letter-spacing: -0.01em; }
.choose__options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); margin-top: clamp(1.5rem, 3vw, 2.25rem); }
.choose__opt { display: grid; grid-template-rows: auto auto 1fr; gap: 0.6rem; padding: 1.25rem 1.25rem 1.5rem; background: var(--surface); color: inherit; text-decoration: none; box-shadow: inset 0 0 0 1px transparent; transition: box-shadow var(--t-hover) ease, background-color var(--t-hover) ease; }
.choose__opt:focus { outline: none; }
.choose__opt:focus-visible, .choose__opt:hover { background: var(--surface-2); box-shadow: inset 0 0 0 1px rgb(201 163 90 / 0.65), 0 0 28px rgb(201 163 90 / 0.08); }
.choose__pic { display: block; margin: -0.25rem -0.25rem 0.5rem; padding: 0.75rem 0; background: radial-gradient(60% 80% at 50% 50%, rgb(201 163 90 / 0.08), transparent 75%); }
.choose__pic svg { display: block; width: 100%; height: auto; max-height: 8.5rem; fill: none; stroke: var(--accent-strong); stroke-width: 1.1; stroke-linecap: round; filter: drop-shadow(0 0 3px rgb(221 184 104 / 0.45)); }
.choose__rows path, .choose__tile path { stroke: rgb(243 245 241 / 0.4); filter: none; }
.choose__scan { fill: rgb(221 184 104 / 0.12); stroke: none; }
.choose__name { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; font-size: var(--step-lead); line-height: 1.1; letter-spacing: -0.01em; }
.choose__now { display: none; font-size: var(--step-small); letter-spacing: 0.04em; color: var(--accent); white-space: nowrap; }
.choose:not(.is-lock) .choose__opt[aria-current] .choose__now { display: inline; }
.choose__text { font-size: var(--step-small); line-height: 1.5; color: var(--muted); max-width: 36ch; }
.choose__close { position: absolute; top: 0.75rem; right: 0.75rem; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; padding: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; transition: color var(--t-hover) ease; }
.choose__close svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.choose__close:hover, .choose__close:focus-visible { color: var(--ink); outline: none; }
.choose.is-lock .choose__close { display: none; }
@media (prefers-reduced-motion: no-preference) {
  /* live, softly: a reading line runs down the one long page, and the six pages light one after another */
  .choose[open] { animation: choose-in 420ms var(--ease-out); }
  .choose__scan { animation: choose-scan 4.8s var(--ease-in-out) infinite; }
  .choose__tile rect { animation: choose-tile 4.8s ease-in-out infinite; animation-delay: calc(var(--n) * 0.4s); }
}
@keyframes choose-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes choose-scan { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(70px); } }
@keyframes choose-tile { 0%, 30%, 100% { fill: transparent; } 12% { fill: rgb(221 184 104 / 0.16); } }
@media (max-width: 640px) {
  .choose__options { grid-template-columns: minmax(0, 1fr); }
  .choose__pic svg { max-height: 5.5rem; }
}

/* ---------- a page's first section ----------
   It starts just under the top bar, not a section's spacing below it, so the page's first screen shows its first piece
   whole (the farm's photograph, the game's phone, the network's map), as a turn of the page would open it: 24px under
   the bar (4.7rem), where site.js opens every page. (A rem or two lower, the first click only took the page up by the
   difference, 17px at 1440x900, which under the veil was a whole turn showing almost nothing new, 2026-12-03) */
html.pages main > :is(.farm, .app, .proof):first-child { padding-top: calc(4.7rem + 24px); }
html.pages main > .network:first-child .network__stage { padding-top: calc(4.75rem + clamp(1.25rem, 3vw, 2.5rem)); }

/* ---------- the pages in the top bar ---------- */
.top__nav a[aria-current="page"] { text-decoration-color: currentColor; }

/* ---------- home: the pages, one card each, name over its line ---------- */
.pgcards { position: relative; z-index: 1; padding: var(--section) var(--margin) calc(var(--section) * 0.6); background: var(--ground); }
.pgcards__title { max-width: 14ch; margin-bottom: clamp(2.75rem, 4.5vw, 4.5rem); }
.pgcards__list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gutter); }
.pgcard a { position: relative; display: grid; grid-template-rows: auto 1fr auto; gap: 0.75rem; height: 100%; min-height: 15rem; padding: 1.5rem 1.5rem 1.25rem; background: var(--surface); color: inherit; text-decoration: none; transition: background-color var(--t-hover) ease; }
.pgcard a::before { content: ''; position: absolute; inset: 0 0 auto; height: 1px; background: var(--accent-strong); box-shadow: 0 0 12px rgb(221 184 104 / 0.7); transform: scaleX(0.12); transform-origin: left center; transition: transform 700ms var(--ease-out); }
.pgcard a:hover, .pgcard a:focus-visible { background: var(--surface-2); outline: none; }
.pgcard a:hover::before, .pgcard a:focus-visible::before { transform: none; }
.pgcard__name { font-size: var(--step-lead); line-height: 1.1; letter-spacing: -0.01em; }
.pgcard__text { font-size: var(--step-small); line-height: 1.5; color: var(--muted); max-width: 30ch; }
.pgcard__foot { display: flex; align-items: center; justify-content: space-between; font-size: var(--step-small); letter-spacing: 0.04em; color: var(--accent); }
.pgcard__foot svg { width: 1.75rem; height: 0.9rem; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--t-hover) var(--ease-out); }
.pgcard a:hover .pgcard__foot svg, .pgcard a:focus-visible .pgcard__foot svg { transform: translateX(0.3rem); }

/* ---------- investors: proven technology, each system where it already works ---------- */
.proof { --rule: rgb(243 245 241 / 0.14); position: relative; z-index: 1; padding: var(--section) var(--margin) calc(var(--section) * 0.6); background: var(--ground); }
.proof__head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: end; margin-bottom: clamp(2.75rem, 4.5vw, 4.5rem); }
.proof__title { grid-column: 1 / 7; max-width: 11ch; }
.proof__lead { grid-column: 7 / 13; font-size: var(--step-lead); line-height: 1.3; letter-spacing: -0.01em; color: var(--muted); max-width: 36ch; }
.proof__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem var(--gutter); }
.proof__item { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); align-content: start; column-gap: 0.9rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.proof__icon { grid-row: 1 / 3; width: 2.4rem; height: 2.4rem; padding: 0.4rem; border-radius: 50%; fill: none; stroke: var(--accent-strong); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; box-shadow: inset 0 0 0 1px rgb(221 184 104 / 0.32); filter: drop-shadow(0 0 4px rgb(221 184 104 / 0.35)); }
.proof__item h3 { font-size: var(--step-body); font-weight: 500; line-height: 1.3; }
.proof__item p { margin-top: 0.35rem; font-size: var(--step-small); line-height: 1.5; color: var(--muted); max-width: 38ch; }

/* ---------- the next page, at each page's foot ---------- */
.pgnext { position: relative; z-index: 1; padding: clamp(4rem, 8vw, 7rem) var(--margin); background: var(--ground); }
.pgnext__go { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; row-gap: 0.75rem; column-gap: var(--gutter); padding-top: 1.25rem; border-top: 1px solid rgb(243 245 241 / 0.14); color: inherit; text-decoration: none; }
.pgnext__kicker { grid-column: 1 / -1; font-size: var(--step-small); line-height: 1.45; letter-spacing: 0.04em; color: var(--accent); }
.pgnext__name { display: flex; align-items: baseline; gap: 0.6em; font-size: var(--step-head); line-height: 1; letter-spacing: -0.03em; }
.pgnext__num { font-size: var(--step-small); letter-spacing: 0.04em; color: var(--muted); }
.pgnext__arrow { width: clamp(2.5rem, 4vw, 4rem); height: auto; fill: none; stroke: var(--accent-strong); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 4px rgb(221 184 104 / 0.4)); transition: transform var(--t-hover) var(--ease-out); }
.pgnext__go:hover .pgnext__arrow, .pgnext__go:focus-visible .pgnext__arrow { transform: translateX(0.6rem); }
.pgnext__go:focus-visible { outline: 1px solid var(--accent); outline-offset: 0.5rem; }

@media (min-width: 768px) and (max-width: 1099px) {
  .pgcards__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .proof__title { grid-column: 1 / 13; }
  .proof__lead { grid-column: 1 / 10; margin-top: 1.5rem; }
  .proof__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .pgcards, .proof { padding: 5rem 1.25rem 4rem; }
  .pgcards__list { grid-template-columns: minmax(0, 1fr); }
  .pgcard a { min-height: 0; }
  .proof__head { display: block; }
  .proof__lead { margin-top: 1.25rem; }
  .proof__list { grid-template-columns: minmax(0, 1fr); row-gap: 1.75rem; }
  .pgnext { padding: 3.5rem 1.25rem; }
}
