:root {
  --bg: #0a120c;
  --bg-2: #0f1a12;
  --bg-3: #14241a;
  --fg: #ecf2e8;
  --muted: #7a8a78;
  --emerald: #2fd46b;
  --emerald-2: #15a34a;
  --gold: #e6b752;
  --ease: cubic-bezier(.77,0,.18,1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', 'Noto Sans Thai', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  cursor: none;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(47,212,107,.12), transparent 60%),
    radial-gradient(900px 500px at 100% 20%, rgba(230,183,82,.08), transparent 60%);
  pointer-events: none; z-index: 0;
}

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

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: none; border: none; background: none; color: inherit; }

img { max-width: 100%; display: block; }

/* ——— typography helpers ——— */
.eyebrow {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .35em;
  color: var(--emerald);
  margin-bottom: 1.5rem;
  font-weight: 600;
}

h2 { font-family: 'Fraunces', serif; font-weight: 300; letter-spacing: -.02em; }

/* ——— custom cursor ——— */
.cursor, .cursor-dot {
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9999;
  border-radius: 50%;
  mix-blend-mode: difference;
  will-change: transform;
}
.cursor {
  width: 36px; height: 36px;
  border: 1px solid var(--fg);
  transform: translate(-50%, -50%);
  transition: width .3s var(--ease), height .3s var(--ease), background .3s var(--ease);
}
.cursor-dot { width: 5px; height: 5px; background: var(--fg); transform: translate(-50%, -50%); }
.cursor.is-hover { width: 70px; height: 70px; background: var(--fg); }

/* ——— loader ——— */
.page-loader {
  position: fixed; inset: 0;
  background: var(--bg); z-index: 9000;
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 2rem;
}
.page-loader__bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 0%; background: var(--emerald); }
.page-loader__mark { width: 80px; color: var(--emerald); position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); animation: spin 6s linear infinite; }
.page-loader__mark svg { width: 100%; }
@keyframes spin { to { transform: translate(-50%,-50%) rotate(360deg); } }
.page-loader__count {
  font-family: 'Fraunces', serif;
  font-size: clamp(4rem, 14vw, 12rem);
  font-weight: 300; line-height: 1;
  font-feature-settings: 'tnum';
  color: var(--fg);
}

/* ——— nav ——— */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.25rem 2rem;
  background: rgba(10,18,12,.6);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.nav__logo { display: flex; align-items: center; gap: .6rem; font-weight: 600; font-size: .95rem; letter-spacing: -.01em; }
.nav__logo-mark { width: 20px; height: 20px; color: var(--emerald); }
.nav__logo i { color: var(--muted); font-style: normal; font-weight: 400; }
.nav__links { display: flex; gap: 2rem; font-size: .85rem; }
.nav__links a { color: var(--muted); transition: color .3s; }
.nav__links a:hover { color: var(--fg); }
.nav__cta { padding: .6rem 1.1rem !important; font-size: .8rem !important; }

/* ——— buttons ——— */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.6rem;
  border: 1px solid rgba(236,242,232,.15);
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 500;
  letter-spacing: .02em;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn:hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.btn--primary { background: var(--emerald); color: var(--bg); border-color: var(--emerald); }
.btn--primary:hover { background: var(--emerald-2); border-color: var(--emerald-2); color: var(--bg); }
.btn--ghost { background: transparent; }
.btn--big { font-size: 1.1rem; padding: 1.2rem 2.2rem; }

/* ——— hero ——— */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 9rem 2rem 4rem;
  display: flex; flex-direction: column; justify-content: center;
  max-width: 1400px; margin: 0 auto;
}
.hero__leaf {
  position: absolute; top: 50%; right: -5%; transform: translateY(-50%);
  width: min(80vh, 900px); height: min(80vh, 900px);
  color: var(--emerald);
  opacity: .08;
  pointer-events: none;
  animation: sway 12s ease-in-out infinite;
}
.hero__leaf svg { width: 100%; height: 100%; }
@keyframes sway { 50% { transform: translateY(-50%) rotate(4deg); } }

.hero__eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .75rem; text-transform: uppercase; letter-spacing: .25em;
  color: var(--emerald); font-weight: 600;
  margin-bottom: 2rem;
  opacity: 0;
}
.hero__title {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: clamp(3.5rem, 13vw, 13rem);
  line-height: .9;
  letter-spacing: -.04em;
}
.hero__title .line { display: block; overflow: hidden; padding: .1em 0; }
.hero__title .word { display: inline-block; }
.hero__title .word--italic { font-style: italic; font-weight: 300; color: var(--emerald); }

