/* =========================================================
   Pengye Yang — Portfolio 2026
   Black, Apple-like, frosted glass. Tokens first.
   ========================================================= */

html:lang(zh-CN) body { font-family: "Poppins", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", -apple-system, sans-serif; }
:root {
  --bg: #000;
  --bg-2: #0a0a0b;
  --surface: #111113;
  --surface-2: #1a1a1d;
  --line: rgba(255, 255, 255, 0.1);
  --line-soft: rgba(255, 255, 255, 0.06);
  --text: #f5f5f7;
  --text-2: #a1a1a6;
  --text-3: #6e6e73;

  --glass-bg: rgba(30, 30, 33, 0.48);
  --glass-bg-strong: rgba(22, 22, 24, 0.72);
  --glass-blur: blur(28px) saturate(170%);
  --glass-hi: inset 0 1px 0 rgba(255, 255, 255, 0.09), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  --glow: 0 0 28px rgba(255, 255, 255, 0.09), 0 0 2px rgba(255, 255, 255, 0.18);

  --teal: #54d4cd;
  --lime: #d5e36d;
  --violet: #5c4eff;
  --red: #ff4d4d;

  --tag-pink: #f7b9ea;
  --tag-lilac: #b9c4f8;
  --tag-mint: #b8f3d1;
  --tag-sky: #b5ecf8;

  --r-xl: 36px;
  --r-lg: 28px;
  --r-md: 20px;
  --r-sm: 14px;

  --sans: "Poppins", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  --serif: "Playfair Display", "Times New Roman", serif;
  --hand: "Caveat", "Comic Sans MS", cursive;
  --script: "Mrs Saint Delafield", "Brush Script MT", cursive;

  --wrap: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --accent: var(--teal);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: rgba(84, 212, 205, 0.35); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-wide { width: 100%; max-width: 1480px; margin: 0 auto; padding: 0 var(--gutter); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- type ---------- */
.eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 14px;
}
.eyebrow.plain { text-transform: none; letter-spacing: 0.01em; font-size: 15px; }

.grad {
  background: linear-gradient(100deg, #fff 0%, #fff 45%, #8d8d92 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.h-display { font-size: clamp(44px, 7.4vw, 104px); font-weight: 700; letter-spacing: -0.035em; line-height: 0.98; }
.h-1 { font-size: clamp(34px, 5vw, 64px); font-weight: 700; letter-spacing: -0.03em; }
.h-2 { font-size: clamp(28px, 3.6vw, 48px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.12; }
.h-3 { font-size: clamp(20px, 2vw, 26px); font-weight: 600; line-height: 1.25; }
.h-4 { font-size: 18px; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; }

.lede { font-size: clamp(16px, 1.35vw, 19px); color: var(--text-2); line-height: 1.65; max-width: 760px; }
.body { color: var(--text-2); font-size: 15px; line-height: 1.7; }
.small { font-size: 13px; color: var(--text-3); line-height: 1.6; }
.center { text-align: center; }
.center .lede, .lede.center { margin-left: auto; margin-right: auto; }
.script { font-family: var(--script); font-weight: 400; letter-spacing: 0; color: rgba(255, 255, 255, 0.4); }

/* ---------- section rhythm ---------- */
.section { position: relative; isolation: isolate; padding: clamp(96px, 13vw, 180px) 0; }
.section.tight { padding: clamp(64px, 8vw, 110px) 0; }
.section-head { margin-bottom: clamp(44px, 6vw, 80px); }
.section-head.center { text-align: center; }
.section-head .lede { margin-top: 18px; }

/* ---------- glass ---------- */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-hi);
}

.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
  border-radius: var(--r-lg);
  box-shadow: var(--glass-hi);
  overflow: hidden;
}
.card.pad { padding: clamp(24px, 3vw, 40px); }

/* glowing black pills (from the PDF diagrams) */
.pill-glow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, #121214, #050506);
  box-shadow: var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  font-weight: 600;
  font-size: clamp(15px, 1.3vw, 18px);
  text-align: center;
  color: #fff;
}
.pill-glow.teal { box-shadow: 0 0 30px rgba(84, 212, 205, 0.18), 0 0 2px rgba(84, 212, 205, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.12); }

/* chips (no outlines, soft fill) */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  font-size: 14px;
  color: #e8e8ed;
  white-space: nowrap;
}

/* ---------- buttons (no strokes) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  transition: transform 0.4s var(--ease), background 0.3s, opacity 0.3s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(0.97); }
.btn-primary { background: #f5f5f7; color: #000; }
.btn-primary:hover { background: #fff; }
.btn-glass { background: rgba(255, 255, 255, 0.1); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); color: #fff; }
.btn-glass:hover { background: rgba(255, 255, 255, 0.16); }
.btn svg { width: 18px; height: 18px; flex: none; }

.link-arrow { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 500; font-size: 15px; }
.link-arrow svg { width: 16px; height: 16px; transition: transform 0.4s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- nav ---------- */
.topbar { position: fixed; top: 16px; left: 50%; z-index: 50; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; width: min(calc(100% - 32px), 560px); }
.nav {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 8px 8px 22px;
  border-radius: 999px;
  background: rgba(20, 20, 22, 0.42);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  box-shadow: var(--glass-hi), 0 10px 40px rgba(0, 0, 0, 0.35);
  transition: background 0.4s;
}
.lang-bubble { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: rgba(20, 20, 22, 0.42); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%); box-shadow: var(--glass-hi), 0 10px 40px rgba(0, 0, 0, 0.35); font-size: 15px; font-weight: 500; color: #f5f5f7; line-height: 1; transition: background 0.3s, transform 0.4s var(--ease); }
.contact-bubble { flex: none; display: grid; place-items: center; height: 52px; padding: 0 22px; border-radius: 999px; background: #f5f5f7; color: #000; font-size: 14px; font-weight: 500; white-space: nowrap; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35); transition: background 0.3s, transform 0.4s var(--ease); }
.contact-bubble:hover { background: #fff; transform: scale(1.04); }
.nav-brand { flex: none; }
.lang-bubble:hover { background: rgba(255, 255, 255, 0.14); transform: scale(1.05); }
.lang-bubble[lang="zh-CN"] { font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif; font-size: 16px; }
.nav.scrolled { background: rgba(20, 20, 22, 0.7); }
.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; letter-spacing: -0.01em; white-space: nowrap; }
.nav-brand img { width: 26px; height: auto; }
.nav-brand { padding: 6px 4px; }
.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-links a {
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--text-2);
  transition: color 0.25s, background 0.25s;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: #fff; background: rgba(255, 255, 255, 0.08); }

/* ---------- reveal motion ---------- */
/* outside the landing cover motion stays quiet: a short fade with a small rise, no blur */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease-out, transform 0.6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.04s; }
.reveal.d2 { transition-delay: 0.08s; }
.reveal.d3 { transition-delay: 0.12s; }
.reveal.d4 { transition-delay: 0.16s; }
.reveal-scale { opacity: 0; transition: opacity 0.6s ease-out; }
.reveal-scale.in { opacity: 1; }

/* =========================================================
   HOME — cover. Built 1:1 from the PDF cover (measured on a 2000px render):
   every coordinate below is a fraction of the stage width --W.
   ========================================================= */
.cover {
  --W: min(1600px, 100vw);
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(16px, 2.4vw, 36px);
  padding: 96px 0 44px;
  overflow: hidden;
}
.cv-stage { position: relative; width: var(--W); height: calc(var(--W) * 0.41); isolation: isolate; }
.cv-stage > * { position: absolute; }

