/* Kokoro Showcase — main stylesheet (light + dark) */
:root {
	--bg: #F6F4EF;
	--surface: #FFFFFF;
	--surface-2: #EFECE5;
	--ink: #15171C;
	--muted: #5A606C;
	--line: rgb(21 23 28 / .10);
	--line-strong: rgb(21 23 28 / .22);
	--brand: #E8505B;
	--brand-ink: #B8303B;
	--code-bg: #15171C;
	--shadow: 0 30px 60px -30px rgb(21 23 28 / .35);
	--radius: 18px;
	--radius-lg: 26px;
	--wrap: 1200px;
	--pad: clamp(1rem, 4vw, 2rem);
	--sec: clamp(4rem, 9vw, 7rem);
	--ease: cubic-bezier(.2, .8, .2, 1);
	--display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
	--text: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	color-scheme: light;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg: #0E1014; --surface: #161920; --surface-2: #1C2029; --ink: #ECEDEF; --muted: #9EA5B1;
		--line: rgb(255 255 255 / .09); --line-strong: rgb(255 255 255 / .2); --brand-ink: #FF8A92; --code-bg: #0A0C10;
		--shadow: 0 30px 60px -30px rgb(0 0 0 / .8); color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--bg: #0E1014; --surface: #161920; --surface-2: #1C2029; --ink: #ECEDEF; --muted: #9EA5B1;
	--line: rgb(255 255 255 / .09); --line-strong: rgb(255 255 255 / .2); --brand-ink: #FF8A92; --code-bg: #0A0C10;
	--shadow: 0 30px 60px -30px rgb(0 0 0 / .8); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.7 var(--text); -webkit-font-smoothing: antialiased; overflow-x: clip; transition: background-color .3s, color .3s; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .2em; }
h1, h2, h3, h4, .h4 { font-family: var(--display); line-height: 1.08; letter-spacing: -.035em; margin: 0 0 .6em; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: 1.35rem; letter-spacing: -.02em; }
.h4 { font-size: 1.1rem; margin-top: 1.75rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 100; padding: .7rem 1.1rem; background: var(--ink); color: var(--bg); border-radius: 10px; font-weight: 700; }
.skip-link:focus { top: 1rem; }
main:focus { outline: none; }
.icon { width: 1.15em; height: 1.15em; flex: none; }
.muted { color: var(--muted); }
.center { text-align: center; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--muted); }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.wrap--narrow { max-width: calc(760px + 2 * var(--pad)); }
.section { padding-block: var(--sec); }
.section--alt { background: var(--surface-2); }
.section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1.5rem 2rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section__head h2, .section__head h1 { margin: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; font: 600 .78rem/1 var(--text); letter-spacing: .14em; text-transform: uppercase; color: var(--brand-ink); margin-bottom: 1.1rem; }
.pulse { width: .55rem; height: .55rem; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 0 rgb(34 197 94 / .6); }
@media (prefers-reduced-motion: no-preference) { .pulse { animation: pulse 2s infinite; } }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgb(34 197 94 / 0); } 100% { box-shadow: 0 0 0 0 rgb(34 197 94 / 0); } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; padding: .6rem 1.25rem; border-radius: 999px; border: 1.5px solid transparent; font: 600 .97rem/1.2 var(--text); text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .2s var(--ease), background-color .2s, border-color .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-1px); }
.btn--lg { min-height: 54px; padding: .8rem 1.6rem; font-size: 1.02rem; }
.btn--solid { background: var(--ink); color: var(--bg); }
.btn--solid:hover { box-shadow: var(--shadow); }
.btn--ghost { border-color: var(--line-strong); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--ink); }
.btn--accent { background: color-mix(in srgb, var(--accent, var(--brand)) 80%, #000); color: #fff; }
.btn--accent:hover { box-shadow: 0 14px 30px -14px var(--accent, var(--brand)); }
.btn--light { background: #fff; color: #15171C; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); border-bottom: 1px solid transparent; transition: border-color .25s; }
.site-header.is-scrolled { border-color: var(--line); }
.site-header__inner { display: flex; align-items: center; gap: 1.5rem; min-height: 74px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font: 700 1.2rem/1 var(--display); letter-spacing: -.03em; }
.brand__mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--brand); color: #fff; }
.brand__mark .icon { fill: currentColor; }
.brand__logo { max-height: 40px; width: auto; }
.nav { margin-left: auto; }
.nav__list { display: flex; gap: .2rem; list-style: none; margin: 0; padding: 0; }
.nav__list a { display: block; padding: .5rem .85rem; border-radius: 999px; text-decoration: none; font-weight: 500; color: var(--muted); transition: color .2s, background-color .2s; }
.nav__list a:hover { color: var(--ink); background: var(--surface-2); }
.site-header__actions { display: flex; align-items: center; gap: .5rem; }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); cursor: pointer; }
.icon-btn__moon { display: none; }
:root[data-theme="dark"] .icon-btn__sun { display: none; }
:root[data-theme="dark"] .icon-btn__moon { display: block; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .icon-btn__sun { display: none; }
	:root:not([data-theme="light"]) .icon-btn__moon { display: block; }
}

