/* =========================================================
   Green Office · HOME (nature / interactive)
   โหลดเฉพาะหน้าแรก ต่อจาก site.css
   ========================================================= */
body.page-home { overflow-x: clip; }
:root { --fern: #8fc75b; --bark: #6b4a2f; --sand: #e9dfc8; --night: #07170f; }

/* ---------- custom cursor (เฉพาะเมาส์) ---------- */
.cur { position: fixed; left: 0; top: 0; width: 36px; height: 36px; margin: -18px 0 0 -18px; border: 1.5px solid #fff; border-radius: 50%; pointer-events: none; z-index: 4000; mix-blend-mode: difference; opacity: 0; transition: width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease), background .3s, opacity .3s; }
.cur.on { opacity: 1; }
.cur.big { width: 76px; height: 76px; margin: -38px 0 0 -38px; background: #fff; }
.cur-dot { position: fixed; left: 0; top: 0; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #fff; pointer-events: none; z-index: 4000; mix-blend-mode: difference; opacity: 0; }
.cur-dot.on { opacity: 1; }
@media (pointer: coarse), (max-width: 991px) { .cur, .cur-dot { display: none; } }

#leaves { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 900; }

/* ---------- HERO (full-bleed nature) ---------- */
.gh { position: relative; min-height: min(100svh, 980px); color: #fff; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; isolation: isolate; background: var(--night); }
.gh-media { position: absolute; inset: -6% 0 0 0; z-index: -2; will-change: transform; }
.gh-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); animation: ken 24s var(--ease) forwards; }
@keyframes ken { to { transform: scale(1); } }
.gh::before { content: ''; position: absolute; inset: 0; z-index: -1; background:
  radial-gradient(ellipse at 20% 100%, rgba(7,23,15,.92) 0%, rgba(7,23,15,0) 60%),
  linear-gradient(180deg, rgba(7,23,15,.55) 0%, rgba(7,23,15,.05) 28%, rgba(7,23,15,.1) 55%, rgba(7,23,15,.88) 100%); }
.gh .container-wide { width: 100%; }
.gh-inner { padding: calc(var(--nav-h) + 40px) 0 38px; }
.gh .eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px 7px 8px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(10px); font-size: .86rem; margin-bottom: 26px; }
.gh .eyebrow i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--lime); color: var(--forest); font-size: .8rem; }
.gh h1 { color: #fff; font-size: clamp(2.7rem, 7.6vw, 7.4rem); font-weight: 700; line-height: 1.02; letter-spacing: -.04em; margin: 0 0 26px; max-width: 14ch; }
.gh h1 .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding: .26em .06em .1em 0; margin: -.26em 0 -.1em; }
.gh h1 .w > span { display: inline-block; transform: translateY(110%); transition: transform 1.1s var(--ease); }
.is-ready .gh h1 .w > span { transform: none; }
.gh h1 .serif { color: var(--lime); font-weight: 400; letter-spacing: -.02em; }
.gh .sub { max-width: 560px; color: rgba(255,255,255,.82); font-size: clamp(1.02rem, 1.4vw, 1.25rem); margin: 0 0 30px; }
.gh-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 18px; margin-top: 44px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.2); font-size: .82rem; color: rgba(255,255,255,.7); }
.gh-foot .coord { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.scroll-cue { display: inline-flex; align-items: center; gap: 10px; }
.scroll-cue .dot { width: 22px; height: 34px; border: 1.5px solid currentColor; border-radius: 12px; position: relative; }
.scroll-cue .dot::after { content: ''; position: absolute; left: 50%; top: 6px; width: 3px; height: 7px; margin-left: -1.5px; background: currentColor; border-radius: 2px; animation: cue 1.8s infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(10px); } }

@media (max-width: 767px) {
  .gh::before { background: linear-gradient(180deg, rgba(7,23,15,.55) 0%, rgba(7,23,15,.12) 22%, rgba(7,23,15,.55) 48%, rgba(7,23,15,.94) 100%); }
  .gh .eyebrow { font-size: .78rem; }
}

