/* ==========================================================================
   HOME — The Threshold
   ========================================================================== */

/* When the visitor reads the land as SAVOR, the chrome turns to paper */
body.is-savor { --fg: #18211B; --muted: rgba(24,33,27,.62); --faint: rgba(24,33,27,.36); --line: rgba(24,33,27,.14); --line-2: rgba(24,33,27,.26); --accent: var(--narenj); --accent-ink: #FFF8F0; --bg: var(--paper); }
body.is-savor .nav { color: var(--fg); }

main { position: relative; z-index: 3; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: space-between; padding: calc(var(--nav-h) + 28px) 0 clamp(120px, 15vh, 140px); pointer-events: none; }
.hero a, .hero button, .hero .lens { pointer-events: auto; }
.hero__top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hero__title { padding-inline: var(--gutter); margin-top: auto; margin-bottom: clamp(24px, 4vw, 56px); color: var(--fg); transition: color .9s; }
.hero__title em { color: var(--accent); transition: color .9s; }
.hero__fa { font-family: var(--f-fa); font-weight: 300; font-size: clamp(16px, 1.4vw, 22px); color: var(--muted); }
.hero__foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 24px; }
.hero__foot .lede { color: var(--fg); opacity: .78; max-width: 40ch; font-size: clamp(15px, 1.15vw, 18px); }
.hero__ctas { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.scroll-cue { font-family: var(--f-mono); font-size: 10px; letter-spacing: .16em; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.scroll-cue i { width: 1px; height: 28px; background: var(--line-2); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; left: 0; top: -100%; width: 1px; height: 100%; background: var(--accent); animation: cue 2.2s var(--ease-settle) infinite; }
@keyframes cue { to { top: 100%; } }
@media (max-width: 960px) { .hero__foot { grid-template-columns: 1fr; } .hero__ctas { justify-content: flex-start; } }

/* savor labels belong to the chapters, not the headline */
body:not(.in-chapters) .land-tag.is-savor { visibility: hidden; }

/* ---------- Lens switch ---------- */
.lens { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lens__cap { font-family: var(--f-mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.lens__track {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; width: 248px; height: 52px; padding: 4px; border-radius: 99px;
  border: 1px solid var(--line-2); background: color-mix(in srgb, var(--bg) 55%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  touch-action: none; user-select: none;
}
.lens__opt { position: relative; z-index: 2; font-size: 13px; font-weight: 500; color: var(--muted); transition: color .5s; display: flex; align-items: center; justify-content: center; gap: 8px; }
.lens__opt:first-child { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 400; }
.lens__opt:last-child { font-family: var(--f-serif); font-size: 19px; font-style: italic; font-weight: 400; }
.lens__opt[aria-pressed="true"] { color: var(--accent-ink); }
.lens__knob { position: absolute; z-index: 1; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 99px; background: var(--accent); transform: translateX(calc(var(--lens, 0) * 100%)); box-shadow: 0 6px 24px color-mix(in srgb, var(--accent) 40%, transparent); }
.lens--float { position: fixed; left: 50%; bottom: 26px; z-index: 50; transform: translate(-50%, 160%); transition: transform .9s var(--ease-grow); }
.lens--float.is-on { transform: translate(-50%, 0); }

/* ---------- Land chapters ---------- */
.chapters { position: relative; pointer-events: none; }
.chapter { min-height: 120vh; display: flex; align-items: center; padding-inline: var(--gutter); }
.chapter:nth-child(even) { justify-content: flex-end; }
.chapter__card {
  pointer-events: auto; width: min(460px, 100%); padding: 28px 28px 30px; border-radius: 20px;
  background: color-mix(in srgb, var(--bg) 62%, transparent); border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(1.1); -webkit-backdrop-filter: blur(18px) saturate(1.1);
  transition: background-color .9s, border-color .9s;
}
.chapter__no { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 11px; color: var(--muted); letter-spacing: .1em; margin-bottom: 40px; }
.chapter__no b { color: var(--accent); font-weight: 400; }
.chapter__title { font-family: var(--f-serif); font-size: clamp(40px, 4.4vw, 64px); line-height: .95; margin-bottom: 26px; }
.chapter__title .fa { display: block; font-family: var(--f-fa); font-size: 15px; color: var(--muted); margin-top: 10px; direction: rtl; text-align: left; }
.reading { display: grid; grid-template-columns: 78px 1fr; gap: 14px; padding-block: 14px; border-top: 1px solid var(--line); transition: opacity .8s; }
.reading dt { font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.reading dd { font-size: 15px; line-height: 1.5; }
.reading--savor dd { font-family: var(--f-serif); font-size: 20px; line-height: 1.3; font-style: italic; }
body:not(.is-savor) .reading--savor, body.is-savor .reading--measure { opacity: .38; }
.chapter__metric { display: flex; align-items: baseline; gap: 8px; margin-top: 18px; }
.chapter__metric b { font-family: var(--f-sans); font-weight: 500; font-size: 44px; letter-spacing: -.04em; line-height: 1; }
.chapter__metric span { font-family: var(--f-mono); font-size: 11px; color: var(--muted); }

/* ---------- Manifesto ---------- */
.manifesto { background: var(--bg); color: var(--fg); }
.manifesto__text { font-family: var(--f-serif); font-size: clamp(34px, 4.6vw, 78px); line-height: 1.04; letter-spacing: -.015em; max-width: 22ch; }
.manifesto__text em { color: var(--accent); }
.manifesto__meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: clamp(64px, 9vw, 128px); border-top: 1px solid var(--line); padding-top: 24px; }
.manifesto__meta div { display: grid; gap: 6px; }
.manifesto__meta b { font-family: var(--f-sans); font-weight: 500; font-size: clamp(40px, 5vw, 72px); letter-spacing: -.045em; line-height: 1; }
.manifesto__meta span { color: var(--muted); font-size: 14px; max-width: 30ch; }
.src { font-family: var(--f-mono); font-size: 10px; color: var(--faint); letter-spacing: .06em; }
@media (max-width: 760px) { .manifesto__meta { grid-template-columns: 1fr; } }

/* ---------- Two doors ---------- */
.doors { display: flex; min-height: 100vh; background: var(--ink); }
.door {
  position: relative; flex: 1; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; isolation: isolate;
  padding: clamp(28px, 4vw, 56px) var(--gutter); color: var(--fg); background: var(--bg); transition: flex-grow 1.1s var(--ease-grow);
  min-height: 100vh;
}
.doors:hover .door { flex-grow: .72; }
.doors .door:hover { flex-grow: 1.5; }
.door__bg { position: absolute; inset: 0; z-index: -1; }
.door__bg svg { width: 100%; height: 100%; }
.door__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.door__title { font-size: clamp(72px, 10vw, 180px); line-height: .85; margin-block: auto 32px; }
.door--supply .door__title { font-family: var(--f-sans); font-weight: 500; letter-spacing: -.06em; }
.door--estate .door__title { font-family: var(--f-serif); font-style: italic; letter-spacing: -.02em; }
.door__list { list-style: none; display: grid; gap: 0; max-width: 420px; }
.door__list li { display: flex; justify-content: space-between; gap: 16px; padding-block: 11px; border-top: 1px solid var(--line); font-size: 15px; }
.door__list li span:last-child { font-family: var(--f-mono); font-size: 11px; color: var(--muted); }
.door__go { display: flex; align-items: center; justify-content: space-between; margin-top: 32px; }
.door__go .btn { pointer-events: none; }
.door:hover .door__go .btn { color: var(--bg); border-color: var(--fg); }
.door:hover .door__go .btn::before { transform: translateY(0); }
@media (max-width: 860px) { .doors { flex-direction: column; } .doors:hover .door, .doors .door:hover { flex-grow: 1; } .door { min-height: 88vh; } }

/* ---------- Open Farm Protocol ---------- */
.protocol { background: var(--bg); }
.protocol__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.protocol__rules { display: grid; gap: 0; margin-top: 40px; }
.rule-item { display: grid; grid-template-columns: 48px 1fr; gap: 16px; padding-block: 20px; border-top: 1px solid var(--line); }
.rule-item b { font-family: var(--f-mono); font-weight: 400; font-size: 11px; color: var(--accent); padding-top: 5px; }
.rule-item h4 { font-weight: 500; font-size: 18px; letter-spacing: -.01em; margin-bottom: 6px; }
.rule-item p { color: var(--muted); font-size: 15px; }
.loop-svg { width: 100%; height: auto; overflow: visible; }
.loop-svg .flow { fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-dasharray: 4 7; animation: flow 1.6s linear infinite; }
.loop-svg .flow--warm { stroke: var(--narenj); }
.loop-svg .track { fill: none; stroke: var(--line-2); stroke-width: 1; }
.loop-svg .node rect { fill: var(--bg-2); stroke: var(--line-2); }
.loop-svg .node text { fill: var(--fg); font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .08em; }
.loop-svg .node .sub { fill: var(--muted); font-size: 9px; }
.loop-svg .core circle { fill: none; stroke: var(--accent); }
.loop-svg .core text { fill: var(--fg); font-family: var(--f-mono); }
.loop-svg .lbl { fill: var(--muted); font-family: var(--f-serif); font-style: italic; font-size: 15px; }
@keyframes flow { to { stroke-dashoffset: -22; } }
@media (max-width: 960px) { .protocol__grid { grid-template-columns: 1fr; } }

/* ---------- Ventures ---------- */
.ventures { background: var(--bg); border-top: 1px solid var(--line); }
.ventures__grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.venture {
  position: relative; min-height: 340px; padding: 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; isolation: isolate;
}
.venture::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--fg); transform: scaleY(0); transform-origin: bottom; transition: transform .8s var(--ease-grow); }
.venture:hover { color: var(--bg); }
.venture:hover::before { transform: scaleY(1); }
.venture:hover .muted, .venture:hover .tag { color: var(--bg); border-color: color-mix(in srgb, var(--bg) 40%, transparent); }
.venture__top { display: flex; justify-content: space-between; align-items: center; font-family: var(--f-mono); font-size: 11px; }
.venture__glyph { width: 56px; height: 56px; margin-block: 28px auto; }
.venture__glyph * { fill: none; stroke: currentColor; stroke-width: 1.3; }
.venture h3 { font-family: var(--f-serif); font-weight: 400; font-size: 32px; line-height: 1; margin-bottom: 10px; }
.venture p { font-size: 14px; line-height: 1.5; }
@media (max-width: 1080px) { .ventures__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .ventures__grid { grid-template-columns: 1fr; } .venture { min-height: 260px; } }

/* ---------- Seasons ---------- */
.seasons { background: var(--bg); overflow: hidden; }
.seasons__pin { height: 100vh; display: flex; flex-direction: column; justify-content: center; gap: 48px; }
.seasons__track { display: flex; gap: 16px; padding-inline: var(--gutter); will-change: transform; }
.month {
  flex: none; width: clamp(280px, 26vw, 380px); height: clamp(380px, 56vh, 520px); border-radius: 20px; border: 1px solid var(--line);
  padding: 24px; display: flex; flex-direction: column; background: var(--bg-2); position: relative; overflow: hidden;
}
.month__fa { font-family: var(--f-fa); font-size: 48px; font-weight: 300; line-height: 1; direction: rtl; text-align: right; }
.month__lat { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 11px; color: var(--muted); margin-top: 14px; letter-spacing: .06em; }
.month__phase { width: 100%; height: 120px; margin-block: auto; }
.month__row { display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); margin-top: 12px; font-size: 14px; line-height: 1.4; }
.month__row dt { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.month__row--estate dd { font-family: var(--f-serif); font-style: italic; font-size: 18px; line-height: 1.2; }
.month.is-now { border-color: var(--accent); }
.month.is-now::after { content: "NOW"; position: absolute; top: 24px; left: 24px; font-family: var(--f-mono); font-size: 10px; letter-spacing: .14em; color: var(--accent-ink); background: var(--accent); padding: 3px 7px; border-radius: 4px; }
.seasons__bar { display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.seasons__progress { flex: 1; max-width: 340px; height: 1px; background: var(--line-2); position: relative; }
.seasons__progress i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); }
@media (max-width: 760px) {
  .seasons__pin { height: auto; padding-block: 96px; }
  .seasons__track { overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
  .month { scroll-snap-align: start; }
}

/* On phones the headline owns the hero; labels wait for the chapters */
@media (max-width: 760px) { body:not(.in-chapters) .land-tags { opacity: 0; transition: opacity .6s; } }