/* Hero */
.hero { position: relative; padding-block: clamp(3.5rem, 8vw, 6.5rem) clamp(2.5rem, 5vw, 4rem); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%); }
.hero::after { content: ""; position: absolute; z-index: -1; width: 520px; height: 520px; right: -120px; top: -160px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 28%, transparent), transparent); filter: blur(10px); }
.hero__inner { display: grid; grid-template-columns: 1.25fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero__title { max-width: 17ch; }
.hero__intro { font-size: clamp(1.08rem, 1.6vw, 1.22rem); color: var(--muted); max-width: 38rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.code-card { margin: 0; border-radius: var(--radius-lg); background: var(--code-bg); color: #E6E8EC; box-shadow: var(--shadow); overflow: hidden; border: 1px solid rgb(255 255 255 / .08); transform: rotate(1.2deg); }
.code-card__bar, .browser { display: flex; align-items: center; gap: .4rem; padding: .8rem 1rem; border-bottom: 1px solid rgb(255 255 255 / .08); }
.code-card__bar span, .browser span { width: 11px; height: 11px; border-radius: 50%; background: #FF5F57; }
.code-card__bar span:nth-child(2), .browser span:nth-child(2) { background: #FEBC2E; }
.code-card__bar span:nth-child(3), .browser span:nth-child(3) { background: #28C840; }
.code-card__bar em, .browser em { margin-left: .6rem; font: 500 .78rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: #9EA5B1; font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code-card pre { margin: 0; padding: 1.4rem 1.5rem 1.6rem; overflow-x: auto; font: 500 clamp(.82rem, 1.2vw, .95rem)/1.75 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.code-card .c { color: #7D8590; }
.code-card .v { color: #FF8A92; }
.code-card .s { color: #A5D6FF; }
.code-card .k { color: #FFA657; }
.code-card .n { color: #7EE787; }
.stats { list-style: none; padding: 0; margin: clamp(2.5rem, 5vw, 4rem) 0 0; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.stats li { padding: 1.3rem 1.5rem; border-left: 1px solid var(--line); }
.stats li:first-child { border-left: 0; }
.stats strong { display: block; font: 700 clamp(1.8rem, 3vw, 2.4rem)/1 var(--display); letter-spacing: -.03em; }
.stats span { color: var(--muted); font-size: .9rem; }

/* Featured */
.featured__inner { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.featured__shot { display: block; border-radius: var(--radius-lg); overflow: hidden; background: #15171C; box-shadow: var(--shadow), 0 0 0 1px var(--line); text-decoration: none; position: relative; }
.featured__shot::after { content: ""; position: absolute; inset: auto -20% -40% -20%; height: 60%; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 35%, transparent), transparent); z-index: -1; }
.featured__shot img { width: 100%; transition: transform .8s var(--ease); }
.featured__shot:hover img { transform: scale(1.02); }
.ticks { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: .55rem; }
.ticks li { display: flex; gap: .6rem; align-items: flex-start; }
.ticks .icon { color: var(--accent, var(--brand)); margin-top: .25em; }

/* Filters + grid */
.filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.filter { min-height: 40px; padding: .4rem .95rem; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink); font: 500 .9rem var(--text); cursor: pointer; }
.filter:hover { border-color: var(--ink); }
.filter.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: clamp(1.25rem, 3vw, 2rem); }
.grid > [hidden] { display: none; }
.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; }
.card:hover, .card:focus-within { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.card__shot { background: #15171C; position: relative; }
.card__shot img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; transition: transform .8s var(--ease); }
.card:hover .card__shot img { transform: scale(1.03); }
.card__placeholder { display: grid; place-items: center; aspect-ratio: 4 / 3; color: var(--accent); background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 60%), #15171C; }
.card__placeholder .icon { width: 56px; height: 56px; }
.card__body { display: flex; flex-direction: column; gap: .5rem; padding: 1.4rem 1.5rem 1.6rem; flex: 1; }
.card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 .25rem; }
.card__title { margin: 0; font-size: 1.45rem; }
.card__title a { text-decoration: none; }
.card__title a:hover { text-decoration: underline; }
.card__text { color: var(--muted); margin: 0; }
.card__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; padding-top: 1rem; }
.tag { display: inline-flex; padding: .2rem .65rem; border-radius: 999px; background: color-mix(in srgb, var(--accent, var(--brand)) 14%, transparent); color: var(--ink); font: 600 .75rem/1.5 var(--text); letter-spacing: .02em; vertical-align: middle; }
.status { display: inline-flex; align-items: center; gap: .35rem; font: 600 .78rem/1 var(--text); color: var(--muted); }
.status::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--muted); }
.status--live::before { background: #22C55E; }
.status--building::before { background: #F59E0B; }
.chips { list-style: none; padding: 0; margin: .25rem 0 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.chips li { padding: .3rem .7rem; border-radius: 8px; border: 1px solid var(--line); font: 500 .82rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); background: var(--surface-2); }
.chips--sm li { font-size: .75rem; padding: .2rem .55rem; }

/* Roadmap */
.roadmap { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 1rem; }
.roadmap__item { display: flex; gap: 1rem; padding: 1.4rem; border-radius: var(--radius); background: var(--surface); border: 1px dashed var(--line-strong); }
.roadmap__item h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.roadmap__item p { margin: 0; color: var(--muted); font-size: .95rem; }
.roadmap__dot { flex: none; width: 14px; height: 14px; margin-top: .3rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 20%, transparent); }

/* Principles */
.principles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 1rem; }
.principle { padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.principle h3 { font-size: 1.1rem; margin: 1rem 0 .4rem; }
.principle p { margin: 0; color: var(--muted); font-size: .95rem; }
.principle__icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand-ink); }

/* CTA */
.cta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem; padding: clamp(2rem, 5vw, 3.5rem); border-radius: var(--radius-lg); background: radial-gradient(500px 260px at 90% 10%, rgb(232 80 91 / .55), transparent), #15171C; color: #D9DCE1; }
.cta h2 { color: #fff; margin-bottom: .3rem; }
.cta p { margin: 0; max-width: 40rem; }

/* Single project */
.project__head { padding-block: clamp(2.5rem, 6vw, 4.5rem) 2rem; max-width: calc(900px + 2 * var(--pad)); }
.crumbs a { color: var(--muted); text-decoration: none; font-weight: 500; }
.crumbs a:hover { color: var(--ink); }
.project__shot { margin-bottom: clamp(2rem, 5vw, 4rem); }
.project__body { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(2rem, 5vw, 4rem); padding-bottom: var(--sec); }
.project__aside { padding: 1.75rem; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); align-self: start; }
.project__aside .h4:first-child { margin-top: 0; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: 1.6rem; margin: 1.6em 0 .5em; }
.prose h2:first-child { margin-top: 0; }
.prose a { color: var(--brand-ink); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding-top: 3rem; }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; }
.site-footer__name { font: 700 1.2rem var(--display); margin: 0; }
.site-footer__links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-footer__links a { text-decoration: none; font-weight: 500; }
.site-footer__links a:hover { text-decoration: underline; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; margin-top: 2rem; padding-block: 1.5rem 2.5rem; border-top: 1px solid var(--line); font-size: .88rem; }
.site-footer__bottom p { margin: 0; }

/* Reveal */
@media (prefers-reduced-motion: no-preference) {
	.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
	.js .reveal.is-visible { opacity: 1; transform: none; }
}

/* Responsive */
@media (max-width: 960px) {
	.hero__inner, .featured__inner, .project__body { grid-template-columns: 1fr; }
	.code-card { transform: none; }
	.stats { grid-template-columns: repeat(2, 1fr); }
	.stats li:nth-child(3) { border-left: 0; }
	.stats li:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
	.nav { display: none; }
	.site-header__actions { margin-left: auto; }
	.hero__title { max-width: none; }
}

/* Case-study galleries: show whole screenshots with captions underneath. */
html body .wp-block-gallery.has-nested-images { align-items: flex-start; }
html body .wp-block-gallery.has-nested-images figure.wp-block-image { flex-direction: column; }
html body .wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) img { height: auto; object-fit: contain; flex: none; }
html body .wp-block-gallery.has-nested-images figure.wp-block-image figcaption,
html body .wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption)::before { position: static; background: none; max-height: none; padding: .5rem 0 0; color: var(--muted); font-size: .875rem; line-height: 1.5; text-align: left; text-shadow: none; -webkit-mask-image: none; mask-image: none; backdrop-filter: none; }
html body .wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption)::before { content: none; }
.wp-block-image img { border-radius: 10px; border: 1px solid var(--surface-2); }
.wp-block-image figcaption { color: var(--muted); font-size: .875rem; }
@media (max-width: 640px) { html body .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) { width: 100%; } }