/* sound toggle */
.snd { position: absolute; top: calc(var(--nav-h) + 14px); right: 44px; z-index: 3; display: inline-flex; align-items: center; gap: 12px; padding: 9px 18px 9px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.28); background: rgba(7,23,15,.45); backdrop-filter: blur(12px); color: #fff; font-size: .86rem; font-weight: 500; transition: background .3s, transform .3s var(--spring); }
.snd:hover { background: rgba(7,23,15,.7); transform: translateY(-2px); }
.snd .bars { display: inline-flex; gap: 3px; align-items: flex-end; height: 20px; width: 24px; }
.snd .bars i { flex: 1; background: var(--lime); border-radius: 2px; height: 4px; transition: height .3s; }
.snd.on .bars i { animation: eq 1s ease-in-out infinite; }
.snd.on .bars i:nth-child(2) { animation-delay: -.3s; } .snd.on .bars i:nth-child(3) { animation-delay: -.6s; } .snd.on .bars i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 0%, 100% { height: 4px; } 50% { height: 20px; } }
@media (max-width: 991px) { .snd { right: 20px; } }
@media (max-width: 575px) { .snd .txt { display: none; } .snd { padding: 9px 12px; top: calc(var(--nav-h) + 6px); } }

/* ---------- marquee ธรรมชาติ ---------- */
.mq { overflow: hidden; background: var(--night); color: var(--lime); padding: 20px 0; border-block: 1px solid rgba(255,255,255,.08); }
.mq .t { display: flex; width: max-content; animation: marquee 50s linear infinite; }
.mq span { font-size: clamp(1.2rem, 2.4vw, 1.9rem); font-weight: 600; padding: 0 26px; white-space: nowrap; display: inline-flex; align-items: center; gap: 52px; }
.mq span::after { content: '❋'; color: var(--fern); }
.mq:hover .t { animation-play-state: paused; }

/* ---------- Discover ---------- */
.disc { padding: 130px 0 90px; position: relative; }
.disc .big { font-size: clamp(1.7rem, 3.6vw, 3.2rem); line-height: 1.4; font-weight: 500; letter-spacing: -.02em; max-width: 24ch; }
.disc .big em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--leaf-dark); }
.disc-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 70px; align-items: end; }
@media (max-width: 991px) { .disc-grid { grid-template-columns: 1fr; gap: 36px; } }
.disc .side p { color: var(--muted); }
.disc .nums { display: flex; flex-wrap: wrap; gap: 28px; margin: 26px 0 30px; }
.disc .nums div b { display: block; font-size: 2.4rem; line-height: 1; letter-spacing: -.04em; }
.disc .nums div span { font-size: .85rem; color: var(--muted); }

/* ---------- What we do (3 steps) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 991px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; border-radius: var(--radius); padding: 30px 28px 28px; background: #fff; border: 1px solid var(--line); min-height: 400px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; transition: background .5s var(--ease), color .5s, transform .5s var(--spring); }
.step:hover { background: var(--forest); color: #fff; transform: translateY(-6px); }
.step .sn { font-family: var(--serif); font-style: italic; font-size: 1.4rem; color: var(--leaf-dark); transition: color .4s; }
.step:hover .sn { color: var(--lime); }
.step h3 { font-size: 1.6rem; margin: 6px 0 10px; }
.step:hover h3 { color: #fff; }
.step p { color: var(--muted); margin: 0 0 18px; transition: color .4s; }
.step:hover p { color: rgba(255,255,255,.75); }
.step .vis { height: 150px; border-radius: 18px; background: var(--cream); position: relative; overflow: hidden; margin-bottom: 22px; transition: background .5s; }
.step:hover .vis { background: rgba(255,255,255,.08); }
.step .lnk { font-weight: 600; font-size: .92rem; display: inline-flex; gap: 8px; align-items: center; color: var(--moss); }
.step:hover .lnk { color: var(--lime); }
/* vis 1: waveform */
.vis-wave { display: flex; align-items: center; justify-content: center; gap: 4px; }
.vis-wave i { width: 5px; border-radius: 3px; background: var(--leaf); animation: wave 1.4s ease-in-out infinite; height: 20px; }
.step:hover .vis-wave i { background: var(--lime); }
@keyframes wave { 0%, 100% { height: 14px; } 50% { height: 90px; } }
/* vis 2: scan */
.vis-scan { background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 24px 24px; }
.vis-scan::before { content: ''; position: absolute; top: 0; bottom: 0; width: 2px; background: var(--leaf); box-shadow: 0 0 22px 6px rgba(65,171,93,.5); animation: scan 3.2s ease-in-out infinite alternate; }
.vis-scan .blip { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--leaf-dark); }
.step:hover .vis-scan { background-image: linear-gradient(rgba(255,255,255,.1) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.1) 1px, transparent 1px); }
.step:hover .vis-scan::before { background: var(--lime); box-shadow: 0 0 22px 6px rgba(212,243,107,.5); }
.step:hover .vis-scan .blip { background: var(--lime); }
@keyframes scan { from { left: 4%; } to { left: 96%; } }
/* vis 3: chart */
.vis-chart { display: flex; align-items: flex-end; justify-content: center; gap: 8px; padding: 18px 26px 0; }
.vis-chart i { flex: 1; border-radius: 8px 8px 0 0; background: var(--mint); height: 0; animation: grow 1.6s var(--ease) forwards; animation-play-state: paused; }
.step.in .vis-chart i { animation-play-state: running; }
.vis-chart i:nth-child(odd) { background: var(--leaf); }
.step:hover .vis-chart i { background: rgba(255,255,255,.25); } .step:hover .vis-chart i:nth-child(odd) { background: var(--lime); }
@keyframes grow { to { height: var(--h); } }

