/* ge.css · Growth Engine (บริษัท โกรทเอนจิ้น จำกัด) · CI v1 §13
 * Half parent: ConsultingThai tokens (navy, cream, gold, Inter + Noto Sans Thai, calm motion).
 * Half own: one ember accent (--ge-ember) for the activation loop, the mark and the primary button. */
[data-unit="growthengine"] {
  --ge-ember: #FF7A2F;        /* mark, loop, button fill on navy */
  --ge-ember-ink: #A6430B;    /* ember text on cream (5.6:1) */
  --ge-ember-tint: #FFF1E8;
  --btn-bg: var(--ge-ember); --btn-fg: #0C1D33; --btn-bg-hover: var(--signal);
  --m-mark: rgba(255, 122, 47, .35);
  --focus: var(--ge-ember);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--text-base)/var(--leading-body) var(--font-body);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--navy); color: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2 * var(--gutter), var(--wrap-narrow)); margin-inline: auto; }
section { padding-block: var(--space-section); }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: var(--text-display); line-height: var(--leading-display); padding-block: .08em; }
h2 { font-size: var(--text-3xl); line-height: var(--leading-display); padding-block: .06em; }
h3 { font-size: var(--text-xl); line-height: var(--leading-tight); }
p { margin: 0; }
.nb { display: inline-block; }
.lead { font-size: var(--text-lg); color: var(--ink-2); max-width: 40rem; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: var(--space-4);
  font: 600 var(--text-sm)/1.4 var(--font-body); letter-spacing: .02em; color: var(--ge-ember-ink);
}
.kicker::before { content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }
.on-dark .kicker { color: var(--ge-ember); }
.fine { font-size: var(--text-sm); color: var(--muted); }
.on-dark .fine { color: #A3B1C2; }

/* header */
.top { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand svg { width: 36px; height: 36px; border-radius: 9px; flex: none; }
.brand b { display: block; font: 800 1.05rem/1.1 "Inter", var(--font-body); letter-spacing: -0.01em; }
.brand small { display: block; font: 600 .7rem/1.2 "Inter", var(--font-body); letter-spacing: .04em; color: var(--gold-ink); }
.top nav { display: none; gap: 22px; font-size: var(--text-sm); }
.top nav a { text-decoration: none; color: var(--ink-2); }
.top nav a:hover { color: var(--ge-ember-ink); }
@media (min-width: 60rem) { .top nav { display: flex; } }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 26px; border-radius: var(--radius-pill); border: 0;
  background: var(--btn-bg); color: var(--btn-fg); font: 700 var(--text-base)/1.3 var(--font-body);
  text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.btn:hover { background: var(--btn-bg-hover); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 1px var(--line); }
.btn--ghost:hover { background: var(--paper-2); }
.btn .arr { transition: transform var(--dur-base) var(--ease-out); }
.btn:hover .arr { transform: translateX(3px); }
.cta-note { margin-top: 10px; font-size: var(--text-sm); color: var(--muted); }
.on-dark .cta-note { color: #A3B1C2; }

/* hero */
.hero { padding-top: clamp(28px, 4vw, 56px); }
.hero .wrap { display: grid; gap: var(--space-7); align-items: center; }
.hero h1 .ember { color: var(--ge-ember-ink); }
.hero .lead { margin-top: var(--space-5); }
.hero .actions { margin-top: var(--space-6); }
.hero-photo { position: relative; }
.hero-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 60%; border-radius: var(--radius-lg); box-shadow: var(--photo-offset); }
.hero-photo figcaption { position: absolute; left: 14px; bottom: 14px; right: 14px; padding: 10px 14px; border-radius: 14px; background: rgba(12, 29, 51, .82); color: var(--paper); font-size: var(--text-sm); line-height: 1.5; }
.hero-meta { margin-top: var(--space-6); display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--radius-pill); background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); font-size: var(--text-sm); }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--ge-ember); font-style: normal; }
@media (min-width: 62rem) {
  .hero .wrap { grid-template-columns: 1.15fr .85fr; }
  .hero-photo img { aspect-ratio: 4 / 4.6; }
}

