@font-face { font-family: "IBM Plex Sans Thai"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-thai-thai-400-normal.woff2") format("woff2"); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "IBM Plex Sans Thai"; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-sans-thai-thai-500-normal.woff2") format("woff2"); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "IBM Plex Sans Thai"; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-thai-thai-600-normal.woff2") format("woff2"); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "IBM Plex Sans Thai"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-thai-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Thai"; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-sans-thai-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans Thai"; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-thai-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* monrak.net — one page: what we do, the Phai family, other products, contact */
:root {
    --pink: #e4007f;
    --pink-dark: #b80066;
    --pink-soft: #fff0f7;
    --green: #128a5a;
    --text: #1f2430;
    --muted: #667085;
    --border: #ece6ea;
    --surface: #fff;
    --bg-alt: #fcf8fa;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 14px; } /* every rem on the page follows this */
body { margin: 0; background: var(--surface); color: var(--text); font: 1rem/1.65 "IBM Plex Sans Thai", "Segoe UI", sans-serif; }
a { color: var(--pink); }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* top bar */
.top { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.top-row { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.top-logo img { display: block; height: 34px; width: auto; }
.nav { display: flex; gap: 20px; }
.nav a { color: var(--text); text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--pink); }

/* hero */
.hero { text-align: center; padding: 72px 0 64px; background: radial-gradient(ellipse at top, var(--pink-soft), var(--surface) 70%); }
.hero-logo { width: 520px; max-width: 86%; }
.hero h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.35; margin: 28px auto 12px; max-width: 760px; font-weight: 600; }
.hero p { color: var(--muted); font-size: 1.1rem; max-width: 680px; margin: 0 auto 28px; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 10px; font-weight: 600; text-decoration: none; border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--pink); color: #fff; }
.btn-primary:hover { background: var(--pink-dark); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--pink); color: var(--pink); }

/* sections */
.section { padding: 64px 0; }
.section.alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0 0 6px; font-weight: 600; }
.sub { color: var(--muted); margin: 0 0 28px; max-width: 760px; }