/* ---------- Scrub band ---------- */
.scrub { position: relative; min-height: min(130vh, 1300px); background: var(--night); color: #fff; }
.scrub-sticky { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; overflow: hidden; }
.scrub-bg { position: absolute; inset: -10% 0; background: url('../images/web/econ09.jpg') center/cover; opacity: .55; will-change: transform; filter: saturate(.9); }
.scrub-sticky::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(7,23,15,.2), rgba(7,23,15,.85)); }
.scrub .container-wide { position: relative; z-index: 2; }
.scrub-text { font-size: clamp(1.9rem, 5vw, 4.6rem); font-weight: 700; line-height: 1.25; letter-spacing: -.03em; max-width: 20ch; }
.scrub-text span { opacity: .16; transition: opacity .35s, color .35s; }
.scrub-text span.on { opacity: 1; }
.scrub-text span.hl.on { color: var(--lime); }
.scrub .prog { position: absolute; left: 44px; right: 44px; bottom: 36px; height: 2px; background: rgba(255,255,255,.15); z-index: 2; }
.scrub .prog i { display: block; height: 100%; width: 0; background: var(--lime); }

/* ---------- Stats (sparkline rows) ---------- */
.stats2 { background: var(--forest); color: #e7eee8; border-radius: 40px; margin: 0 12px; padding: 110px 0; position: relative; overflow: hidden; }
.stats2::before { content: ''; position: absolute; width: 700px; height: 700px; border-radius: 50%; right: -240px; top: -260px; background: radial-gradient(circle, rgba(143,199,91,.28), transparent 65%); pointer-events: none; }
.stats2 .container-wide { position: relative; }
.srow { display: grid; grid-template-columns: 60px minmax(130px, 1fr) minmax(210px, 1.3fr) minmax(200px, 1.4fr) auto; gap: 24px; align-items: center; padding: 24px 12px; border-top: 1px solid var(--line-light); color: #fff; position: relative; transition: background .4s, padding .4s var(--ease); }
.srow:last-of-type { border-bottom: 1px solid var(--line-light); }
.srow:hover { background: rgba(212,243,107,.07); padding-left: 24px; padding-right: 24px; color: #fff; border-radius: 18px; }
.srow .ic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 1.4rem; background: rgba(255,255,255,.08); color: var(--lime); transition: all .4s var(--spring); }
.srow:hover .ic { background: var(--lime); color: var(--forest); transform: rotate(-10deg) scale(1.08); }
.srow .lb b { display: block; font-size: 1.15rem; font-weight: 600; }
.srow .lb small { color: rgba(255,255,255,.55); }
.srow .vl { font-size: clamp(1.9rem, 3.4vw, 3rem); font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.srow .vl em { font-style: normal; font-size: .9rem; font-weight: 500; color: rgba(255,255,255,.55); margin-left: 6px; letter-spacing: 0; }
.srow .tr { display: block; font-size: .8rem; font-weight: 500; margin-top: 6px; color: rgba(255,255,255,.7); letter-spacing: 0; }
.spark { display: flex; align-items: flex-end; gap: 5px; height: 64px; }
.spark i { flex: 1; min-height: 3px; border-radius: 4px 4px 0 0; background: rgba(255,255,255,.18); transition: background .3s, height .9s var(--ease); height: 3px; position: relative; }
.spark i.has { background: var(--fern); }
.spark i.max { background: var(--lime); }
.srow:hover .spark i.has { background: var(--lime); }
.spark i:hover::after { content: attr(data-t); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: #fff; color: var(--forest); font-size: .72rem; font-weight: 600; padding: 3px 8px; border-radius: 8px; white-space: nowrap; z-index: 3; }
.spark-lbl { display: flex; justify-content: space-between; font-size: .68rem; color: rgba(255,255,255,.4); margin-top: 6px; }
.srow .go { width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.3); display: grid; place-items: center; transition: all .4s var(--ease); }
.srow:hover .go { background: var(--lime); border-color: var(--lime); color: var(--forest); transform: rotate(-45deg); }
@media (max-width: 991px) {
  .srow { grid-template-columns: 54px 1fr auto; gap: 14px 16px; }
  .srow .vlw { grid-column: 2 / 3; } .srow .sp { grid-column: 1 / -1; } .srow .go { grid-column: 3; grid-row: 1; }
}
.stat-year { display: inline-flex; gap: 4px; padding: 5px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid var(--line-light); }
.stat-year button { border: 0; background: none; color: rgba(255,255,255,.75); padding: 8px 16px; border-radius: 999px; font-size: .88rem; font-weight: 500; }
.stat-year button.active { background: var(--lime); color: var(--forest); }

/* ---------- Criteria: pinned horizontal scroll ---------- */
.hs { position: relative; }
.hs-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: 34px; }
.hs-head { padding-top: 70px; }
.hs-track { display: flex; gap: 20px; padding: 0 44px; width: max-content; will-change: transform; }
.hc { position: relative; flex: 0 0 clamp(290px, 27vw, 410px); height: clamp(340px, 48vh, 430px); border-radius: 32px; padding: 28px; display: flex; flex-direction: column; justify-content: space-between; color: var(--ink); overflow: hidden; transition: transform .5s var(--spring); }
.hc:hover { transform: translateY(-10px) rotate(-.6deg); color: var(--ink); }
.hc .n { font-size: 7rem; font-weight: 700; line-height: .8; letter-spacing: -.07em; opacity: .16; position: absolute; right: 14px; top: 14px; transition: transform .6s var(--spring), opacity .4s; }
.hc:hover .n { transform: scale(1.15) rotate(-6deg); opacity: .3; }
.hc .ic { width: 66px; height: 66px; border-radius: 22px; display: grid; place-items: center; font-size: 1.8rem; background: rgba(255,255,255,.6); transition: transform .5s var(--spring); }
.hc:hover .ic { transform: rotate(-12deg) scale(1.1); }
.hc h3 { font-size: 1.4rem; margin: 0 0 8px; line-height: 1.35; }
.hc p { font-size: .92rem; margin: 0 0 14px; opacity: .78; }
.hc .m { font-weight: 600; font-size: .9rem; display: inline-flex; gap: 8px; align-items: center; }
.hs-prog { padding: 0 44px; }
.hs-prog .bar { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.hs-prog .bar i { display: block; height: 100%; width: 0; background: var(--leaf-dark); }
@media (max-width: 991px) {
  .hs { height: auto !important; }
  .hs-sticky { position: static; height: auto; overflow: visible; padding: 20px 0; }
  .hs-head { padding-top: 0; }
  .hs-track { width: 100%; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 20px 18px; transform: none !important; }
  .hc { scroll-snap-align: start; flex-basis: 78vw; }
  .hs-prog { display: none; }
}

/* ---------- Footprint calculator ---------- */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 991px) { .calc { grid-template-columns: 1fr; } }
.calc-in, .calc-out { border-radius: 36px; padding: clamp(26px, 4vw, 48px); }
.calc-in { background: #fff; border: 1px solid var(--line); }
.calc-out { background: var(--forest); color: #fff; position: relative; overflow: hidden; display: flex; flex-direction: column; }
.calc-out::before { content: ''; position: absolute; width: 420px; height: 420px; border-radius: 50%; right: -120px; top: -160px; background: radial-gradient(circle, rgba(212,243,107,.3), transparent 65%); }
.slider { margin-bottom: 26px; }
.slider .top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-weight: 500; }
.slider .top b { font-size: 1.35rem; letter-spacing: -.02em; }
.slider .top b small { font-size: .8rem; font-weight: 400; color: var(--muted); }
.slider input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 8px; background: linear-gradient(90deg, var(--leaf) var(--p, 40%), var(--cream) var(--p, 40%)); outline: none; }
.slider input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; border-radius: 50%; background: var(--forest); border: 5px solid var(--lime); cursor: grab; transition: transform .2s var(--spring); }
.slider input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.2); }
.slider input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--forest); border: 5px solid var(--lime); cursor: grab; }
.calc-out .co2 { font-size: clamp(3rem, 6vw, 5rem); font-weight: 700; letter-spacing: -.05em; line-height: 1; position: relative; }
.calc-out .co2 small { font-size: 1rem; font-weight: 500; color: rgba(255,255,255,.6); letter-spacing: 0; margin-left: 6px; }
.calc-out .yr { color: rgba(255,255,255,.7); margin: 8px 0 18px; position: relative; }
.forest-grid { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; min-height: 150px; flex: 1; position: relative; }
.forest-grid i { font-size: 1.7rem; color: var(--fern); animation: pop .5s var(--spring) both; }
.forest-grid i:nth-child(3n) { color: var(--lime); } .forest-grid i:nth-child(4n) { color: #5aa86a; }
@keyframes pop { from { transform: scale(0) rotate(-30deg); opacity: 0; } }
.calc-out .tn { position: relative; margin-top: 14px; font-size: 1.1rem; }
.calc-out .tn b { color: var(--lime); font-size: 1.6rem; }
.calc-note { margin-top: 12px; font-size: .78rem; color: rgba(255,255,255,.5); position: relative; }

/* ---------- Bins game ---------- */
.game { display: grid; grid-template-columns: 1fr; gap: 26px; }
.junk-zone { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding: 24px; border-radius: 28px; background: #fff; border: 2px dashed rgba(17,32,26,.2); min-height: 120px; align-items: center; }
.junk { user-select: none; cursor: grab; padding: 10px 18px; border-radius: 999px; background: var(--cream); border: 1.5px solid var(--line); font-weight: 500; font-size: .95rem; display: inline-flex; align-items: center; gap: 8px; transition: transform .3s var(--spring), background .2s, border-color .2s; }
.junk:hover { transform: translateY(-3px) rotate(-2deg); }
.junk.sel { background: var(--forest); color: var(--lime); border-color: var(--forest); transform: scale(1.08); }
.junk.drag { opacity: .4; }
.junk-zone .done-msg { font-size: 1.2rem; font-weight: 600; text-align: center; }
.game .bin { cursor: pointer; min-height: 300px; }
.game .bin.over { transform: scale(1.05); box-shadow: 0 0 0 4px rgba(255,255,255,.6), var(--shadow); }
.game .bin.good { animation: goodb .6s var(--spring); } .game .bin.bad { animation: shake .45s; }
@keyframes goodb { 40% { transform: scale(1.08); } }
@keyframes shake { 20%, 60% { transform: translateX(-9px); } 40%, 80% { transform: translateX(9px); } }
.bin .got { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.bin .got span { font-size: .78rem; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.22); animation: pop .4s var(--spring) both; }
.bin-yellow .got span { background: rgba(43,33,0,.14); }
.game-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; align-items: center; }
.score { font-size: 1.1rem; font-weight: 600; display: inline-flex; gap: 10px; align-items: center; }
.score b { font-size: 1.8rem; letter-spacing: -.03em; color: var(--leaf-dark); }
.toast-g { position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 30px); background: var(--forest); color: #fff; padding: 12px 22px; border-radius: 999px; z-index: 2500; opacity: 0; pointer-events: none; transition: all .4s var(--spring); font-weight: 500; max-width: 90vw; }
.toast-g.show { opacity: 1; transform: translate(-50%, 0); }
.toast-g.ok { background: #1f7a3d; } .toast-g.no { background: #b42318; }

/* tilt */
[data-tilt] { transform-style: preserve-3d; transition: transform .25s ease-out; }