/* model: 3 steps, each with a photo */
.model { background: var(--panel); }
.sec-head { max-width: 46rem; margin-bottom: var(--space-7); }
.sec-head .lead { margin-top: var(--space-4); }
.steps { display: grid; gap: var(--space-5); counter-reset: s; list-style: none; margin: 0; padding: 0; }
.step { display: grid; gap: var(--space-4); align-content: start; }
.step figure { margin: 0; }
.step img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-md); }
.step .num { font: 700 var(--text-sm)/1 "Inter", var(--font-body); color: var(--ge-ember-ink); letter-spacing: .08em; }
.step h3 { margin-top: 6px; }
.step p { color: var(--ink-2); margin-top: 6px; }
.step .clips { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.step .clips a { display: block; border-radius: var(--radius-sm); overflow: hidden; position: relative; }
.step .clips img { aspect-ratio: 9 / 13; border-radius: 0; object-position: 50% 30%; }
.step .clips a::after { content: "▶"; position: absolute; right: 8px; bottom: 8px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(12,29,51,.8); color: #fff; font-size: 12px; }
.loop-line { display: none; }
@media (min-width: 56rem) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
  .step .clips img { aspect-ratio: 9 / 12; }
}

/* categories */
.cats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cat { display: flex; flex-direction: column; background: var(--panel); border-radius: var(--radius-md); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.cat .pic { aspect-ratio: 4 / 3; background: var(--paper-2); display: grid; place-items: center; overflow: hidden; }
.cat .pic img { width: 100%; height: 100%; object-fit: cover; }
.cat .pic svg { width: 38%; height: 50%; color: var(--navy-3); }
.cat .pic.tone-a { background: #EAF1F6; } .cat .pic.tone-b { background: #F4EEE3; } .cat .pic.tone-c { background: #EEF3EA; } .cat .pic.tone-d { background: var(--ge-ember-tint); }
.cat .txt { padding: 14px 14px 16px; display: grid; gap: 4px; }
.cat h3 { font-size: var(--text-base); line-height: 1.4; }
.cat p { font-size: var(--text-sm); color: var(--muted); line-height: 1.55; }
.cat .tag { justify-self: start; margin-top: 4px; font-size: .78rem; font-weight: 600; padding: 2px 10px; border-radius: var(--radius-pill); background: var(--paper-2); color: var(--gold-ink); }
.cat .tag--ember { background: var(--ge-ember-tint); color: var(--ge-ember-ink); }
.cat a.more { font-size: var(--text-sm); color: var(--ge-ember-ink); }
@media (min-width: 48rem) { .cats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } .cat .txt { padding: 16px 18px 20px; } }

/* backyard (shared factory) */
.backyard { background: var(--paper-2); }
.by-grid { display: grid; gap: var(--space-6); align-items: center; }
.by-photos { display: grid; grid-template-columns: 1.1fr .9fr; gap: 12px; }
.by-photos figure { margin: 0; }
.by-photos img { width: 100%; object-fit: cover; border-radius: var(--radius-md); }
.by-photos .tall img { aspect-ratio: 3 / 4; }
.by-photos .stack { display: grid; gap: 12px; }
.by-photos .stack img { aspect-ratio: 1 / 1; }
figcaption { margin-top: 6px; font-size: var(--text-sm); color: var(--muted); line-height: 1.5; }
.by-copy ul { margin: var(--space-5) 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.by-copy li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.by-copy li::before { content: ""; width: 22px; height: 22px; margin-top: 3px; border-radius: 50%; background: radial-gradient(circle at 50% 50%, var(--ge-ember) 0 4px, transparent 5px), var(--ge-ember-tint); }
@media (min-width: 60rem) { .by-grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); } }

/* two paths */
.path { position: relative; }
.path--partner { background: var(--navy); color: var(--paper); }
.path--partner .lead, .path--partner p { color: #D4DCE5; }
.path-grid { display: grid; gap: var(--space-6); align-items: center; }
.path-grid figure { margin: 0; }
.path-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-lg); }
.path--partner figcaption { color: #A3B1C2; }
.offer-list { margin: var(--space-5) 0 var(--space-6); padding: 0; list-style: none; display: grid; gap: 14px; }
.offer-list li { padding-left: 34px; position: relative; }
.offer-list li::before { content: ""; position: absolute; left: 0; top: 4px; width: 22px; height: 22px; border-radius: 7px; background: var(--ge-ember); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.offer-list b { color: var(--paper); }
.path--agent .offer-list b { color: var(--ink); }
@media (min-width: 60rem) { .path-grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); } .path-grid.flip > figure { order: 2; } }

