/* ==========================================================================
   EM Capital Digital — homepage styles
   Palette + type deliberately echo the parent EM Capital site
   (gold #c5a676, Bai Jamjuree display + Inter body) so the division
   reads as a sibling brand.
   ========================================================================== */

:root {
	/* Brand palette — serious navy base + one warm gold accent */
	--bg:          #0e1524;   /* deep navy */
	--bg-soft:     #131c30;
	--bg-elev:     #16223a;   /* cards / raised surfaces */
	--ink:         #eef2f8;   /* near-white text */
	--ink-muted:   #9aa7bd;   /* secondary text */
	--ink-faint:   #6c7a92;
	--accent:      #c5a676;   /* warm gold — matches parent EM Capital */
	--accent-soft: #d8bd91;
	--rule:        rgba(255, 255, 255, 0.09);
	--rule-strong: rgba(255, 255, 255, 0.16);

	--maxw: 1120px;
	--gutter: clamp(20px, 5vw, 48px);
	--radius: 14px;

	--display: "Bai Jamjuree", system-ui, sans-serif;
	--body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--body);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

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

h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0; }

/* ---------- layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

.section { padding-block: clamp(64px, 11vw, 128px); }
.section--tight { padding-block: clamp(48px, 8vw, 88px); }

.eyebrow {
	font-family: var(--body);
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--accent);
	margin: 0 0 18px;
}

.section-head { max-width: 640px; margin-bottom: clamp(36px, 6vw, 60px); }
.section-head h2 {
	font-size: clamp(26px, 4.4vw, 40px);
	font-weight: 700;
	letter-spacing: -0.01em;
}
.section-head p { color: var(--ink-muted); margin: 18px 0 0; font-size: 1.05rem; }

.accent { color: var(--accent); }

/* ---------- buttons ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	font-family: var(--body);
	font-weight: 600;
	font-size: 15px;
	letter-spacing: 0.01em;
	padding: 13px 22px;
	border-radius: 10px;
	text-decoration: none;
	border: 1px solid transparent;
	cursor: pointer;
	transition: transform .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease;
}
.btn--primary { background: var(--accent); color: #1a1205; }
.btn--primary:hover { background: var(--accent-soft); transform: translateY(-1px); }
.btn--ghost { border-color: var(--rule-strong); color: var(--ink); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.btn__arrow { transition: transform .18s ease; }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(14, 21, 36, 0.72);
	backdrop-filter: saturate(140%) blur(12px);
	border-bottom: 1px solid transparent;
	transition: border-color .2s ease, background-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }
.site-header .container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 68px;
}

.wordmark {
	display: inline-flex;
	align-items: baseline;
	gap: 10px;
	font-family: var(--display);
	text-decoration: none;
	color: var(--ink);
}
.wordmark__em { font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; font-size: 16px; }
.wordmark__bar { color: var(--accent); font-weight: 400; }
.wordmark__div { font-weight: 400; letter-spacing: 0.05em; color: var(--ink-muted); font-size: 16px; }

.nav { display: flex; align-items: center; gap: 30px; }
.nav__links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav__links a {
	text-decoration: none;
	color: var(--ink-muted);
	font-size: 15px;
	font-weight: 500;
	transition: color .16s ease;
}
.nav__links a:hover { color: var(--ink); }

.nav__toggle { display: none; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
	position: relative;
	overflow: hidden;
	padding-block: clamp(72px, 13vw, 150px);
	background:
		radial-gradient(1100px 560px at 78% -8%, rgba(197,166,118,0.12), transparent 60%),
		radial-gradient(900px 600px at 50% -20%, var(--bg-soft), var(--bg) 70%);
}
.hero__inner { max-width: 780px; }
.hero h1 {
	font-size: clamp(38px, 8vw, 76px);
	font-weight: 700;
	letter-spacing: -0.02em;
	margin-top: 20px;
}
.hero h1 .line2 { color: var(--accent); }
.hero__lede {
	margin: 26px 0 0;
	max-width: 60ch;
	font-size: clamp(17px, 2.3vw, 20px);
	color: var(--ink-muted);
}
.hero__secondary { color: var(--accent-soft); font-weight: 500; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }
.hero__meta {
	margin-top: 44px;
	padding-top: 26px;
	border-top: 1px solid var(--rule);
	color: var(--ink-faint);
	font-size: 14px;
	letter-spacing: 0.02em;
}

/* ==========================================================================
   Pillars
   ========================================================================== */
.pillars { border-top: 1px solid var(--rule); }
.pillars__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: clamp(24px, 4vw, 48px);
}
.pillar__num {
	font-family: var(--display);
	color: var(--accent);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.16em;
}
.pillar h3 { font-size: 21px; font-weight: 600; margin: 12px 0 8px; }
.pillar p { margin: 0; color: var(--ink-muted); font-size: 15.5px; }

/* ==========================================================================
   Services — the offer ladder
   ========================================================================== */
