/*
Theme Name: Proof of Tech
Theme URI: https://proofoftech.net/
Author: Proof of Tech
Description: Custom theme for proofoftech.net - warm-ink design, bilingual EN/Chinese (Polylang), blog-ready. Converted from the hand-built static design.
Version: 0.2.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: proofoftech
*/

/* ============================================================
   PROOF OF TECH - design system
   Warm-ink palette · #FF6B1F brand signal · "proof receipt" motif
   ============================================================ */

:root {
  /* palette */
  --ink:        #100E0C;   /* warm near-black, page bg */
  --ink-2:      #15110C;   /* alternating section bg */
  --surface:    #1C1711;   /* cards */
  --surface-2:  #241D15;   /* raised / hover */
  --porcelain:  #ECE6DC;   /* primary text */
  --muted:      #9A9082;   /* secondary text */
  --faint:      #6E665B;   /* tertiary / captions */
  --signal:     #FF6B1F;   /* the one bold color */
  --signal-2:   #FF8A4D;   /* lighter orange for gradients */
  --signal-soft:rgba(255,107,31,0.12);
  --verify:     #62AC8F;   /* muted jade - "verified" only */
  --verify-soft:rgba(98,172,143,0.14);
  --line:       rgba(236,230,220,0.10);
  --line-2:     rgba(236,230,220,0.20);

  /* type */
  --display: "Space Grotesk", sans-serif;
  --body:    "Inter", system-ui, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
  --cjk:     "Noto Sans SC", "Noto Sans CJK SC", "PingFang SC",
             "Hiragino Sans GB", "Microsoft YaHei", var(--display);

  /* spacing / radius */
  --rad:   14px;
  --rad-s: 9px;
  --maxw:  1140px;
  --gutter: clamp(20px, 5vw, 48px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--porcelain);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* faint grid wash so the warm black has texture without noise */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 100% 70% at 50% 0%, #000 30%, transparent 78%);
  opacity: .5;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); position: relative; z-index: 1; }
.section { padding-block: clamp(64px, 9vw, 128px); position: relative; z-index: 1; }
.section--alt { background: var(--ink-2); border-block: 1px solid var(--line); }
.stack > * + * { margin-top: 1rem; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.04; letter-spacing: -0.02em; margin: 0; }
.h-xl { font-size: clamp(2.6rem, 6.5vw, 5rem); }
.h-l  { font-size: clamp(2rem, 4.4vw, 3.2rem); }
.h-m  { font-size: clamp(1.4rem, 2.4vw, 1.9rem); letter-spacing: -0.015em; }
p { margin: 0; }
.lede { font-size: clamp(1.08rem, 1.7vw, 1.32rem); color: var(--muted); line-height: 1.55; max-width: 56ch; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
strong, b { font-weight: 700; color: var(--porcelain); }

/* eyebrow - monospace, the "label" voice of the proof theme */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow .tick { color: var(--verify); font-size: 0.9em; }
.eyebrow .bar  { width: 26px; height: 1px; background: var(--line-2); }

/* signal underline accent for inline emphasis */
.mark { color: var(--signal); }
.mark-bg {
  background: linear-gradient(transparent 62%, var(--signal-soft) 0);
  padding: 0 .08em;
}

/* ---------- buttons ---------- */
.btn {
  --pad-y: 0.85em; --pad-x: 1.5em;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.97rem;
  padding: var(--pad-y) var(--pad-x);
  border-radius: var(--rad-s);
  display: inline-flex; align-items: center; gap: 0.55em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--signal); color: #1a0c02; border-color: var(--signal); }
.btn-primary:hover { background: var(--signal-2); border-color: var(--signal-2); }
.btn-ghost { background: transparent; color: var(--porcelain); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--porcelain); background: rgba(236,230,220,0.04); }
.btn .arr { transition: transform .18s ease; }
.btn:hover .arr { transform: translateX(3px); }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--ink) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid var(--line);
  /* promote the header onto its own GPU layer so backdrop-filter rasterizes
     with its descendants in one pass (Chromium/Brave button-text paint glitch) */
  transform: translateZ(0);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--display); font-weight: 600; font-size: 1.12rem; letter-spacing: -0.02em; }