/* Earn timeline */
.earn { margin-top: var(--space-7); }
.tl { display: grid; gap: var(--space-5); list-style: none; margin: 0; padding: 0; position: relative; }
.tl li { display: grid; grid-template-columns: 1fr; gap: 10px; align-content: start; }
.tl .when { font: 700 var(--text-sm)/1.3 var(--font-body); color: var(--ge-ember-ink); }
.tl .pics { display: grid; grid-template-columns: repeat(var(--n, 1), 1fr); gap: 8px; }
.tl .pics img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius-sm); }
.tl .pics figure { margin: 0; }
.tl p { color: var(--ink-2); }
@media (min-width: 56rem) {
  .tl { grid-template-columns: repeat(2, 1fr); gap: var(--space-7); }
  .tl::before { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 2px; background: linear-gradient(90deg, var(--line), var(--ge-ember)); }
  .tl li { padding-top: 30px; position: relative; }
  .tl li::before { content: ""; position: absolute; top: 4px; left: 0; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 3px var(--ge-ember); }
}

/* student results */
.results { margin-top: var(--space-7); }
.res-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.res { margin: 0; background: var(--panel); border-radius: var(--radius-md); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; display: flex; flex-direction: column; }
.res img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 78%; }
.res figcaption { margin: 0; padding: 10px 12px 14px; color: var(--ink-2); }
.res .big { display: block; font: 700 var(--text-lg)/1.2 "Inter", var(--font-body); color: var(--navy); }
.res .who { display: block; font-size: .8rem; color: var(--muted); margin-top: 4px; }
@media (max-width: 40rem) {
  .res-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 72%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: thin; }
  .res { scroll-snap-align: start; }
}
.agent-cta { margin-top: var(--space-7); padding: var(--space-6); border-radius: var(--radius-lg); background: var(--navy); color: var(--paper); display: grid; gap: var(--space-4); }
.agent-cta h3 { font-size: var(--text-2xl); line-height: var(--leading-display); }
.agent-cta p { color: #D4DCE5; }
@media (min-width: 56rem) { .agent-cta { grid-template-columns: 1.4fr 1fr; align-items: center; padding: var(--space-7); } .agent-cta .go { justify-self: end; text-align: right; } }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ge-ember-ink); font-size: 1.4rem; line-height: 1; transition: transform var(--dur-base) var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: 10px; color: var(--ink-2); }