.hero__sub {
  max-width: 56ch;
  margin-top: 2.5rem;
  font-size: clamp(1rem, 1.2vw, 1.2rem);
  color: #b7c0b3;
  line-height: 1.5;
  opacity: 0;
}
.hero__ctas { display: flex; gap: 1rem; margin-top: 2.5rem; flex-wrap: wrap; opacity: 0; }

.hero__proof {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 2rem; margin-top: 5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.08);
  opacity: 0;
}
.hero__proof div { display: flex; flex-direction: column; gap: .3rem; }
.hero__proof strong { font-family: 'Fraunces', serif; font-weight: 300; font-size: clamp(1.8rem, 3vw, 2.8rem); color: var(--fg); }
.hero__proof span { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .15em; }

.hero__scroll {
  position: absolute; bottom: 2rem; right: 2rem;
  display: flex; align-items: center; gap: .5rem;
  font-size: .75rem; text-transform: uppercase; letter-spacing: .25em;
  color: var(--muted);
  opacity: 0;
}
.hero__scroll svg { width: 14px; height: 14px; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }

/* ——— marquee ——— */
.marquee {
  overflow: hidden;
  padding: 2.5rem 0;
  border-top: 1px solid rgba(255,255,255,.06);
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: var(--bg-2);
}
.marquee__track {
  display: flex; gap: 3rem;
  white-space: nowrap;
  font-family: 'Fraunces', serif;
  font-size: clamp(2rem, 5vw, 5rem);
  font-style: italic;
  font-weight: 300;
  will-change: transform;
}
.marquee__track span:nth-child(even) { color: var(--gold); }

/* ——— showcase / terminal ——— */
.showcase {
  padding: 8rem 2rem;
  max-width: 1400px; margin: 0 auto;
}
.showcase__intro { max-width: 48ch; margin-bottom: 4rem; }
.showcase__intro h2 { font-size: clamp(2rem, 4.5vw, 4rem); line-height: 1.05; }