.brand .glyph {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: 8px;
  font-family: var(--cjk); font-size: 16px; color: var(--signal);
  background: var(--signal-soft);
}
.brand span.dim { color: var(--muted); font-weight: 600; }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a { font-size: 0.95rem; color: var(--muted); transition: color .15s ease; position: relative; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--porcelain); }
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--signal); border-radius: 2px;
}
.nav-cta { display: flex; align-items: center; gap: 1.2rem; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-2); border-radius: 8px; width: 42px; height: 42px; color: var(--porcelain); cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle svg { width: 20px; height: 20px; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(56px, 9vw, 120px) clamp(48px, 7vw, 96px); position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { margin-top: 1.1rem; }
.hero .lede { margin-top: 1.5rem; }
.hero-cta { margin-top: 2.2rem; display: flex; gap: 0.9rem; flex-wrap: wrap; }
.hero-meta { margin-top: 2.4rem; display: flex; gap: 1.8rem; flex-wrap: wrap; font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.04em; color: var(--faint); }
.hero-meta b { color: var(--porcelain); font-weight: 600; }

/* ---------- proof receipt (the signature) ---------- */
.receipt {
  position: relative;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line-2);
  border-radius: var(--rad);
  padding: 1.4rem 1.5rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,0.7);
  overflow: hidden;
}
.receipt::after { /* perforated top edge feel */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: repeating-linear-gradient(90deg, var(--signal) 0 10px, transparent 10px 18px);
  opacity: .85;
}
.receipt-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px dashed var(--line-2); padding-bottom: .85rem; margin-bottom: .9rem; }
.receipt-head .label { letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-size: 0.7rem; }
.verified { display: inline-flex; align-items: center; gap: .4em; color: var(--verify); font-size: 0.72rem; letter-spacing: .08em; text-transform: uppercase; }
.verified .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--verify); box-shadow: 0 0 0 3px var(--verify-soft); }
.receipt-row { display: flex; justify-content: space-between; gap: 1rem; padding: .32rem 0; color: var(--muted); }
.receipt-row .k { color: var(--faint); }
.receipt-row .v { color: var(--porcelain); text-align: right; }
.receipt-hash { margin-top: .9rem; padding-top: .85rem; border-top: 1px dashed var(--line-2); color: var(--faint); font-size: 0.72rem; word-break: break-all; line-height: 1.5; }
.receipt-hash .v { color: var(--verify); }
.receipt-stamp {
  position: absolute; right: -10px; bottom: -14px;
  font-family: var(--cjk); font-size: 7rem; line-height: 1; color: var(--signal);
  opacity: 0.07; transform: rotate(-8deg); pointer-events: none; user-select: none;
}

/* ---------- generic section header ---------- */
.sec-head { max-width: 62ch; margin-bottom: clamp(36px, 5vw, 60px); }
.sec-head .h-l { margin-top: 1rem; }
.sec-head p { margin-top: 1rem; }

/* ---------- service cards ---------- */
.cards { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--rad); overflow: hidden; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--ink); padding: clamp(1.5rem, 2.6vw, 2.2rem); transition: background .2s ease; position: relative; }
.card:hover { background: var(--surface); }
.card .idx { font-family: var(--mono); font-size: 0.72rem; color: var(--signal); letter-spacing: 0.1em; }
.card h3 { margin-top: 0.9rem; font-size: 1.22rem; }
.card p { margin-top: 0.7rem; color: var(--muted); font-size: 0.97rem; }
.card .tags { margin-top: 1.1rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.04em; color: var(--muted); border: 1px solid var(--line-2); padding: 0.25em 0.6em; border-radius: 100px; }

/* detailed service block (services page) */
.svc { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(20px, 4vw, 56px); padding-block: clamp(36px, 5vw, 60px); border-top: 1px solid var(--line); align-items: start; }
.svc:first-of-type { border-top: none; }
.svc-num { font-family: var(--mono); font-size: 0.78rem; color: var(--signal); letter-spacing: 0.1em; }
.svc h3 { margin-top: 0.7rem; }
.svc .svc-lede { margin-top: 0.9rem; color: var(--muted); }
.svc ul { margin: 0; padding: 0; list-style: none; }
.svc li { padding: 0.7rem 0; border-bottom: 1px solid var(--line); display: flex; gap: 0.75rem; align-items: flex-start; color: var(--porcelain); font-size: 0.98rem; }
.svc li:last-child { border-bottom: none; }
.svc li .chk { color: var(--verify); flex: none; margin-top: 0.15em; font-family: var(--mono); }