/* footer */
.foot { background: var(--navy-deep); color: #D4DCE5; padding-top: var(--space-8); font-size: var(--text-sm); }
.foot .cols { display: grid; gap: var(--space-5); padding-bottom: var(--space-6); }
.foot .brand { color: var(--paper); }
.foot .brand small { color: var(--gold-soft); }
.foot a { color: #D4DCE5; }
.foot a:hover { color: var(--ge-ember); }
@media (min-width: 48rem) { .foot .cols { grid-template-columns: 1.3fr 1fr; } }
.foot .eco-strip { --eco-line: rgba(247, 246, 243, .14); --eco-ink: #D4DCE5; }
.eco-strip .m-ge { width: 28px; height: 28px; border-radius: 7px; }

/* ---------- apply (one question per screen) ---------- */
.apply-shell { padding-block: clamp(24px, 4vw, 56px) var(--space-8); }
.apply-intro { margin-bottom: var(--space-6); }
.apply-intro h1 { font-size: var(--text-3xl); }
.apply-intro .lead { margin-top: var(--space-3); }
.quiz-card { scroll-margin-top: 80px; background: var(--panel); border-radius: var(--radius-lg); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-tight); padding: clamp(20px, 4vw, 40px); }
.progress { display: grid; gap: 8px; margin-bottom: var(--space-5); }
.progress small { font: 600 .78rem/1 "Inter", var(--font-body); letter-spacing: .08em; color: var(--muted); }
.progress-bar { height: 6px; border-radius: 6px; background: var(--paper-2); overflow: hidden; }
.progress-bar i { display: block; height: 100%; width: var(--p, 0%); background: var(--ge-ember); border-radius: 6px; transition: width .35s var(--ease-out); }
.quiz-q { font-size: var(--text-xl); font-weight: 700; line-height: var(--leading-tight); outline: none; }
.quiz-help { margin-top: 8px; color: var(--muted); font-size: var(--text-sm); }
.quiz-options { display: grid; gap: 10px; margin-top: var(--space-5); }
.quiz-option {
  display: flex; gap: 12px; align-items: flex-start; width: 100%; min-height: 56px; padding: 14px 16px;
  text-align: left; font: 500 var(--text-base)/1.5 var(--font-body); color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px; cursor: pointer;
  transition: border-color .2s, background-color .2s, transform .2s;
}
.quiz-option:hover { border-color: var(--ge-ember); }
.quiz-option.is-picked { background: var(--ge-ember-tint); border-color: var(--ge-ember); }
.quiz-option .key { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); font: 700 .8rem/1 "Inter", var(--font-body); color: var(--ge-ember-ink); }
.quiz-option.is-nudged { animation: nudge .5s; }
@keyframes nudge { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
.rm .quiz-option.is-nudged { animation: none; }
.apply-field { display: grid; gap: 6px; margin-top: var(--space-4); }
.apply-field span { font-size: var(--text-sm); font-weight: 600; color: var(--ink-2); }
.apply-field input, .apply-field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--paper); color: var(--ink); font: 400 var(--text-base)/1.5 var(--font-body);
}
.apply-field textarea { min-height: 120px; resize: vertical; }
.apply-field input:focus, .apply-field textarea:focus { outline: none; border-color: var(--ge-ember); box-shadow: 0 0 0 3px rgba(255, 122, 47, .2); }
.field-err { color: var(--error); font-size: var(--text-sm); }
.choice-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: var(--space-5); font-size: var(--text-sm); color: var(--ink-2); }
.choice-consent input { flex: none; width: 20px; height: 20px; margin-top: 3px; accent-color: var(--navy); }
.quiz-nav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; margin-top: var(--space-6); }
.quiz-nav .btn { min-height: 48px; }
.apply-status { display: block; margin-top: 10px; font-size: var(--text-sm); }
.apply-status.is-error { color: var(--error); }
.stop-screen p + p { margin-top: 12px; color: var(--ink-2); }
.stop-screen .actions { margin-top: var(--space-5); display: flex; flex-wrap: wrap; gap: 10px; }

/* thank-you / privacy */
.simple { padding-block: clamp(32px, 6vw, 80px); }
.simple h1 { font-size: var(--text-3xl); }
.simple .lead { margin-top: var(--space-4); }
.next-steps { margin: var(--space-6) 0; padding: 0; list-style: none; display: grid; gap: 14px; counter-reset: n; }
.next-steps li { counter-increment: n; display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; }
.next-steps li::before { content: counter(n); width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ge-ember-tint); color: var(--ge-ember-ink); font: 700 .9rem/1 "Inter", var(--font-body); }
.prose h2 { font-size: var(--text-xl); margin-top: var(--space-6); }
.prose p, .prose ul { margin-top: var(--space-3); color: var(--ink-2); }
