/* FREE-01/02: หน้าคนนอก (สไตล์สนุก แบบ ANGA ONE · ธีม ForeToday) */
:root { --ink: #1f1d1d; --ink2: #5c5959; --ink3: #9a9696; --line: rgba(45,43,43,.08); --o1: #ff582d; --o2: #fe6d00; --o3: #ffab24; --grad: linear-gradient(135deg, var(--o1), var(--o2) 50%, var(--o3)); --good: #15803d; --bad: #e0352b; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html { background: #fff; }
body { margin: 0; background: #fff; color: var(--ink); font-family: var(--ft-font-sans); font-weight: 300; line-height: 1.7; overflow-x: hidden; }
a { color: inherit; }
.g { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* nav */
.nav { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 20; width: min(1080px, calc(100% - 24px)); display: flex; align-items: center; justify-content: space-between;
  background: rgba(255,255,255,.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px 10px 18px; box-shadow: 0 8px 30px rgba(31,29,29,.06); }
.nav .brand { font-weight: 500; letter-spacing: .01em; text-decoration: none; }
.nav .brand b { font-weight: 500; }
.btn { display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; font: inherit; font-weight: 500; text-decoration: none; border-radius: 999px; padding: 11px 22px; transition: transform .2s, box-shadow .2s; }
.btn-p { background: var(--grad); color: #fff; box-shadow: 0 8px 24px rgba(254,109,0,.28); }
.btn-p:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(254,109,0,.36); }
.btn-s { background: #fff; color: var(--ink); border: 1px solid rgba(45,43,43,.14); }
.btn-s:hover { transform: translateY(-2px); }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn:disabled { opacity: .6; cursor: default; transform: none; }

/* hero: tile grid + floating icons */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 110px 20px 80px; overflow: hidden; }
.grid { position: absolute; inset: -2px; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 88px 88px; background-position: center;
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 50%, #000 30%, transparent 80%); mask-image: radial-gradient(ellipse 70% 65% at 50% 50%, #000 30%, transparent 80%); }
.glow { position: absolute; width: 640px; height: 640px; left: 50%; top: 50%; transform: translate(-50%, -50%); background: radial-gradient(circle, rgba(255,171,36,.20), rgba(255,88,45,.08) 45%, transparent 70%); filter: blur(10px); }
.tile { position: absolute; width: 76px; height: 76px; border-radius: 20px; background: #fff; border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(31,29,29,.07); display: grid; place-items: center; font-size: 34px;
  animation: float 7s ease-in-out infinite; animation-delay: var(--d, 0s); }
.tile.sm { width: 60px; height: 60px; font-size: 26px; border-radius: 16px; }
.tile.ghost { opacity: .45; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(-14px) rotate(calc(var(--r, 0deg) * -1)); } }
.hero-in { position: relative; max-width: 760px; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 400; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px 6px 8px; box-shadow: 0 4px 14px rgba(31,29,29,.05); }
.pill i { font-style: normal; background: var(--grad); color: #fff; border-radius: 999px; padding: 1px 10px; font-size: 12px; font-weight: 500; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.5); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
h1 { font-weight: 500; font-size: clamp(38px, 6.4vw, 68px); line-height: 1.12; letter-spacing: -0.02em; margin: 22px 0 16px; }
.sub { color: var(--ink2); font-size: clamp(16px, 2vw, 18px); max-width: 560px; margin: 0 auto 28px; }
.cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.proof { margin-top: 26px; color: var(--ink3); font-size: 13px; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.proof span::before { content: "✓ "; color: var(--good); font-weight: 500; }
.scroll-hint { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); color: var(--ink3); font-size: 12px; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(-50%, 6px); } }

/* section heads */
section { padding: 90px 0; }
.h2 { text-align: center; font-weight: 500; font-size: clamp(28px, 4.2vw, 44px); line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 12px; }
.lead { text-align: center; color: var(--ink2); max-width: 560px; margin: 0 auto 56px; }

/* feature rows with live mock cards */
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; padding: 44px 0; border-top: 1px solid var(--line); position: relative; }
.row:first-of-type { border-top: 0; }
.row .num { position: absolute; left: -10px; top: 10px; font-size: 140px; font-weight: 500; line-height: 1; color: rgba(45,43,43,.035); pointer-events: none; }
.eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--o2); font-weight: 500; }
.eyebrow em { font-style: normal; letter-spacing: .04em; text-transform: none; font-size: 11px; background: #fff3e8; color: var(--o2); border-radius: 6px; padding: 2px 8px; margin-left: 6px; }
.row h3 { font-weight: 500; font-size: clamp(24px, 3vw, 32px); line-height: 1.25; margin: 8px 0 10px; letter-spacing: -0.01em; }
.row p { color: var(--ink2); margin: 0 0 14px; }
.row ul { list-style: none; padding: 0; margin: 0; color: var(--ink2); font-size: 15px; }
.row li { padding-left: 18px; position: relative; margin: 4px 0; }
.row li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 6px; height: 6px; border-radius: 50%; background: var(--grad); }

.mock { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 60px rgba(31,29,29,.09); padding: 16px 18px 18px; position: relative; }
.mock .bar { display: flex; gap: 6px; margin-bottom: 14px; }
.mock .bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; } .mock .bar i:nth-child(2) { background: #febc2e; } .mock .bar i:nth-child(3) { background: #28c840; }
.live { position: absolute; top: -12px; right: 16px; font-size: 11px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; display: inline-flex; gap: 6px; align-items: center; color: var(--ink2); box-shadow: 0 4px 12px rgba(31,29,29,.05); }
.mlabel { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink3); }