/* ---------- bridge / feature split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.bridge-visual {
  position: relative; aspect-ratio: 1/1; border: 1px solid var(--line-2); border-radius: var(--rad);
  background: radial-gradient(circle at 30% 30%, var(--signal-soft), transparent 55%), var(--surface);
  display: grid; place-items: center; overflow: hidden;
}
.bridge-visual .big-glyph { font-family: var(--cjk); font-size: clamp(8rem, 22vw, 15rem); color: var(--signal); opacity: 0.92; line-height: 1; }
.bridge-visual .ring { position: absolute; border: 1px solid var(--line-2); border-radius: 50%; }
.bridge-visual .ring.r1 { inset: 14%; }
.bridge-visual .ring.r2 { inset: 26%; border-style: dashed; }
.bridge-visual .pin { position: absolute; font-family: var(--mono); font-size: 0.68rem; color: var(--muted); letter-spacing: 0.06em; }

/* ---------- proof / stats strip ---------- */
.proof-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--rad); overflow: hidden; }
.proof-cell { background: var(--ink); padding: clamp(1.4rem, 2.5vw, 2rem); }
.proof-cell .n { font-family: var(--display); font-weight: 600; font-size: clamp(1.8rem, 3.2vw, 2.6rem); letter-spacing: -0.02em; }
.proof-cell .l { margin-top: 0.4rem; font-size: 0.9rem; color: var(--muted); }
.proof-cell .src { margin-top: 0.5rem; font-family: var(--mono); font-size: 0.66rem; color: var(--faint); letter-spacing: 0.04em; }

/* ---------- channels (honest social proof) ---------- */
.channels { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.channel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--rad-s); padding: 1.2rem 1.3rem; display: flex; gap: 1rem; align-items: center; transition: border-color .2s ease; }
.channel:hover { border-color: var(--line-2); }
.channel .av { width: 42px; height: 42px; border-radius: 9px; background: var(--signal-soft); border: 1px solid var(--line-2); display: grid; place-items: center; font-family: var(--mono); color: var(--signal); font-size: 0.9rem; flex: none; }
.channel .meta b { display: block; font-size: 0.98rem; }
.channel .meta span { font-family: var(--mono); font-size: 0.72rem; color: var(--faint); }

/* ---------- about / credibility ---------- */
.cred-list { list-style: none; margin: 0; padding: 0; }
.cred-list li { display: flex; gap: 1rem; padding: 1.1rem 0; border-top: 1px solid var(--line); }
.cred-list li:first-child { border-top: none; }
.cred-list .yr { font-family: var(--mono); font-size: 0.78rem; color: var(--signal); flex: none; width: 92px; padding-top: 0.15rem; letter-spacing: 0.04em; }
.cred-list .desc b { display: block; margin-bottom: 0.2rem; }
.cred-list .desc p { color: var(--muted); font-size: 0.95rem; }

.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--rad); overflow: hidden; }
.value { background: var(--ink); padding: clamp(1.4rem, 2.4vw, 2rem); }
.value .glyph-sm { font-family: var(--cjk); font-size: 1.5rem; color: var(--signal); }
.value h3 { margin-top: 0.7rem; font-size: 1.1rem; }
.value p { margin-top: 0.55rem; color: var(--muted); font-size: 0.94rem; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.5rem; }
.field input, .field select, .field textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--rad-s);
  color: var(--porcelain); font-family: var(--body); font-size: 1rem; padding: 0.85rem 1rem; transition: border-color .15s ease, background .15s ease;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--signal); background: var(--surface-2); }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239A9082' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; }
