/*
 * HBK Terminal — main stylesheet.
 * Layout: visible 40px grid, 1px white rules, fixed bar → hero + terminal → data ribbon → 3-col service grid → green CTA band. Single dark look by design (Hardu spec). */
:root {
  --bg: #000000;
  --fg: #ffffff;
  --accent: #00ff00;
  --grid: #111111;
  --muted: #a1a1aa;   /* zinc-400 */
  --dim: #666666;
  --line-dim: #333333;
  --display: "Space Grotesk", "Arial Narrow", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --ease-reveal: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; border-radius: 0; }
html, body { margin: 0; padding: 0; }
img, svg, video { max-width: 100%; height: auto; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--accent); color: var(--bg); padding: 10px 16px; font-weight: 700; }
.skip-link:focus { left: 16px; top: 16px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 80px; }
body {
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px;
  color: var(--fg);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--bg); z-index: 60; }


.wrap { max-width: 1320px; margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* NAV */
.nav {
  position: fixed; top: env(safe-area-inset-top, 0px); left: 0; right: 0; z-index: 50;
  height: 80px; background: var(--bg); border-bottom: 1px solid var(--fg);
}
.nav .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { font-weight: 800; font-size: 16px; letter-spacing: 0.02em; }
.logo b { color: var(--accent); margin-right: 6px; }
.nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.nav ul a { color: var(--muted); transition: color .1s steps(2); }
.nav ul a:hover { color: var(--accent); }
.nav ul span { color: var(--dim); }
.nav ul .current-menu-item > a { color: var(--fg); }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle {
  display: none; background: transparent; color: var(--fg); border: 1px solid var(--fg);
  font-family: var(--mono); font-weight: 700; font-size: 11px; letter-spacing: 0.08em; padding: 0.6rem 0.8rem; cursor: pointer;
  transition: all .1s steps(2);
}
.nav-toggle[aria-expanded="true"] { background: var(--accent); color: var(--bg); border-color: var(--accent); }
/* WordPress admin bar */
.admin-bar .nav { top: calc(env(safe-area-inset-top, 0px) + 32px); }
@media (max-width: 782px) { .admin-bar .nav { top: calc(env(safe-area-inset-top, 0px) + 46px); } }

.btn {
  display: inline-block; padding: 0.75rem 1.5rem; background: var(--fg); color: var(--bg);
  font-family: var(--mono); font-weight: 700; text-transform: uppercase; font-size: 13px; letter-spacing: 0.04em;
  border: 0; cursor: pointer; transition: all .1s steps(2); white-space: nowrap;
}
.btn:hover, .btn:focus-visible { background: var(--accent); box-shadow: 6px 6px 0 0 var(--fg); transform: translate(-3px, -3px); }

/* HERO */
.hero { position: relative; overflow: hidden; min-height: 100vh; padding-top: 80px; display: flex; align-items: center; }
.hero > .wrap { position: relative; z-index: 1; }
.hero .wrap { width: 100%; padding-block: 72px; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 48px; align-items: end; }
.status { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 32px; }
.status i { width: 9px; height: 9px; background: var(--accent); display: inline-block; animation: pulse 1.2s steps(2) infinite; }
@keyframes pulse { 50% { opacity: 0.15; } }
h1 {
  font-family: var(--display); font-weight: 700; letter-spacing: -0.05em; line-height: 0.85;
  font-size: clamp(3.4rem, 10.5vw, 8rem); margin: 0 0 32px; text-transform: uppercase; text-wrap: balance;
}
h1 .stroke { color: transparent; -webkit-text-stroke: 1.5px var(--fg); }
h1 .g { color: var(--accent); }
.lede { color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.4rem); line-height: 1.5; max-width: 34ch; margin: 0 0 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.ghost { font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid var(--dim); padding-bottom: 2px; color: var(--muted); }
.ghost:hover { color: var(--accent); border-color: var(--accent); }

.term { border: 1px solid var(--line-dim); padding: 1rem; font-size: 10px; line-height: 1.7; color: var(--dim); min-width: 0; }
.term-head { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line-dim); padding-bottom: 8px; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.08em; }
.term pre { margin: 0; font-family: var(--mono); white-space: pre; overflow-x: auto; }
.term .ok { color: var(--accent); }
.term .w { color: var(--fg); }
.cursor { display: inline-block; width: 7px; height: 12px; background: var(--accent); vertical-align: -2px; animation: pulse 1s steps(2) infinite; }