/* services */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.service { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
.service.main { grid-column: 1 / -1; border-color: var(--pink); background: linear-gradient(150deg, var(--pink-soft), var(--surface) 65%); }
.service i { font-size: 1.6rem; color: var(--pink); }
.service h3 { margin: 6px 0 4px; font-size: 1.05rem; font-weight: 600; }
.service p { margin: 0; color: var(--muted); }

/* products */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.product { position: relative; display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; color: var(--text); text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s; }
a.product:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0, 0, 0, .07); border-color: var(--pink); }
.product-icon { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--pink-soft); color: var(--pink); font-size: 1.6rem; }
.product-icon img { width: 40px; height: 40px; }
.phai .product-icon { background: #e9f7f0; color: var(--green); }
.product h3 { margin: 0 0 2px; font-size: 1.05rem; font-weight: 600; }
.product p { margin: 0; color: var(--muted); font-size: .95rem; }
.badge { display: inline-block; margin-left: 6px; padding: 1px 9px; border-radius: 999px; font-size: .75rem; font-weight: 600; vertical-align: 2px; }
.badge.ready { background: #e9f7f0; color: var(--green); }
.badge.soon { background: #f2f4f7; color: var(--muted); }
.src { display: block; margin-top: 6px; font-size: .8rem; font-weight: 600; }
.src.open { color: var(--green); }
.src.shut { color: var(--muted); }
.family-title { display: flex; align-items: center; gap: 10px; }
.family-title img { width: 36px; height: 36px; }
.section h2.mt { margin-top: 56px; }

/* contact */
.contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; max-width: 860px; }
.contact-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; min-width: 0; transition: transform .15s, box-shadow .15s, border-color .15s; }
.contact-item:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0, 0, 0, .08); border-color: var(--brand); }
.contact-item i { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 1.5rem; }
.contact-item span { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.contact-item small { color: var(--muted); overflow-wrap: anywhere; }
.contact-item.line { --brand: #06c755; }
.contact-item.fb { --brand: #1877f2; }
.contact-item.mail { --brand: #ea4335; }

/* footer */
.footer { padding: 28px 0; text-align: center; color: var(--muted); font-size: .9rem; }
.footer .heart { color: var(--pink); }

@media (max-width: 640px) {
    .nav { gap: 14px; font-size: .95rem; }
    .nav .hide-sm { display: none; }
    .hero { padding: 48px 0 44px; }
    .section { padding: 48px 0; }
    .products { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .services { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
    .services { grid-template-columns: 1fr; }
}

/* who we are */
.muted { color: var(--muted); }
.about { display: grid; grid-template-columns: 350px 1fr; gap: 40px; align-items: start; }
.about-card { text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 28px 20px; box-shadow: 0 10px 30px rgba(228, 0, 127, .06); }
.avatar { display: block; width: 190px; height: 190px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(140deg, var(--pink), #ff6fb5); color: #fff; font-size: 2rem; font-weight: 600; box-shadow: 0 0 0 6px var(--pink-soft); object-fit: cover; }
.about-card h3 { margin: 0; font-size: 1.15rem; font-weight: 600; }
.about-card p { margin: 2px 0 0; }
.motto { margin-top: 14px !important; color: var(--pink); font-weight: 500; }
.about-text h2 { margin-bottom: 10px !important; }
.lead { font-size: 1.12rem; margin: 0 0 12px; }
.about-text > p { margin: 0 0 12px; }
.why { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.why li { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.why i { flex: none; font-size: 1.4rem; color: var(--pink); margin-top: 2px; }
.why span { color: var(--muted); }
.why b { color: var(--text); font-weight: 600; }

/* who it fits */
.fits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.fit { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; }
.fit.main { border-color: var(--pink); background: linear-gradient(160deg, var(--pink-soft), var(--surface) 60%); }
.fit > i { font-size: 2rem; color: var(--pink); }
.fit h3 { margin: 8px 0 0; font-size: 1.15rem; font-weight: 600; }
.fit .size { margin: 0 0 10px; color: var(--pink); font-weight: 600; }
.fit p { margin: 0 0 10px; color: var(--muted); }
.fit .how { margin: auto 0 0; padding-top: 12px; border-top: 1px dashed var(--border); color: var(--text); }

@media (max-width: 900px) {
    .about { grid-template-columns: 1fr; gap: 24px; }
    .about-card { max-width: 420px; margin: 0 auto; width: 100%; }
    .fits { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .why { grid-template-columns: 1fr; }
}

/* what we can build */
.scale { margin-top: 56px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.stats div { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; text-align: center; }
.stats b { display: block; font-size: 2rem; line-height: 1.2; color: var(--pink); font-weight: 600; font-variant-numeric: tabular-nums; }
.stats span { color: var(--muted); font-size: .92rem; }
.skills { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.skills li { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.skills i { grid-row: span 2; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--pink-soft); color: var(--pink); font-size: 1.4rem; }
.skills b { font-weight: 600; }
.skills span { color: var(--muted); font-size: .9rem; }
.badge.plan { background: var(--pink-soft); color: var(--pink); }
@media (max-width: 900px) {
    .stats { grid-template-columns: repeat(2, 1fr); }
    .skills { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .skills { grid-template-columns: 1fr; }
}

/* the owner's line under what we can build */
.bamboo { display: flex; align-items: center; gap: 16px; margin: 20px 0 0; padding: 18px 22px; border-radius: 16px; background: linear-gradient(120deg, #e9f7f0, var(--surface) 70%); border: 1px solid #cdebdc; }
.bamboo img { flex: none; }
.bamboo p { margin: 0; font-size: 1.15rem; font-weight: 500; color: var(--text); }
.bamboo cite { display: block; margin-top: 2px; font-size: .9rem; font-style: normal; color: var(--green); font-weight: 500; }
.role { white-space: nowrap; }

/* our story */
.story { display: grid; grid-template-columns: 1fr 420px; gap: 36px; align-items: start; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 39px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--pink), #f7b6d6); }
.timeline li { position: relative; display: grid; grid-template-columns: 80px 1fr; gap: 16px; padding-bottom: 22px; }
.timeline li:last-child { padding-bottom: 0; }
.year { position: relative; z-index: 1; justify-self: center; align-self: start; min-width: 64px; text-align: center; padding: 3px 8px; border-radius: 999px; background: var(--surface); border: 2px solid var(--pink); color: var(--pink); font-weight: 600; font-size: .9rem; font-variant-numeric: tabular-nums; }
.timeline .now .year { background: var(--pink); color: #fff; }
.timeline b { font-weight: 600; }
.timeline p { margin: 2px 0 0; color: var(--muted); }
.then { margin: 0; }
.then img { display: block; border-radius: 12px; border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0, 0, 0, .08); transition: transform .15s; }
.then a:hover img { transform: translateY(-2px); }
.then figcaption { margin-top: 8px; color: var(--muted); font-size: .88rem; text-align: center; }
@media (max-width: 900px) {
    .story { grid-template-columns: 1fr; }
    .then { max-width: 520px; }
}

/* story pictures and the gallery */
.then > a { position: relative; display: block; }
.zoom { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font-size: .85rem; }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.thumbs a { display: grid; place-items: center; aspect-ratio: 4 / 3; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); overflow: hidden; transition: border-color .15s, transform .15s; }
.thumbs a:hover { border-color: var(--pink); transform: translateY(-2px); }
.thumbs img { max-width: 92%; max-height: 92%; object-fit: contain; }
.thumbs img { max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(15, 10, 20, .92); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 56px 64px 16px; }
.lightbox[hidden] { display: none; }
.lb-stage { flex: 1; width: 100%; overflow: auto; display: flex; align-items: center; justify-content: center; }
.lb-stage img { max-width: 100%; max-height: 100%; background: #fff; border-radius: 6px; }
.lb-stage img.tall { max-height: none; width: min(1000px, 100%); align-self: flex-start; }
.lb-caption { margin: 10px 0 0; color: #fff; text-align: center; font-size: .95rem; }
.lightbox button { position: absolute; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 1.5rem; cursor: pointer; }
.lightbox button:hover { background: var(--pink); }
.lb-close { top: 10px; right: 12px; }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
    .lightbox { padding: 56px 8px 12px; }
    .lb-prev, .lb-next { top: auto; bottom: 8px; transform: none; }
    .lb-caption { padding: 0 52px; }
}

/* story slider */
.slider { position: relative; overflow: hidden; border-radius: 12px; border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(0, 0, 0, .08); background: var(--surface); }
.slides { display: flex; transition: transform .6s ease; }
.slide { flex: 0 0 100%; display: block; cursor: zoom-in; }
.slide img { display: block; width: 100%; height: auto; }
.slider .zoom { pointer-events: none; }
.slider button { position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .9); color: var(--pink); font-size: 1.3rem; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); opacity: 0; transition: opacity .2s; }
.slider:hover button, .slider button:focus-visible { opacity: 1; }
.sl-prev { left: 10px; }
.sl-next { right: 10px; }
.dots { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px; background: #e3d5dc; cursor: pointer; transition: width .2s, background .2s; }
.dots button.on { width: 24px; background: var(--pink); }
@media (hover: none) {
    .slider button { opacity: 1; }
}

/* motion and texture, after desktopserver.monrak.net */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #fbf6f9; }
::-webkit-scrollbar-thumb { background: #e7c3d6; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--pink); }
#grid-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image: linear-gradient(to right, rgba(31, 36, 48, .04) 1px, transparent 1px), linear-gradient(to bottom, rgba(31, 36, 48, .04) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 40%, transparent 100%);
    mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 40%, transparent 100%); }
.hero, .section, .footer { position: relative; z-index: 2; }
.hero { background: radial-gradient(ellipse at top, rgba(255, 240, 247, .85), rgba(255, 255, 255, 0) 70%); }
.section.alt { background: rgba(252, 248, 250, .72); }
.mono-label { display: block; margin-bottom: 6px; font-family: "JetBrains Mono", ui-monospace, Consolas, monospace; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--pink); }
.mono-label.mt { margin-top: 56px; }
.mono-label.mt + h2 { margin-top: 0; }
.about-card, .why li, .stats div, .skills li, .fit, .service, .product, .contact-item, .slider { background: rgba(255, 255, 255, .74); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.fit.main, .service.main { background: linear-gradient(150deg, rgba(255, 240, 247, .9), rgba(255, 255, 255, .7) 65%); }
.reveal { opacity: 0; transform: translateY(var(--drift, 18px)); transition: opacity .7s ease-out; will-change: transform, opacity; }
.reveal.shown { opacity: 1; }
#floater { display: none; }
@media (min-width: 1440px) {
    #floater { display: block; position: fixed; top: 46%; right: calc((100vw - 1120px) / 4 - 110px); z-index: 1; pointer-events: none; animation: float 7s ease-in-out infinite; }
    #floater img { width: 220px; height: 220px; opacity: .18; }
}
@keyframes float { 0%, 100% { transform: translateY(-50%); } 50% { transform: translateY(calc(-50% - 14px)); } }
@media (prefers-reduced-motion: reduce) { #floater { animation: none; } }

/* each card under the pointer: a pink spotlight that follows it, a slight 3D tilt, a lift, and the icon comes alive */
.reveal { transform: none; translate: 0 var(--drift, 18px); transition: opacity .7s ease-out, transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.card-fx { position: relative; overflow: hidden; transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, opacity .7s ease-out; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.card-fx::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(228, 0, 127, .11), transparent 62%); }
.card-fx::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
    padding: 1px; background: radial-gradient(200px circle at var(--mx, 50%) var(--my, 50%), rgba(228, 0, 127, .7), transparent 70%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.card-fx:hover { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px); box-shadow: 0 16px 36px rgba(228, 0, 127, .10), 0 2px 6px rgba(0, 0, 0, .04); border-color: rgba(228, 0, 127, .25); }
.card-fx:hover::before, .card-fx:hover::after { opacity: 1; }
.card-fx > * { position: relative; }
a.product:hover, .contact-item:hover, .thumbs a:hover { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px); }

/* icons */
.why i, .service > i, .fit > i, .skills i, .product-icon, .contact-item i, .stats b { transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), background .3s, color .3s, box-shadow .3s; }
.card-fx:hover .why i, .why li.card-fx:hover i, .service.card-fx:hover > i, .fit.card-fx:hover > i { transform: scale(1.18) rotate(-8deg); }
.skills li.card-fx:hover i, .product.card-fx:hover .product-icon:not(:has(img)) { transform: scale(1.1) rotate(-6deg); background: var(--pink); color: #fff; box-shadow: 0 6px 16px rgba(228, 0, 127, .3); }
.product.card-fx:hover .product-icon { transform: scale(1.1) rotate(-6deg); box-shadow: 0 6px 16px rgba(18, 138, 90, .18); }
.contact-item.card-fx:hover i { transform: scale(1.12) rotate(-8deg); box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 45%, transparent); }
.stats div.card-fx:hover b { transform: scale(1.12); }
.about-card.card-fx:hover .avatar { transform: scale(1.04); box-shadow: 0 0 0 6px var(--pink-soft), 0 10px 26px rgba(228, 0, 127, .22); }
.avatar { transition: transform .4s ease, box-shadow .4s ease; }
.bamboo.card-fx:hover img { transform: rotate(-12deg) scale(1.08); }
.bamboo img { transition: transform .4s cubic-bezier(.34, 1.56, .64, 1); }
.bamboo.card-fx::before { background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(18, 138, 90, .12), transparent 62%); }
.bamboo.card-fx::after { background: radial-gradient(200px circle at var(--mx, 50%) var(--my, 50%), rgba(18, 138, 90, .7), transparent 70%); }
.bamboo.card-fx:hover { box-shadow: 0 16px 36px rgba(18, 138, 90, .12); border-color: rgba(18, 138, 90, .3); }
@media (hover: none), (prefers-reduced-motion: reduce) {
    .card-fx, .card-fx:hover { transform: none; }
}
.fit > i, .service > i { display: inline-block; align-self: flex-start; line-height: 1; transform-origin: 30% 70%; }

/* paragraphs glide with the scroll too (translate, so it never fights a hover transform) */
.glide { translate: 0 var(--drift, 0px); will-change: translate; }
.reveal { translate: 0 var(--drift, 18px); }

/* small cards: a thin light runs around the border all the time */
@property --beam { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.why li, .skills li, .stats div, .contact-item, .product { isolation: isolate; }
.why li::after, .skills li::after, .stats div::after, .contact-item::after, .product::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; padding: 1px; opacity: .9;
    background: conic-gradient(from var(--beam), transparent 0deg, transparent 290deg, rgba(228, 0, 127, .55) 330deg, rgba(255, 140, 200, .9) 350deg, transparent 360deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
    animation: beam 6s linear infinite; }
.why li:nth-child(2n)::after, .skills li:nth-child(2n)::after, .stats div:nth-child(2n)::after, .product:nth-child(2n)::after { animation-delay: -2s; }
.why li:nth-child(3n)::after, .skills li:nth-child(3n)::after, .stats div:nth-child(3n)::after, .product:nth-child(3n)::after, .contact-item:nth-child(2)::after { animation-delay: -4s; }
.contact-item:nth-child(3)::after { animation-delay: -1s; }
.phai .product::after { background: conic-gradient(from var(--beam), transparent 0deg, transparent 290deg, rgba(18, 138, 90, .5) 330deg, rgba(90, 210, 150, .9) 350deg, transparent 360deg); }
.card-fx:hover::after { opacity: 1; animation-duration: 2.5s; }
@keyframes beam { to { --beam: 360deg; } }
@media (prefers-reduced-motion: reduce) {
    .why li::after, .skills li::after, .stats div::after, .contact-item::after, .product::after { animation: none; opacity: 0; }
}

/* one colour per card (--fx, r g b): its border light, spotlight, hover edge and shadow all use it */
.card-fx, .why li, .skills li, .stats div, .contact-item, .product { --fx: 228 0 127; }
.phai .product, .bamboo { --fx: 18 150 95; }
.contact-item.line { --fx: 6 199 85; }
.contact-item.fb { --fx: 24 119 242; }
.contact-item.mail { --fx: 234 67 53; }
.phai .product { border-color: rgb(18 150 95 / .16); }
.card-fx::before { background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgb(var(--fx) / .11), transparent 62%); }
.card-fx::after { background: radial-gradient(200px circle at var(--mx, 50%) var(--my, 50%), rgb(var(--fx) / .7), transparent 70%); }
.card-fx:hover { box-shadow: 0 16px 36px rgb(var(--fx) / .12), 0 2px 6px rgba(0, 0, 0, .04); border-color: rgb(var(--fx) / .3); }
.why li::after, .skills li::after, .stats div::after, .contact-item::after, .product::after, .phai .product::after {
    background: conic-gradient(from var(--beam), transparent 0deg, transparent 300deg, rgb(var(--fx) / .45) 335deg, rgb(var(--fx) / .95) 352deg, transparent 360deg); }
.phai .product { background: linear-gradient(160deg, rgb(233 247 240 / .92), rgb(246 252 249 / .8) 70%); }
.phai .product-icon { background: #fff; }

/* the Phai family stands on light green, like a bamboo grove */
.section.phai-zone { background: linear-gradient(180deg, rgb(236 248 241 / .85), rgb(244 251 247 / .75)); border-top: 1px solid #d5ede1; border-bottom: 1px solid #d5ede1; }
.phai-zone .mono-label { color: #128a5a; }
.phai-zone .phai .product { background: linear-gradient(160deg, rgb(255 255 255 / .92), rgb(246 252 249 / .85) 70%); }

/* ── one mood per section ──────────────────────────────────────────────
   --zone (r g b) is the section's colour; every card inside takes it as --fx,
   so its running border light, spotlight, hover edge, shadow and icons match the background. */
.section { --zone: 228 0 127; border-top: 1px solid rgb(var(--zone) / .1); }
.section .why li, .section .skills li, .section .stats div, .section .product, .section .card-fx,
.section .service, .section .fit, .section .about-card, .section .slider { --fx: var(--zone); }
.zone-about    { --zone: 214 120 40;  background: linear-gradient(180deg, rgb(255 248 241 / .9), rgb(255 251 246 / .8)); }
.zone-scale    { --zone: 70 105 220;  background: linear-gradient(180deg, rgb(244 247 251 / .9), rgb(248 250 253 / .8)); }
.zone-story    { --zone: 160 112 60;  background: linear-gradient(180deg, rgb(251 246 236 / .92), rgb(253 250 244 / .82)); }
.zone-fit      { --zone: 20 130 200;  background: linear-gradient(180deg, rgb(241 247 253 / .9), rgb(247 251 254 / .8)); }
.zone-services { --zone: 228 0 127;   background: rgb(255 255 255 / .6); }
.phai-zone     { --zone: 18 150 95; }
.zone-more     { --zone: 228 0 127;   background: rgb(252 248 250 / .8); }
.zone-contact  { --zone: 228 0 127;   background: linear-gradient(180deg, rgb(255 240 247 / .9), rgb(255 255 255 / .7)); }
.phai .product { --fx: 18 150 95; }
.contact-item.line { --fx: 6 199 85; }
.contact-item.fb { --fx: 24 119 242; }
.contact-item.mail { --fx: 234 67 53; }
.section .bamboo { --fx: 18 150 95; }

/* labels, icons, numbers and the highlighted cards follow the section */
.section .mono-label { color: rgb(var(--zone)); }
.section .why i, .section .service > i, .section .fit > i, .section .fit .size, .section .stats b { color: rgb(var(--zone)); }
.section .skills i { background: rgb(var(--zone) / .1); color: rgb(var(--zone)); }
.section .skills li.card-fx:hover i { background: rgb(var(--zone)); color: #fff; box-shadow: 0 6px 16px rgb(var(--zone) / .3); }
.section .fit.main, .section .service.main { border-color: rgb(var(--zone) / .55); background: linear-gradient(150deg, rgb(var(--zone) / .09), rgb(255 255 255 / .75) 65%); }
.section .why li, .section .skills li, .section .stats div, .section .fit, .section .service, .section .about-card { border-color: rgb(var(--zone) / .14); }
.about-card { box-shadow: 0 10px 30px rgb(var(--zone, 228 0 127) / .08); }
.about-card .motto { color: rgb(214 120 40); }

/* the story keeps its pink years but takes the old-paper tone for the line */
.zone-story .timeline::before { background: linear-gradient(rgb(160 112 60 / .7), rgb(160 112 60 / .25)); }
.zone-story .year { border-color: rgb(160 112 60); color: rgb(140 95 45); background: #fffaf2; }
.zone-story .timeline .now .year { background: var(--pink); border-color: var(--pink); color: #fff; }
.zone-story .dots button.on { background: rgb(160 112 60); }

/* the Phai ERP card's hover edge follows its own colour, not the old pink rule */
.section a.product:hover { border-color: rgb(var(--fx) / .35); }

/* guestbook: rose mood, form on the left, the messages the owner ticked on the right */
.zone-guest { --zone: 219 39 119; background: linear-gradient(180deg, rgb(255 244 248 / .92), rgb(255 250 252 / .82)); }
.guest { display: grid; grid-template-columns: 380px 1fr; gap: 28px; align-items: start; }
.guest-form { display: grid; gap: 12px; padding: 20px; border-radius: 16px; border: 1px solid rgb(219 39 119 / .16); background: rgb(255 255 255 / .82); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 10px 30px rgb(219 39 119 / .07); }
.guest-form label { display: grid; gap: 4px; font-weight: 500; }
.guest-form .opt { color: var(--muted); font-weight: 400; font-size: .88rem; }
.guest-form input, .guest-form textarea { width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; background: #fff; font: inherit; color: var(--text); resize: vertical; transition: border-color .2s, box-shadow .2s; }
.guest-form input:focus, .guest-form textarea:focus { outline: 0; border-color: rgb(219 39 119 / .6); box-shadow: 0 0 0 3px rgb(219 39 119 / .12); }
.guest-form small { min-height: 0; color: #c0392b; font-weight: 400; }
.guest-form small:empty { display: none; }
.guest-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.guest-send { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.guest-send button { border: 0; cursor: pointer; font: inherit; }
.guest-send button:disabled { opacity: .6; cursor: wait; }
.guest-done { color: #128a5a; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.notes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.note { position: relative; margin: 0; padding: 16px 18px 14px; border-radius: 14px; border: 1px solid rgb(219 39 119 / .14); background: rgb(255 255 255 / .8); }
.note::before { content: "“"; position: absolute; top: -6px; left: 12px; font-size: 3rem; line-height: 1; color: rgb(219 39 119 / .25); font-family: Georgia, serif; }
.note p { margin: 8px 0 10px; overflow-wrap: anywhere; }
.note footer { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .88rem; border-top: 1px dashed var(--border); padding-top: 8px; }
.note footer b { color: var(--text); font-weight: 600; }
.notes-empty { margin: 0; padding: 28px; text-align: center; color: var(--muted); border: 1px dashed rgb(219 39 119 / .3); border-radius: 14px; background: rgb(255 255 255 / .6); }
.visitors { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; padding: 2px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--border); color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
    .guest { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .notes { grid-template-columns: 1fr; }
    .visitors { display: flex; width: fit-content; margin: 8px auto 0; }
}

/* guestbook: a spinner while sending, then the form folds away and only the thank-you stays */
.guest-send .spin { display: none; width: 14px; height: 14px; border: 2px solid rgb(255 255 255 / .45); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.guest-form.sending .guest-send .ti-send { display: none; }
.guest-form.sending .guest-send .spin { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.guest-form.sent > label, .guest-form.sent > .guest-send { display: none; }
.guest-thanks { display: grid; justify-items: center; gap: 6px; padding: 26px 8px; text-align: center; animation: thanks .5s ease-out; }
.guest-thanks[hidden] { display: none; }
.guest-thanks i { font-size: 3rem; color: #128a5a; }
.guest-thanks b { font-size: 1.1rem; }
.guest-thanks p { margin: 0; color: var(--muted); }
@keyframes thanks { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }

/* Thai: lines break between phrases only (assets/thai-wrap.js), no lone word on the last line. */
.nb { white-space: nowrap; }
p, li, h1, h2, h3, figcaption, blockquote, small, span { text-wrap: pretty; }
h1, h2 { text-wrap: balance; }