.contact-aside { background: var(--surface); border: 1px solid var(--line); border-radius: var(--rad); padding: clamp(1.5rem, 3vw, 2.2rem); }
.contact-line { display: flex; gap: 0.85rem; padding: 0.9rem 0; border-top: 1px solid var(--line); align-items: center; }
.contact-line:first-of-type { border-top: none; }
.contact-line .ic { width: 34px; height: 34px; border-radius: 8px; background: var(--signal-soft); display: grid; place-items: center; color: var(--signal); flex: none; font-family: var(--mono); font-size: 0.85rem; }
.contact-line a:hover { color: var(--signal); }
.note { font-family: var(--mono); font-size: 0.74rem; color: var(--faint); line-height: 1.6; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band .h-l { max-width: 18ch; margin-inline: auto; }
.cta-band p { margin: 1.1rem auto 2rem; max-width: 48ch; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: clamp(40px, 5vw, 64px); position: relative; z-index: 1; }
.footer-top { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; align-items: flex-start; }
.footer-cols { display: flex; gap: clamp(2rem, 6vw, 5rem); flex-wrap: wrap; }
.footer-col h4 { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--faint); margin: 0 0 0.9rem; font-weight: 500; }
.footer-col a { display: block; color: var(--muted); font-size: 0.95rem; padding: 0.28rem 0; transition: color .15s ease; }
.footer-col a:hover { color: var(--porcelain); }
.footer-blurb { max-width: 30ch; }
.footer-blurb p { color: var(--muted); font-size: 0.92rem; margin-top: 0.8rem; }
.footer-bottom { margin-top: clamp(32px, 5vw, 56px); padding-top: 1.6rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-family: var(--mono); font-size: 0.72rem; color: var(--faint); letter-spacing: 0.03em; }

/* ---------- reveal animation (granular micro-glitch) ---------- */
.reveal { opacity: 0; transform: translateY(10px); }   /* pre-JS hide, prevents flash of content */
.gl { opacity: 0; transform: translateY(10px); }
.gl.in { animation: glitch-in .55s both; }
@keyframes glitch-in {
  0%   { opacity: 0;  transform: translate(0,10px);  clip-path: inset(0 0 0 0);   animation-timing-function: steps(1,end); }
  12%  { opacity: 1;  transform: translate(-4px,4px); clip-path: inset(0 0 60% 0); text-shadow: 4px 0 rgba(255,0,80,.9), -4px 0 rgba(0,231,255,.9);  animation-timing-function: steps(1,end); }
  26%  { opacity: .35;transform: translate(4px,2px);  clip-path: inset(42% 0 30% 0); text-shadow: -5px 0 rgba(255,0,80,.85), 5px 0 rgba(0,231,255,.85); animation-timing-function: steps(1,end); }
  40%  { opacity: 1;  transform: translate(-3px,1px); clip-path: inset(58% 0 0 0); text-shadow: 4px 0 rgba(255,0,80,.78), -4px 0 rgba(0,231,255,.78); animation-timing-function: steps(1,end); }
  54%  { opacity: 1;  transform: translate(3px,0);    clip-path: inset(0 0 0 0); text-shadow: -3px 0 rgba(255,0,80,.6), 3px 0 rgba(0,231,255,.6);  animation-timing-function: steps(1,end); }
  68%  { opacity: .72;transform: translate(-1px,0);   text-shadow: 2px 0 rgba(255,0,80,.4), -2px 0 rgba(0,231,255,.4);  animation-timing-function: ease-out; }
  100% { opacity: 1;  transform: none;                clip-path: inset(0 0 0 0); text-shadow: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-receipt-wrap { max-width: 420px; }
  .split, .contact-grid { grid-template-columns: 1fr; }
  .cards-3 { grid-template-columns: 1fr 1fr; }
  .proof-grid { grid-template-columns: 1fr 1fr; }
  .values { grid-template-columns: 1fr; }
  .svc { grid-template-columns: 1fr; }
  .channels { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: inline-flex; }
  .mobile-menu.open { display: block; }
  .cards-3, .cards-2 { grid-template-columns: 1fr; }
  .proof-grid { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; }
  .cred-list li { flex-direction: column; gap: 0.3rem; }
  .cred-list .yr { width: auto; }
}

/* mobile menu */
.mobile-menu { display: none; border-bottom: 1px solid var(--line); background: var(--ink); padding: 0.5rem var(--gutter) 1.3rem; position: relative; z-index: 40; }
.mobile-menu a { display: block; padding: 0.85rem 0; border-bottom: 1px solid var(--line); color: var(--porcelain); font-size: 1.05rem; }
.mobile-menu a:last-of-type { border-bottom: none; }
.mobile-menu .btn { width: 100%; justify-content: center; margin-top: 1rem; }

/* ---------- a11y ---------- */
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 10px; z-index: 100; background: var(--signal); color: #1a0c02; padding: 0.6rem 1rem; border-radius: 8px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal, .gl { opacity: 1 !important; transform: none !important; }
}