/* mock 1: score ring */
.score { display: flex; gap: 22px; align-items: center; }
.ring { width: 132px; height: 132px; flex: none; position: relative; }
.ring svg { transform: rotate(-90deg); }
.ring .val { position: absolute; inset: 0; display: grid; place-items: center; font-size: 38px; font-weight: 500; }
.ring .val small { display: block; font-size: 11px; color: var(--ink3); font-weight: 300; margin-top: -30px; }
.mods { flex: 1; display: grid; gap: 9px; }
.mod { font-size: 13px; }
.mod .t { display: flex; justify-content: space-between; color: var(--ink2); }
.mod .track { height: 7px; background: #f3f1f0; border-radius: 99px; overflow: hidden; margin-top: 3px; }
.mod .fill { height: 100%; width: 0; border-radius: 99px; transition: width 1.4s cubic-bezier(.2,.8,.2,1); }

/* mock 2: wasted search terms */
.terms { display: grid; gap: 8px; }
.term { display: flex; justify-content: space-between; align-items: center; font-size: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; transition: all .5s; }
.term .q { position: relative; }
.term .q::after { content: ""; position: absolute; left: 0; top: 52%; height: 2px; width: 0; background: var(--bad); transition: width .5s; }
.term.hit { background: #fff6f5; border-color: rgba(224,53,43,.2); }
.term.hit .q::after { width: 100%; }
.term .c { color: var(--ink3); font-size: 13px; }
.term .tag { font-size: 11px; border-radius: 6px; padding: 1px 8px; background: #f3f1f0; color: var(--ink3); transition: all .4s; }
.term.hit .tag { background: var(--bad); color: #fff; }
.waste-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; padding-top: 12px; border-top: 1px dashed rgba(45,43,43,.15); }
.waste-total b { font-size: 28px; font-weight: 500; color: var(--bad); }

/* mock 3: benchmark bars */
.bench { display: grid; gap: 14px; }
.b-row .t { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink2); }
.b-track { position: relative; height: 26px; background: #f7f5f4; border-radius: 8px; margin-top: 4px; }
.b-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 8px; transition: width 1.4s cubic-bezier(.2,.8,.2,1); display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; color: #fff; font-size: 12px; font-weight: 500; white-space: nowrap; }
.b-mark { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); border-radius: 2px; }
.b-mark::after { content: "benchmark"; position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: 10px; color: var(--ink3); white-space: nowrap; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 26px 22px; position: relative; overflow: hidden; transition: transform .25s, box-shadow .25s; }
.step:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: 0 18px 40px rgba(31,29,29,.08); }
.step .n { font-size: 64px; font-weight: 500; line-height: 1; margin-bottom: 10px; }
.step h4 { font-weight: 500; font-size: 18px; margin: 0 0 6px; }
.step p { color: var(--ink2); font-size: 14px; margin: 0; }
.mcc { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-weight: 500; font-size: 18px; background: #fff3e8; border: 1px dashed rgba(254,109,0,.45); border-radius: 12px; padding: 6px 8px 6px 14px; cursor: pointer; font-family: inherit; color: var(--ink); }
.mcc span { font-size: 12px; font-weight: 400; background: #fff; border-radius: 8px; padding: 2px 8px; color: var(--o2); }
.path { font-size: 13px; color: var(--ink3); margin-top: 10px; }

/* form */
.form-sec { background: linear-gradient(180deg, #fff, #fff8f2); }
.form-card { max-width: 680px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 30px 70px rgba(254,109,0,.10); padding: 32px; position: relative; }
.form-card::before { content: ""; position: absolute; inset: -1px; border-radius: 25px; padding: 1px; background: var(--grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .5; pointer-events: none; }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
label { display: block; font-size: 14px; margin: 14px 0 5px; font-weight: 400; }
input[type=text], input[type=email], input[type=tel], input[type=url] { width: 100%; font: inherit; padding: 12px 14px; border: 1px solid rgba(45,43,43,.16); border-radius: 12px; background: #fff; transition: border-color .2s, box-shadow .2s; }
input:focus { outline: none; border-color: var(--o2); box-shadow: 0 0 0 4px rgba(254,109,0,.12); }
.consent { display: flex; gap: 10px; align-items: flex-start; color: var(--ink2); font-size: 14px; margin-top: 18px; font-weight: 300; }
.consent input { margin-top: 6px; accent-color: var(--o2); }
.err { color: var(--bad); font-size: 13px; }
.hp { position: absolute; left: -9999px; }
.submit { width: 100%; justify-content: center; margin-top: 18px; padding: 15px; font-size: 17px; }
.done { text-align: center; padding: 20px 0; }
.done .big { font-size: 64px; animation: pop .6s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { from { transform: scale(.2); } }
.done h3 { font-weight: 500; font-size: 28px; margin: 6px 0; }
.done p { color: var(--ink2); }
.foot { text-align: center; color: var(--ink3); font-size: 13px; padding: 30px 20px 40px; }
#confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; }

/* reveal */
.rv { opacity: 0; transform: translateY(26px); transition: opacity .8s, transform .8s cubic-bezier(.2,.8,.2,1); }
.rv.in { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .row { grid-template-columns: 1fr; gap: 26px; }
  .row.rev .mock { order: 2; }
  .steps { grid-template-columns: 1fr; }
  .tile.hide-m { display: none; }
}
@media (max-width: 560px) {
  .frow { grid-template-columns: 1fr; }
  .form-card { padding: 22px 18px; }
  .score { flex-direction: column; align-items: stretch; }
  .ring { margin: 0 auto; }
  .tile { width: 56px; height: 56px; font-size: 24px; border-radius: 14px; }
  .tile.sm { width: 46px; height: 46px; font-size: 20px; }
  .nav .hide-s { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rv { opacity: 1; transform: none; }
}