/* back sheet (behind the word) */
.cv-back {
  z-index: 1;
  left: calc(var(--W) * 0.776);
  top: calc(var(--W) * 0.1385);
  width: calc(var(--W) * 0.105);
  height: calc(var(--W) * 0.237);
  border-radius: calc(var(--W) * 0.021);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.035) 22%, rgba(255, 255, 255, 0.02) 60%, rgba(255, 255, 255, 0.05));
  box-shadow: inset 1.5px 1.5px 0 rgba(255, 255, 255, 0.2), inset 0 -1px 0 rgba(255, 255, 255, 0.06), 0 30px 60px rgba(0, 0, 0, 0.6);
}
/* teal light inside the folder, seen through the front glass */
.cv-glow {
  z-index: 3;
  left: calc(var(--W) * 0.862);
  top: calc(var(--W) * 0.142);
  width: calc(var(--W) * 0.095);
  aspect-ratio: 1.1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(190, 255, 245, 0.95), rgba(110, 220, 210, 0.5) 45%, transparent);
  filter: blur(calc(var(--W) * 0.006));
  animation: breathe 7s ease-in-out infinite;
}
@keyframes breathe { 0%, 100% { opacity: 0.75; scale: 1; } 50% { opacity: 1; scale: 1.1; } }
/* front sheet: folder notch on the left, perspective bottom (shape lives in the mask) */
.cv-front {
  z-index: 4;
  left: calc(var(--W) * 0.8325);
  top: calc(var(--W) * 0.134);
  width: calc(var(--W) * 0.1275);
  height: calc(var(--W) * 0.251);
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05) 30%, rgba(16, 16, 18, 0.5) 62%, rgba(30, 30, 32, 0.55));
  -webkit-backdrop-filter: blur(calc(var(--W) * 0.009)) saturate(140%);
  backdrop-filter: blur(calc(var(--W) * 0.009)) saturate(140%);
  -webkit-mask: url("../img/ui/folder-side.svg") center / 100% 100% no-repeat;
  mask: url("../img/ui/folder-side.svg") center / 100% 100% no-repeat;
}
.cv-front::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255, 255, 255, 0.28), transparent 6%, transparent 94%, rgba(255, 255, 255, 0.22)), linear-gradient(180deg, rgba(255, 255, 255, 0.25), transparent 4%); pointer-events: none; }
.cv-sign {
  position: absolute;
  left: 20%;
  bottom: 8%;
  font-family: var(--script);
  font-size: calc(var(--W) * 0.021);
  line-height: 1;
  color: rgba(255, 255, 255, 0.5);
  rotate: -12deg;
  transform-origin: left bottom;
  white-space: nowrap;
}