/* ---------- social badges (about, top) ---------- */
.socials { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.8rem; }
.social { display: inline-flex; align-items: center; gap: 0.7rem; background: var(--surface); border: 1px solid var(--line-2); border-radius: 100px; padding: 0.5rem 1.05rem 0.5rem 0.55rem; transition: border-color .2s ease, transform .2s ease; }
.social:hover { border-color: var(--signal); transform: translateY(-1px); }
.social .ic { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--porcelain); background: var(--signal-soft); flex: none; }
.social .ic svg { width: 17px; height: 17px; }
.social .txt b { display: block; font-size: 0.95rem; line-height: 1.15; }
.social .txt span { font-family: var(--mono); font-size: 0.7rem; color: var(--faint); letter-spacing: 0.02em; }

/* ---------- represented projects (about) ---------- */
.clients { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.client { display: flex; align-items: center; gap: 0.9rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--rad-s); padding: 1rem 1.15rem; transition: border-color .2s ease, transform .2s ease; }
.client:hover { border-color: var(--line-2); transform: translateY(-2px); }
.client img { width: 42px; height: 42px; border-radius: 10px; flex: none; background: var(--surface-2); object-fit: contain; }
.client .meta b { display: block; font-size: 0.98rem; line-height: 1.2; }
.client .meta span { font-family: var(--mono); font-size: 0.72rem; color: var(--faint); }
@media (max-width: 900px) { .clients { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .clients { grid-template-columns: 1fr; } }

/* ---------- language network (index) ---------- */
.langs { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.lang { display: inline-flex; align-items: baseline; gap: 0.55rem; background: var(--surface); border: 1px solid var(--line-2); border-radius: 100px; padding: 0.6rem 1.15rem; font-size: 0.93rem; color: var(--muted); transition: border-color .2s ease, transform .2s ease; }
.lang:hover { border-color: var(--signal); transform: translateY(-1px); }
.lang b { color: var(--porcelain); font-weight: 700; font-size: 1rem; }

/* ---------- file upload (contact) ---------- */
.field .filedrop { display: flex; align-items: center; gap: 0.9rem; text-align: left; padding: 1.05rem 1.15rem; background: var(--surface); border: 1.5px dashed var(--line-2); border-radius: var(--rad-s); cursor: pointer; margin: 0; font-family: var(--body); font-size: 1rem; font-weight: 400; letter-spacing: normal; text-transform: none; color: var(--porcelain); transition: border-color .2s ease, background .2s ease; }
.field .filedrop:hover, .field .filedrop.drag { border-color: var(--signal); background: var(--surface-2); }
.field .filedrop:focus-within { outline: 2px solid var(--signal); outline-offset: 2px; }
.field .filedrop.has-file { border-style: solid; border-color: var(--verify); }
.field .filedrop.error { border-style: solid; border-color: var(--signal); }
.field .filedrop input[type="file"] { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; opacity: 0; }
.filedrop-ico { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 9px; background: var(--signal-soft); color: var(--signal); transition: background .2s ease, color .2s ease; }
.filedrop-ico svg { width: 19px; height: 19px; }
.filedrop.has-file .filedrop-ico { background: var(--verify-soft); color: var(--verify); }
.filedrop-body { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.filedrop-title { font-size: 0.96rem; color: var(--porcelain); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filedrop-hint { font-family: var(--mono); font-size: 0.7rem; color: var(--faint); letter-spacing: 0.03em; }
.file-msg { color: var(--signal); font-family: var(--mono); font-size: 0.74rem; margin-top: 0.55rem; }
.file-msg:empty { margin: 0; }

/* ---------- language switch ---------- */
.lang-switch { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.04em; color: var(--muted); border: 1px solid var(--line-2); border-radius: 8px; padding: 0.5rem 0.7rem; transition: border-color .15s ease, color .15s ease; white-space: nowrap; }
.lang-switch:hover { color: var(--porcelain); border-color: var(--porcelain); }
.lang-switch svg { width: 15px; height: 15px; flex: none; }

/* ---------- brand logo ---------- */
.brand .brand-logo { width: 30px; height: 30px; flex: none; border-radius: 8px; border: 1px solid var(--line-2); object-fit: cover; display: block; }

/* --- WP integration shims: render menu <li> wrappers as the design's flat <a> rows --- */
.nav-links ul,.footer-col ul,.mobile-menu ul{display:contents;list-style:none;margin:0;padding:0;}
.nav-links li,.footer-col li,.mobile-menu li{display:contents;}


/* ===========================================================
   Blog & generic-page content - styled to the Proof of Tech palette
   (uses the design tokens already defined in :root above)
   =========================================================== */
.pot-page { padding: clamp(90px, 12vh, 150px) 0 90px; }
.pot-eyebrow { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--signal); }
.pot-h1 { font-family: var(--display); font-weight: 600; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.08; margin: 0.5rem 0 1rem; color: var(--porcelain); }
.pot-meta { font-family: var(--mono); font-size: 0.82rem; color: var(--faint); margin: 0 0 2rem; }
.pot-prose { max-width: 760px; color: var(--porcelain); font-size: 18px; line-height: 1.75; }
.pot-prose h2 { font-family: var(--display); font-weight: 600; font-size: 1.7rem; margin: 2.2rem 0 0.8rem; color: var(--porcelain); }
.pot-prose h3 { font-family: var(--display); font-weight: 600; font-size: 1.3rem; margin: 1.8rem 0 0.6rem; color: var(--porcelain); }
.pot-prose p { margin: 0 0 1.1rem; }
.pot-prose a { color: var(--signal); text-decoration: underline; text-underline-offset: 3px; }
.pot-prose a:hover { color: var(--signal-2); }
.pot-prose ul, .pot-prose ol { margin: 0 0 1.1rem 1.25rem; }
.pot-prose li { margin: 0.3rem 0; }
.pot-prose blockquote { border-left: 3px solid var(--signal); margin: 1.4rem 0; padding: 0.2rem 0 0.2rem 1.2rem; color: var(--muted); font-style: italic; }
.pot-prose code { font-family: var(--mono); font-size: 0.9em; background: var(--surface); padding: 0.15em 0.4em; border-radius: 6px; }
.pot-prose pre { font-family: var(--mono); font-size: 0.9em; background: var(--surface); border: 1px solid var(--line); border-radius: var(--rad-s); padding: 1rem; overflow: auto; }
.pot-prose pre code { background: none; padding: 0; }
.pot-prose img { max-width: 100%; height: auto; border-radius: var(--rad-s); }
.pot-prose hr { border: none; border-top: 1px solid var(--line); margin: 2rem 0; }
.pot-cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.4rem; margin-top: 2.2rem; }
.pot-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--rad); padding: 1.6rem; transition: border-color .15s ease, transform .15s ease; }
.pot-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.pot-card h2 { font-family: var(--display); font-size: 1.25rem; margin: 0.2rem 0 0.5rem; }
.pot-card h2 a { color: var(--porcelain); text-decoration: none; }
.pot-card h2 a:hover { color: var(--signal); }
.pot-card .pot-meta { margin: 0 0 0.6rem; }
.pot-card p { color: var(--muted); margin: 0; font-size: 0.95rem; }
.pot-pagination { display: flex; gap: 1rem; justify-content: center; margin-top: 3rem; font-family: var(--mono); font-size: 0.85rem; }
.pot-pagination a, .pot-pagination .current { color: var(--signal); padding: 0.3rem 0.6rem; }

