/* Codename Home — main stylesheet */
:root {
	--paper: #efeae3;
	--paper-2: #e7e1d8;
	--ink: #1d1a2b;
	--ink-2: #3a3549;
	--muted: #75707f;
	--line: rgba(29, 26, 43, 0.16);
	--line-strong: rgba(29, 26, 43, 0.4);
	--accent: #19c3dc;
	--sans: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
	--mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	--gutter: clamp(18px, 3vw, 40px);
	--max: 1320px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0; background: var(--paper); color: var(--ink);
	font-family: var(--sans); font-size: 17px; line-height: 1.55;
	-webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink-2); }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.mono, kbd, code { font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 12px; }
.skip-link:focus { left: 8px; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 820px; }
.screen-reader-text { position: absolute !important; clip: rect(0 0 0 0); width: 1px; height: 1px; overflow: hidden; }

/* Type */
.display-1, .display-2, .display-3, .hero__title { font-weight: 500; letter-spacing: -0.035em; line-height: 1.02; margin: 0 0 0.4em; }
.display-1 { font-size: clamp(42px, 7vw, 104px); }
.display-2 { font-size: clamp(30px, 4.2vw, 58px); line-height: 1.06; }
.display-3 { font-size: clamp(26px, 3vw, 40px); }
.lead { font-size: clamp(17px, 1.4vw, 20px); color: var(--ink-2); max-width: 60ch; }
h3 { font-size: 21px; font-weight: 600; letter-spacing: -0.015em; margin: 0 0 0.3em; }
.kicker { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 22px; }
.kicker__idx { color: var(--ink); }

/* Frame corners (blueprint sheet) */
.frame span { position: fixed; width: 10px; height: 10px; z-index: 60; pointer-events: none; border-color: var(--line-strong); border-style: solid; border-width: 0; }
.frame span:nth-child(1) { top: 8px; left: 8px; border-top-width: 1px; border-left-width: 1px; }
.frame span:nth-child(2) { top: 8px; right: 8px; border-top-width: 1px; border-right-width: 1px; }
.frame span:nth-child(3) { bottom: 8px; left: 8px; border-bottom-width: 1px; border-left-width: 1px; }
.frame span:nth-child(4) { bottom: 8px; right: 8px; border-bottom-width: 1px; border-right-width: 1px; }

