/* site-v2.css · Tum Kantawee revamp
 * Layout patterns: personal-brand hub (inset hero card, pill nav, router, light/bold headings)
 * CI: ConsultingThai — navy #0C1D33 · gold #B99559 · cream #F7F6F3 · Inter + Noto Sans Thai
 */

:root {
    --navy: #0c1d33;
    --navy-2: #102b49;
    --navy-3: #1e466b;
    --gold: #b99559;
    --gold-2: #c6a36b;
    --gold-soft: #e2c58f;
    --sky: #a6cbe8;
    --paper: #f7f6f3;
    --paper-2: #f0ebe2;
    --white: #ffffff;
    --ink: #15314a;
    --muted: #596b7b;
    --line: #d8dfe4;
    --focus: #e2c58f;
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
    --max: 1220px;
    --gutter: clamp(16px, 4vw, 40px);
    --font: "Inter", "Noto Sans Thai", -apple-system, system-ui, "Segoe UI", sans-serif;
    --ease: cubic-bezier(.2, .8, .2, 1);
    --pop: cubic-bezier(.34, 1.56, .64, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    overflow-x: clip;
    color: var(--ink);
    background: var(--paper);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

img {
    height: auto;
}

a {
    color: inherit;
}

button,
input,
select {
    font: inherit;
}

h1,
h2,
h3,
p {
    margin: 0;
}

h1,
h2,
h3 {
    line-height: 1.2;
    letter-spacing: -0.01em;
}

[hidden] {
    display: none !important;
}

.skip {
    position: absolute;
    top: 12px;
    left: -999px;
    z-index: 200;
    padding: 8px 16px;
    color: var(--navy);
    background: var(--gold-soft);
    border-radius: 999px;
}

.skip:focus {
    left: 16px;
}

.shell {
    width: 100%;
    max-width: var(--max);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* light / bold mixed headings */
.mix {
    font-weight: 300;
}

.mix b {
    font-weight: 800;
}

.kicker {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    color: var(--gold);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.kicker::before {
    content: "";
    width: 28px;
    height: 1.5px;
    background: currentColor;
}

.btn {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    color: var(--navy);
    background: var(--gold-soft);
    border: 1px solid var(--gold-soft);
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s var(--pop), background-color 0.2s, box-shadow 0.2s;
}

.btn:hover {
    background: var(--gold-2);
    box-shadow: 0 10px 24px rgba(185, 149, 89, 0.3);
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(1px);
}

.btn--ghost {
    color: inherit;
    background: transparent;
    border-color: currentColor;
}

.btn--ghost:hover {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.btn--navy {
    color: var(--paper);
    background: var(--navy);
    border-color: var(--navy);
}

.btn--navy:hover {
    background: var(--navy-3);
}

.btn:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
button:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
}

.arrow-link {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.arrow-link span {
    transition: transform 0.25s var(--pop);
}

.arrow-link:hover span {
    transform: translateX(4px);
}

/* reveal on scroll */
[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s var(--ease), transform 0.8s var(--ease);
    transition-delay: var(--d, 0s);
}

[data-reveal].in {
    opacity: 1;
    transform: none;
}

/* ================= HERO ================= */

.hero-wrap {
    padding: 12px;
}

.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: min(92svh, 860px);
    color: var(--paper);
    background: var(--navy);
    border-radius: var(--radius-xl);
}

.hero::before {
    content: "";
    position: absolute;
    inset: -40% -20% auto;
    z-index: -2;
    height: 180%;
    background: repeating-conic-gradient(from 180deg at 70% 100%, rgba(226, 197, 143, 0.07) 0deg 0.6deg, transparent 0.6deg 4.5deg);
    mask-image: radial-gradient(ellipse at 70% 100%, #000 10%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at 70% 100%, #000 10%, transparent 70%);
}

.hero-glow {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(520px circle at var(--mx, 72%) var(--my, 80%), rgba(198, 163, 107, 0.22), transparent 60%);
    transition: background-position 0.2s;
    pointer-events: none;
}

.topbar {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    padding: 18px clamp(18px, 3vw, 32px);
}

.brand {
    display: inline-flex;
    gap: 12px;
    align-items: center;
    color: var(--paper);
    text-decoration: none;
    line-height: 1.1;
}

.brand-mark {
    flex: none;
    width: 44px;
    height: 44px;
}

.brand b {
    display: block;
    font-size: 17px;
    font-weight: 800;
}

.brand small {
    display: block;
    color: var(--gold-soft);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.pill-nav {
    display: flex;
    gap: 2px;
    padding: 5px;
    background: var(--paper);
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.pill-nav a {
    padding: 8px 15px;
    color: var(--navy);
    font-size: 14.5px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 999px;
    transition: background-color 0.2s;
}

.pill-nav a:hover {
    background: var(--paper-2);
}

.topbar .btn {
    min-height: 42px;
    padding: 0 18px;
    font-size: 15px;
}

.menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    color: var(--paper);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    cursor: pointer;
}

.menu-btn svg {
    width: 20px;
    margin: auto;
}

.sheet {
    position: fixed;
    inset: 76px 12px auto;
    z-index: 120;
    display: grid;
    gap: 4px;
    padding: 12px;
    background: var(--paper);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 60px rgba(12, 29, 51, 0.35);
}

.sheet a {
    padding: 12px 14px;
    color: var(--navy);
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
}

.sheet a:hover {
    background: var(--paper-2);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: clamp(28px, 4vw, 64px);
    align-items: center;
    padding: clamp(28px, 5vw, 64px) clamp(18px, 4vw, 56px) clamp(40px, 6vw, 72px);
}

.hero h1 {
    font-size: clamp(42px, 6.2vw, 80px);
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.hero h1 .who {
    display: block;
    font-weight: 300;
}

.rotator {
    position: relative;
    display: inline-block;
    height: 1.15em;
    overflow: hidden;
    vertical-align: bottom;
}

.rotator-track {
    display: flex;
    flex-direction: column;
    transition: transform 0.6s var(--ease);
}

.rotator-track span {
    display: block;
    height: 1.15em;
    color: var(--gold-soft);
    font-weight: 800;
    white-space: nowrap;
}

.hero-sub {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin-top: 22px;
    color: var(--paper);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}

.hero-sub span {
    transition: transform 0.25s var(--pop);
}

.hero-sub:hover span {
    transform: translateX(4px);
}

.hero-lede {
    max-width: 34em;
    margin-top: 16px;
    color: rgba(247, 246, 243, 0.78);
    font-size: 17px;
}

.router {
    display: grid;
    gap: 10px;
    max-width: 560px;
    margin-top: 30px;
}

.router label {
    color: var(--gold-soft);
    font-size: 14px;
    font-weight: 600;
}

.router-row {
    display: flex;
    gap: 10px;
}

.router select {
    flex: 1;
    min-width: 0;
    min-height: 52px;
    padding: 0 44px 0 18px;
    color: var(--navy);
    font-size: 16px;
    background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%230c1d33' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 18px center;
    border: 0;
    border-radius: 14px;
    appearance: none;
    cursor: pointer;
}

.router .btn {
    min-height: 52px;
    border-radius: 14px;
}

.router.shake .router-row {
    animation: shake 0.4s;
}

@keyframes shake {
    25% { transform: translateX(-6px); }
    50% { transform: translateX(6px); }
    75% { transform: translateX(-3px); }
}

/* stacked card (ConsultingThai signature) */
.stack-card {
    position: relative;
    padding: 26px;
    color: var(--ink);
    background: var(--paper);
    border-radius: var(--radius-lg);
    box-shadow: 14px 14px 0 -2px var(--navy-3), 14px 14px 0 0 rgba(226, 197, 143, 0.35);
}

.stack-card header {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.stack-card header b {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    color: var(--navy);
    background: var(--gold-soft);
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.chip--line {
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--line);
    font-weight: 600;
}

.row-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.row-list a {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 16px 4px;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--line);
    transition: background-color 0.2s, padding 0.25s var(--ease);
}

.row-list a:hover {
    padding-inline: 10px 0;
    background: rgba(226, 197, 143, 0.18);
}

.row-list .n {
    color: var(--gold);
    font-size: 13px;
    font-weight: 800;
}

.row-list b {
    display: block;
    font-size: 16.5px;
    font-weight: 800;
}

.row-list small {
    display: block;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.5;
}

.row-list .go {
    color: var(--gold);
    font-weight: 800;
    transition: transform 0.25s var(--pop);
}

.row-list a:hover .go {
    transform: translateX(4px);
}

.stack-foot {
    margin-top: 16px;
    padding: 12px 14px;
    color: var(--muted);
    background: var(--paper-2);
    border-left: 3px solid var(--gold);
    border-radius: 0 10px 10px 0;
    font-size: 13.5px;
}

/* ================= TICKER ================= */

.ticker {
    overflow: hidden;
    margin: 28px 0 0;
    border-block: 1px solid var(--line);
}

.ticker-track {
    display: flex;
    width: max-content;
    animation: ticker 48s linear infinite;
}

.ticker:hover .ticker-track {
    animation-play-state: paused;
}

.ticker-run {
    display: flex;
    gap: 34px;
    align-items: center;
    padding: 16px 17px;
    white-space: nowrap;
}

.ticker-run span {
    color: var(--ink);
    font-size: 15px;
    font-weight: 600;
}

.ticker-run i {
    width: 7px;
    height: 7px;
    background: var(--gold);
    border-radius: 50%;
    transform: rotate(45deg);
}

@keyframes ticker {
    to { transform: translateX(-50%); }
}

/* ================= SECTIONS ================= */

.section {
    padding-block: clamp(64px, 9vw, 112px);
}

.sec-head {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: clamp(28px, 4vw, 44px);
}

.sec-head h2 {
    font-size: clamp(34px, 4.6vw, 54px);
    letter-spacing: -0.025em;
}

.sec-head p {
    max-width: 36em;
    margin-top: 10px;
    color: var(--muted);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.p-card {
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    transition: transform 0.35s var(--pop), box-shadow 0.35s var(--ease);
}

.p-card:hover {
    box-shadow: 0 24px 50px rgba(12, 29, 51, 0.14), 10px 10px 0 -2px var(--gold-soft);
    transform: translateY(-6px);
}

.p-card figure {
    position: relative;
    margin: 0;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--navy);
}

.p-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease);
}

.p-card:hover img {
    transform: scale(1.05);
}

.p-card figure .chip {
    position: absolute;
    top: 14px;
    left: 14px;
}

.p-card .body {
    display: grid;
    gap: 8px;
    align-content: start;
    padding: 22px 22px 24px;
}

.p-card h3 {
    font-size: 22px;
    font-weight: 800;
}

.p-card p {
    color: var(--muted);
    font-size: 15.5px;
}

.p-card .meta {
    margin-top: 6px;
    color: var(--gold);
    font-size: 13px;
    font-weight: 700;
}

/* numbers */
.numbers {
    color: var(--paper);
    background: var(--navy);
}

.numbers-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    background: rgba(226, 197, 143, 0.2);
    border-radius: var(--radius-lg);
}

.num-cell {
    display: grid;
    gap: 6px;
    padding: 28px 24px;
    background: var(--navy);
}

.num-cell b {
    color: var(--gold-soft);
    font-size: clamp(36px, 4.4vw, 54px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.num-cell span {
    color: rgba(247, 246, 243, 0.72);
    font-size: 14.5px;
    line-height: 1.5;
}

.fine {
    color: var(--muted);
    font-size: 13px;
}

.numbers .fine {
    margin-top: 16px;
    color: rgba(247, 246, 243, 0.55);
}

.numbers .sec-head h2 {
    color: var(--paper);
}

.numbers .sec-head p {
    color: rgba(247, 246, 243, 0.7);
}

.numbers .arrow-link {
    color: var(--gold-soft);
}

/* credentials */
.cred-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(24px, 4vw, 56px);
    align-items: start;
}

.cred-list a {
    grid-template-columns: 38px minmax(0, 1fr) auto;
}

.cred-photo {
    position: relative;
    margin: 0;
}

.cred-photo img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: 14px 14px 0 -2px var(--paper-2), 14px 14px 0 0 var(--line);
}

.cred-photo figcaption {
    margin-top: 18px;
    color: var(--muted);
    font-size: 13px;
}

/* start here */
.s-card {
    display: grid;
    gap: 10px;
    align-content: start;
    padding: 26px;
    color: inherit;
    text-decoration: none;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    transition: transform 0.35s var(--pop), border-color 0.2s;
}

.s-card:hover {
    border-color: var(--gold);
    transform: translateY(-5px);
}

.s-card .ico {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    color: var(--gold-soft);
    background: var(--navy);
    border-radius: 14px;
}

.s-card .ico svg {
    width: 24px;
}

.s-card h3 {
    margin-top: 6px;
    font-size: 21px;
    font-weight: 800;
}

.s-card p {
    color: var(--muted);
    font-size: 15.5px;
}

.s-card .arrow-link {
    margin-top: 6px;
}

/* books */
.books {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.book {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    padding: 24px;
    color: inherit;
    text-decoration: none;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    transition: transform 0.35s var(--pop);
}

.book:hover {
    transform: translateY(-5px);
}

.cover {
    position: relative;
    display: grid;
    align-content: space-between;
    aspect-ratio: 3 / 4.2;
    padding: 16px 14px;
    color: var(--paper);
    background: linear-gradient(160deg, var(--navy-3), var(--navy) 70%);
    border-radius: 4px 10px 10px 4px;
    box-shadow: inset 6px 0 0 rgba(0, 0, 0, 0.25), 8px 10px 22px rgba(12, 29, 51, 0.3);
    transform: perspective(700px) rotateY(-14deg);
    transition: transform 0.5s var(--pop);
}

.book:hover .cover {
    transform: perspective(700px) rotateY(0deg);
}

.cover small {
    color: var(--gold-soft);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.cover b {
    font-size: 19px;
    font-weight: 800;
    line-height: 1.15;
}

.cover--plain {
    background: var(--paper-2);
    color: var(--ink);
    border: 1px dashed var(--gold);
    box-shadow: none;
    transform: none;
    place-content: center;
    text-align: center;
}

.cover--plain b {
    font-size: 15px;
}

.book .chip {
    width: fit-content;
}

.book h3 {
    margin-top: 10px;
    font-size: 22px;
    font-weight: 800;
}

.book p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 15px;
}

.book .arrow-link {
    margin-top: 12px;
}

/* work with me */
.w-card {
    display: grid;
    gap: 14px;
    align-content: start;
    padding: clamp(24px, 3vw, 34px);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}

.w-card h3 {
    font-size: 24px;
    font-weight: 800;
}

.w-card > p {
    color: var(--muted);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.talks {
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
}

.talks li {
    border-top: 1px solid var(--line);
}

.talks a {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: baseline;
    padding: 13px 0;
    color: inherit;
    text-decoration: none;
}

.talks time {
    color: var(--gold);
    font-size: 14px;
    font-weight: 800;
}

.talks b {
    display: block;
    font-size: 15.5px;
    font-weight: 700;
}

.talks small {
    color: var(--muted);
    font-size: 13px;
}

.talks .go {
    color: var(--gold);
    font-size: 13px;
}

.talks a:hover b {
    text-decoration: underline;
    text-decoration-color: var(--gold);
    text-underline-offset: 3px;
}

.w-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 6px;
}

/* lead panel with statue */
.lead-wrap {
    padding: 12px;
}

.lead {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 24px;
    align-items: end;
    overflow: hidden;
    padding: clamp(32px, 5vw, 64px) clamp(20px, 4vw, 56px) 0;
    color: var(--paper);
    background: var(--navy);
    border-radius: var(--radius-xl);
}

.lead::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: repeating-conic-gradient(from 0deg at 78% 115%, rgba(226, 197, 143, 0.06) 0deg 0.6deg, transparent 0.6deg 5deg);
}

.lead-copy {
    padding-bottom: clamp(32px, 5vw, 64px);
}

.lead h2 {
    font-size: clamp(34px, 4.6vw, 54px);
    letter-spacing: -0.025em;
}

.lead h2 b {
    color: var(--gold-soft);
}

.lead-copy > p {
    max-width: 30em;
    margin-top: 14px;
    color: rgba(247, 246, 243, 0.75);
}

.lead-form {
    display: grid;
    gap: 10px;
    max-width: 520px;
    margin-top: 26px;
}

.lead-form label {
    color: var(--gold-soft);
    font-size: 14px;
    font-weight: 600;
}

.lead-form .row {
    display: flex;
    gap: 10px;
}

.lead-form input[type="email"],
.lead-form input[type="text"] {
    flex: 1;
    min-width: 0;
    min-height: 52px;
    padding: 0 18px;
    color: var(--navy);
    background: var(--paper);
    border: 0;
    border-radius: 14px;
}

.lead-form .btn {
    min-height: 52px;
    border-radius: 14px;
}

.lead-form small {
    color: rgba(247, 246, 243, 0.6);
    font-size: 13px;
}

.lead-form small a {
    color: var(--gold-soft);
}

.lead-form [data-status].is-error {
    color: #ffb4a8;
}

.btn.hot {
    animation: hot 0.6s ease;
}

@keyframes hot {
    0% { box-shadow: 0 0 0 0 rgba(255, 216, 74, 0.8); }
    30% { transform: translate(2px, -2px) rotate(0.8deg); }
    60% { transform: translate(-2px, 1px) rotate(-0.8deg); box-shadow: 0 0 0 14px rgba(255, 216, 74, 0); }
    100% { transform: none; }
}

.statue {
    position: relative;
    align-self: end;
    justify-self: center;
    width: min(100%, 420px);
}

#bust {
    width: 100%;
    height: auto;
    overflow: visible;
    cursor: pointer;
}

#bust:focus-visible {
    outline: 2px solid var(--gold-soft);
    outline-offset: 6px;
    border-radius: 18px;
}

.statue .tag {
    position: absolute;
    top: 6%;
    right: 0;
    padding: 6px 12px;
    color: var(--navy);
    background: var(--gold-soft);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    transform: rotate(6deg);
    animation: bob 2.8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes bob {
    50% { transform: rotate(3deg) translateY(-5px); }
}

.halo { transform-box: fill-box; transform-origin: center; animation: spin 150s linear infinite; }
.headpar { transition: transform 0.6s var(--ease); transform: translate(calc(var(--hx, 0) * 6px), calc(var(--hy, 0) * 4px)); }
.shades { transition: transform 0.38s var(--pop); }
#bust.laser .shades { transform: translateY(-58px) rotate(-5deg); }
.eyeglow { opacity: 0; transition: opacity 0.15s; }
#bust.laser .eyeglow { opacity: 1; }
.glint { animation: glint 5.5s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes glint { 0%, 60% { transform: translateX(-120px) skewX(-24deg); } 82%, 100% { transform: translateX(150px) skewX(-24deg); } }

#laserLayer {
    position: fixed;
    inset: 0;
    z-index: 150;
    width: 100vw;
    height: 100vh;
    overflow: visible;
    pointer-events: none;
}

.spark {
    position: fixed;
    z-index: 151;
    width: 7px;
    height: 7px;
    background: var(--c, var(--gold-soft));
    border-radius: 50%;
    box-shadow: 0 0 8px var(--c, var(--gold-soft));
    pointer-events: none;
    animation: spark 0.7s ease-out forwards;
}

@keyframes spark {
    from { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    to { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.2); }
}

/* ================= FOOTER ================= */

.footer {
    margin-top: 12px;
    padding: 56px 0 32px;
    color: var(--paper);
    background: #08142a;
}

.foot-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 32px;
}

.foot-grid h4 {
    margin: 0 0 12px;
    color: var(--gold-soft);
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.foot-grid ul {
    display: grid;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.foot-grid a {
    color: rgba(247, 246, 243, 0.85);
    text-decoration: none;
}

.foot-grid a:hover {
    color: var(--gold-soft);
}

.foot-grid p {
    max-width: 22em;
    margin-top: 14px;
    color: rgba(247, 246, 243, 0.6);
    font-size: 14.5px;
}

.legal {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    justify-content: space-between;
    margin-top: 44px;
    padding-top: 20px;
    color: rgba(247, 246, 243, 0.5);
    border-top: 1px solid rgba(247, 246, 243, 0.12);
    font-size: 13px;
}

.legal a {
    color: inherit;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 1060px) {
    .pill-nav a {
        padding: 8px 11px;
    }
}

@media (max-width: 980px) {
    .pill-nav,
    .topbar .btn {
        display: none;
    }

    .menu-btn {
        display: grid;
    }

    .hero-grid,
    .cred-grid,
    .lead {
        grid-template-columns: 1fr;
    }

    .stack-card {
        margin-right: 14px;
    }

    .grid-3 {
        grid-template-columns: 1fr 1fr;
    }

    .numbers-grid {
        grid-template-columns: 1fr 1fr;
    }

    .books,
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .lead-copy {
        padding-bottom: 0;
    }

    .statue {
        width: min(100%, 360px);
    }

    .foot-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 16px;
    }

    .hero-wrap,
    .lead-wrap {
        padding: 8px;
    }

    .hero {
        border-radius: 22px;
    }

    .router-row,
    .lead-form .row {
        flex-direction: column;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }

    .sec-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .book {
        grid-template-columns: 110px minmax(0, 1fr);
        gap: 16px;
        padding: 18px;
    }

    .talks a {
        grid-template-columns: 52px minmax(0, 1fr);
    }

    .talks .go {
        display: none;
    }

    .foot-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

    [data-reveal] {
        opacity: 1;
        transform: none;
    }

    .ticker {
        overflow-x: auto;
    }
}

/* =========================================================
   SIGNAL — electric lime, ~10% high-contrast spice
   ========================================================= */
:root {
    --signal: #d7ff3a;
}

::selection {
    color: var(--navy);
    background: var(--signal);
}

.btn:not(.btn--ghost):hover {
    color: var(--navy);
    background: var(--signal);
    border-color: var(--signal);
    box-shadow: 0 10px 26px rgba(215, 255, 58, 0.35);
}

.hl {
    padding-inline: 0.06em;
    background: linear-gradient(transparent 58%, var(--signal) 58%, var(--signal) 90%, transparent 90%);
}

.sticker {
    display: inline-block;
    margin: 18px 0 0 14px;
    padding: 6px 12px;
    color: var(--navy);
    background: var(--signal);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    transform: rotate(-3deg);
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.35);
    transition: transform 0.25s var(--pop);
}

.sticker:hover {
    transform: rotate(0deg) scale(1.06);
}

.rotator-track span::after {
    content: "";
    display: block;
    width: 0.9em;
    height: 0.09em;
    margin-top: -0.06em;
    background: var(--signal);
    border-radius: 99px;
}

.ticker-run i {
    background: var(--signal);
    box-shadow: 0 0 0 2px var(--navy);
}

.p-card:hover {
    box-shadow: 0 24px 50px rgba(12, 29, 51, 0.14), 10px 10px 0 -2px var(--signal);
}

.s-card:hover .ico {
    color: var(--navy);
    background: var(--signal);
}

.statue .tag {
    background: var(--signal);
}

.num-cell:first-child b {
    color: var(--signal);
}

.talks a:hover b {
    text-decoration-color: var(--signal);
    text-decoration-thickness: 3px;
}

@keyframes hot {
    0% { box-shadow: 0 0 0 0 rgba(215, 255, 58, 0.9); background: var(--signal); }
    30% { transform: translate(2px, -2px) rotate(0.8deg); }
    60% { transform: translate(-2px, 1px) rotate(-0.8deg); box-shadow: 0 0 0 16px rgba(215, 255, 58, 0); }
    100% { transform: none; }
}

/* language switch */
.lang-link {
    display: inline-grid;
    place-items: center;
    min-width: 42px;
    min-height: 42px;
    padding: 0 12px;
    color: var(--paper);
    border: 1px solid rgba(247, 246, 243, 0.4);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.lang-link:hover {
    color: var(--navy);
    background: var(--signal);
    border-color: var(--signal);
}

@media (max-width: 980px) {
    .topbar .lang-link {
        margin-left: auto;
        margin-right: 8px;
    }
}

/* Mobile hero: keep the rotator inside the viewport */
@media (max-width: 980px) {
    .hero-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 560px) {
    .hero h1 {
        font-size: clamp(30px, 9.4vw, 42px);
    }

    .hero h1 .rotator {
        display: block;
    }
}

.router,
.router-row {
    min-width: 0;
}

.router select {
    width: 100%;
    max-width: 100%;
}

/* Hero portrait: arched niche with the program card overlapping */
.hero-visual {
    position: relative;
    display: grid;
    min-width: 0;
}

.hero-portrait {
    position: relative;
    justify-self: end;
    width: min(70%, 380px);
    margin: 0 10px 0 0;
    aspect-ratio: 4 / 5;
    background: #8b8680;
    border-radius: 999px 999px 28px 28px;
    outline: 1px solid rgba(226, 197, 143, 0.45);
    outline-offset: 10px;
}

.hero-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 0;
    border-radius: inherit;
}

.hero-portrait::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(12, 29, 51, 0.5));
    border-radius: inherit;
    pointer-events: none;
}