/* DATA BAR */
/* stats box sits inside the container: no full-width lines */
.data-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--fg); }
.cell { padding: 2rem; border-right: 1px solid var(--fg); transition: background .1s steps(2), color .1s steps(2); }
.cell:last-child { border-right: 0; }
.cell small { display: block; font-size: 11px; letter-spacing: 0.1em; color: var(--dim); text-transform: uppercase; margin-bottom: 10px; }
.cell strong { display: block; font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cell span { display: block; font-size: 12px; color: var(--muted); margin-top: 8px; }
.cell:hover { background: var(--accent); color: var(--bg); }
.cell:hover small, .cell:hover span { color: var(--bg); }

/* SECTION HEAD */
.sec { padding-block: 96px; }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 48px; }
.sec-head h2 { font-family: var(--display); font-weight: 700; letter-spacing: -0.05em; text-transform: uppercase; font-size: clamp(2.2rem, 5.5vw, 4rem); line-height: 0.9; margin: 0; }
.sec-head p { margin: 0; color: var(--muted); font-size: 13px; max-width: 42ch; }
.tag-path { color: var(--accent); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; display: block; margin-bottom: 14px; }

/* SERVICES */
.svc { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--fg); border-left: 1px solid var(--fg); }
.card { padding: 3rem; border-right: 1px solid var(--fg); border-bottom: 1px solid var(--fg); display: flex; flex-direction: column; gap: 18px; background: var(--bg); transition: background .1s steps(2); min-width: 0; }
.card:hover { background: #0a0a0a; }
.card:hover .ico { color: var(--accent); border-color: var(--accent); }
.ico { width: 44px; height: 44px; border: 1px solid var(--fg); display: grid; place-items: center; transition: all .1s steps(2); }
.ico svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: square; }
.card h3 { margin: 0; font-size: 17px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.card p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.7; flex: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; border: 1px solid var(--line-dim); padding: 2px 8px; color: var(--muted); }
.chip.k { border-color: var(--fg); color: var(--fg); }

/* PORTFOLIO — case log rows */
.work { border-top: 1px solid var(--fg); }
.cases { border-top: 1px solid var(--fg); }
.case {
  display: grid; grid-template-columns: 90px minmax(0, 1.1fr) minmax(0, 1.6fr) minmax(0, 0.9fr) 32px;
  gap: 28px; align-items: start; padding: 28px 20px; border-bottom: 1px solid var(--fg);
  transition: background .1s steps(2), color .1s steps(2);
}
.case-id { font-size: 12px; letter-spacing: 0.1em; color: var(--accent); padding-top: 4px; }
.case-client { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); margin-bottom: 6px; }
.case h3 { margin: 0; font-family: var(--display); font-weight: 700; letter-spacing: -0.03em; font-size: clamp(1.3rem, 2.2vw, 1.75rem); line-height: 1.05; text-transform: uppercase; text-wrap: balance; }
.case dl { margin: 0; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 6px 12px; font-size: 13px; color: var(--muted); }
.case dt { color: var(--dim); font-size: 11px; letter-spacing: 0.08em; padding-top: 2px; }
.case dd { margin: 0; }
.case .chips { align-content: start; }
.case-arrow { font-size: 20px; color: var(--dim); text-align: right; }
.case:hover { background: var(--accent); color: var(--bg); }
.case:hover .case-id, .case:hover .case-client, .case:hover dl, .case:hover dt, .case:hover .case-arrow { color: var(--bg); }
.case:hover .chip { border-color: var(--bg); color: var(--bg); }