.services { background: var(--bg-soft); border-block: 1px solid var(--rule); }
.services__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 22px;
}
.service {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--bg-elev);
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	padding: 30px 28px 32px;
	transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.service:hover {
	transform: translateY(-4px);
	border-color: var(--rule-strong);
	box-shadow: 0 18px 40px -24px rgba(0,0,0,0.7);
}
.service__step {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px; height: 34px;
	border-radius: 9px;
	background: rgba(197,166,118,0.13);
	color: var(--accent);
	font-family: var(--display);
	font-weight: 700;
	font-size: 15px;
	margin-bottom: 20px;
}
.service h3 { font-size: 20px; font-weight: 600; }
.service__desc { color: var(--ink-muted); font-size: 15.5px; margin: 12px 0 22px; flex: 1 1 auto; }
.service__foot {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ink-faint);
	padding-top: 18px;
	border-top: 1px solid var(--rule);
}
.service--featured { border-color: rgba(197,166,118,0.45); }
.service__tag {
	position: absolute;
	top: 22px; right: 22px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--accent);
	background: rgba(197,166,118,0.12);
	border: 1px solid rgba(197,166,118,0.3);
	padding: 4px 9px;
	border-radius: 999px;
}

/* ==========================================================================
   Use cases
   ========================================================================== */
.uses__layout { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(36px, 6vw, 72px); align-items: start; }
.uses__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.uses__list li {
	display: flex;
	gap: 16px;
	padding: 18px 4px;
	border-top: 1px solid var(--rule);
}
.uses__list li:last-child { border-bottom: 1px solid var(--rule); }
.uses__check { color: var(--accent); flex: none; margin-top: 3px; }
.uses__list strong { font-weight: 600; display: block; }
.uses__list span { color: var(--ink-muted); font-size: 15px; }
.uses__note {
	margin-top: 26px;
	font-size: 14px;
	color: var(--ink-faint);
}

/* ==========================================================================
   About
   ========================================================================== */
.about { background: var(--bg-soft); border-block: 1px solid var(--rule); }
.about__layout { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 6vw, 72px); align-items: start; }
.about__body p { margin: 0 0 18px; color: var(--ink-muted); font-size: 1.05rem; }
.about__body p:last-child { margin-bottom: 0; }
.about__body strong { color: var(--ink); font-weight: 600; }

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta { text-align: center; }
.cta__inner {
	max-width: 720px;
	margin-inline: auto;
	background:
		radial-gradient(600px 300px at 50% 0%, rgba(197,166,118,0.14), transparent 70%),
		var(--bg-elev);
	border: 1px solid var(--rule-strong);
	border-radius: 20px;
	padding: clamp(40px, 7vw, 68px) var(--gutter);
}
.cta h2 { font-size: clamp(26px, 4.6vw, 42px); font-weight: 700; letter-spacing: -0.01em; }
.cta p { color: var(--ink-muted); margin: 16px auto 30px; max-width: 48ch; }

/* ---------- contact form ---------- */
.contact-form {
	max-width: 520px;
	margin: 8px auto 0;
	text-align: left;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--ink-muted);
	margin-bottom: 7px;
}
.field__opt { color: var(--ink-faint); font-weight: 400; }
.contact-form input,
.contact-form textarea {
	width: 100%;
	font: inherit;
	font-size: 15px;
	color: var(--ink);
	background: rgba(255,255,255,0.03);
	border: 1px solid var(--rule-strong);
	border-radius: 10px;
	padding: 12px 14px;
	transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--ink-faint); }
.contact-form input:focus,
.contact-form textarea:focus {
	outline: none;
	border-color: var(--accent);
	background: rgba(255,255,255,0.05);
	box-shadow: 0 0 0 3px rgba(197,166,118,0.15);
}
.contact-form textarea { resize: vertical; min-height: 116px; }
.contact-form input:user-invalid,
.contact-form textarea:user-invalid { border-color: #d98a6a; }

/* honeypot — visually and semantically hidden, still submitted */
.field--hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 4px; }
.form-actions .btn:disabled { opacity: .6; cursor: default; transform: none; }
.form-status { margin: 0; font-size: 14px; color: var(--ink-muted); }
.form-status.is-error { color: #e0a184; }

.form-success { padding: 8px 0; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { border-top: 1px solid var(--rule); padding-block: 44px; }
.site-footer .container {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
}
.site-footer__meta { color: var(--ink-faint); font-size: 13.5px; }
.site-footer__meta a { color: var(--ink-muted); text-decoration: none; border-bottom: 1px solid var(--rule); }
.site-footer__meta a:hover { color: var(--ink); }

/* ==========================================================================
   Scroll-reveal (progressive enhancement — content visible without JS)
   ========================================================================== */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
	.js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 860px) {
	.pillars__grid { grid-template-columns: 1fr; gap: 28px; }
	.services__grid { grid-template-columns: 1fr; }
	.uses__layout,
	.about__layout { grid-template-columns: 1fr; }
	.form-row { grid-template-columns: 1fr; }

	.nav__links {
		position: fixed;
		inset: 68px 0 auto 0;
		flex-direction: column;
		gap: 0;
		background: var(--bg-soft);
		border-bottom: 1px solid var(--rule);
		padding: 8px var(--gutter) 20px;
		transform: translateY(-120%);
		/* visibility keeps the closed menu fully hidden — translateY alone
		   leaves its bottom edge peeking below the top of the viewport
		   because it's anchored at top:68px. */
		visibility: hidden;
		transition: transform .28s ease, visibility .28s;
	}
	.nav__links.is-open { transform: translateY(0); visibility: visible; }
	.nav__links li { border-top: 1px solid var(--rule); }
	.nav__links a { display: block; padding: 15px 2px; font-size: 16px; }
	.nav__cta { display: none; }
	.nav__toggle {
		display: inline-flex;
		flex-direction: column;
		gap: 5px;
		background: none;
		border: 0;
		padding: 8px;
		cursor: pointer;
	}
	.nav__toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
	.nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
	.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
	.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