/* the word: in front of the back sheet, behind the front sheet */
.cv-word {
  z-index: 2;
  left: calc(var(--W) * 0.095);
  top: calc(var(--W) * 0.1816);
  margin: 0;
  font-family: var(--serif);
  font-weight: 900;
  font-size: calc(var(--W) * 0.132);
  line-height: 1;
  letter-spacing: -0.02em;
  white-space: nowrap;
  background: linear-gradient(90deg, #fff 0%, #f6f6f6 32%, #c4c4c7 62%, #8f8f94 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  user-select: none;
  animation: slideOut 1.5s var(--ease) 0.1s both;
}
@keyframes slideOut { from { transform: translateX(26%); opacity: 0; filter: blur(8px); } to { transform: none; opacity: 1; filter: none; } }

/* tags: positioned by their centre; VISUAL and 3D MODEL end under the front glass */
.cv-tags { z-index: 3; inset: 0; pointer-events: none; }
.tw { position: absolute; width: 0; height: 0; animation: float 7s ease-in-out infinite; }
.tw.t1 { left: calc(var(--W) * 0.572); top: calc(var(--W) * 0.066); animation-delay: -1s; }
.tw.t2 { left: calc(var(--W) * 0.7205); top: calc(var(--W) * 0.1155); animation-delay: -3s; }
.tw.t3 { left: calc(var(--W) * 0.852); top: calc(var(--W) * 0.1465); animation-delay: -5s; }
.tw.t4 { left: calc(var(--W) * 0.8745); top: calc(var(--W) * 0.184); animation-delay: -2s; }
.tag {
  position: absolute;
  left: 0;
  top: 0;
  translate: -50% -50%;
  padding: 0.12em 0.72em;
  border-radius: 999px;
  font-family: var(--hand);
  font-weight: 500;
  font-size: calc(var(--W) * 0.019);
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  animation: flyOut 1.2s var(--ease) both;
}
.t1 .tag { background: var(--tag-pink); color: #5d2a55; rotate: 16deg; --fx: 160%; --fy: 260%; animation-delay: 0.7s; }
.t2 .tag { background: var(--tag-lilac); color: #2e356a; rotate: -10deg; --fx: 80%; --fy: 140%; animation-delay: 0.85s; }
.t3 .tag { background: var(--tag-mint); color: #1f5a3d; rotate: 21deg; --fx: 40%; --fy: 40%; animation-delay: 1s; }
.t4 .tag { background: var(--tag-sky); color: #18505e; rotate: -8deg; --fx: 40%; --fy: 20%; animation-delay: 1.15s; }
@keyframes flyOut { from { transform: translate(var(--fx), var(--fy)) scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 calc(var(--W) * -0.004); } }

/* frosted role pill over the bottom-left of the word */
.cv-role {
  z-index: 5;
  left: calc(var(--W) * 0.064);
  top: calc(var(--W) * 0.2825);
  width: calc(var(--W) * 0.2175);
  height: calc(var(--W) * 0.0435);
  display: flex;
  align-items: center;
  padding-left: calc(var(--W) * 0.041);
  border-radius: 999px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: calc(var(--W) * 0.0174);
  color: #fff;
  white-space: nowrap;
  background: rgba(24, 24, 26, 0.3);
  -webkit-backdrop-filter: blur(calc(var(--W) * 0.005)) saturate(150%);
  backdrop-filter: blur(calc(var(--W) * 0.005)) saturate(150%);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.45), inset 0 -10px 20px rgba(255, 255, 255, 0.05), inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 14px 34px rgba(0, 0, 0, 0.55);
  animation: rise 1.2s var(--ease) 0.6s both;
}
.cv-sub { z-index: 5; left: calc(var(--W) * 0.105); top: calc(var(--W) * 0.351); margin: 0; font-size: calc(var(--W) * 0.011); line-height: 1; white-space: nowrap; color: rgba(255, 255, 255, 0.55); animation: rise 1.2s var(--ease) 0.75s both; }
@keyframes rise { from { transform: translateY(40%); opacity: 0; } to { transform: none; opacity: 1; } }

.cover-foot { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cover-foot img { width: 34px; opacity: 0.45; }
.cover-foot .script { font-size: 26px; color: rgba(255, 255, 255, 0.32); }
.scroll-cue { margin-top: 6px; width: 22px; height: 36px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); position: relative; }
.scroll-cue::after { content: ""; position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; border-radius: 4px; background: #fff; translate: -50% 0; animation: cue 2s var(--ease) infinite; }
@keyframes cue { 0% { opacity: 0; transform: translateY(-2px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* small screens: same layering, re-proportioned so text stays legible */
@media (max-width: 700px) {
  .cv-stage { height: calc(var(--W) * 0.98); }
  .cv-back { left: calc(var(--W) * 0.66); top: calc(var(--W) * 0.14); width: calc(var(--W) * 0.17); height: calc(var(--W) * 0.44); border-radius: 18px; }
  .cv-glow { left: calc(var(--W) * 0.79); top: calc(var(--W) * 0.14); width: calc(var(--W) * 0.17); }
  .cv-front { left: calc(var(--W) * 0.77); top: calc(var(--W) * 0.12); width: calc(var(--W) * 0.21); height: calc(var(--W) * 0.5); }
  .cv-sign { font-size: calc(var(--W) * 0.042); }
  .cv-word { left: calc(var(--W) * 0.04); top: calc(var(--W) * 0.46); font-size: calc(var(--W) * 0.142); }
  .tag { font-size: 12px; }
  .tw.t1 { left: calc(var(--W) * 0.34); top: calc(var(--W) * 0.12); }
  .tw.t2 { left: calc(var(--W) * 0.46); top: calc(var(--W) * 0.23); }
  .tw.t3 { left: calc(var(--W) * 0.74); top: calc(var(--W) * 0.33); }
  .tw.t4 { left: calc(var(--W) * 0.76); top: calc(var(--W) * 0.42); }
  .cv-role { left: calc(var(--W) * 0.04); top: calc(var(--W) * 0.7); width: auto; height: auto; padding: 10px 26px; font-size: 15px; }
  .cv-sub { left: calc(var(--W) * 0.05); right: calc(var(--W) * 0.05); top: calc(var(--W) * 0.85); font-size: 12px; line-height: 1.6; white-space: normal; }
}

/* =========================================================
   HOME — about
   ========================================================= */
.about-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.monogram { width: 52px; opacity: 0.3; margin-bottom: 20px; }
.about-intro strong { color: #fff; font-weight: 600; }
.about-intro .lede { margin-top: 22px; }
.about-intro .h-display { margin-top: 6px; font-size: clamp(44px, 5.8vw, 88px); white-space: nowrap; }
.about-lead { margin-top: 24px; font-size: clamp(16px, 1.4vw, 19px); color: #e8e8ed; }
.about-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.tools { margin-top: 30px; }
.tools img { width: min(100%, 520px); }
.awards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 32px; margin-top: 30px; }
.awards li { position: relative; padding-left: 18px; font-size: 14px; color: var(--text-2); }
.awards li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 5px; height: 5px; border-radius: 50%; background: var(--text-3); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: clamp(40px, 5vw, 64px); }
.stat { padding: 4px clamp(14px, 2.5vw, 34px); }
.stat:first-child { padding-left: 0; }
.stat + .stat { box-shadow: -1px 0 0 var(--line); }
.stat b { display: block; font-size: clamp(36px, 4.6vw, 60px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.stat span { display: block; margin-top: 8px; font-size: 14px; color: var(--text-2); }

.portrait-wrap { position: relative; isolation: isolate; perspective: 1200px; justify-self: center; width: min(100%, 400px); }
.portrait {
  position: relative;
  border-radius: 34px;
  overflow: hidden;
  rotate: 8deg;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.92), 0 40px 80px rgba(0, 0, 0, 0.6);
  transition: rotate 0.9s var(--ease), transform 0.9s var(--ease);
}
.portrait-wrap:hover .portrait { rotate: 3deg; transform: scale(1.02); }
.portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; }
.portrait-glow { display: none; }

/* experience */
.xp-list { display: grid; gap: 36px; }
.xp-body { display: grid; grid-template-rows: 1fr; }
.xp-body > ul { min-height: 0; overflow: hidden; }
.xp-list.foldable { gap: 10px; transition: gap 1s var(--ease); }
.xp-list.foldable .xp-body { grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 1s var(--ease), opacity 0.8s var(--ease); }
.xp-list.foldable .xp { cursor: pointer; }
.xp-list.foldable .xp.open { cursor: auto; }
.xp-list.foldable .xp.open .xp-body { grid-template-rows: 1fr; opacity: 1; }
.xp-list.foldable.unfolded { gap: 36px; }
.xp-toggle { display: inline-grid; place-items: center; width: 30px; height: 30px; margin-top: 14px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); transition: transform 0.6s var(--ease), opacity 0.4s; }
.xp-toggle svg { width: 14px; height: 14px; }
.xp.open .xp-toggle { transform: rotate(45deg); opacity: 0; }
.xp-list:not(.foldable) .xp-toggle { display: none; }
.xp {
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) 1fr;
  gap: clamp(20px, 4vw, 60px);
  padding: clamp(24px, 3vw, 38px);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  box-shadow: var(--glass-hi);
  transition: background 0.4s;
}
.xp:hover { background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.03)); }
.xp-org { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; }
.xp-role { margin-top: 8px; color: #e8e8ed; font-size: 15px; }
.xp-date { margin-top: 4px; color: var(--text-3); font-size: 14px; font-variant-numeric: tabular-nums; }
.xp ul { display: grid; gap: 12px; }
.xp li { position: relative; padding-left: 20px; color: var(--text-2); font-size: 15px; line-height: 1.65; }
.xp li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); opacity: 0.7; }

/* =========================================================
   HOME — UI marquee
   ========================================================= */
.overview { overflow: hidden; }
.marquee { position: relative; display: flex; flex-direction: column; gap: 22px; margin-top: 10px; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-row { display: flex; gap: 22px; padding-right: 22px; width: max-content; animation: marquee var(--dur, 60s) linear infinite; will-change: transform; }
.marquee-row.rev { animation-direction: reverse; }
.marquee:hover .marquee-row { animation-play-state: paused; }
.marquee-row img { flex: none; width: clamp(170px, 16vw, 290px); height: auto; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.5)); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* =========================================================
   HOME — project folders (glass folder cards, from p.4)
   ========================================================= */
.folders { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 44px); }
.folder { position: relative; display: block; aspect-ratio: 0.8; isolation: isolate; }
.folder-back {
  position: absolute;
  inset: 34% 0 0 0;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  z-index: -2;
}
.folder-media {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 0;
  bottom: 18%;
  border-radius: 22px;
  overflow: hidden;
  z-index: -1;
  transition: transform 0.6s var(--ease);
}
.folder-media img { width: 100%; height: 100%; object-fit: cover; }
.folder:hover .folder-media { transform: translateY(-3%); }
.folder-front {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 52%;
  padding: 15% clamp(20px, 2.4vw, 34px) clamp(20px, 2.4vw, 30px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(24, 24, 26, 0.38);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 60' preserveAspectRatio='none'%3E%3Cpath d='M0 7Q0 0 7 0H42Q46 0 48.5 3.5L53 10Q55.5 13 60 13H93Q100 13 100 20V52Q100 60 92 60H8Q0 60 0 52Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 60' preserveAspectRatio='none'%3E%3Cpath d='M0 7Q0 0 7 0H42Q46 0 48.5 3.5L53 10Q55.5 13 60 13H93Q100 13 100 20V52Q100 60 92 60H8Q0 60 0 52Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.folder-front::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 30%); pointer-events: none; }
.folder-num { display: block; font-size: clamp(20px, 2vw, 28px); font-weight: 600; line-height: 1; }
.folder-text, .folder-title, .folder-desc { display: block; }
.folder-title { font-size: clamp(20px, 2vw, 28px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.folder-desc { margin-top: 8px; font-size: 14px; color: rgba(255, 255, 255, 0.62); line-height: 1.5; }
.folder-tag {
  position: absolute;
  top: 5%;
  right: 2%;
  z-index: 2;
  padding: 0.3em 1.1em;
  border-radius: 999px;
  font-family: var(--hand);
  font-size: clamp(16px, 1.5vw, 22px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform 0.6s var(--ease);
}
.folder:hover .folder-tag { transform: translateY(-3px); }
.folder-go { position: absolute; right: clamp(20px, 2.4vw, 32px); bottom: clamp(22px, 2.4vw, 32px); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.12); transition: background 0.3s, transform 0.5s var(--ease); }
.folder-go svg { width: 16px; height: 16px; }
.folder:hover .folder-go { background: #fff; color: #000; transform: rotate(-45deg); }
.folder .folder-text { padding-right: 52px; }

/* =========================================================
   HOME — other work
   ========================================================= */
.vibe { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(30px, 5vw, 70px); align-items: center; padding: clamp(28px, 4vw, 56px); border-radius: var(--r-xl); background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)); box-shadow: var(--glass-hi); overflow: hidden; }
.vibe + .vibe { margin-top: 24px; }
a.vibe { display: grid; transition: background 0.5s var(--ease), transform 0.6s var(--ease); }
a.vibe:hover { background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)); transform: translateY(-4px); }
a.vibe:hover .link-arrow svg { transform: translateX(4px); }
.vibe-phones { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(10px, 1.4vw, 18px); }
.vibe-badge { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 7px 14px; border-radius: 999px; background: rgba(255, 36, 66, 0.14); color: #ff8a9b; font-size: 13px; font-weight: 500; }
.vibe .h-2 { margin-bottom: 16px; }
.vibe .note { margin-top: 16px; }

.bento { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: clamp(120px, 13vw, 190px); gap: 14px; }
.bento figure { margin: 0; border-radius: var(--r-md); overflow: hidden; background: #0d0d0e; }
.bento img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.bento figure:hover img { transform: scale(1.06); }
.b-a { grid-column: span 3; grid-row: span 2; }
.b-b { grid-column: span 1; grid-row: span 2; }
.b-c { grid-column: span 2; grid-row: span 1; }
.b-d { grid-column: span 2; grid-row: span 1; }
.b-e { grid-column: span 2; grid-row: span 2; }
.b-f { grid-column: span 2; grid-row: span 2; }
.b-g { grid-column: span 2; grid-row: span 2; }

/* =========================================================
   HOME — contact
   ========================================================= */
.thanks { position: relative; text-align: center; overflow: hidden; }
.thanks-word { font-family: var(--serif); font-weight: 900; font-size: clamp(60px, 13vw, 200px); line-height: 0.9; letter-spacing: -0.02em; background: linear-gradient(90deg, #fff 30%, #8e8e93); -webkit-background-clip: text; background-clip: text; color: transparent; }
.thanks .lede { margin: 26px auto 0; }
.thanks-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
.thanks-glow { display: none; }

.footer { padding: 40px 0 50px; color: var(--text-3); font-size: 13px; }
.footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer .script { font-size: 28px; color: rgba(255, 255, 255, 0.32); }
.footer a:hover { color: #fff; }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 60; translate: -50% 20px; opacity: 0; padding: 12px 20px; border-radius: 999px; background: rgba(40, 40, 44, 0.8); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); font-size: 14px; transition: opacity 0.4s, translate 0.5s var(--ease); pointer-events: none; }
.toast.show { opacity: 1; translate: -50% 0; }

/* =========================================================
   PHONE MOCKUP (CSS, no image frames)
   ========================================================= */
.phone {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 19.5;
  padding: 3.4%;
  border-radius: 17% / 7.8%;
  background: linear-gradient(145deg, #2c2c2e, #0b0b0c 40%, #1c1c1e);
  box-shadow: inset 0 0 0 1.5px #6b6b70, inset 0 0 0 3px #111, 0 30px 60px rgba(0, 0, 0, 0.55);
}
.phone::before { content: ""; position: absolute; z-index: 2; top: 5.2%; left: 50%; translate: -50% 0; width: 31%; height: 3.6%; border-radius: 999px; background: #000; }
.phone.no-island::before, .phone.flat::before { display: none; }
.phone > img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 14.4% / 6.6%; background: #fff; }
.phone.dark > img { background: #000; }
.phone.flat { padding: 0; background: none; box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5); }
.phone.flat > img { border-radius: 12% / 5.6%; }

.shot { display: block; width: 100%; height: auto; filter: drop-shadow(0 28px 44px rgba(0, 0, 0, 0.55)); }
.step .shot { margin-top: 24px; }
.phones { display: grid; gap: clamp(14px, 2vw, 28px); align-items: end; }
.phones.c3 { grid-template-columns: repeat(3, 1fr); }
.phones.c4 { grid-template-columns: repeat(4, 1fr); }
.phones.c5 { grid-template-columns: repeat(5, 1fr); }
.phones .lift { transform: translateY(-8%); }

/* =========================================================
   CASE STUDY
   ========================================================= */
.case-hero { position: relative; isolation: isolate; min-height: 100svh; display: flex; align-items: center; overflow: hidden; padding: 120px 0 90px; }
.case-hero-bg { position: absolute; inset: 0; z-index: -1; }
.case-hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: var(--hero-pos, 50% 50%); }
.case-hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.6) 38%, rgba(0, 0, 0, 0) 70%), linear-gradient(0deg, #000 0%, transparent 25%); }
.case-hero .logo-mark { width: 74px; margin-bottom: 26px; }
.case-hero h1 { font-size: clamp(48px, 7.6vw, 112px); font-weight: 700; letter-spacing: -0.035em; line-height: 0.95; max-width: 9.5em; }
.case-hero .sub { margin-top: 18px; font-size: clamp(20px, 2.2vw, 30px); font-weight: 500; color: #fff; letter-spacing: -0.01em; }
.case-hero .lede { margin-top: 12px; max-width: 560px; }
html:lang(zh-CN) .case-hero h1 { font-size: clamp(44px, 5.4vw, 84px); letter-spacing: -0.01em; line-height: 1.08; }
html:lang(zh-CN) .case-hero .lede { max-width: 22em; }
html:lang(zh-CN) :is(h1, h2, h3) { text-wrap: balance; }
.case-hero .chips { margin-top: 28px; }
.case-hero-meta { margin-top: clamp(40px, 7vw, 90px); }
.case-hero-meta b { display: block; font-size: 15px; font-weight: 500; letter-spacing: 0.06em; }
.case-hero-meta span { display: block; margin-top: 6px; color: var(--text-2); font-size: 15px; }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 820px; margin: clamp(40px, 5vw, 64px) auto 0; text-align: center; }
.facts div + div { box-shadow: -1px 0 0 var(--line); }
.facts b { display: block; font-size: 13px; letter-spacing: 0.12em; font-weight: 500; text-transform: uppercase; }
.facts span { display: block; margin-top: 8px; color: var(--text-2); font-size: 15px; }

.statement { font-size: clamp(24px, 3vw, 40px); font-weight: 600; line-height: 1.3; letter-spacing: -0.02em; max-width: 980px; }
.statement .dim { color: #6e6e73; }
.statement-en { margin-top: 18px; color: var(--text-3); font-size: 15px; max-width: 760px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.split.wide-left { grid-template-columns: 1.2fr 0.8fr; }
.split.wide-right { grid-template-columns: 0.8fr 1.2fr; }

.grid { display: grid; gap: clamp(14px, 2vw, 24px); }
.split > *, .grid > *, .phones > *, .ba > *, .steps > * { min-width: 0; }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }

.figure { margin: 0; border-radius: var(--r-lg); overflow: hidden; background: #0c0c0d; }
.figure img { width: 100%; height: 100%; object-fit: cover; }
.figure.contain img { object-fit: contain; }
.figcap { margin-top: 14px; font-size: 14px; color: var(--text-3); text-align: center; }

.img-glow { filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.6)); }

/* photo card with text overlay (problem cards) */
.photo-card { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 0.78; background: #111; box-shadow: var(--glass-hi); }
.photo-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.photo-card:hover img { transform: scale(1.04); }
.photo-card .txt { position: absolute; left: 0; right: 0; bottom: 0; padding: 28% clamp(20px, 2.4vw, 30px) clamp(20px, 2.4vw, 30px); background: linear-gradient(0deg, rgba(0, 0, 0, 0.92) 30%, rgba(0, 0, 0, 0)); }
.photo-card .txt p { margin-top: 10px; color: rgba(255, 255, 255, 0.66); font-size: 14px; line-height: 1.6; }

/* icon tiles with dot halftone */
.dots { position: relative; }
.dots::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(70, 110, 255, 0.55) 1.3px, transparent 1.6px); background-size: 14px 14px; -webkit-mask-image: radial-gradient(closest-side, #000 20%, transparent); mask-image: radial-gradient(closest-side, #000 20%, transparent); opacity: 0.8; pointer-events: none; }
.tile { aspect-ratio: 1; border-radius: var(--r-lg); display: grid; place-items: center; background: #050506; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14); overflow: hidden; }
.tile svg { position: relative; width: 30%; height: 30%; color: #fff; }

/* goals → strategy diagram */
.flow { display: grid; grid-template-columns: 160px repeat(3, 1fr); gap: clamp(14px, 2vw, 26px); align-items: start; }
.flow-label { font-size: 20px; font-weight: 600; padding-top: 12px; }
.flow-cell .body { margin-top: 16px; padding: 0 6px; }
.flow-arrow { display: block; width: 2px; height: 70px; margin: 18px auto; background: linear-gradient(180deg, transparent, var(--teal)); position: relative; }
.flow-arrow::after { content: ""; position: absolute; left: 50%; bottom: -2px; translate: -50% 0; border: 7px solid transparent; border-top: 9px solid var(--teal); border-bottom: 0; }
.flow-ring { position: relative; grid-column: 1 / -1; display: grid; grid-template-columns: 160px repeat(3, 1fr); gap: clamp(14px, 2vw, 26px); padding: 34px 30px; margin: 0 -30px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }

/* pyramid */
.pyramid-wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.pyramid { position: relative; aspect-ratio: 1 / 0.9; }
.pyramid::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.pyr { position: absolute; left: 50%; translate: -50% 0; height: 13%; border-radius: 10px; background: linear-gradient(180deg, #24384f, #1a2b3e); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16); clip-path: polygon(8% 0, 92% 0, 100% 100%, 0 100%); }
.pyr.l2 { top: 36%; width: 30%; }
.pyr.l3 { top: 56%; width: 46%; background: linear-gradient(180deg, #1d4a52, #173a41); }
.pyr.l4 { top: 76%; width: 62%; }
.pyr-top { position: absolute; left: 50%; top: 9%; translate: -50% 0; width: 18%; aspect-ratio: 1.08; background: linear-gradient(180deg, #2a8cff, #0b56c6); clip-path: polygon(50% 0, 100% 100%, 0 100%); filter: drop-shadow(0 0 18px rgba(42, 140, 255, 0.9)); display: grid; place-items: end center; padding-bottom: 14%; }
.pyr-top svg, .pyr-top img { width: 44%; color: #fff; }
.pyr-list { display: grid; gap: clamp(22px, 3vw, 36px); }
.pyr-list li h3 { font-size: clamp(20px, 2vw, 26px); font-weight: 700; }
.pyr-list li p { margin-top: 6px; color: var(--text-2); font-size: 15px; }
.pyr-list li:first-child h3 { color: #fff; }
.pyr-list li:first-child { position: relative; }
.pyr-list li:first-child::before { content: ""; position: absolute; left: -52px; top: 0.7em; width: 40px; height: 2px; background: linear-gradient(90deg, transparent, #2a8cff); }

/* numbered steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 2vw, 24px); }
.step-n { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #0b0b0c; box-shadow: var(--glow); font-weight: 600; font-size: 18px; }
.step h3 { margin-top: 18px; font-size: 18px; }
.step p { margin-top: 6px; font-size: 14px; color: var(--text-2); }
.step .phone { margin-top: 24px; }

/* circles */
.orbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.4vw, 30px); align-items: start; }
.orb { aspect-ratio: 1; width: 78%; margin: 0 auto 28px; border-radius: 50%; display: grid; place-items: center; text-align: center; padding: 14%; background: radial-gradient(circle at 50% 110%, rgba(84, 212, 205, 0.18), rgba(255, 255, 255, 0.03) 60%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 30px 80px rgba(0, 0, 0, 0.6); font-size: clamp(18px, 2vw, 26px); font-weight: 700; line-height: 1.25; letter-spacing: -0.015em; }
.orbs > div:nth-child(2) .orb { width: 92%; margin-top: -6%; }
.issue { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: var(--r-md); background: rgba(255, 255, 255, 0.04); box-shadow: var(--glass-hi); font-size: 14px; color: #d8d8dd; line-height: 1.6; }
.issue + .issue { margin-top: 12px; }
.issue i { flex: none; width: 9px; height: 9px; margin-top: 0.5em; border-radius: 50%; background: #ff5a3c; box-shadow: 0 0 10px rgba(255, 90, 60, 0.7); }
.issue.fix i { background: #2bb3c7; box-shadow: 0 0 10px rgba(43, 179, 199, 0.7); }
.issue b { display: block; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); font-weight: 500; margin-bottom: 2px; }

/* metrics */
.metric { padding: clamp(22px, 3vw, 34px); border-radius: var(--r-lg); background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)); box-shadow: var(--glass-hi); }
.metric b { display: block; font-size: clamp(34px, 4vw, 52px); font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--accent); }
.metric h3 { margin-top: 16px; font-size: 17px; font-weight: 600; }
.metric p { margin-top: 6px; font-size: 14px; color: var(--text-2); }
.metric-row { display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: 24px; padding: 22px 28px; }
.metric-row b { font-size: clamp(28px, 2.5vw, 38px); }
.metric-row p { margin: 0; font-size: 14.5px; line-height: 1.55; }
.metric-row img { justify-self: end; max-height: 40px; max-width: 132px; width: auto !important; object-fit: contain; }
.expo-grid { grid-auto-rows: 1fr; }
.expo-grid .figure { aspect-ratio: auto !important; height: 100%; }
@media (max-width: 600px) { .metric-row { grid-template-columns: 1fr auto; gap: 10px 16px; } .metric-row p { grid-column: 1 / -1; } .metric-row img { grid-row: 1; grid-column: 2; } }
.metrics-sm .metric { padding: 20px 18px; }
.metrics-sm .metric b { font-size: clamp(26px, 2.5vw, 38px); }
.metrics-sm .metric h3 { font-size: 15px; }
.metrics-sm .metric p { font-size: 13px; }

/* before/after */
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 3vw, 40px); }
.ba.ba-pdf { grid-template-columns: 0.82fr 1.18fr; align-items: end; }
.ba-pdf > :first-child .ba-media { aspect-ratio: 16 / 9.4; }
.ba-pdf > :last-child .ba-media { aspect-ratio: 4 / 3; }
.ba-pdf > :first-child { opacity: 0.92; }
@media (max-width: 860px) { .ba.ba-pdf { grid-template-columns: 1fr; } }
.ba-label { display: inline-flex; padding: 7px 16px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); font-size: 13px; font-weight: 500; letter-spacing: 0.04em; }
.ba-label.new { background: var(--accent); color: #000; }
.ba-media { margin-top: 18px; border-radius: var(--r-lg); overflow: hidden; background: #0d0d0e; aspect-ratio: 16 / 9; }
.ba-media img { width: 100%; height: 100%; object-fit: cover; }
.ba-cap { margin-top: 18px; font-size: 15px; color: #e8e8ed; font-weight: 500; }
.checks { margin-top: 16px; display: grid; gap: 10px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--text-2); line-height: 1.55; }
.checks li::before { content: ""; flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; background: #34c759 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 13px no-repeat; }
.checks li.x::before { background: #ff3b30 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E") center / 11px no-repeat; }

/* quotes */
.quotes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.quote { display: flex; gap: 18px; padding: clamp(22px, 3vw, 32px); border-radius: var(--r-lg); background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03)); box-shadow: var(--glass-hi); }
.quote-avatar { flex: none; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: #000; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.quote-avatar svg, .quote-avatar img { width: 56%; }
.quote small { display: block; font-size: 13px; color: var(--text-2); font-weight: 500; }
.quote h3 { margin-top: 6px; font-size: 17px; font-weight: 600; line-height: 1.4; letter-spacing: -0.01em; }
.quote p { margin-top: 10px; font-size: 14px; color: var(--text-2); line-height: 1.65; }

/* list cards (future) */
.rows { display: grid; gap: 14px; max-width: 880px; margin: 0 auto; }
.row-card { display: flex; gap: 18px; align-items: center; padding: 24px 28px; border-radius: var(--r-md); background: #050506; box-shadow: var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.08); font-size: 16px; color: #e8e8ed; }
.row-card i { flex: none; width: 14px; height: 14px; border-radius: 50%; background: #1fa45f; }
.row-card:nth-child(even) i { background: #5f8ea6; }

/* swatches / type */
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.swatch { aspect-ratio: 0.5; border-radius: 26px; display: flex; align-items: flex-end; padding: 18px; font-size: 13px; }
.type-card { display: flex; flex-direction: column; justify-content: space-between; min-height: 100%; }
.type-aa { font-size: clamp(90px, 12vw, 170px); font-weight: 700; line-height: 0.9; letter-spacing: -0.04em; }

/* journey map */
.journey { display: grid; grid-template-columns: 140px repeat(4, 1fr); border-radius: var(--r-lg); background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015)); box-shadow: var(--glass-hi); overflow: hidden; }
.journey > div { padding: 18px 16px; font-size: 13.5px; color: var(--text-2); line-height: 1.55; box-shadow: inset 0 -1px 0 var(--line-soft); }
.journey .jh { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; font-weight: 600; }
.journey .act { color: #fff; font-weight: 600; font-size: 15px; }
.journey .act.hot, .journey .hot-text { color: #8c84ff; }
.journey img { border-radius: 14px; width: 100%; aspect-ratio: 1; object-fit: cover; }
.journey .emo { font-size: 26px; text-align: center; }
.journey .emo.hot { filter: drop-shadow(0 0 10px rgba(92, 78, 255, 0.9)); }

/* stat cards (hyped) */
.pct { padding: 28px; border-radius: var(--r-lg); background: #111113; box-shadow: var(--glass-hi); }
.pct b { display: block; font-size: clamp(38px, 4vw, 54px); font-weight: 600; color: #6f63ff; letter-spacing: -0.02em; line-height: 1; }
.pct p { margin-top: 14px; font-size: 14px; color: #d8d8dd; }
.say { padding: 16px 22px; border-radius: 999px; background: #121214; font-size: 15px; color: #e8e8ed; }
.say + .say { margin-top: 12px; }

/* next project */
.next { display: block; position: relative; padding: clamp(60px, 9vw, 120px) 0; text-align: center; overflow: hidden; }
.next small { display: block; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); }
.next strong { display: block; margin-top: 14px; font-size: clamp(40px, 7vw, 96px); font-weight: 700; letter-spacing: -0.035em; line-height: 1; transition: letter-spacing 0.8s var(--ease); }
.next:hover strong { letter-spacing: -0.02em; }
.next .link-arrow { margin-top: 22px; }

/* section ambient glows */
.ambient { position: absolute; z-index: -1; width: 70vw; max-width: 900px; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, var(--glow-c, rgba(84, 212, 205, 0.12)), transparent); filter: blur(30px); pointer-events: none; }


/* ---------- vibe-coding case studies ---------- */
.hero-split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(30px, 5vw, 80px); align-items: center; }
.hero-phones { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px, 2vw, 26px); align-items: end; max-width: 560px; justify-self: end; width: 100%; }
.hero-phones .phone:last-child { transform: translateY(-9%); }
.case-hero.dim .case-hero-bg::after { background: linear-gradient(90deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 45%, rgba(0, 0, 0, 0.45) 100%), linear-gradient(0deg, #000 0%, transparent 30%); }
.flow5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(12px, 1.6vw, 22px); }
.flow5 .step h3 { font-size: 16px; }
.flow6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(10px, 1.4vw, 18px); }
.flow6 .step h3 { font-size: 15px; }
.palette { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.palette span { display: flex; flex-direction: column; justify-content: flex-end; aspect-ratio: 1; padding: 12px; border-radius: 18px; font-size: 12px; line-height: 1.3; color: rgba(255, 255, 255, 0.92); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35); }
.palette span small { display: block; opacity: 0.75; font-size: 11px; }
.timeline { display: grid; gap: 12px; }
.timeline li { display: grid; grid-template-columns: 92px 1fr; gap: 18px; padding: 18px 22px; border-radius: var(--r-md); background: rgba(255, 255, 255, 0.04); box-shadow: var(--glass-hi); }
.timeline b { color: var(--accent); font-size: 15px; font-weight: 600; }
.timeline p { color: var(--text-2); font-size: 14.5px; line-height: 1.6; }
.timeline p strong { color: #fff; font-weight: 600; }
.tiers { display: grid; gap: 8px; }
.tiers div { display: grid; grid-template-columns: 1.2fr 0.7fr 0.8fr 2fr; gap: 12px; align-items: center; padding: 14px 20px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); font-size: 14px; color: var(--text-2); }
.tiers div:first-child { background: none; padding-top: 0; padding-bottom: 4px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.tiers b { color: #fff; font-weight: 600; }
.tiers .gold { background: linear-gradient(90deg, rgba(217, 178, 106, 0.22), rgba(217, 178, 106, 0.05)); box-shadow: inset 0 0 0 1px rgba(217, 178, 106, 0.35); }
.tiers .gold b { color: #e8c886; }
.big-nums { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.big-nums .metric { padding: 22px 18px; }
.big-nums .metric b { font-size: clamp(30px, 3vw, 44px); }
.swatches.five { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 600px) { .swatches.five { grid-template-columns: repeat(2, 1fr); } }
.cap { margin-top: 12px; font-size: 13px; color: var(--text-3); text-align: center; }
@media (max-width: 1080px) {
  .flow6 { grid-template-columns: repeat(3, 1fr); }
  .big-nums { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .hero-split { grid-template-columns: 1fr; }
  .hero-phones { justify-self: start; max-width: 420px; }
  .flow5 { grid-template-columns: repeat(2, 1fr); }
  .palette { grid-template-columns: repeat(4, 1fr); }
  .tiers div { grid-template-columns: 1fr 0.6fr 0.7fr; }
  .tiers div > :last-child { grid-column: 1 / -1; }
  .timeline li { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 600px) {
  .flow6, .big-nums { grid-template-columns: repeat(2, 1fr); }
  .palette { grid-template-columns: repeat(3, 1fr); }
}


/* ---------- PDF slides (WooWoof): clean page render + English overlays ---------- */
.slides { --W: min(1600px, 100vw); display: grid; justify-items: center; }
.slide { position: relative; width: var(--W); aspect-ratio: 16 / 9; overflow: hidden; container-type: inline-size; }
.slide-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.slide .o { position: absolute; left: calc(var(--W) * var(--x) / 1920); top: calc(var(--W) * var(--y) / 1920); width: calc(var(--W) * var(--w) / 1920); max-width: none; }
.slide .t { position: absolute; margin: 0; left: calc(var(--W) * var(--x) / 1920); top: calc(var(--W) * var(--y) / 1920); width: calc(var(--W) * var(--w) / 1920); font-size: calc(var(--W) * var(--s) / 1920); line-height: 1.42; color: #8e8e93; letter-spacing: -0.005em; }
.slide .t.c { translate: -50% 0; text-align: center; }
.slide .t.r { translate: -100% 0; text-align: right; }
.slide .t.h { font-weight: 700; line-height: 1.16; letter-spacing: -0.02em; background: linear-gradient(90deg, #fff 0%, #fff 45%, #8d8d92 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.slide .t.w { color: #fff; font-weight: 600; line-height: 1.28; }
.slide .t.w .g { color: #77777c; }
.slide .t.p { color: #8e8e93; }
.slide .t.s { color: #a1a1a6; line-height: 1.3; }
.slide .t.pill { color: #fff; font-weight: 600; line-height: 1.25; }
@media (max-width: 760px) {
  .slides { --W: 100vw; }
  .slide { aspect-ratio: auto; overflow: visible; padding-bottom: 36px; }
  .slide-bg { position: relative; height: auto; aspect-ratio: 16 / 9; }
  .slide .t { position: static; translate: none; width: auto; margin: 10px 20px 0; text-align: left !important; font-size: 14px; }
  .slide .t.h { font-size: 24px; margin-top: 18px; }
  .slide .t.w { font-size: 17px; margin-top: 16px; }
  .slide .t.pill { display: inline-block; margin: 8px 0 0 20px; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); font-size: 13px; }
  .slide .t.s { font-size: 13px; }
}


/* ---------- HYPED final UI (PDF p.57 proportions) ---------- */
.final-ui { display: grid; grid-template-columns: minmax(260px, 0.36fr) 1fr; gap: clamp(30px, 4vw, 70px); align-items: center; }
.final-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 1.6vw, 28px) clamp(14px, 1.8vw, 30px); }
.final-grid .shot:nth-child(odd) { transform: translateY(7%); }
.final-grid .shot.reveal.in:nth-child(odd) { transform: translateY(7%); }
@media (max-width: 1080px) { .final-ui { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .final-grid { grid-template-columns: repeat(2, 1fr); } .final-grid .shot:nth-child(odd), .final-grid .shot.reveal.in:nth-child(odd) { transform: none; } }

/* ---------- live demo in a phone ---------- */
.demo { display: grid; grid-template-columns: 1fr auto; gap: clamp(30px, 6vw, 100px); align-items: center; }
.demo-phone { --pw: min(360px, 78vw); position: relative; width: var(--pw); aspect-ratio: 390 / 844; padding: 12px; border-radius: 56px; background: linear-gradient(145deg, #2c2c2e, #0b0b0c 40%, #1c1c1e); box-shadow: inset 0 0 0 1.5px #6b6b70, inset 0 0 0 3px #111, 0 40px 90px rgba(0, 0, 0, 0.6), 0 0 120px var(--demo-glow, rgba(84, 212, 205, 0.12)); }
.demo-screen { position: relative; width: 100%; height: 100%; border-radius: 44px; overflow: hidden; background: #000; }
.demo-screen iframe { position: absolute; left: 0; top: 0; width: 390px; height: 844px; border: 0; transform-origin: 0 0; transform: scale(var(--k, 0.86)); background: #000; }
.demo-cover { position: absolute; inset: 0; display: grid; place-items: center; cursor: pointer; }
.demo-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.55); transition: filter 0.5s, transform 1s var(--ease); }
.demo-cover:hover img { filter: brightness(0.7); transform: scale(1.03); }
.demo-play { position: relative; display: inline-flex; align-items: center; gap: 10px; height: 54px; padding: 0 26px; border-radius: 999px; background: rgba(255, 255, 255, 0.92); color: #000; font-weight: 600; font-size: 15px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45); }
.demo-play svg { width: 16px; height: 16px; }
.demo-island { position: absolute; z-index: 3; top: 22px; left: 50%; translate: -50% 0; width: 30%; height: 26px; border-radius: 999px; background: #000; pointer-events: none; }
.demo-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.demo-note { margin-top: 18px; font-size: 13px; color: var(--text-3); }
@media (max-width: 860px) { .demo { grid-template-columns: 1fr; justify-items: center; text-align: center; } .demo-actions { justify-content: center; } }

/* ---------- next project: blurred cover card ---------- */
.next-card { position: relative; display: block; background: #000; padding: clamp(80px, 11vw, 150px) var(--gutter); }
.next-card-inner { position: relative; display: grid; grid-template-columns: 1fr 1.15fr; align-items: center; gap: clamp(24px, 4vw, 60px); max-width: 1180px; margin: 0 auto; padding: clamp(22px, 3vw, 36px); border-radius: 36px; background: linear-gradient(180deg, #161618, #0d0d0e); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.06); transition: transform 0.8s var(--ease); }
.next-card:hover .next-card-inner { transform: translateY(-6px); }
.next-card small { display: block; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); }
.next-card strong { display: block; margin-top: 12px; font-size: clamp(34px, 4.4vw, 64px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.02; }
.next-card .next-sub { margin-top: 12px; color: rgba(255, 255, 255, 0.7); font-size: clamp(15px, 1.3vw, 18px); }
.next-card .btn { margin-top: 28px; }
.next-card-media { border-radius: 26px; overflow: hidden; aspect-ratio: 16 / 10; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45); }
.next-card-media img { width: 100%; height: 100%; object-fit: cover; object-position: var(--next-pos, 50% 50%); transition: transform 1.2s var(--ease); }
.next-card:hover .next-card-media img { transform: scale(1.05); }
@media (max-width: 760px) { .next-card-inner { grid-template-columns: 1fr; } .next-card-media { order: -1; } }


/* ---------- WooWoof slides rebuilt as front-end (1920 x 1080 grid) ---------- */
.slide.fe { background: #000; }
.slide.fe > * { position: absolute; }
.fe-img { left: calc(var(--W) * var(--x) / 1920); top: calc(var(--W) * var(--y) / 1920); width: calc(var(--W) * var(--w) / 1920); height: auto; max-width: none; }
.fe-lines { inset: 0; width: 100%; height: 100%; pointer-events: none; }
.fe-pill, .fe-num { display: flex; align-items: center; justify-content: center; text-align: center; left: calc(var(--W) * var(--x) / 1920); top: calc(var(--W) * var(--y) / 1920); width: calc(var(--W) * var(--w) / 1920); height: calc(var(--W) * var(--h) / 1920); }
.fe-pill { padding: 0 1.1em; border-radius: 999px; background: linear-gradient(180deg, #141416, #060607); box-shadow: 0 0 calc(var(--W) * 22 / 1920) rgba(255, 255, 255, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.07); font-size: calc(var(--W) * var(--s) / 1920); font-weight: 600; line-height: 1.15; color: #fff; letter-spacing: -0.005em; }
.fe-pill.teal { box-shadow: 0 0 calc(var(--W) * 24 / 1920) rgba(84, 212, 205, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 0 0 1px rgba(84, 212, 205, 0.35); }
.fe-pill.solid { background: #000; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3), 0 10px 24px rgba(0, 0, 0, 0.55); font-weight: 400; }
.fe-num { border-radius: 50%; background: #050506; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.5); font-size: calc(var(--W) * 32 / 1920); font-weight: 700; color: #fff; }
.fe-card { left: calc(var(--W) * var(--x) / 1920); top: calc(var(--W) * var(--y) / 1920); width: calc(var(--W) * var(--w) / 1920); height: calc(var(--W) * var(--h) / 1920); border-radius: calc(var(--W) * var(--r) / 1920); background: linear-gradient(180deg, #161618, #0c0c0d); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.fe-card.line { background: #050506; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.fe-card.dot-r::before, .fe-card.dot-b::before { content: ""; position: absolute; left: calc(var(--W) * 30 / 1920); top: 50%; width: calc(var(--W) * 10 / 1920); aspect-ratio: 1; border-radius: 50%; translate: 0 -50%; background: #ff5a3c; box-shadow: 0 0 10px rgba(255, 90, 60, 0.7); }
.fe-card.dot-b::before { background: #2bb3c7; box-shadow: 0 0 10px rgba(43, 179, 199, 0.7); }
.fe-capsule { left: calc(var(--W) * var(--x) / 1920); top: calc(var(--W) * var(--y) / 1920); width: calc(var(--W) * var(--w) / 1920); height: calc(var(--W) * var(--h) / 1920); border-radius: 999px; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.1); }
.fe-orb { left: calc(var(--W) * var(--x) / 1920); top: calc(var(--W) * var(--y) / 1920); width: calc(var(--W) * var(--w) / 1920); height: calc(var(--W) * var(--h) / 1920); border-radius: 50%; background: radial-gradient(circle at 50% 30%, #1c1c1e, #0a0a0b 70%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.07), 0 30px 80px rgba(0, 0, 0, 0.6); }
.fe-sign { left: 50%; translate: -50% 0; top: calc(var(--W) * 1008 / 1920); font-family: var(--script); font-size: calc(var(--W) * 28 / 1920); color: rgba(255, 255, 255, 0.32); white-space: nowrap; }
.slide .t.e { color: #a1a1a6; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 400; line-height: 1.2; }
.slide .t.y { color: #f5b31a; font-weight: 600; }
.slide .t.tq { color: #54d4cd; font-weight: 700; line-height: 1.1; }
.slide .t.k { color: #1f3b39; font-weight: 600; line-height: 1.2; }
.slide .t.g { color: #5c5c61; }
.slide .t.fw4, .slide .t.fw5, .slide .t.fw6, .slide .t.fw7 { color: #e8e8ed; line-height: 1.2; }
.slide .t.fw4 { font-weight: 400; } .slide .t.fw5 { font-weight: 500; } .slide .t.fw6 { font-weight: 600; } .slide .t.fw7 { font-weight: 700; }
.slide .t.ghost { color: rgba(255, 255, 255, 0.05); font-weight: 700; line-height: 0.9; }
.slide .t.w.c, .slide .t.s.c { text-align: center; }
.slide .t.zh { width: auto; white-space: nowrap; line-height: var(--lh, 1.3); letter-spacing: 0.01em; }
@media (max-width: 760px) { .slide .t.zh { white-space: normal; line-height: 1.5; } .slide .t.zh br { display: none; } }
@media (max-width: 760px) {
  .slide.fe { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 26px 0 40px; }
  .slide.fe > * { position: static; translate: none; order: var(--o, 0); }
  .slide.fe > .t.c, .slide.fe > .t.r { translate: none; text-align: left; }
  .slide.fe .fe-card, .slide.fe .fe-capsule, .slide.fe .fe-orb, .slide.fe .fe-lines, .slide.fe .fe-deco, .slide.fe .fe-pill.solid, .slide.fe .fe-sign, .slide.fe .t.ghost { display: none; }
  .slide.fe .fe-img { width: clamp(52vw, calc(100vw * var(--w) / 1920 * 2.2), calc(100vw - 40px)); margin: 12px 20px; }
  .slide.fe .fe-img.sm { width: calc(100vw * var(--w) / 1920 * 2.2); }
  .slide.fe .fe-pill { width: auto; height: auto; margin: 6px 20px 0; padding: 9px 16px; font-size: 13px; }
  .slide.fe .fe-num { width: 30px; height: 30px; margin: 10px 20px 0; font-size: 14px; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (min-width: 1700px) {
  :root { --wrap: 1400px; }
  body { font-size: 17px; }
}

@media (max-width: 1080px) {
  .folders { grid-template-columns: 1fr 1fr; }
  .folders .folder:last-child { grid-column: 1 / -1; width: min(100%, 520px); justify-self: center; }
  .flow, .flow-ring { grid-template-columns: repeat(3, 1fr); }
  .flow-label { grid-column: 1 / -1; padding: 0; }
  .flow-ring { border-radius: 40px; margin: 0; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .journey { grid-template-columns: 110px repeat(4, minmax(150px, 1fr)); overflow-x: auto; }
}

@media (max-width: 860px) {
  .nav-links a:not(.keep) { display: none; }
  .about-grid, .split, .split.wide-left, .split.wide-right, .pyramid-wrap, .vibe { grid-template-columns: 1fr; }
  .portrait-wrap { order: -1; width: min(78%, 340px); }
  .xp { grid-template-columns: 1fr; gap: 16px; }
  .grid.c3, .grid.c4 { grid-template-columns: 1fr 1fr; }
  .orbs { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; }
  .orbs > div:nth-child(2) .orb { width: 78%; margin-top: 0; }
  .orbs > div + div { margin-top: 30px; }
  .quotes, .ba { grid-template-columns: 1fr; }
  .phones.c4, .phones.c5 { grid-template-columns: repeat(2, 1fr); }
  .phones.c4 .lift, .phones.c5 .lift { transform: none; }
  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
  .b-a, .b-e, .b-f, .b-g { grid-column: span 2; grid-row: span 2; }
  .b-b, .b-c, .b-d { grid-column: span 1; grid-row: span 1; }
  .case-hero-bg img { object-position: var(--hero-pos-m, 62% 50%); }
  .stack-m { grid-template-columns: 1fr !important; }
  .two-m { grid-template-columns: 1fr 1fr !important; }
  .two-m > * { grid-column: auto !important; }
  .case-hero-bg::after { background: linear-gradient(0deg, #000 10%, rgba(0, 0, 0, 0.75) 45%, rgba(0, 0, 0, 0.35) 100%); }
  .case-hero { align-items: flex-end; }
  .case-hero-bg img[style*="scale(1.16)"] { transform: none !important; }
}

@media (max-width: 600px) {
  body { font-size: 15px; }
  .flow, .flow-ring { grid-template-columns: 1fr; }
  .flow-ring { padding: 28px 22px; }
  .flow-arrow { height: 40px; }
  .folders { grid-template-columns: 1fr; }
  .folders .folder:last-child { width: 100%; }
  .grid.c2, .grid.c3, .grid.c4, .steps, .swatches { grid-template-columns: 1fr; }
  .swatches { grid-template-columns: repeat(2, 1fr); }
  .swatch { aspect-ratio: 0.9; }
  .facts { grid-template-columns: 1fr; gap: 18px; }
  .facts div + div { box-shadow: none; }
  .awards { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; gap: 20px; }
  .stat, .stat:first-child { padding: 0; }
  .stat + .stat { box-shadow: none; }
  .phones.c3 { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .vibe-phones { grid-template-columns: repeat(2, 1fr); }
  .nav { padding-left: 16px; }
  .nav-brand span { display: none; }
  .row-card { padding: 18px 20px; font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .reveal-scale { opacity: 1; transform: none; filter: none; }
  html { scroll-behavior: auto; }
}

/* topbar on small phones: nav + contact + language bubbles share 328–358px */
@media (max-width: 420px) {
  .topbar { gap: 8px; }
  .nav { gap: 4px; padding: 6px 6px 6px 16px; }
  .nav-links a { padding: 9px 10px; }
  .contact-bubble { height: 48px; padding: 0 16px; }
  .lang-bubble { width: 48px; height: 48px; }
}