/* WORK HISTORY — git log */
.hist { border-top: 1px solid var(--fg); }
.hist-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 48px; align-items: start; }
.hist-side { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 112px); }
.admin-bar .hist-side { top: calc(env(safe-area-inset-top, 0px) + 144px); }
.hist-side h2 { font-family: var(--display); font-weight: 700; letter-spacing: -0.05em; text-transform: uppercase; font-size: clamp(2.2rem, 5.5vw, 4rem); line-height: 0.9; margin: 0 0 20px; }
.hist-side p { margin: 0; color: var(--muted); font-size: 13px; max-width: 34ch; }
.log { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--fg); }
.log li { position: relative; padding: 0 0 44px 32px; }
.log li:last-child { padding-bottom: 0; }
.log li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 11px; height: 11px; background: var(--bg); border: 1px solid var(--fg); }
.log li.now::before { background: var(--accent); border-color: var(--accent); }
.commit { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }
.commit .h { color: var(--accent); }
.commit .fill { color: var(--accent); border: 1px dashed var(--accent); padding: 0 6px; }
.log h3 { margin: 0 0 4px; font-size: 18px; font-weight: 700; text-transform: uppercase; }
.log .org { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.log ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.log ul li { padding: 0 0 0 18px; font-size: 13px; color: var(--muted); }
.log ul li::before { content: "+"; left: 0; top: 0; width: auto; height: auto; border: 0; background: none; color: var(--accent); }

/* PROCESS */
.proc { border-top: 1px solid var(--fg); }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--fg); }
.step { padding: 2rem; border-right: 1px solid var(--fg); min-width: 0; }
.step:last-child { border-right: 0; }
.step b { color: var(--accent); font-size: 12px; letter-spacing: 0.1em; }
.step h4 { margin: 10px 0 8px; font-size: 15px; text-transform: uppercase; }
.step p { margin: 0; color: var(--muted); font-size: 13px; }