/* Header */
.site-header {
	position: fixed; inset: 0 0 auto 0; z-index: 50; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
	padding: 14px var(--gutter); pointer-events: none;
}
.site-header > * { pointer-events: auto; }
.site-header__right { display: flex; justify-content: flex-end; gap: 8px; }
.coords { color: var(--muted); }
.brand { text-decoration: none; color: var(--ink); }
.brand__logo { max-height: 36px; width: auto; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; }
.wordmark__text { font-family: var(--sans); font-weight: 600; letter-spacing: 0.32em; font-size: 17px; }
.chip {
	font: 500 13px/1 var(--sans); color: var(--ink); background: rgba(255, 255, 255, 0.55); border: 1px solid var(--line);
	backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
	padding: 8px 10px; border-radius: 3px; text-decoration: none; display: inline-flex; gap: 6px; align-items: center; cursor: pointer;
}
.chip:hover { background: #fff; }
.chip kbd { color: var(--muted); font-size: 11px; }
.menu-panel {
	position: fixed; z-index: 45; inset: 0; background: rgba(239, 234, 227, 0.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
	display: grid; place-items: center; animation: fade 0.25s ease;
}
.menu-panel[hidden] { display: none; }
.menu-panel__inner { width: min(900px, 90vw); }
.menu-panel__label { color: var(--muted); }
.menu-panel .menu { list-style: none; padding: 0; margin: 0 0 40px; counter-reset: m; }
.menu-panel .menu li { counter-increment: m; border-top: 1px solid var(--line); }
.menu-panel .menu li:last-child { border-bottom: 1px solid var(--line); }
.menu-panel .menu a { display: flex; align-items: baseline; gap: 20px; padding: 14px 0; font-size: clamp(32px, 5vw, 64px); letter-spacing: -0.03em; text-decoration: none; transition: padding 0.25s ease; }
.menu-panel .menu a::before { content: "0" counter(m); font: 12px var(--mono); color: var(--muted); }
.menu-panel .menu a:hover { padding-left: 14px; }
.menu-panel__meta { display: flex; flex-wrap: wrap; gap: 8px 30px; color: var(--muted); }
.menu-panel__meta p { margin: 0; }
@keyframes fade { from { opacity: 0; } }

/* Buttons */
.btn {
	display: inline-flex; align-items: center; gap: 10px; padding: 13px 18px; border: 1px solid var(--ink); border-radius: 3px;
	font: 500 15px/1 var(--sans); text-decoration: none; color: var(--ink); background: transparent; cursor: pointer; transition: background 0.2s, color 0.2s;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: transparent; color: var(--ink); }
.btn .arrow { transition: transform 0.2s; }
.btn:hover .arrow { transform: translate(2px, -2px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* Scenes */
.scene { display: block; width: 100%; height: 100%; }
.annotations { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.annotations svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.annotations line { stroke: var(--ink); stroke-opacity: 0.35; stroke-width: 0.75; }
.annotations circle { fill: var(--paper); stroke: var(--ink); stroke-width: 0.9; }
.anno {
	position: absolute; left: 0; top: 0; font: 10.5px/1.25 var(--mono); color: var(--ink-2); white-space: nowrap; will-change: transform;
	transition: opacity 0.35s ease;
}
.anno b { font-weight: 400; color: var(--muted); margin-right: 4px; }
.anno--dim { color: var(--muted); font-size: 11px; }
.anno--accent b { color: #0e98ad; }
.fig { color: var(--muted); position: absolute; left: var(--gutter); bottom: 18px; margin: 0; }

/* Hero */
.hero { position: relative; height: 260vh; }
.hero__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.hero__sticky .scene { position: absolute; inset: 0; }
.hero__copy { position: absolute; left: var(--gutter); bottom: clamp(24px, 5vh, 56px); max-width: 560px; z-index: 2; }
.hero__title { font-size: clamp(30px, 3.7vw, 54px); }
.hero__lead { font-size: 16px; color: var(--ink-2); max-width: 52ch; margin: 0 0 14px; }
.hero__cta { font-size: 16px; margin: 0; }
.hero__cta a { font-weight: 500; }
.hero__hud {
	position: absolute; right: var(--gutter); bottom: clamp(24px, 5vh, 56px); display: flex; flex-direction: column; align-items: flex-end; gap: 10px; color: var(--muted); z-index: 2;
}
.hero__progress { width: 160px; height: 1px; background: var(--line); position: relative; }
.hero__progress i { position: absolute; inset: 0; background: var(--ink); transform-origin: left; transform: scaleX(0); }

/* Intro */
.intro { padding-block: clamp(80px, 14vh, 160px); }
.intro .display-2 { max-width: 22ch; max-width: 26ch; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 70px 0 0; border-top: 1px solid var(--line); }
.stat { padding: 22px 20px 0 0; border-right: 1px solid var(--line); margin: 0; }
.stat + .stat { padding-left: 20px; }
.stat:last-child { border-right: 0; }
.stat dt { color: var(--muted); margin-bottom: 10px; text-transform: uppercase; }
.stat dd { margin: 0; font-size: clamp(28px, 3.4vw, 48px); letter-spacing: -0.03em; font-weight: 500; }

/* Split sections */
.split { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.split--reverse .split__visual { order: 2; }
.split__visual { position: relative; border-right: 1px solid var(--line); }
.split--reverse .split__visual { border-right: 0; border-left: 1px solid var(--line); }
.split__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; }
.split__sticky .scene { position: absolute; inset: 0; }
.split__content { padding: clamp(90px, 16vh, 180px) var(--gutter) clamp(80px, 12vh, 140px); max-width: 680px; }
.split--hero .split__content { padding-top: 140px; }
.service-list { list-style: none; padding: 0; margin: 50px 0 0; }
.service { border-top: 1px solid var(--line); padding: 26px 0 30px; display: grid; grid-template-columns: 70px 1fr; column-gap: 12px; }
.service > *:not(.service__idx) { grid-column: 2; }
.service__idx { grid-row: 1 / span 2; color: var(--muted); padding-top: 6px; }
.service p { margin: 0; color: var(--ink-2); }
.spec-list { list-style: none; padding: 0; margin: 40px 0; }
.spec-list li { border-top: 1px solid var(--line); padding: 14px 0; font-size: 19px; display: flex; gap: 18px; align-items: baseline; }
.spec-list li:last-child { border-bottom: 1px solid var(--line); }
.spec-list .mono { color: var(--muted); }

/* Product */
.product { padding-block: clamp(90px, 14vh, 170px); border-top: 1px solid var(--line); background: linear-gradient(var(--paper), var(--paper-2)); }
.product__head { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: end; margin-bottom: 50px; }
.product__name { font-weight: 600; }
.product__name i { font-style: normal; color: var(--accent); }
.product__grid { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: auto auto; gap: 16px; }
.product__shot { margin: 0; border: 1px solid var(--line-strong); padding: 8px; background: rgba(255, 255, 255, 0.4); position: relative; }
.product__shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.product__shot figcaption { padding: 10px 2px 2px; color: var(--muted); }
.product__shot::before, .product__shot::after { content: ""; position: absolute; width: 7px; height: 7px; border: 1px solid var(--ink); background: var(--paper); }
.product__shot::before { top: -4px; left: -4px; }
.product__shot::after { bottom: -4px; right: -4px; }
.product__shot--main { grid-row: span 2; }
.product__shot--wide { max-width: 1100px; margin-inline: auto; }
.ticks { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 0; margin: 40px 0; color: var(--ink-2); }
.ticks li::before { content: "◆ "; color: var(--accent); }
.product__cta { display: flex; gap: 10px; flex-wrap: wrap; }

/* Globe */
.global { position: relative; min-height: 110vh; border-top: 1px solid var(--line); overflow: hidden; display: flex; align-items: center; }
.global__scene { position: absolute; inset: 0; }
.global__copy { position: relative; z-index: 2; pointer-events: none; }
.global__copy > * { max-width: 560px; }
.global__copy a { pointer-events: auto; }
.global--contact { min-height: 82vh; padding-top: 80px; }
.regions { list-style: none; padding: 0; margin: 30px 0 0; color: var(--ink-2); }
.regions li { padding: 10px 0; border-top: 1px solid var(--line); max-width: 420px; }
.regions span { display: inline-block; width: 36px; color: var(--ink); }

/* Process */
.process { padding-block: clamp(90px, 14vh, 170px); border-top: 1px solid var(--line); }
.steps { list-style: none; padding: 0; margin: 50px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--ink); }
.step { padding: 20px 22px 10px 0; position: relative; }
.step::before { content: ""; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; border: 1px solid var(--ink); background: var(--paper); transform: rotate(45deg); }
.step .mono { color: var(--muted); display: block; margin: 8px 0 14px; }
.step p { color: var(--ink-2); margin: 0; font-size: 16px; }

/* Contact */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(30px, 6vw, 90px); padding-block: clamp(90px, 14vh, 170px); border-top: 1px solid var(--line); }
.contact-form { display: grid; gap: 16px; align-content: start; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 8px; }
.field .mono { color: var(--muted); text-transform: uppercase; }
.field input, .field select, .field textarea {
	font: 16px var(--sans); color: var(--ink); background: rgba(255, 255, 255, 0.45); border: 0; border-bottom: 1px solid var(--line-strong);
	padding: 12px 10px; border-radius: 0; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--ink); background: #fff; }
.contact-form .btn { justify-self: start; margin-top: 8px; }
.hp { position: absolute; left: -9999px; }
.notice { padding: 12px 14px; border: 1px solid var(--line-strong); font-family: var(--mono); font-size: 13px; margin: 0; }
.notice--ok { border-color: #0e98ad; background: rgba(25, 195, 220, 0.08); }

/* Page templates */
.page-hero { padding-top: clamp(120px, 20vh, 220px); padding-bottom: 50px; }
.pb-hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.pb-hero .scene { position: absolute; inset: 0; }
.pb-hero__copy { position: relative; z-index: 2; padding-bottom: clamp(40px, 8vh, 90px); pointer-events: none; }
.pb-hero__copy > * { max-width: 640px; }
.pb-hero__copy a { pointer-events: auto; }
.pb-video { padding-block: 40px 100px; }
.pillars, .audiences, .faq { padding-block: clamp(70px, 12vh, 140px); border-top: 1px solid var(--line); }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 50px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cards--3 { grid-template-columns: repeat(3, 1fr); }
.card { padding: 26px 24px 34px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background 0.25s; }
.card:hover { background: rgba(255, 255, 255, 0.45); }
.card .mono { color: var(--muted); display: block; margin-bottom: 40px; }
.card p { color: var(--ink-2); margin: 0; font-size: 16px; }
.faq__item { border-top: 1px solid var(--line); max-width: 900px; }
.faq__item:last-of-type { border-bottom: 1px solid var(--line); }
.faq__item summary { list-style: none; cursor: pointer; padding: 20px 0; font-size: 21px; display: flex; justify-content: space-between; gap: 20px; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary span { font-family: var(--mono); transition: transform 0.2s; }
.faq__item[open] summary span { transform: rotate(45deg); }
.faq__item p { margin: 0 0 22px; color: var(--ink-2); max-width: 70ch; }
.features { display: grid; gap: clamp(60px, 10vh, 120px); padding-bottom: 100px; }
.feature { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(24px, 4vw, 60px); align-items: center; }
.feature:nth-child(even) .product__shot { order: 2; }
.spec-table { padding-block: 80px; border-top: 1px solid var(--line); }
.spec-table table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td { text-align: left; padding: 16px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec-table th { width: 30%; color: var(--muted); font-weight: 400; text-transform: uppercase; }
.cta { padding-block: clamp(90px, 16vh, 180px); border-top: 1px solid var(--line); text-align: center; }
.cta .btn-row { justify-content: center; }
.cta .mono { color: var(--muted); }

/* Posts */
.post-list { padding-bottom: 120px; }
.post-row a { display: grid; grid-template-columns: 120px 1fr auto; gap: 20px; align-items: baseline; padding: 22px 0; border-top: 1px solid var(--line); text-decoration: none; }
.post-row__title { margin: 0; font-size: clamp(22px, 2.4vw, 32px); font-weight: 500; letter-spacing: -0.02em; }
.post-row__date { color: var(--muted); }
.prose { font-size: 18px; padding-bottom: 80px; }
.prose h2, .prose h3 { letter-spacing: -0.02em; margin-top: 1.6em; }
.prose img { margin-block: 1.4em; }
.prose blockquote { border-left: 2px solid var(--ink); margin: 1.5em 0; padding-left: 20px; font-size: 1.15em; }
.entry__thumb { margin: 0 0 40px; }
.comments { padding-bottom: 80px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); position: relative; }
.site-footer__scene { position: relative; height: clamp(260px, 42vh, 460px); border-bottom: 1px solid var(--line); }
.site-footer__scene .scene { position: absolute; inset: 0; }
.site-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; padding-block: 60px; }
.site-footer__brand p { color: var(--ink-2); max-width: 40ch; margin-top: 18px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer ul a { text-decoration: none; }
.site-footer ul a:hover { text-decoration: underline; }
.foot-label { color: var(--muted); text-transform: uppercase; margin: 0 0 16px; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-block: 22px 30px; color: var(--muted); border-top: 1px solid var(--line); }
.footer-menu { display: flex !important; gap: 18px !important; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* WP core alignment helpers */
.alignwide { max-width: 1100px; margin-inline: auto; }
.alignfull { width: 100%; }
.wp-caption-text, .gallery-caption { font: 12px var(--mono); color: var(--muted); }
.sticky, .bypostauthor { }

@media (max-width: 1000px) {
	.split, .contact, .product__head, .feature { grid-template-columns: 1fr; }
	.split__visual { border-right: 0 !important; border-left: 0 !important; border-bottom: 1px solid var(--line); order: 0 !important; }
	.split__sticky { position: relative; height: 70vh; }
	.split__content { padding-top: 60px; }
	.product__grid { grid-template-columns: 1fr; }
	.product__shot--main { grid-row: auto; }
	.cards { grid-template-columns: 1fr 1fr; }
	.steps { grid-template-columns: 1fr 1fr; row-gap: 30px; }
	.feature:nth-child(even) .product__shot { order: 0; }
	.site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
	body { font-size: 16px; }
	.coords, .hide-sm { display: none; }
	.site-header { grid-template-columns: auto 1fr; }
	.site-header__left { display: none; }
	.stats { grid-template-columns: 1fr 1fr; }
	.stat:nth-child(2) { border-right: 0; }
	.stat:nth-child(3) { padding-left: 0; }
	.cards, .cards--3, .steps, .field-row, .site-footer__grid { grid-template-columns: 1fr; }
	.hero__hud { display: none; }
	.hero__copy { right: var(--gutter); }
	.anno { font-size: 9px; }
	.post-row a { grid-template-columns: 1fr auto; }
	.post-row__date { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.reveal { opacity: 1; transform: none; transition: none; }
}

/* Header backdrop once the page scrolls */
.site-header::before { content: ""; position: absolute; inset: 0 0 -24px; background: linear-gradient(var(--paper) 55%, rgba(239, 234, 227, 0)); opacity: 0; transition: opacity 0.3s; z-index: -1; pointer-events: none; }
.is-scrolled .site-header::before { opacity: 1; }
.site-footer__scene { height: clamp(320px, 56vh, 560px); }
.site-footer__caption { position: absolute; left: var(--gutter); top: 22px; margin: 0; color: var(--muted); }
.global__copy .lead { background: radial-gradient(closest-side, rgba(239, 234, 227, 0.85), rgba(239, 234, 227, 0)); }
@media (max-width: 640px) {
	.split .annotations, .site-footer__scene .annotations, .global .annotations, .hero .annotations, .pb-hero .annotations { display: none; }
}

/* Language switcher */
.lang-switch { gap: 4px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; }
.lang-switch span { color: var(--muted); }
.lang-switch .is-current { color: var(--ink); font-weight: 600; }
.lang-switch__sep { opacity: 0.5; }

/* PlayBot plans */
.plans { padding-block: clamp(70px, 12vh, 140px); border-top: 1px solid var(--line); }
.cards--2 { grid-template-columns: repeat(2, 1fr); }
.plan { padding: 30px 28px 36px; position: relative; }
.plan .plan__tag { margin-bottom: 26px; }
.plan__name { font-size: clamp(32px, 3.4vw, 48px); font-weight: 500; letter-spacing: -0.03em; margin: 0 0 12px; }
.plan > p { max-width: 46ch; }
.plan__list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 8px; font-size: 15px; color: var(--ink-2); }
.plan__list li::before { content: "◆ "; color: var(--accent); font-size: 11px; }
.plan--pro { background: var(--ink); color: var(--paper); }
.plan--pro:hover { background: var(--ink); }
.plan--pro p, .plan--pro .plan__list { color: rgba(239, 234, 227, 0.78); }
.plan--pro .plan__tag { color: var(--accent); }
.plans__cta { margin-top: 30px; }
.spec-table .soon { color: var(--muted); margin-left: 10px; }
@media (max-width: 640px) { .cards--2 { grid-template-columns: 1fr; } }
