/* ===================================================================
   Orgramic — split landing "field to table"
   Two worlds divided by a curved organic seam. Botanical line-art,
   printed grain, editorial type, gentle ambient motion.
   =================================================================== */

html, body { height: 100%; }
.split-body {
  margin: 0; min-height: 100%;
  background: var(--emerald-deep);
  overflow: hidden;
}
.clip-defs { position: absolute; }

/* ---------- printed grain over everything ---------- */
.grain {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;   /* below seam + text, above color fills */
  opacity: .42; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- top bar ---------- */
.split-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 25;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(16px, 4vw, 32px);
  padding-top: max(16px, env(safe-area-inset-top));
}
.split-top .brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.split-top .brand-name { color: #fff; }
.split-top-right { display: flex; align-items: center; gap: 12px; }
.split-top .lang-toggle { color: rgba(255,255,255,.9); border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.08); }
.split-top .lang-toggle [data-lang].active { color: #fff; }

/* poetic kicker, sits over the farmer (emerald) zone */
.split-tagline {
  position: fixed; z-index: 25; top: clamp(64px, 9vh, 92px); left: clamp(20px, 5vw, 56px);
  margin: 0; max-width: 40vw;
  font-family: var(--font-head); font-style: italic; font-weight: 500;
  font-size: clamp(1rem, 1.5vw, 1.35rem); line-height: 1.25;
  color: var(--lime-soft); opacity: .92;
  text-shadow: 0 2px 12px rgba(0,0,0,.3);
}

/* ---------- the two worlds ---------- */
.split { position: relative; height: 100vh; height: 100dvh; width: 100%; }

.side {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  text-decoration: none; overflow: hidden;
  padding: clamp(24px, 5vw, 56px);
}
/* farmer = full emerald field (underneath); consumer = curved cream wedge on top */
.side-farmer {
  background:
    radial-gradient(90% 70% at 22% 12%, #205f27 0%, #123f18 55%, #0c3413 100%);
  color: var(--on-dark);
}
.side-consumer {
  clip-path: url(#consumerClip);
  background:
    radial-gradient(80% 70% at 88% 12%, #ffffff 0%, #f4f8ec 45%, #e9f0df 100%);
  color: var(--ink);
  /* crisp lime rim-light along the curved seam, then a soft glow — follows the clip exactly */
  filter: drop-shadow(-1.5px 0 0 rgba(166,206,57,.6)) drop-shadow(-3px 0 11px rgba(166,206,57,.28));
}

/* push each world's content into its own wedge */
.side-farmer  .side-inner { margin-right: 36%; }
.side-consumer .side-inner { margin-left: 40%; }

/* the seam is drawn as a drop-shadow rim on the consumer wedge (see .side-consumer) */
.seam { display: none; }

/* ---------- content ---------- */
.side-inner {
  position: relative; z-index: 3;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  max-width: 30ch; text-align: left;
}
.side-consumer .side-inner { align-items: flex-start; }
.side-eyebrow {
  font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .16em;
  padding: 5px 13px; border-radius: 999px;
}
.side-farmer .side-eyebrow { background: rgba(255,255,255,.12); color: var(--lime-soft); }
.side-consumer .side-eyebrow { background: rgba(46,125,50,.12); color: var(--grass-action-d); }

.side-title {
  font-family: var(--font-head); font-weight: 600;
  font-size: clamp(2.6rem, 6vw, 5rem); line-height: .96; letter-spacing: -.025em;
  margin: 4px 0 0;
}
.side-farmer .side-title { color: #fff; }
.side-consumer .side-title { color: var(--emerald); }

/* hand-drawn underline swash under each title */
.swash { width: clamp(150px, 16vw, 240px); height: 18px; margin: -2px 0 4px; overflow: visible; }
.swash path { fill: none; stroke-width: 3.5; stroke-linecap: round; vector-effect: non-scaling-stroke;
  stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw 1s var(--ease) .5s forwards; }
.side-farmer .swash path { stroke: var(--lime); }
.side-consumer .swash path { stroke: var(--grass); }
@keyframes draw { to { stroke-dashoffset: 0; } }

.side-sub { font-size: clamp(1rem, 1.3vw, 1.14rem); line-height: 1.5; max-width: 26ch; }
.side-farmer .side-sub { color: var(--on-dark-soft); }
.side-consumer .side-sub { color: var(--muted); }

.side-cta {
  margin-top: 18px; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-width: 15rem; min-height: 3.4rem; box-sizing: border-box;   /* uniform size across both worlds */
  font-weight: 700; font-size: 1.02rem; padding: 0 28px; border-radius: 999px;
  transition: gap .35s var(--ease), transform .35s var(--ease), box-shadow .35s var(--ease);
}
.side-cta::after { content: "→"; transition: transform .35s var(--ease); }
.side-farmer .side-cta { background: var(--lime); color: var(--emerald-deep); box-shadow: 0 16px 34px -14px rgba(166,206,57,.6); }
.side-consumer .side-cta { background: var(--grass-action); color: #fff; box-shadow: 0 16px 34px -14px rgba(46,125,50,.6); }

/* ---------- botanical line-art ---------- */
.deco { position: absolute; z-index: 1; pointer-events: none; fill: none; }
.deco .stem { stroke-width: 2.5; fill: none; stroke-linecap: round; }
.deco-wheat {
  width: clamp(120px, 15vw, 200px); left: -8px; bottom: -12px;
  color: var(--lime); opacity: .22;
  transform-origin: bottom center; animation: sway 7s ease-in-out infinite;
}
.deco-wheat .grain-cluster path { fill: currentColor; stroke: none; }
.deco-wheat .awn { fill: none; stroke: currentColor; stroke-width: 2; }
.deco-wheat .stem { stroke: currentColor; }
.deco-sprig {
  width: clamp(150px, 18vw, 260px); right: -20px; bottom: -18px;
  color: var(--grass); opacity: .18;
  transform-origin: bottom center; animation: sway 9s ease-in-out infinite reverse;
}
.deco-sprig .stem { stroke: currentColor; }
.deco-sprig .leaves path { fill: currentColor; stroke: none; }
@keyframes sway { 0%,100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }

/* ---------- hover: warm the chosen world, lift its content ---------- */
@media (hover: hover) and (min-width: 760px) {
  .side:hover .side-inner { transform: translateY(-6px); transition: transform .5s var(--ease); }
  .side:hover .side-cta { transform: translateY(-2px); gap: 13px; }
  .side:hover .side-cta::after { transform: translateX(4px); }
  .side-farmer:hover { background:
    radial-gradient(95% 75% at 22% 10%, #266a2d 0%, #143f18 55%, #0c3413 100%); }
  .side-consumer:hover { filter: drop-shadow(-1.5px 0 0 rgba(166,206,57,.75)) drop-shadow(-3px 0 13px rgba(166,206,57,.36)) saturate(1.04) brightness(1.02); }
  .side:hover .deco { opacity: .3; transition: opacity .5s var(--ease); }
}
.side:focus-visible { outline: none; }
.side:focus-visible .side-cta { box-shadow: 0 0 0 4px rgba(109,179,63,.5); }

/* ---------- enter animation ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.side-inner { animation: rise .7s var(--ease) both; }
.side-farmer .side-inner { animation-delay: .1s; }
.side-consumer .side-inner { animation-delay: .22s; }
.seam path { animation: seamIn 1.1s var(--ease) .2s both; }
@keyframes seamIn { from { opacity: 0; } to { opacity: .55; } }

/* ---------- third path: BRC onboarding pill ---------- */
.split-brc {
  position: fixed; z-index: 30; left: 50%; bottom: clamp(16px, 3.5vh, 30px);
  transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 11px;
  padding: 9px 18px 9px 14px; border-radius: 999px;
  background: rgba(14, 58, 22, .82); border: 1px solid rgba(166, 206, 57, .38);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 14px 34px -14px rgba(0, 0, 0, .55);
  text-decoration: none; color: #fff; max-width: calc(100vw - 28px);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.split-brc-ic { font-size: 1.35rem; line-height: 1; flex-shrink: 0; }
.split-brc-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.split-brc-lead { font-size: .72rem; letter-spacing: .02em; color: rgba(234, 243, 230, .78); }
.split-brc-cta {
  font-weight: 700; font-size: .96rem; color: var(--lime-soft);
  display: inline-flex; align-items: center; gap: 6px;
}
.split-brc-cta::after { content: "→"; transition: transform .3s var(--ease); }
@media (hover: hover) {
  .split-brc:hover { transform: translateX(-50%) translateY(-3px); border-color: rgba(166,206,57,.65); box-shadow: 0 20px 40px -16px rgba(0,0,0,.6); }
  .split-brc:hover .split-brc-cta::after { transform: translateX(4px); }
}
.split-brc:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(166,206,57,.5); }
.split-body.is-leaving .split-brc { opacity: 0; }

/* leaving → fade out */
.split-body.is-leaving { transition: opacity .32s ease; opacity: 0; }

/* ---------- mobile: real stacked flow (no overlap → no merging) ---------- */
@media (max-width: 759px) {
  /* content is taller than the viewport now — let the root document scroll normally */
  html { overflow-x: hidden; }         /* root scroller (vertical auto), no sideways scroll */
  html, body { height: auto; min-height: 100%; }
  .split-body { overflow: visible; }

  .split-tagline { position: static; max-width: none; margin: 84px clamp(20px,6vw,28px) 0; text-align: center; }

  .split { display: flex; flex-direction: column; height: auto; min-height: 100dvh; }
  .side {
    position: relative; inset: auto; flex: 0 0 auto; min-height: 46vh;
    place-items: center; clip-path: none;
    padding: clamp(28px, 7vw, 44px);
  }
  .side-farmer  { padding: 14px clamp(28px,7vw,44px) 13vh; }   /* room for the cream to tuck up */
  .side-consumer {
    margin-top: -9vh;                                          /* overlap the seam */
    border-radius: 48% 52% 0 0 / 8vh 8vh 0 0;                  /* gentle curved top */
    padding-top: 10vh;
    filter: drop-shadow(0 -1.6px 0 rgba(166,206,57,.6)) drop-shadow(0 -4px 12px rgba(166,206,57,.22));
  }

  .side-inner { align-items: center; text-align: center; max-width: 28ch; margin: 0 !important; }
  .swash { align-self: center; }
  .side-title { font-size: clamp(2.4rem, 12vw, 3.4rem); }

  .deco-wheat { left: -22px; top: auto; bottom: 4%; width: 116px; }
  .deco-sprig { right: -24px; bottom: 5%; width: 150px; }

  /* BRC pill joins the normal scroll flow at the very bottom */
  .split-brc {
    position: static; transform: none; margin: 0 auto env(safe-area-inset-bottom);
    margin-top: 22px; margin-bottom: 26px;
  }
  @media (hover: hover) {
    .split-brc:hover { transform: translateY(-3px); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .deco { animation: none; }
  .side-inner, .swash path, .seam path { animation: none; opacity: 1; stroke-dashoffset: 0; }
  .split-body.is-leaving { transition: none; }
}