.hero-portrait::before {
    content: "";
    position: absolute;
    top: 16%;
    left: -14px;
    z-index: 1;
    width: 28px;
    height: 28px;
    background: var(--signal);
    border-radius: 50%;
    box-shadow: 0 0 0 6px rgba(215, 255, 58, 0.18);
}

.hero-visual .stack-card {
    z-index: 2;
    width: min(76%, 420px);
    margin-top: -96px;
    padding: 20px 22px 8px;
}

.hero-visual .row-list a {
    padding-block: 12px;
}

.hero-visual .row-list li:last-child a {
    border-bottom: 0;
}

.hero-visual .stack-foot {
    display: none;
}

@media (max-width: 980px) {
    .hero-portrait {
        width: min(70%, 320px);
        margin-right: 24px;
    }

    .hero-visual .stack-card {
        width: auto;
        max-width: 520px;
        margin-top: -72px;
    }
}

/* Seven nav items: switch to the menu button before the pill nav wraps */
.pill-nav {
    flex-wrap: nowrap;
    white-space: nowrap;
}

@media (max-width: 1200px) {
    .pill-nav,
    .topbar .btn {
        display: none;
    }

    .menu-btn {
        display: grid;
    }
}

/* real book photo (สูตรลับจับเงินกลางอากาศ) */
.cover--photo {
    display: block;
    aspect-ratio: auto;
    margin: 0;
    padding: 0;
    background: none;
    border-radius: 0;
    box-shadow: none;
    transform: none;
}

.cover--photo img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 12px 18px rgba(12, 29, 51, 0.22));
    transition: transform 0.5s var(--pop);
}

.book:hover .cover--photo {
    transform: none;
}

.book:hover .cover--photo img {
    transform: rotate(-3deg) scale(1.04);
}

/* Ecosystem: ConsultingThai + DIY ECOM with their sub-projects */
.eco-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.eco-card {
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
}

.eco-card figure {
    position: relative;
    margin: 0;
    aspect-ratio: 16 / 7;
    overflow: hidden;
}

.eco-card figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.eco-card figure .chip {
    position: absolute;
    top: 14px;
    left: 14px;
}

.eco-card .body {
    display: grid;
    gap: 10px;
    padding: 22px 24px 18px;
}

.eco-card h3 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.eco-card .body > p {
    color: var(--muted);
}

.eco-domain {
    width: fit-content;
    color: var(--gold);
    font-weight: 700;
    text-decoration: none;
}

.eco-list a {
    grid-template-columns: minmax(0, 1fr) auto;
}

.chip--soon {
    color: var(--ink);
    background: var(--signal);
}

@media (max-width: 860px) {
    .eco-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