.terminal {
  background: linear-gradient(180deg, #0f1a12, #0b1510);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 50px 100px -40px rgba(0,0,0,.8), 0 0 0 1px rgba(47,212,107,.08);
}
.terminal__bar {
  display: flex; align-items: center; gap: .5rem;
  padding: .8rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
  background: rgba(0,0,0,.2);
}
.terminal__bar span { width: 10px; height: 10px; border-radius: 50%; background: #2a3d2e; }
.terminal__bar span:nth-child(1) { background: #ff5f57; }
.terminal__bar span:nth-child(2) { background: #febc2e; }
.terminal__bar span:nth-child(3) { background: var(--emerald); }
.terminal__clock { margin-left: auto; font-family: 'Fraunces', serif; font-size: .85rem; color: var(--muted); }

.terminal__body {
  display: grid;
  grid-template-columns: 200px 1fr 280px;
  min-height: 600px;
}
.terminal__side {
  padding: 1.5rem;
  border-right: 1px solid rgba(255,255,255,.06);
  background: rgba(0,0,0,.15);
  display: flex; flex-direction: column;
}
.terminal__logo { font-weight: 600; margin-bottom: 2rem; color: var(--emerald); letter-spacing: .1em; }
.terminal__side ul { list-style: none; display: flex; flex-direction: column; gap: .5rem; font-size: .9rem; }
.terminal__side li { padding: .5rem .75rem; border-radius: 8px; color: var(--muted); }
.terminal__side li.is-active { background: rgba(47,212,107,.12); color: var(--emerald); }
.terminal__branch { margin-top: auto; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.06); font-size: .8rem; }
.terminal__branch span { color: var(--muted); text-transform: uppercase; letter-spacing: .15em; font-size: .65rem; }
.terminal__branch strong { display: block; margin-top: .3rem; font-weight: 500; }

.terminal__grid { padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.terminal__search {
  padding: .8rem 1rem;
  background: rgba(255,255,255,.04);
  border-radius: 10px;
  font-size: .85rem;
  color: var(--muted);
}
.terminal__products {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: .75rem;
  flex: 1;
}
.product {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 12px;
  padding: .75rem;
  display: flex; flex-direction: column; gap: .4rem;
  transition: transform .4s var(--ease), border-color .3s;
}
.product:hover { transform: translateY(-4px); border-color: var(--emerald); }
.product img {
  width: 100%; aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  background: #0a120c;
}
.product h4 { font-size: .8rem; font-weight: 500; }
.product span { font-size: .75rem; color: var(--emerald); font-family: 'Fraunces', serif; }

.terminal__cart {
  padding: 1.5rem;
  border-left: 1px solid rgba(255,255,255,.06);
  background: rgba(0,0,0,.2);
  display: flex; flex-direction: column; gap: 1rem;
}
.terminal__cart header { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; }
.terminal__cart header em { font-style: normal; color: var(--muted); font-size: .75rem; font-weight: 400; }
.terminal__cart ul { list-style: none; display: flex; flex-direction: column; gap: .6rem; font-size: .85rem; }
.terminal__cart li { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .6rem; border-bottom: 1px dashed rgba(255,255,255,.06); }
.terminal__cart li b { font-family: 'Fraunces', serif; font-weight: 400; }
.terminal__total { display: flex; justify-content: space-between; align-items: baseline; padding-top: .5rem; }
.terminal__total span { color: var(--muted); text-transform: uppercase; letter-spacing: .15em; font-size: .7rem; }
.terminal__total strong { font-family: 'Fraunces', serif; font-weight: 300; font-size: 1.8rem; color: var(--fg); }
.terminal__chip {
  font-size: .75rem;
  padding: .5rem .75rem;
  background: rgba(47,212,107,.1);
  color: var(--emerald);
  border-radius: 8px;
  text-align: center;
}
.terminal__pay {
  padding: 1rem;
  background: var(--emerald);
  color: var(--bg);
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: .05em;
}

/* ——— features ——— */
.features {
  padding: 8rem 2rem;
  max-width: 1400px; margin: 0 auto;
}
.features__head { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 4rem; max-width: 40ch; }
.features__head h2 { font-size: clamp(2rem, 4.5vw, 4rem); line-height: 1.05; }
.features__grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.feature {
  padding: 2.5rem 2rem 2rem;
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: 14px;
  display: flex; flex-direction: column; gap: 1rem;
  transition: border-color .4s, transform .4s var(--ease), background .4s;
}
.feature:hover { border-color: var(--emerald); background: var(--bg-3); transform: translateY(-4px); }
.feature__num { font-family: 'Fraunces', serif; font-size: .85rem; color: var(--gold); letter-spacing: .15em; }
.feature h3 { font-family: 'Fraunces', serif; font-weight: 400; font-size: 1.6rem; letter-spacing: -.01em; }
.feature p { color: #a3ada0; font-size: .95rem; line-height: 1.55; }

/* ——— pinned compliance ——— */
.pin { overflow: hidden; background: #f3efe3; color: #0a120c; }
.pin__stage { height: 100vh; }
.pin__track { display: flex; height: 100%; will-change: transform; }
.panel {
  flex: 0 0 100vw; height: 100%;
  padding: 6rem 2rem 4rem;
  display: flex; flex-direction: column; justify-content: center; gap: 2rem;
  border-right: 1px solid rgba(0,0,0,.06);
  max-width: none;
}
.panel .eyebrow { color: var(--emerald-2); }
.panel__num { font-family: 'Fraunces', serif; font-style: italic; font-size: 1.5rem; color: var(--emerald-2); }
.panel h3 {
  font-family: 'Fraunces', serif; font-weight: 300;
  font-size: clamp(3rem, 10vw, 9rem);
  line-height: .9;
  letter-spacing: -.03em;
  max-width: 14ch;
}
.panel h3 em { font-weight: 700; color: var(--emerald-2); font-style: italic; }
.panel p { max-width: 50ch; font-size: 1.15rem; color: #2e3a30; line-height: 1.5; }
.panel--cta { justify-content: center; align-items: center; text-align: center; gap: 3rem; }
.panel--cta h3 { max-width: none; }

/* ——— stats ——— */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6rem 2rem;
  max-width: 1400px; margin: 0 auto;
  gap: 1px;
  background: rgba(255,255,255,.05);
}
.stat {
  background: var(--bg);
  padding: 3rem 1.5rem;
  display: flex; flex-direction: column; gap: .5rem;
}
.stat strong {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1;
  color: var(--emerald);
  font-feature-settings: 'tnum';
}
.stat span { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .2em; }

/* ——— pricing ——— */
.pricing {
  padding: 8rem 2rem;
  max-width: 1400px; margin: 0 auto;
}
.pricing__head { text-align: center; margin-bottom: 4rem; }
.pricing__head h2 { font-size: clamp(2rem, 5vw, 4.5rem); }
.pricing__grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.plan {
  padding: 2.5rem 2rem;
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 16px;
  display: flex; flex-direction: column; gap: 1.5rem;
}
.plan--featured {
  background: linear-gradient(180deg, rgba(47,212,107,.1), var(--bg-2));
  border-color: var(--emerald);
  transform: translateY(-12px);
  box-shadow: 0 30px 60px -30px rgba(47,212,107,.3);
}
.plan header h3 { font-family: 'Fraunces', serif; font-weight: 400; font-size: 1.5rem; }
.plan header p { color: var(--muted); font-size: .85rem; margin-top: .25rem; }
.plan__price { display: flex; align-items: baseline; gap: .5rem; padding: 1rem 0; border-top: 1px solid rgba(255,255,255,.06); border-bottom: 1px solid rgba(255,255,255,.06); }
.plan__price strong { font-family: 'Fraunces', serif; font-weight: 300; font-size: 2.5rem; color: var(--fg); }
.plan__price span { color: var(--muted); font-size: .85rem; }
.plan ul { list-style: none; display: flex; flex-direction: column; gap: .75rem; font-size: .9rem; }
.plan li::before { content: '✓ '; color: var(--emerald); font-weight: 700; }
.plan .btn { justify-content: center; margin-top: auto; }

/* ——— faq ——— */
.faq { padding: 8rem 2rem; max-width: 900px; margin: 0 auto; }
.faq__head { text-align: center; margin-bottom: 4rem; }
.faq__head h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
.faq__list { display: flex; flex-direction: column; gap: 0; }
.faq details { border-top: 1px solid rgba(255,255,255,.08); padding: 1.5rem 0; }
.faq details:last-child { border-bottom: 1px solid rgba(255,255,255,.08); }
.faq summary {
  cursor: none; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'Fraunces', serif; font-size: 1.3rem; font-weight: 400;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.5rem; color: var(--emerald); transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: 1rem; color: #a3ada0; line-height: 1.6; max-width: 65ch; }

/* ——— cta ——— */
.cta {
  padding: 10rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(600px 400px at 50% 50%, rgba(47,212,107,.15), transparent 60%);
  pointer-events: none;
}
.cta__inner { position: relative; max-width: 900px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 2rem; }
.cta h2 { font-family: 'Fraunces', serif; font-weight: 300; font-size: clamp(3rem, 8vw, 7rem); line-height: .95; letter-spacing: -.03em; }
.cta__sub { max-width: 50ch; color: var(--muted); font-size: 1.1rem; }
.cta__actions { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

/* ——— footer ——— */
.footer {
  padding: 4rem 2rem 2rem;
  background: var(--bg-2);
  border-top: 1px solid rgba(255,255,255,.06);
  font-size: .85rem;
}
.footer__top {
  display: grid; grid-template-columns: 1fr 2fr;
  gap: 4rem;
  max-width: 1400px; margin: 0 auto;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.footer__brand { display: flex; align-items: center; gap: .6rem; font-weight: 600; }
.footer__mark { width: 22px; height: 22px; color: var(--emerald); }
.footer__brand i { color: var(--muted); font-style: normal; font-weight: 400; }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.footer__cols h5 { font-size: .75rem; text-transform: uppercase; letter-spacing: .2em; color: var(--muted); margin-bottom: 1rem; font-weight: 500; }
.footer__cols a { display: block; color: #a3ada0; padding: .3rem 0; }
.footer__cols a:hover { color: var(--emerald); }
.footer__bottom {
  max-width: 1400px; margin: 0 auto;
  display: flex; justify-content: space-between;
  padding-top: 2rem;
  color: var(--muted);
  text-transform: uppercase; letter-spacing: .2em; font-size: .75rem;
}

/* ——— split helpers ——— */
[data-split] .split-line { display: block; overflow: hidden; padding: .1em 0; }
[data-split] .split-line__inner { display: inline-block; }

@media (max-width: 1024px) {
  .terminal__body { grid-template-columns: 1fr; }
  .terminal__side, .terminal__cart { border: none; border-bottom: 1px solid rgba(255,255,255,.06); }
  .terminal__products { grid-template-columns: repeat(4, 1fr); }
  .features__grid { grid-template-columns: repeat(2, 1fr); }
  .pricing__grid { grid-template-columns: 1fr; max-width: 500px; margin: 0 auto; }
  .plan--featured { transform: none; }
  .hero__proof { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer__top { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  html, body { cursor: auto; }
  .cursor, .cursor-dot { display: none; }
  .nav__links { display: none; }
  .nav { padding: 1rem; }
  .terminal__products { grid-template-columns: repeat(2, 1fr); }
  .features__grid { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: 1fr; }
  .hero { padding: 7rem 1.25rem 3rem; }
  .showcase, .features, .pricing, .faq { padding: 5rem 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
