/*
Theme Name: MJ Solutions
Theme URI: https://matthewmjjordan.com/
Author: MATTHEWMJJORDAN
Description: Light, fast, responsive multi-page theme for MJ Solutions (owned by MATTHEWMJJORDAN), Phnom Penh, Cambodia.
Version: 5.1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: mjj-services
*/

:root {
  --ink: #142033; --ink-soft: #5b6b82; --bg: #fff; --bg-alt: #f5f8fc; --bg-tint: #eef3ff; --line: #e4e9f2;
  --brand: #1f56ff; --brand-dark: #1640c8; --gold: #f2a20c; --tg: #229ed9;
  --radius: 18px; --max: 1180px; --shadow: 0 18px 40px -22px rgba(20,32,51,.25);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, iframe { max-width: 100%; height: auto; }
a { color: var(--brand); }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.025em; }
p { margin: 0 0 1em; }
svg { width: 1em; height: 1em; flex-shrink: 0; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; z-index: 100; background: #fff; padding: 8px 14px; border-radius: 8px; }
.entry { max-width: 780px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.admin-bar .site-header { top: 32px; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, var(--brand), #6a8dff); color: #fff; font-weight: 800; font-size: 1rem; }
.brand-words { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; }
.brand-sub { font-size: .72rem; font-weight: 600; color: var(--ink-soft); letter-spacing: .04em; }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--brand); }
.nav .btn { color: #fff; padding: 10px 20px; }
.nav-toggle, .nav-burger { display: none; }

/* Buttons */
.btn { display: inline-block; padding: 14px 26px; border-radius: 999px; font: inherit; font-weight: 700; text-decoration: none; text-align: center; border: 0; cursor: pointer; transition: background .2s, transform .2s, border-color .2s; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 10px 22px -10px rgba(31,86,255,.55); }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-2px); }
.btn-ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; margin-top: auto; }
.link-arrow svg { transition: transform .2s; }
.link-arrow:hover svg { transform: translateX(3px); }

/* Hero (home) */
.hero { position: relative; padding: 110px 0 120px; overflow: hidden; isolation: isolate; background: var(--bg-alt); }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(95deg, rgba(255,255,255,.97) 0%, rgba(255,255,255,.9) 42%, rgba(255,255,255,.35) 75%, rgba(255,255,255,.1) 100%); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin-bottom: 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(242,162,12,.2); }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.3rem); max-width: 13ch; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero p { font-size: 1.15rem; color: var(--ink-soft); max-width: 54ch; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Inner page hero */
.page-hero { padding: 72px 0 56px; background: linear-gradient(180deg, var(--bg-tint), #fff); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); max-width: 20ch; }
.page-hero p { font-size: 1.12rem; color: var(--ink-soft); max-width: 60ch; margin: 0; }

/* Sections */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 52px; }
.section h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); }
.section-head p { color: var(--ink-soft); margin: 0; }