/* ---- native contact form status ---- */
.pot-form-status { padding: .8rem 1rem; border-radius: var(--rad-s); font-size: .95rem; margin-bottom: 1.2rem; }
.pot-form-status--ok { background: var(--verify-soft); color: var(--verify); border: 1px solid var(--verify); }
.pot-form-status--err { background: rgba(255,107,31,0.12); color: var(--signal); border: 1px solid var(--signal); }

/* ---- blog post media (images + captions) ---- */
.pot-prose figure, .pot-prose .wp-block-image { margin: 1.9rem auto; text-align: center; }
.pot-prose figure img, .pot-prose .wp-block-image img, .pot-prose p > img { display: block; height: auto; margin: 0 auto; border: 1px solid var(--line-2); border-radius: var(--rad-s); }
.pot-prose figcaption, .pot-prose .wp-element-caption, .pot-prose .wp-caption-text { margin-top: 0.7rem; font-family: var(--mono); font-size: 0.78rem; line-height: 1.5; letter-spacing: 0.02em; color: var(--faint); text-align: center; }

/* fix: keep button text painting on GPU-composited surfaces (header backdrop-filter / reveal transforms) - Chromium/Brave glitch */
.btn { transform: translateZ(0); -webkit-backface-visibility: hidden; backface-visibility: hidden; }

