/*
Theme Name: Stratamend
Theme URI: https://stratamend.com
Author: Stratamend Pte. Ltd.
Description: Website theme for Stratamend — agentic AI for legacy code modernization, built on Claude Code. Singapore.
Version: 1.1.0
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: stratamend
License: GPL-2.0-or-later
*/

:root {
	--bg: #fbfaf7;
	--surface: #ffffff;
	--dark: #0e1116;
	--dark-2: #161b23;
	--dark-line: #262d38;
	--accent: #d97757;
	--accent-2: #f0a37f;
	--accent-strong: #b8532f; /* filled buttons: white text 4.87:1 */
	--accent-ink: #b04f30; /* accent text on light backgrounds: 5.02:1 */
	--ok: #4fb286;
	--warn: #e6b450;
	--ink: #14171c;
	--muted: #5b6370;
	--line: #e7e3da;
	--radius: 18px;
	--max: 1180px;
	--font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	--mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.65; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; }
a { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
:target { scroll-margin-top: 90px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.025em; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4.1rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.7rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
code { font-family: var(--mono); font-size: .88em; background: rgba(217, 119, 87, .12); color: #a9492b; padding: 2px 6px; border-radius: 6px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.icon { width: 1.25em; height: 1.25em; flex: none; }
.container { width: min(var(--max), 100% - 40px); margin-inline: auto; }
.section { padding: clamp(64px, 9vw, 116px) 0; }
.section--dark { background: var(--dark); color: #c9d1dc; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--white { background: var(--surface); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 14px; }
.section--dark .eyebrow, .hero .eyebrow, .site-footer .eyebrow { color: var(--accent); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 660px; }
.section--dark .lead { color: #9aa5b4; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }
.section-head { margin-bottom: 52px; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 24px; border-radius: 12px; font: inherit; font-weight: 700; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .15s, background .15s, border-color .15s; }
.btn:hover { transform: translateY(-2px); }
.btn .icon { width: 18px; height: 18px; transition: transform .15s; }
.btn:hover .icon { transform: translateX(3px); }
.btn--primary { background: var(--accent-strong); color: #fff; }
.btn--primary:hover { background: #a9492b; }
.btn--sm { padding: 10px 18px; font-size: .9rem; }
.btn--ghost { border-color: currentColor; color: inherit; background: transparent; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(14, 17, 22, .85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--dark-line); color: #fff; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 70px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: #fff; text-decoration: none; letter-spacing: -.02em; }
.brand__mark { width: 30px; height: 30px; flex: none; }
.brand { min-height: 44px; }
.nav ul { display: flex; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav a { color: #c9d1dc; text-decoration: none; font-weight: 500; font-size: .94rem; }
.nav a:hover { color: #fff; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; color: #fff; padding: 9px; min-width: 44px; min-height: 44px; }
.nav__cta { display: none; }
.nav-toggle .icon { width: 26px; height: 26px; }

/* Hero */
.hero { position: relative; overflow: hidden; background: var(--dark); color: #fff; padding: clamp(72px, 10vw, 128px) 0 clamp(64px, 8vw, 104px); }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(800px 420px at 80% 0%, rgba(217, 119, 87, .28), transparent 70%), radial-gradient(600px 400px at 0% 100%, rgba(79, 178, 134, .12), transparent 70%); pointer-events: none; }
.hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(var(--dark-line) 1px, transparent 1px), linear-gradient(90deg, var(--dark-line) 1px, transparent 1px); background-size: 48px 48px; opacity: .35; mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%); pointer-events: none; }
.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.hero h1 span { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { color: #a9b3c1; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 38px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 8px; border: 1px solid var(--dark-line); border-radius: 999px; background: var(--dark-2); font-size: .82rem; color: #c9d1dc; margin-bottom: 22px; }
.pill b { background: var(--accent-strong); color: #fff; border-radius: 999px; padding: 2px 8px; font-size: .72rem; }

/* Agent console */
.console { background: #0a0d12; border: 1px solid var(--dark-line); border-radius: var(--radius); box-shadow: 0 40px 100px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .02) inset; font-family: var(--mono); font-size: .8rem; color: #c9d1dc; overflow: hidden; }
.console__bar { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 16px; border-bottom: 1px solid var(--dark-line); color: #8b95a4; }
.console__bar i { width: 11px; height: 11px; border-radius: 50%; background: #3a4250; }
.console__bar i:nth-child(1) { background: #ff5f57; }
.console__bar i:nth-child(2) { background: #febc2e; }
.console__bar i:nth-child(3) { background: #28c840; }
.console__bar span { margin-left: 8px; }
.console__toggle { margin-left: auto; min-height: 44px; min-width: 64px; padding: 0 12px; border: 1px solid var(--dark-line); border-radius: 8px; background: transparent; color: #c9d1dc; font: inherit; font-family: var(--mono); font-size: .72rem; cursor: pointer; }
.console__toggle:hover { border-color: var(--accent); color: #fff; }
.console__body { padding: 18px; display: grid; gap: 12px; }
.agent { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; }
.agent__name { color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent__name small { color: #8b95a4; }
.agent__state { font-size: .72rem; padding: 2px 8px; border-radius: 6px; background: rgba(230, 180, 80, .12); color: var(--warn); }
.agent__state.is-done { background: rgba(79, 178, 134, .14); color: var(--ok); }
.agent__track { grid-column: 1 / -1; height: 5px; background: var(--dark-line); border-radius: 99px; overflow: hidden; }
.agent__fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 99px; transition: width .6s ease; }
.agent.is-done .agent__fill { background: var(--ok); }
.console__log { border-top: 1px solid var(--dark-line); padding: 12px 18px 16px; min-height: 92px; color: #8b95a4; }
.console__log div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.console__log .ok { color: var(--ok); }
.console__log .hl { color: var(--accent-2); }
.console__note { padding: 0 18px 14px; font-size: .68rem; color: #7d8796; }

/* Logos */
.logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 48px; padding: 32px 0; border-bottom: 1px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; }
.logos small { display: block; width: 100%; text-align: center; font-family: var(--mono); font-size: .72rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* Cards & grids */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(20, 23, 28, .08); border-color: #dcd5c7; }
.section--dark .card { background: var(--dark-2); border-color: var(--dark-line); }
.section--dark .card:hover { border-color: #3a4352; box-shadow: none; }
.card__icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px; color: #fff; background: linear-gradient(135deg, var(--accent), #b04f30); box-shadow: 0 8px 20px rgba(217, 119, 87, .35), inset 0 1px 0 rgba(255, 255, 255, .25); }
.card__icon .icon { width: 24px; height: 24px; }
.stat { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; color: var(--accent); line-height: 1; margin-bottom: 10px; letter-spacing: -.03em; }

.steps { counter-reset: step; }
.step { position: relative; padding: 28px; border: 1px solid var(--dark-line); border-radius: var(--radius); background: var(--dark-2); }
.step__num { font-family: var(--mono); color: var(--accent); font-size: .8rem; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.step__num .icon { width: 22px; height: 22px; color: #fff; }

/* Split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.checklist { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist .icon { color: var(--ok); width: 22px; height: 22px; margin-top: 2px; }
.codeblock { background: var(--dark); color: #c9d1dc; border-radius: var(--radius); padding: 24px; font-family: var(--mono); font-size: .8rem; line-height: 1.8; overflow-x: auto; border: 1px solid var(--dark-line); }
.codeblock .c { color: #8b95a4; }
.codeblock .k { color: var(--accent-2); }
.codeblock .s { color: #9ece6a; }
.codeblock .ok { color: var(--ok); }

/* FAQ */
.faq { max-width: 780px; margin-inline: auto; display: grid; gap: 12px; }
.faq details { padding: 0; }
.faq summary { list-style: none; cursor: pointer; padding: 22px 26px; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-weight: 700; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform .2s; color: var(--muted); }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq details p { padding: 0 26px 22px; margin: 0; color: var(--muted); }

/* Principles, agent loop, roadmap */
.principles { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: .9rem; color: #a9b3c1; }
.principles li { display: flex; align-items: center; gap: 8px; }
.principles .icon { color: var(--accent-2); width: 18px; height: 18px; }
.loop { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; padding: 22px; border: 1px dashed #d8cfbd; border-radius: var(--radius); font-family: var(--mono); font-size: .85rem; }
.loop span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.loop span .icon { color: var(--accent); width: 18px; height: 18px; }
.loop__arrow { color: var(--muted); width: 18px; height: 18px; }
.roadmap__phase { font-family: var(--mono); font-size: .75rem; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .08em; }
.roadmap h3 { margin-top: 8px; }
.roadmap .checklist { margin-top: 12px; gap: 10px; font-size: .95rem; }
.roadmap .checklist .icon { color: var(--accent); width: 18px; height: 18px; }
.section--dark .checklist .icon { color: var(--ok); }

/* Posts */
.post-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; overflow: hidden; padding: 0; }
.post-card__body { padding: 24px; }
.post-card__meta { font-family: var(--mono); font-size: .74rem; color: var(--muted); margin-bottom: 8px; }
.post-card__thumb { aspect-ratio: 1200/630; background: linear-gradient(135deg, var(--dark-2), var(--accent)); }
.post-card__thumb img { width: 100%; height: 100%; object-fit: cover; }

/* CTA form */
.cta { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.form { background: var(--surface); color: var(--ink); border-radius: var(--radius); padding: 32px; display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.form .full { grid-column: 1 / -1; }
.form__note { margin: 0; font-size: .82rem; color: var(--muted); }
.form__note a { color: var(--accent-ink); }
.form label { font-weight: 600; font-size: .86rem; display: grid; gap: 6px; }
.form input, .form select, .form textarea { font: inherit; font-weight: 400; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
.form .hp { position: absolute; left: -9999px; }
.form .btn { justify-content: center; }
.notice { padding: 14px 18px; border-radius: 10px; font-weight: 600; }
.notice--ok { background: #e1f3ea; color: #1f6b47; }
.notice--err { background: #fbe4dc; color: #8a2b10; }
.contact-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.contact-list li { display: flex; gap: 12px; align-items: center; }
.contact-list .icon { color: var(--accent); }

/* Pagination */
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.pagination .page-numbers { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--accent-ink); text-decoration: none; font-weight: 600; background: var(--surface); }
.pagination .page-numbers.current { background: var(--dark); border-color: var(--dark); color: #fff; }

/* Content pages */
.entry { max-width: 760px; margin-inline: auto; }
.entry__meta { color: var(--muted); font-size: .9rem; margin-bottom: 32px; }
.entry__content { font-size: 1.08rem; }
.entry__content h2 { margin-top: 1.6em; font-size: 1.6rem; }

/* Footer */
.site-footer { background: var(--dark); color: #8b95a4; padding: 64px 0 32px; font-size: .92rem; border-top: 1px solid var(--dark-line); }
.site-footer .container { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.site-footer a { color: #c9d1dc; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.site-footer li a, .site-footer li { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer__bottom a { display: inline-block; padding: 12px 0; margin: -12px 0; }
.site-footer h4 { color: #fff; margin: 0 0 14px; font-size: .95rem; }
.social { display: flex; gap: 10px; }
.social a { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--dark-line); border-radius: 10px; }
.social a:hover { border-color: var(--accent); color: var(--accent); }
.social .icon { width: 18px; height: 18px; }
.site-footer__bottom { grid-column: 1 / -1; border-top: 1px solid var(--dark-line); padding-top: 22px; margin-top: 16px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .82rem; }

@media (max-width: 960px) {
	.hero__grid, .cta, .split { grid-template-columns: 1fr; }
	.grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
	.site-footer .container { grid-template-columns: 1fr; }
	.nav-toggle { display: block; }
	.nav { display: none; position: absolute; top: 70px; left: 0; right: 0; background: var(--dark); border-bottom: 1px solid var(--dark-line); padding: 18px 20px; }
	.nav.is-open { display: block; }
	.nav ul { flex-direction: column; gap: 0; }
	.nav ul a { display: flex; align-items: center; min-height: 44px; }
}
@media (max-width: 600px) {
	.site-header__cta { display: none; }
	.nav__cta { display: inline-flex; margin-top: 12px; }
}
@media (max-width: 600px) {
	.grid-2, .grid-3, .grid-4, .form { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.btn, .card, .agent__fill { transition: none; }
}
.entry__content ul, .entry__content ol { padding-left: 1.4em; }
.entry__content li { margin: .4em 0; }
.entry__content code { font-family: var(--mono); font-size: .88em; background: #f1ede5; padding: .1em .35em; border-radius: 6px; }
.entry__content pre { background: var(--dark); color: #c9d1dc; border: 1px solid var(--dark-line); border-radius: 12px; padding: 18px 20px; overflow-x: auto; font-size: .85rem; line-height: 1.7; }
.entry__content pre code { background: none; padding: 0; color: inherit; font-size: inherit; }

/* Article page actions */
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -12px 0 36px; position: relative; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; font-size: .88rem; font-weight: 600; text-decoration: none; cursor: pointer; list-style: none; }
.chip::-webkit-details-marker { display: none; }
.chip:hover { border-color: var(--accent-ink); color: var(--accent-ink); }
.chip--primary { background: var(--dark); border-color: var(--dark); color: #fff; }
.chip--primary:hover { background: #262d38; color: #fff; border-color: #262d38; }
.chip .icon { width: 16px; height: 16px; }
.page-actions__menu { position: relative; }
.page-actions__menu[open] > summary .icon { transform: rotate(180deg); }
.page-actions__menu ul { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; min-width: 260px; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px rgba(14, 17, 22, .12); }
.page-actions__menu li a, .page-actions__menu li button { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; font-size: .9rem; text-align: left; text-decoration: none; cursor: pointer; }
.page-actions__menu li a:hover, .page-actions__menu li button:hover { background: var(--bg); color: var(--accent-ink); }
.page-actions__status { flex-basis: 100%; margin: 0; min-height: 1.4em; font-size: .85rem; color: var(--muted); }

/* Article footer */
.entry__cta { margin-top: 56px; padding: 32px; border-radius: var(--radius); background: var(--dark); color: #c9d1dc; }
.entry__cta h2 { color: #fff; margin: 0 0 10px; font-size: 1.4rem; }
.entry__nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.entry__nav-link { display: grid; gap: 6px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 700; }
.entry__nav-link small { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: .74rem; font-weight: 500; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .06em; }
.entry__nav-link small .icon { width: 14px; height: 14px; }
.entry__nav-link--next { grid-column: 2; text-align: right; }
.entry__nav-link--next small { justify-content: flex-end; }
.entry__nav-link:hover { border-color: var(--accent-ink); }
@media (max-width: 600px) {
	.entry__nav { grid-template-columns: 1fr; }
	.entry__nav-link--next { grid-column: auto; }
	.page-actions__menu ul { position: fixed; left: 16px; right: 16px; top: auto; bottom: 16px; min-width: 0; }
}