/* Clients marquee */
.clients { padding: 40px 0; border-bottom: 1px solid var(--line); background: #fff; }
.clients-title { text-align: center; font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 22px; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; align-items: center; gap: 64px; width: max-content; animation: marquee 28s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.client { display: flex; align-items: center; height: 44px; filter: grayscale(1); opacity: .65; transition: filter .25s, opacity .25s; text-decoration: none; }
.client:hover { filter: none; opacity: 1; }
.client img { height: 40px; width: auto; }
.client-word { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 1.2rem; letter-spacing: .14em; color: #3b3b39; }
.client-word svg { height: 30px; width: 10px; fill: #3b3b39; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 32px)); } }

/* Cards */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { font-size: 1.15rem; }
.card p { color: var(--ink-soft); }
.card-icon { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; background: var(--bg-tint); color: var(--brand); font-size: 24px; flex-shrink: 0; }
.product-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.tag { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 5px 10px; border-radius: 999px; background: #fff6e5; color: #9a6400; }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { position: relative; padding: 5px 0 5px 26px; }
.checks li::before { content: ""; position: absolute; left: 3px; top: 12px; width: 11px; height: 6px; border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(-45deg); }

/* Grow (home) */
.grow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.grow-item { display: flex; flex-direction: column; gap: 10px; padding: 26px 22px; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; transition: transform .25s, box-shadow .25s, border-color .25s; }
.grow-item:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.grow-item h3 { font-size: 1.1rem; margin: 6px 0 0; }
.grow-item p { color: var(--ink-soft); font-size: .93rem; margin: 0; }
.grow-tag { margin-top: auto; font-size: .75rem; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .08em; padding-top: 8px; }

/* Results */
.results { display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: center; }
.results-flip { grid-template-columns: 1.15fr 1fr; }
.results-flip .results-copy { order: 2; }
.results-copy p { color: var(--ink-soft); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 24px 0; }
.stats div { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.stats dt { font-size: 1.6rem; font-weight: 800; color: var(--brand); line-height: 1.1; }
.stats dd { margin: 4px 0 0; color: var(--ink-soft); font-size: .88rem; }
.shot { margin: 0; }
.shot img { display: block; width: 100%; border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--shadow); background: #fff; }
.shot figcaption { font-size: .82rem; color: var(--ink-soft); margin-top: 10px; text-align: center; }

/* Design grid */
.design-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.design-item { padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; cursor: zoom-in; text-align: left; font: inherit; color: var(--ink); transition: transform .25s, box-shadow .25s; }
.design-item:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.design-item img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; }
.design-item span { display: block; padding: 16px 20px; color: var(--ink-soft); font-size: .92rem; }
.design-item strong { display: block; color: var(--ink); font-size: 1.02rem; }
.gh-strip { text-align: center; color: var(--ink-soft); font-size: .88rem; margin: 32px 0 0; }
.gh-strip a { color: var(--ink-soft); }

/* Case study */
.case { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.case-media img { display: block; width: 100%; border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.case-body .lead { font-size: 1.1rem; color: var(--ink-soft); }
.case-body h3 { font-size: 1.05rem; margin-top: 22px; }
.case-body p { color: var(--ink-soft); }
.stack { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 26px; }
.stack span { font-size: .8rem; font-weight: 700; padding: 6px 12px; border-radius: 8px; background: var(--bg-tint); color: var(--ink); }

/* Team */
.team { display: flex; justify-content: center; flex-wrap: wrap; gap: 48px; }
.member { margin: 0; text-align: center; width: 220px; }
.member img { width: 180px; height: 180px; border-radius: 50%; object-fit: cover; display: block; margin: 0 auto 18px; border: 5px solid #fff; box-shadow: 0 0 0 2px var(--line), var(--shadow); }
.member strong { display: block; font-size: 1.1rem; }
.member strong span { color: var(--ink-soft); font-weight: 600; }
.member em { font-style: normal; color: var(--brand); font-weight: 600; font-size: .92rem; }

/* Services page */
.services-list { display: grid; gap: 20px; }
.service-row { display: grid; grid-template-columns: auto 1.2fr 1fr; gap: 28px; align-items: start; padding: 32px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.service-row h2 { font-size: 1.5rem; }
.service-row p { color: var(--ink-soft); margin: 0; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: step; }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: #fff; border: 1px solid var(--line); color: var(--brand); font-weight: 800; margin-bottom: 16px; }
.step h3 { font-size: 1.08rem; }
.step p { color: var(--ink-soft); margin: 0; }

/* About */
.about { display: grid; grid-template-columns: 1.3fr 1fr; gap: 56px; align-items: start; }
.about p { color: var(--ink-soft); font-size: 1.05rem; }
.values { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.values li { display: flex; gap: 14px; padding: 18px; border-radius: 14px; background: var(--bg-alt); }
.values svg { color: var(--brand); font-size: 22px; margin-top: 2px; }
.values strong { display: block; }
.values span { color: var(--ink-soft); font-size: .92rem; }

/* CTA */
.cta { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; padding: 48px; border-radius: 24px; background: linear-gradient(120deg, var(--bg-tint), #fff7e6); border: 1px solid var(--line); }
.cta h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.cta p { color: var(--ink-soft); max-width: 56ch; margin: 0; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: start; }
.contact-form:hover { transform: none; box-shadow: none; }
.contact-form h2 { font-size: 1.5rem; }
.contact-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 18px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.ci-icon { flex: 0 0 46px; height: 46px; border-radius: 12px; background: var(--bg-tint); display: grid; place-items: center; color: var(--brand); font-size: 20px; }
.ci-icon svg { width: 22px; height: 22px; }
.ci-tg { color: var(--tg); }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.map iframe { width: 100%; height: 300px; border: 0; display: block; }

/* Lead form (MJ Leads plugin) */
.mjl-form { display: grid; gap: 16px; }
.mjl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mjl-form label { display: grid; gap: 6px; font-size: .88rem; font-weight: 700; }
.mjl-form input, .mjl-form select, .mjl-form textarea { width: 100%; font: inherit; font-weight: 500; font-size: 1rem; color: var(--ink); background: var(--bg-alt); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; transition: border-color .2s, background .2s; }
.mjl-form input:focus, .mjl-form select:focus, .mjl-form textarea:focus { outline: none; border-color: var(--brand); background: #fff; }
.mjl-form textarea { resize: vertical; min-height: 130px; }
.mjl-submit { width: 100%; }
.mjl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.mjl-alert { padding: 14px 16px; border-radius: 12px; font-weight: 600; margin-bottom: 16px; }
.mjl-ok { background: #e7f8ee; color: #136c3a; }
.mjl-err { background: #fdecec; color: #a61b1b; }

/* Registered (contact page bottom) */
.registered { display: grid; grid-template-columns: 260px 1fr; gap: 36px; align-items: center; }
.cert-thumb { position: relative; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; cursor: zoom-in; box-shadow: var(--shadow); transition: transform .2s; }
.cert-thumb:hover { transform: scale(1.02); }
.cert-thumb img { display: block; width: 100%; }
.cert-thumb span { position: absolute; right: 8px; bottom: 8px; font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(20,32,51,.8); color: #fff; }
.registered h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); }
.registered p { color: var(--ink-soft); margin: 0 0 8px; }
.reg-line { font-weight: 700; color: var(--ink) !important; }
.doc-list { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.doc-list a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px; background: #fff; border: 1px solid var(--line); text-decoration: none; font-weight: 700; color: var(--ink); }
.doc-list small { color: var(--ink-soft); font-weight: 500; }

/* Lightbox */
.lightbox { padding: 0; border: 0; border-radius: 12px; max-width: min(96vw, 1400px); max-height: 92vh; background: transparent; overflow: visible; }
.lightbox::backdrop { background: rgba(20,32,51,.82); }
.lightbox img { display: block; max-width: min(96vw, 1400px); max-height: 92vh; width: auto; height: auto; border-radius: 12px; cursor: zoom-out; }
.lightbox-close { position: absolute; top: -14px; right: -14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; font-size: 24px; line-height: 1; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.3); }

/* Footer (light) */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--line); color: var(--ink-soft); padding: 64px 0 24px; font-size: .94rem; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--brand); }
.site-footer h4 { color: var(--ink); font-size: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { padding: 4px 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1.3fr; gap: 40px; }
.footer-company p { max-width: 40ch; margin-top: 14px; }
.footer-legal { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); text-align: center; }
.footer-legal p { margin: 4px 0; font-size: .88rem; }
.company-logo { display: inline-block; font-weight: 800; font-size: 1.15rem; letter-spacing: .12em; color: var(--ink); padding: 8px 16px; border: 2px solid var(--gold); border-radius: 10px; margin-bottom: 10px; }
.company-kh { color: var(--ink); font-size: 1rem !important; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .84rem; }
.footer-bottom strong { color: var(--ink); }
.credit { font-size: .74rem; opacity: .75; }

/* Telegram floating button */
.tg-float { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px 12px 14px; border-radius: 999px; background: var(--tg); color: #fff; text-decoration: none; font-weight: 700; font-size: .95rem; box-shadow: 0 14px 30px -10px rgba(34,158,217,.7); transition: transform .2s; }
.tg-float:hover { transform: translateY(-3px); }
.tg-float svg { width: 26px; height: 26px; }

/* Tablet */
@media (max-width: 1100px) { .grow { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .results, .results-flip, .case, .contact-grid, .about { grid-template-columns: 1fr; }
  .results-flip .results-copy { order: 0; }
  .service-row { grid-template-columns: auto 1fr; }
  .service-row .checks { grid-column: 2; }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 900px) {
  .nav-burger { display: block; width: 40px; height: 40px; position: relative; cursor: pointer; }
  .nav-burger span, .nav-burger span::before, .nav-burger span::after { position: absolute; left: 9px; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; content: ""; transition: transform .2s, top .2s; }
  .nav-burger span { top: 19px; }
  .nav-burger span::before { left: 0; top: -7px; }
  .nav-burger span::after { left: 0; top: 7px; }
  .nav-toggle:checked + .nav-burger span { background: transparent; }
  .nav-toggle:checked + .nav-burger span::before { top: 0; transform: rotate(45deg); }
  .nav-toggle:checked + .nav-burger span::after { top: 0; transform: rotate(-45deg); }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 20px 20px; box-shadow: 0 20px 30px -20px rgba(20,32,51,.25); }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 14px; border: 0; }
  .nav-toggle:checked ~ .nav { display: flex; }
}

/* Mobile */
@media (max-width: 640px) {
  .hero { padding: 72px 0 80px; }
  .hero::after { background: linear-gradient(180deg, rgba(255,255,255,.93), rgba(255,255,255,.85)); }
  .hero-actions .btn, .cta-actions .btn { flex: 1 1 100%; }
  .section { padding: 60px 0; }
  .page-hero { padding: 52px 0 40px; }
  .grid-4, .grow, .design-grid, .footer-grid, .mjl-row, .steps, .registered { grid-template-columns: 1fr; }
  .service-row { grid-template-columns: 1fr; padding: 24px; gap: 16px; }
  .service-row .checks { grid-column: auto; }
  .cta { padding: 32px 24px; }
  .team { gap: 32px; }
  .member img { width: 150px; height: 150px; }
  .marquee-track { gap: 44px; animation-duration: 22s; }
  .client img { height: 32px; }
  .cert-thumb { max-width: 300px; }
  .tg-float { padding: 14px; right: 16px; bottom: 16px; }
  .tg-float span { display: none; }
  .lightbox-close { top: 8px; right: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .marquee-track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }
  .marquee-track > [aria-hidden="true"] { display: none; }
}

/* ---- v4.1: hero services square + compact work cards ---- */
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { max-width: 15ch; }
.hero::after { background: linear-gradient(95deg, rgba(255,255,255,.97) 0%, rgba(255,255,255,.88) 45%, rgba(255,255,255,.25) 80%, rgba(255,255,255,.05) 100%); }
.hero-card { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 18px; border-radius: 26px; background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 30px 60px -30px rgba(20,32,51,.45); }
.hero-chip { display: flex; flex-direction: column; gap: 8px; padding: 20px 18px; min-height: 150px; border-radius: 18px; background: rgba(255,255,255,.92); color: var(--ink); text-decoration: none; transition: transform .25s, box-shadow .25s; animation: float 6s ease-in-out infinite; }
.hero-chip:nth-child(2), .hero-chip:nth-child(3) { animation-delay: -3s; }
.hero-chip:hover { transform: translateY(-4px); box-shadow: var(--shadow); animation-play-state: paused; }
.hero-chip strong { font-size: 1.02rem; line-height: 1.25; }
.hero-chip small { color: var(--ink-soft); font-size: .8rem; line-height: 1.45; }
.chip-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-tint); color: var(--brand); font-size: 21px; }
.hero-chip:nth-child(2) .chip-icon { background: #fff6e5; color: #c47f00; }
.hero-chip:nth-child(3) .chip-icon { background: #fdeef2; color: #d0346a; }
.hero-chip:nth-child(4) .chip-icon { background: #e9f8f0; color: #17924f; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.work-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.work-card { display: flex; flex-direction: column; padding: 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff; font: inherit; color: var(--ink); text-align: left; cursor: zoom-in; transition: transform .25s, box-shadow .25s; }
.work-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.work-img { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.work-img img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; }
.work-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.work-tag { font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.work-body strong { font-size: .98rem; line-height: 1.3; }
.work-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.work-stats span { font-size: .74rem; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--bg-alt); color: var(--ink-soft); }
.center-link { text-align: center; margin: 28px 0 0; }

@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-card { max-width: 560px; }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .hero-card { gap: 10px; padding: 12px; border-radius: 20px; }
  .hero-chip { min-height: 0; padding: 16px 14px; animation: none; }
  .hero-chip small { font-size: .74rem; }
  .work-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .work-body { padding: 12px; }
  .work-stats span:nth-child(n+2) { display: none; }
}
@media (max-width: 400px) { .work-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .hero-chip { animation: none; } }

/* Cambodian flag badge (hero, top right) */
.flag-badge { position: absolute; top: 20px; right: 20px; z-index: 2; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: rgba(255,255,255,.9); box-shadow: 0 8px 20px -10px rgba(20,32,51,.4); font-size: .78rem; font-weight: 700; color: var(--ink); backdrop-filter: blur(6px); }
.flag-badge svg { width: 36px; height: 24px; border-radius: 4px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
@media (max-width: 640px) { .flag-badge { top: 12px; right: 12px; padding: 4px; } .flag-badge span { display: none; } .flag-badge svg { width: 30px; height: 20px; } }

/* v4.3: role pills in hero + GitHub bar */
.roles { list-style: none; padding: 0; margin: 4px 0 22px; display: flex; flex-wrap: wrap; gap: 10px; }
.roles li { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); box-shadow: 0 6px 16px -10px rgba(20,32,51,.3); font-weight: 700; font-size: .95rem; color: var(--ink); }
.roles svg { color: var(--brand); font-size: 18px; }
.brand-name { letter-spacing: .02em; }
.gh-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin-top: 28px; padding: 14px 20px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.gh-main { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: .95rem; }
.gh-main svg { font-size: 22px; }
.gh-main:hover { color: var(--brand); }
.gh-repos { display: flex; flex-wrap: wrap; gap: 8px; }
.gh-repos a { font-size: .82rem; font-weight: 600; padding: 5px 12px; border-radius: 999px; background: var(--bg-alt); color: var(--ink-soft); text-decoration: none; border: 1px solid var(--line); }
.gh-repos a:hover { color: var(--brand); border-color: var(--brand); }
@media (max-width: 640px) { .roles li { font-size: .85rem; padding: 7px 12px; } }

/* Office photos (About page) */
.office-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.office { margin: 0; }
.office img, .office-ph { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
.office-ph { display: grid; place-content: center; justify-items: center; gap: 10px; background: repeating-linear-gradient(45deg, var(--bg-alt), var(--bg-alt) 14px, #fff 14px, #fff 28px); color: var(--ink-soft); font-weight: 600; font-size: .92rem; }
.office-ph svg { font-size: 30px; color: var(--brand); }
.office figcaption { margin-top: 10px; font-size: .88rem; color: var(--ink-soft); text-align: center; }
@media (max-width: 640px) { .office-grid { grid-template-columns: 1fr; } }

/* v4.4: lighter white overlay on hero so the photo shows more */
.hero::after { background: linear-gradient(95deg, rgba(255,255,255,.82) 0%, rgba(255,255,255,.6) 45%, rgba(255,255,255,.12) 80%, rgba(255,255,255,0) 100%); }
.hero-copy h1, .hero-copy p { text-shadow: 0 1px 12px rgba(255,255,255,.8); }
.hero-copy p { color: #3d4a5e; }
@media (max-width: 640px) { .hero::after { background: linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.66)); } }

/* v4.5 */
.btn-sm { padding: 9px 18px; font-size: .88rem; margin-top: 14px; }
.service-row .btn-sm { color: #fff; }

/* v4.6: plain contact details (no blue / underline) + quote pop-up */
.contact-list a { color: var(--ink); text-decoration: none; font-weight: 600; }
.contact-list a:hover { color: var(--brand); }
.contact-list strong { display: inline-block; color: var(--ink-soft); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 2px; }
.quote-dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; padding: 32px 28px 28px; border: 0; border-radius: 22px; background: #fff; color: var(--ink); box-shadow: 0 40px 80px -30px rgba(20,32,51,.5); }
.quote-dialog::backdrop { background: rgba(20,32,51,.55); backdrop-filter: blur(3px); }
.quote-dialog h2 { font-size: 1.6rem; margin-bottom: 6px; }
.quote-dialog > p { color: var(--ink-soft); margin-bottom: 20px; }
.quote-dialog .lightbox-close { top: 14px; right: 14px; background: var(--bg-alt); box-shadow: none; }
@media (max-width: 640px) { .quote-dialog { padding: 26px 18px 20px; } .quote-dialog .mjl-row { grid-template-columns: 1fr; } }

/* ---- v4.7 ---- */
/* Logo: laptop-with-code mark + spaced sub-line */
.brand-mark { color: #fff; }
.brand-mark svg { width: 26px; height: 26px; }
.brand-sub { margin-top: 3px; letter-spacing: .12em; }

/* Live green dot */
.dot-live { background: #22c55e; box-shadow: none; position: relative; animation: mjj-blink 1.6s ease-in-out infinite; }
.dot-live::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #22c55e; animation: mjj-ping 1.6s cubic-bezier(0,0,.2,1) infinite; }
@keyframes mjj-blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes mjj-ping { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(2.6); opacity: 0; } }

/* Header quote button: continuously running border */
@property --mjj-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.nav .btn-quote, .nav .btn-quote:hover {
  border: 2px solid transparent;
  background: linear-gradient(var(--brand), var(--brand)) padding-box,
              conic-gradient(from var(--mjj-a), #f2a20c, #ffd166 15%, #22c55e 30%, var(--brand) 45%, var(--brand) 85%, #f2a20c) border-box;
  animation: mjj-spin 2.8s linear infinite;
}
.nav .btn-quote:hover { background: linear-gradient(var(--brand-dark), var(--brand-dark)) padding-box, conic-gradient(from var(--mjj-a), #f2a20c, #ffd166 15%, #22c55e 30%, var(--brand) 45%, var(--brand) 85%, #f2a20c) border-box; }
@keyframes mjj-spin { to { --mjj-a: 360deg; } }

/* Cambodian flag corner (hero, top right) */
.flag-badge { display: none; }
.flag-corner { position: absolute; top: 0; right: 0; z-index: 2; width: 150px; height: 150px; pointer-events: none;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
  background: linear-gradient(45deg, transparent 50%, #032ea1 50%, #032ea1 62.5%, #e00025 62.5%, #e00025 87.5%, #032ea1 87.5%); }
.flag-angkor { position: absolute; left: 75%; top: 25%; width: 32px; height: 30px; transform: translate(-50%, -50%) rotate(45deg); }

/* Hero */
.hero-copy .btn-ghost { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; }
.hero-chip { min-height: 0; }
.chip-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.chip-top .tools { margin: 0; gap: 6px; }
.hero-chip-wide { grid-column: 1 / -1; }
.hero-chip:nth-child(5) .chip-icon { background: #f1ecff; color: #6d3fe0; }

/* Tool logo rows */
.tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0 0; }
.tools img { display: block; object-fit: contain; transition: transform .2s; }
.tools img:hover { transform: scale(1.15); }
.grow-item .tools { margin-top: auto; padding-top: 12px; gap: 8px; }
.grow-item .grow-tag { margin-top: 0; }
.service-row .tools { margin: 16px 0 4px; gap: 12px; }

@media (max-width: 640px) {
  .flag-corner { width: 92px; height: 92px; }
  .flag-angkor { width: 20px; height: 19px; }
  .hero-chip-wide { grid-column: 1 / -1; }
  .chip-top .tools img { width: 16px; height: 16px; }
}
@media (prefers-reduced-motion: reduce) { .dot-live, .dot-live::after, .nav .btn-quote { animation: none; } }

/* ---- v4.8: hero tiles restored (no logos), refined ---- */
.hero-card { gap: 14px; padding: 16px; }
.hero-chip { position: relative; min-height: 164px; padding: 22px 20px 20px; gap: 10px; border: 1px solid rgba(255,255,255,.9); overflow: hidden; }
.hero-chip::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--brand); opacity: 0; transition: opacity .25s; }
.hero-chip:nth-child(2)::before { background: #c47f00; }
.hero-chip:nth-child(3)::before { background: #d0346a; }
.hero-chip:nth-child(4)::before { background: #17924f; }
.hero-chip:hover::before { opacity: 1; }
.hero-chip strong { font-size: 1.05rem; }
.chip-go { position: absolute; right: 16px; bottom: 16px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-tint); color: var(--brand); font-size: 15px; opacity: 0; transform: translateX(-6px); transition: opacity .25s, transform .25s; }
.hero-chip:hover .chip-go { opacity: 1; transform: translateX(0); }
.row-link { margin: 14px 0 0 16px; font-size: .9rem; }
@media (max-width: 640px) { .hero-chip { min-height: 0; padding: 16px 14px; } .chip-go { display: none; } .row-link { margin-left: 0; display: flex; } }

/* ---- v4.9: compact header quote button ---- */
.nav { gap: 22px; }
.nav a { white-space: nowrap; }
.nav .btn-quote { padding: 7px 16px; font-size: .86rem; line-height: 1.3; white-space: nowrap; box-shadow: 0 6px 14px -8px rgba(31,86,255,.55); }
.nav .btn-quote:hover { transform: none; }
@media (max-width: 1100px) and (min-width: 901px) { .nav { gap: 16px; } .nav a { font-size: .9rem; } }
@media (max-width: 900px) { .nav .btn-quote { align-self: flex-start; margin-top: 14px; padding: 10px 20px; font-size: .92rem; } }

/* ---- v4.10: service name first, outcome below ---- */
.grow-item h3 { font-size: 1.2rem; margin: 8px 0 0; }
.grow-outcome { display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: 2px; }
.grow-item:nth-child(2) .grow-outcome { color: #c47f00; }
.grow-item:nth-child(3) .grow-outcome { color: #d0346a; }
.grow-item:nth-child(4) .grow-outcome { color: #6d3fe0; }
.grow-item:nth-child(5) .grow-outcome { color: #17924f; }

/* ---- v5.0: slick & fast ---- */
/* Smooth cross-fade between pages (supported browsers; others just load normally) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }
.site-header { view-transition-name: site-header; }

/* Reveal on scroll (class added by JS only, so content is always visible without JS) */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.rv.in { opacity: 1; transform: none; }

/* Smoother interactions */
a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid rgba(31,86,255,.45); outline-offset: 3px; border-radius: 8px; }
.client img { width: auto; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } .rv { opacity: 1; transform: none; } }

/* v5.1 image logo */
.brand-logo { display: block; height: 44px; width: auto; }
@media (max-width: 600px) { .brand-logo { height: 36px; } }
@media (max-width: 380px) { .brand-logo { height: 30px; } }