/* --- Multi-page content (wp_link_pages) --- */
.pot-pagelinks { margin-top: 1.6rem; font-family: var(--mono); font-size: 0.85rem; display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; color: var(--faint); }
.pot-pagelinks a { color: var(--signal); text-decoration: none; }
.pot-pagelinks a:hover { text-decoration: underline; }

/* --- Comments (blog single posts) --- */
.pot-comments { max-width: 72ch; margin: 4rem auto 0; padding-top: 2.5rem; border-top: 1px solid var(--line-2); }
.pot-comments-title { font-family: var(--display); font-size: 1.4rem; font-weight: 600; margin: 0 0 1.6rem; }
.pot-comment-list { list-style: none; margin: 0 0 2.5rem; padding: 0; }
.pot-comment-list ol, .pot-comment-list ul { list-style: none; }
.pot-comment-list .children { margin: 1rem 0 0 1rem; padding-left: 1.25rem; border-left: 1px solid var(--line); }
.pot-comment-list li.comment { margin: 0 0 1.25rem; }
.pot-comment-list .comment-body { padding: 1.1rem 1.25rem; border: 1px solid var(--line); border-radius: var(--rad-s); background: var(--surface); }
.pot-comment-list .comment-author { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; color: var(--porcelain); }
.pot-comment-list .comment-author .avatar { border-radius: 50%; }
.pot-comment-list .comment-author .says { display: none; }
.pot-comment-list .comment-author .fn { font-style: normal; }
.pot-comment-list .comment-metadata { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--faint); margin: 0.25rem 0 0.7rem; }
.pot-comment-list .comment-metadata a { color: inherit; text-decoration: none; }
.pot-comment-list .comment-content { color: var(--muted); }
.pot-comment-list .comment-content p { margin: 0 0 0.6rem; }
.pot-comment-list .reply { margin-top: 0.6rem; font-family: var(--mono); font-size: 0.78rem; }
.pot-comment-list .reply a { color: var(--signal); text-decoration: none; }
.pot-comment-list .comment-awaiting-moderation { font-family: var(--mono); font-size: 0.72rem; color: var(--faint); }
.pot-comment-form { display: flex; flex-direction: column; gap: 0.9rem; margin-top: 1rem; }
.pot-comment-form .comment-notes, .pot-comment-form .logged-in-as { font-size: 0.85rem; color: var(--faint); }
.pot-comment-form label { display: block; font-size: 0.82rem; color: var(--muted); margin-bottom: 0.35rem; }
.pot-comment-form input[type=text], .pot-comment-form input[type=email], .pot-comment-form input[type=url], .pot-comment-form textarea {
  width: 100%; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--rad-s); color: var(--porcelain); padding: 0.7rem 0.85rem; font-family: var(--body); font-size: 0.95rem;
}
.pot-comment-form textarea { min-height: 120px; resize: vertical; }
.pot-comment-form input:focus, .pot-comment-form textarea:focus { outline: none; border-color: var(--signal); }
.pot-comments-closed { color: var(--faint); font-family: var(--mono); font-size: 0.85rem; }

/* fix: the Chromium/Brave backdrop-filter paint bug left the header CTA text
   ("Contact Us" / "联系我们") invisible-until-hover on the blog index + single
   posts. Drop the backdrop-filter on exactly those templates — the header is
   already 78% opaque, so a solid header reads visually near-identical — which
   eliminates the glitch deterministically there. */
body.blog .site-header,
body.single .site-header {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background: var(--ink);
}

/* ---- header CTA text color hardening ---- */
.nav-cta .btn.btn-primary,
.nav-cta .btn.btn-primary:visited,
.nav-cta .btn.btn-primary:hover,
.nav-cta .btn.btn-primary:focus,
.mobile-menu .btn.btn-primary,
.mobile-menu .btn.btn-primary:visited,
.mobile-menu .btn.btn-primary:hover,
.mobile-menu .btn.btn-primary:focus,
.nav-cta .btn.btn-primary *,
.mobile-menu .btn.btn-primary * {
  color: #1a0c02 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}