/* CTA */
.cta { background: var(--accent); color: var(--bg); }
.cta .wrap { padding-block: 96px; display: flex; justify-content: space-between; align-items: center; gap: 40px; flex-wrap: wrap; }
.cta h2 { font-family: var(--display); font-weight: 700; letter-spacing: -0.05em; text-transform: uppercase; line-height: 0.85; font-size: clamp(3rem, 9vw, 6.5rem); margin: 0; max-width: 11ch; }
.cta-right { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.btn-xl { background: var(--bg); color: var(--fg); font-size: clamp(1.1rem, 2.4vw, 1.5rem); font-weight: 800; padding: 1.1rem 2rem; transition: all .1s steps(2); display: inline-block; text-transform: uppercase; }
.btn-xl:hover, .btn-xl:focus-visible { background: var(--fg); color: var(--bg); box-shadow: 6px 6px 0 0 var(--bg); transform: translate(-3px, -3px); }
.cta small { font-size: 12px; letter-spacing: 0.06em; }

/* FOOTER */
.site-footer { border-top: 1px solid var(--fg); }

.site-footer .wrap { padding-block: 28px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.1em; }

/* BLOG / PAGES (index.php) */
.page-sec { padding-top: calc(80px + 72px); }
.narrow { max-width: 860px; }
.page-title { font-family: var(--display); font-weight: 700; letter-spacing: -0.05em; text-transform: uppercase; font-size: clamp(2.2rem, 6vw, 4.2rem); line-height: 0.9; margin: 0; text-wrap: balance; }
.entry-head { margin-bottom: 40px; border-bottom: 1px solid var(--fg); padding-bottom: 32px; }
.entry-content { color: #d4d4d8; font-size: 15px; line-height: 1.8; }
.entry-content > * { max-width: 68ch; }
.entry-content h2, .entry-content h3 { font-family: var(--display); letter-spacing: -0.03em; text-transform: uppercase; color: var(--fg); margin: 2em 0 0.5em; line-height: 1; }
.entry-content a { color: var(--accent); border-bottom: 1px solid currentColor; }
.entry-content code, .entry-content pre { font-family: var(--mono); background: #0a0a0a; border: 1px solid var(--line-dim); }
.entry-content code { padding: 1px 5px; }
.entry-content pre { padding: 1rem; overflow-x: auto; }
.entry-content blockquote { margin: 1.5em 0; padding-left: 20px; border-left: 2px solid var(--accent); color: var(--muted); }
.entry-content img { border: 1px solid var(--fg); }
.post-list { border-top: 1px solid var(--fg); }
.post-row { border-bottom: 1px solid var(--fg); padding: 24px 0; display: grid; gap: 6px; }
.post-row h2 { margin: 0; font-size: 20px; text-transform: uppercase; }
.post-row h2 a:hover { color: var(--accent); }
.post-row p, .muted { margin: 0; color: var(--muted); font-size: 13px; }
.post-date { font-size: 11px; color: var(--accent); letter-spacing: 0.1em; }
.pager { margin-top: 32px; font-size: 13px; }
.pager .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pager .page-numbers { border: 1px solid var(--fg); padding: 6px 12px; }
.pager .page-numbers.current, .pager a.page-numbers:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }

/* reveal */
.rv { animation: rv .7s var(--ease-reveal) both; }
.rv.d1 { animation-delay: .08s; } .rv.d2 { animation-delay: .16s; } .rv.d3 { animation-delay: .24s; }
@keyframes rv { from { transform: translateY(20px); } to { transform: none; } }

/* responsive */
@media (max-width: 1000px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .svc { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .data-grid, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cell:nth-child(2) { border-right: 0; }
  .cell:nth-child(-n+2) { border-bottom: 1px solid var(--fg); }
  .step:nth-child(2) { border-right: 0; }
  .step:nth-child(-n+2) { border-bottom: 1px solid var(--fg); }
  .case { grid-template-columns: 70px minmax(0, 1fr) minmax(0, 1.4fr); }
  .case .chips { grid-column: 2 / -1; }
  .case-arrow { display: none; }
  .hist-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .hist-side { position: static; }
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .nav-menu { position: absolute; top: 80px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--fg); display: none; }
  .nav-menu.is-open { display: block; }
  .nav ul { flex-direction: column; gap: 0; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
  .nav ul li { border-top: 1px solid var(--line-dim); }
  .nav ul a { display: block; padding: 16px 0; font-size: 13px; }
  .nav .btn { display: none; }
  .hero { min-height: 0; }
  .svc, .data-grid, .steps { grid-template-columns: minmax(0, 1fr); }
  .cell, .step { border-right: 0; border-bottom: 1px solid var(--fg); }
  .cell:last-child, .step:last-child { border-bottom: 0; }
  .card { padding: 2rem; }
  .case { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 24px 16px; }
  .case .chips { grid-column: auto; }
  .sec { padding-block: 64px; }
  .btn { padding: 0.65rem 1rem; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .rv, .status i, .cursor { animation: none !important; }
  * { transition: none !important; }
}

/* FEEDBACK — summary bar + review cards */
.feedback { border-top: 1px solid var(--fg); }
.fb-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); border: 1px solid var(--fg); margin-bottom: 48px; }
.fb-overall { padding: 2rem; border-right: 1px solid var(--fg); display: flex; flex-direction: column; gap: 8px; justify-content: center; transition: background .1s steps(2), color .1s steps(2); }
.fb-overall small, .fb-overall span { font-size: 11px; letter-spacing: 0.1em; color: var(--dim); text-transform: uppercase; }
.fb-overall strong { font-family: var(--display); font-weight: 700; letter-spacing: -0.05em; font-size: clamp(3rem, 7vw, 5rem); line-height: 0.9; font-variant-numeric: tabular-nums; }
.fb-overall strong em { font-style: normal; font-size: 0.4em; color: var(--dim); letter-spacing: 0; margin-left: 4px; }
.fb-overall:hover { background: var(--accent); color: var(--bg); }
.fb-overall:hover small, .fb-overall:hover span, .fb-overall:hover em { color: var(--bg); }
.fb-criteria { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fb-criteria > div { padding: 1.5rem 2rem; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px solid var(--line-dim); border-right: 1px solid var(--line-dim); }
.fb-criteria > div:nth-child(3n) { border-right: 0; }
.fb-criteria > div:nth-last-child(-n+3) { border-bottom: 0; }
.fb-criteria dt { font-size: 11px; letter-spacing: 0.1em; color: var(--muted); }
.fb-criteria dd { margin: 0; font-size: 22px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }

.reviews { columns: 3 300px; column-gap: 24px; }
.review {
  position: relative; break-inside: avoid; margin: 0 0 24px; padding: 28px; border: 1px solid var(--fg); background: var(--bg);
  display: flex; flex-direction: column; gap: 20px; transition: all .1s steps(2);
}
.review:hover { border-color: var(--accent); box-shadow: 6px 6px 0 0 var(--accent); transform: translate(-3px, -3px); }
.review-head { display: flex; align-items: center; gap: 12px; font-size: 11px; letter-spacing: 0.1em; }
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 10px; height: 10px; border: 1px solid var(--accent); background: linear-gradient(90deg, var(--accent) var(--f), transparent var(--f)); }
.review-score { font-weight: 700; font-variant-numeric: tabular-nums; }
.review-src { margin-left: auto; color: var(--dim); }
.review blockquote { margin: 0; }
.review blockquote p { margin: 0; font-size: 14px; line-height: 1.75; color: #e4e4e7; }
.review blockquote p::before { content: "\201C"; color: var(--accent); margin-right: 2px; }
.review blockquote p::after { content: "\201D"; color: var(--accent); margin-left: 1px; }
.review figcaption { display: flex; flex-direction: column; gap: 4px; padding-top: 16px; border-top: 1px solid var(--line-dim); }
.review-name { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; }
.review-name b { color: var(--accent); }
.review-project { font-size: 12px; color: var(--muted); }
.review-id { position: absolute; top: -1px; right: -1px; font-size: 10px; letter-spacing: 0.1em; padding: 3px 8px; background: var(--fg); color: var(--bg); }
.review:hover .review-id { background: var(--accent); }
.fb-more { margin: 8px 0 0; }

@media (max-width: 1000px) {
  .fb-summary { grid-template-columns: minmax(0, 1fr); }
  .fb-overall { border-right: 0; border-bottom: 1px solid var(--fg); }
  .fb-criteria { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fb-criteria > div:nth-child(3n) { border-right: 1px solid var(--line-dim); }
  .fb-criteria > div:nth-child(2n) { border-right: 0; }
  .fb-criteria > div:nth-last-child(-n+3) { border-bottom: 1px solid var(--line-dim); }
  .fb-criteria > div:nth-last-child(-n+2) { border-bottom: 0; }
}
@media (max-width: 760px) {
  .fb-criteria > div { padding: 1rem 1.25rem; }
  .review { padding: 22px; }
}

/* CONTACT — Contact Form 7, styled by the theme (CF7's own CSS is off) */
.contact { border-top: 1px solid var(--fg); --err: #ff4d4d; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 64px; align-items: start; }
.contact-side { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 112px); }
.admin-bar .contact-side { top: calc(env(safe-area-inset-top, 0px) + 144px); }
.contact-side h2 { font-family: var(--display); font-weight: 700; letter-spacing: -0.05em; text-transform: uppercase; font-size: clamp(2.2rem, 5.5vw, 4rem); line-height: 0.9; margin: 0 0 20px; text-wrap: balance; }
.contact-intro { margin: 0 0 32px; color: var(--muted); font-size: 14px; max-width: 40ch; }
.contact-meta { margin: 0; border-top: 1px solid var(--line-dim); }
.contact-meta > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-dim); font-size: 13px; }
.contact-meta dt { color: var(--dim); font-size: 11px; letter-spacing: 0.1em; padding-top: 2px; }
.contact-meta dd { margin: 0; color: var(--fg); overflow-wrap: anywhere; }
.contact-meta .selectable { user-select: all; color: var(--accent); }

.contact-form { border: 1px solid var(--fg); padding: 1.25rem 2rem 2rem; min-width: 0; }
.contact-form .term-head { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line-dim); padding-bottom: 10px; margin-bottom: 28px; font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.1em; }
.form-missing { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; border: 1px dashed var(--accent); padding: 16px; }

.wpcf7-form { display: flex; flex-direction: column; gap: 24px; }
.wpcf7-form .hidden-fields-container, .wpcf7 .screen-reader-response { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }
.f-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.f-field { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.f-label { font-size: 11px; letter-spacing: 0.1em; color: var(--muted); }
.wpcf7-form-control-wrap { display: block; position: relative; }

.wpcf7-form input[type="text"], .wpcf7-form input[type="email"], .wpcf7-form input[type="url"], .wpcf7-form input[type="tel"], .wpcf7-form select, .wpcf7-form textarea {
  width: 100%; background: var(--bg); color: var(--fg); border: 1px solid var(--line-dim); padding: 0.85rem 1rem;
  font-family: var(--mono); font-size: 14px; line-height: 1.5; outline: 0; transition: border-color .1s steps(2), box-shadow .1s steps(2);
  -webkit-appearance: none; appearance: none;
}
.wpcf7-form textarea { resize: vertical; min-height: 150px; }
.wpcf7-form ::placeholder { color: #52525b; }
.wpcf7-form input:hover, .wpcf7-form select:hover, .wpcf7-form textarea:hover { border-color: var(--muted); }
.wpcf7-form input:focus, .wpcf7-form select:focus, .wpcf7-form textarea:focus { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.wpcf7-form select {
  cursor: pointer; padding-right: 2.5rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--fg) 50%), linear-gradient(135deg, var(--fg) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
.wpcf7-form select option { background: var(--bg); color: var(--fg); }

/* radio + checkbox as toggle chips */
.wpcf7-radio, .wpcf7-checkbox { display: flex; flex-wrap: wrap; gap: 8px; }
.wpcf7-list-item { margin: 0; }
.wpcf7-list-item label { position: relative; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-dim); padding: 0.55rem 0.9rem; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); cursor: pointer; transition: all .1s steps(2); }
.wpcf7-list-item input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wpcf7-list-item-label::before { content: ""; display: inline-block; width: 9px; height: 9px; border: 1px solid currentColor; margin-right: 8px; vertical-align: 0; }
.wpcf7-list-item label:hover { border-color: var(--fg); color: var(--fg); }
.wpcf7-list-item label:has(input:checked) { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.wpcf7-list-item label:has(input:checked) .wpcf7-list-item-label::before { background: var(--bg); border-color: var(--bg); }
.wpcf7-list-item label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* submit */
.f-submit { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 4px; }
.wpcf7-submit {
  padding: 1rem 1.75rem; background: var(--fg); color: var(--bg); border: 0; cursor: pointer;
  font-family: var(--mono); font-weight: 800; font-size: 14px; text-transform: uppercase; letter-spacing: 0.04em; transition: all .1s steps(2);
}
.wpcf7-submit:hover, .wpcf7-submit:focus-visible { background: var(--accent); box-shadow: 6px 6px 0 0 var(--fg); transform: translate(-3px, -3px); outline: 0; }
.wpcf7-submit:disabled { opacity: 0.5; cursor: wait; }
.wpcf7-spinner { visibility: hidden; display: inline-block; width: 10px; height: 16px; background: var(--accent); margin: 0; animation: pulse 0.8s steps(2) infinite; }
.wpcf7-form.submitting .wpcf7-spinner { visibility: visible; }

/* validation + response */
.wpcf7-not-valid { border-color: var(--err) !important; }
.wpcf7-not-valid-tip { display: block; margin-top: 6px; font-size: 11px; letter-spacing: 0.06em; color: var(--err); text-transform: uppercase; }
.wpcf7-not-valid-tip::before { content: "ERR: "; }
.wpcf7-response-output { margin: 0; padding: 14px 16px; font-size: 13px; border: 1px solid var(--line-dim); color: var(--fg); }
.wpcf7-response-output:empty { display: none; }
.wpcf7 form.init .wpcf7-response-output, .wpcf7 form.resetting .wpcf7-response-output, .wpcf7 form.submitting .wpcf7-response-output { display: none; }
.wpcf7 form.sent .wpcf7-response-output { border-color: var(--accent); color: var(--accent); }
.wpcf7 form.sent .wpcf7-response-output::before { content: "[ OK ] "; }
.wpcf7 form.invalid .wpcf7-response-output, .wpcf7 form.unaccepted .wpcf7-response-output, .wpcf7 form.payment-required .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output, .wpcf7 form.aborted .wpcf7-response-output, .wpcf7 form.spam .wpcf7-response-output { border-color: var(--err); color: var(--err); }
.wpcf7 form.invalid .wpcf7-response-output::before, .wpcf7 form.failed .wpcf7-response-output::before, .wpcf7 form.spam .wpcf7-response-output::before { content: "[FAIL] "; }

@media (max-width: 1000px) {
  .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .contact-side { position: static; }
}
@media (max-width: 760px) {
  .f-grid { grid-template-columns: minmax(0, 1fr); }
  .contact-form { padding: 1rem 1.1rem 1.5rem; }
  .contact-meta > div { grid-template-columns: 90px minmax(0, 1fr); }
}

/* 404 */
.err404 .status-err { color: var(--fg); }
.err404 .status-err i { background: #ff4d4d; }
.err404 h1 .stroke { font-size: 1.6em; display: inline-block; line-height: 0.8; }
.err404 .term { font-size: 12px; }
.term .err { color: #ff4d4d; }
.term a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.term a:hover { background: var(--accent); color: var(--bg); text-decoration: none; }

/* STICKY WHATSAPP (bottom-right) */
.wa-float {
  position: fixed; z-index: 80;
  right: calc(20px + env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center;
}
.wa-icon {
  width: 56px; height: 56px; display: grid; place-items: center;
  background: var(--bg); color: var(--accent); border: 1px solid var(--accent);
  transition: all .1s steps(2);
}
.wa-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: square; }
.wa-icon img { width: 26px; height: 26px; }
.wa-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; white-space: nowrap;
  background: var(--fg); color: var(--bg); padding: 6px 10px; margin-right: 8px;
  opacity: 0; transform: translateX(8px); pointer-events: none; transition: all .1s steps(2);
}
.wa-float:hover .wa-icon, .wa-float:focus-visible .wa-icon { background: var(--accent); color: var(--bg); box-shadow: 6px 6px 0 0 var(--fg); transform: translate(-3px, -3px); }
.wa-float:hover .wa-label, .wa-float:focus-visible .wa-label { opacity: 1; transform: none; }
.wa-float:focus-visible { outline: 0; }
.wa-float:focus-visible .wa-icon { outline: 2px solid var(--fg); outline-offset: 2px; }
@media (max-width: 760px) {
  .wa-float { right: calc(14px + env(safe-area-inset-right, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
  .wa-icon { width: 50px; height: 50px; }
  .wa-label { display: none; }
}
@media print { .wa-float { display: none; } }

/* CONTACT — social & direct links */
.contact-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 32px; border-top: 1px solid var(--fg); border-left: 1px solid var(--fg); }
.contact-links a { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px 40px 16px 16px; border-right: 1px solid var(--fg); border-bottom: 1px solid var(--fg); min-width: 0; transition: background .1s steps(2), color .1s steps(2); }
.contact-links small { font-size: 10px; letter-spacing: 0.12em; color: var(--dim); }
.contact-links span { font-size: 13px; overflow-wrap: anywhere; }
.contact-links i { position: absolute; top: 14px; right: 14px; font-style: normal; color: var(--accent); }
.contact-links a:hover, .contact-links a:focus-visible { background: var(--accent); color: var(--bg); outline: 0; }
.contact-links a:hover small, .contact-links a:hover i, .contact-links a:focus-visible small, .contact-links a:focus-visible i { color: var(--bg); }
@media (max-width: 400px) { .contact-links { grid-template-columns: minmax(0, 1fr); } }

/* NAV — active section (set by scroll spy in main.js) */
.nav ul a { position: relative; }
.nav ul a.is-active { color: var(--fg); }
.nav ul a.is-active span { color: var(--accent); }
.nav ul a.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--accent); }
@media (max-width: 760px) {
  .nav ul a.is-active::after { display: none; }
  .nav ul a.is-active { color: var(--accent); }
  .nav ul a.is-active::before { content: "> "; color: var(--accent); }
}

/* WORK — linked case rows */
.case-ext { display: block; margin-top: 6px; font-size: 16px; color: var(--accent); }
a.case:hover .case-ext { color: var(--bg); }
@media (max-width: 1000px) { a.case h3::after { content: " ↗"; color: var(--accent); } a.case:hover h3::after { color: var(--bg); } }

/* LIVE STATUS (online / away) */
.live-status { display: inline-flex; align-items: center; gap: 8px; }
.live-status > i { width: 7px; height: 7px; flex: none; display: inline-block; background: var(--accent); }
.live-status.is-online > i { animation: pulse 1.2s steps(2) infinite; }
.live-status.is-away > i { background: transparent; border: 1px solid var(--muted); animation: none; }
.status.live-status > i { width: 9px; height: 9px; }
.status.live-status.is-away { color: var(--muted); }
.site-footer .live-status.is-online { color: var(--accent); }
.live-inline { display: flex; margin-top: 4px; font-size: 11px; letter-spacing: 0.06em; color: var(--accent); }
.live-inline.is-away { color: var(--muted); }
/* keep footer text clear of the floating WhatsApp button */
.site-footer .wrap { padding-right: calc(var(--gutter-r) + 80px); }

/* HERO crosshair + coordinates (drawn by main.js, mouse/trackpad only) */
.hero-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
@media (pointer: fine) { .hero.has-fx { cursor: crosshair; } .hero.has-fx a, .hero.has-fx button { cursor: pointer; } }

/* ---------- 07 Arcade ---------- */
.arcade { border-top: 1px solid var(--fg); --err: #ff4d4d; }
.games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.game-term { display: flex; flex-direction: column; border: 1px solid var(--fg); background: var(--bg); min-width: 0; transition: box-shadow .15s, border-color .15s; }
.game-term.is-focus { border-color: var(--accent); box-shadow: 6px 6px 0 0 var(--accent); }
.game-head { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line-dim); font-size: 11px; letter-spacing: .1em; color: var(--dim); }
.game-head b { color: var(--fg); font-weight: 700; }
.game-score { display: flex; gap: 16px; font-variant-numeric: tabular-nums; }
.game-score span { color: var(--accent); }
.game-term canvas { display: block; width: 100%; height: auto; outline: none; touch-action: none; image-rendering: pixelated; cursor: pointer; }
.game-term canvas:focus-visible { outline: none; }
.game-foot { margin-top: auto; padding: 10px 14px; border-top: 1px solid var(--line-dim); font-size: 11px; color: var(--dim); letter-spacing: .06em; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.game-foot kbd { font-family: var(--mono); color: var(--fg); border: 1px solid var(--line-dim); padding: 0 5px; }
.game-foot.touch { display: none; }
.game-pad { display: none; grid-template-columns: repeat(3, 52px); gap: 6px; justify-content: center; padding: 12px; border-top: 1px solid var(--line-dim); }
.game-pad button { font-family: var(--mono); font-weight: 700; background: var(--bg); color: var(--fg); border: 1px solid var(--fg); height: 44px; font-size: 14px; cursor: pointer; }
.game-pad button:active { background: var(--accent); color: var(--bg); border-color: var(--accent); }
@media (max-width: 900px) { .games { grid-template-columns: minmax(0, 1fr); } }
@media (pointer: coarse) { .game-pad { display: grid; } .game-foot.keys { display: none; } .game-foot.touch { display: flex; } }
