/* =========================================================
   Renie Namocot — Portfolio
   ========================================================= */
:root {
  --bg: #F6F6F3;
  --surface: #FFFFFF;
  --surface-2: #EEEEEA;
  --ink: #0B0B0C;
  --ink-2: #2A2A2E;
  --muted: #6B6B73;
  --line: rgba(11, 11, 12, .09);
  --accent: #4F6BFF;
  --accent-soft: #E8ECFF;
  --accent-text: #3348D4; /* AA-contrast blue for text links */
  --dark: #0B0B0C;
  --dark-2: #151517;
  --dark-line: rgba(255, 255, 255, .1);
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 30px -12px rgba(0,0,0,.12);
  --shadow-lg: 0 30px 80px -30px rgba(15, 20, 50, .35);
  --font: "Inter Tight", "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
::selection { background: var(--accent); color: #fff; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.accent { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 22px; border-radius: 999px;
  font-weight: 500; font-size: 15px; white-space: nowrap;
  transition: transform .3s var(--ease), background .3s, color .3s, box-shadow .3s;
}
.btn svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--accent); box-shadow: 0 10px 30px -10px var(--accent); }
.btn-ghost { background: var(--surface); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--accent); color: #fff; }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; letter-spacing: -.02em; }
.logo-mark { width: 40px; height: 40px; flex: none; }
.logo-mark rect { fill: var(--ink); transition: fill .4s var(--ease); }
.logo-mark path { stroke: #fff; stroke-dasharray: 90; stroke-dashoffset: 0; }
.logo-mark circle { fill: var(--accent); transition: transform .5s var(--ease); transform-origin: 31px 30.6px; }
.logo:hover .logo-mark path { animation: draw 1s var(--ease); }
.logo:hover .logo-mark circle { transform: scale(1.35); }
.logo-text { font-size: 17px; line-height: 1.1; }
.logo-text small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
@keyframes draw { from { stroke-dashoffset: 90; } to { stroke-dashoffset: 0; } }

/* (nav styles: see "NAV v2" at the end of this file) */
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(34,197,94,0); } }

/* ---------- Hero ---------- */
.hero { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 130px 0 40px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 80%;
  background: radial-gradient(50% 50% at 50% 0%, rgba(79,107,255,.14), transparent 70%);
  pointer-events: none;
}
.hero-top { text-align: center; position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  font-size: 13px; color: var(--ink-2); box-shadow: var(--shadow);
}
.eyebrow .icons { display: flex; }
.eyebrow .icons span { width: 26px; height: 26px; border-radius: 50%; background: var(--bg); border: 2px solid var(--surface); display: grid; place-items: center; margin-left: -8px; }
.eyebrow .icons span:first-child { margin-left: 0; }
.eyebrow .icons img { width: 14px; height: 14px; }
.hero h1 {
  font-size: clamp(44px, 8.2vw, 128px); line-height: .95; letter-spacing: -.045em; font-weight: 600;
  margin: 28px auto 24px; max-width: 13ch;
}
.hero h1 .serif { font-size: 1.08em; letter-spacing: -.02em; }
.hero p.lead { font-size: clamp(17px, 1.5vw, 20px); color: var(--muted); max-width: 640px; margin: 0 auto 34px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.showcase { margin-top: clamp(48px, 7vh, 80px); display: grid; gap: 16px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.track { display: flex; gap: 16px; width: max-content; animation: scroll 60s linear infinite; }
.track.reverse { animation-direction: reverse; animation-duration: 70s; }
.showcase:hover .track { animation-play-state: paused; }
@keyframes scroll { to { transform: translateX(-50%); } }
.shot {
  width: clamp(240px, 24vw, 340px); aspect-ratio: 16 / 10; border-radius: 18px; overflow: hidden; position: relative;
  background: var(--surface-2); border: 1px solid var(--line); box-shadow: var(--shadow); flex: none;
}
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.shot:hover img { transform: scale(1.05); }
.shot .tag {
  position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px 5px 6px; border-radius: 999px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  font-size: 12px; font-weight: 500;
}
.shot .tag img { width: 14px; height: 14px; }

/* ---------- Logo strip ---------- */
.brands { padding: 44px 0 20px; }
.brands-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: clamp(22px, 4vw, 54px); }
.brands-row p { font-size: 13px; color: var(--muted); margin: 0; width: 100%; text-align: center; }
.brand-item { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; letter-spacing: -.02em; color: var(--ink-2); opacity: .75; filter: grayscale(1); transition: opacity .3s, filter .3s; }
.brand-item:hover { opacity: 1; filter: none; }
.brand-item img { width: 24px; height: 24px; }

/* ---------- Sections ---------- */
section { position: relative; }
.section { padding: clamp(80px, 12vw, 160px) 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: clamp(40px, 6vw, 72px); flex-wrap: wrap; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-bottom: 18px; }
.kicker::before { content: ""; width: 24px; height: 1px; background: currentColor; }
.h2 { font-size: clamp(36px, 5.4vw, 76px); line-height: 1; letter-spacing: -.04em; font-weight: 600; margin: 0; max-width: 16ch; }
.section-head p { color: var(--muted); max-width: 420px; margin: 0; font-size: 17px; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.portrait {
  position: relative; border-radius: 28px; overflow: hidden; aspect-ratio: 4 / 4.6;
  background: linear-gradient(160deg, #E9ECF8 0%, #DADFF3 55%, #CBD2EF 100%);
}
.portrait::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 50% at 70% 20%, rgba(255,255,255,.55), transparent 70%); pointer-events: none; }
.portrait > img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; mix-blend-mode: multiply; transform: scale(1.18); transform-origin: 50% 25%; }
.portrait .badge-float {
  position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-radius: 14px;
  font-size: 13px; font-weight: 500; box-shadow: var(--shadow);
}
.portrait .badge-float img { width: 20px; height: 20px; }
.portrait .b1 { left: 18px; top: 22px; } .portrait .b2 { right: 18px; bottom: 90px; }
.portrait .name-card { position: absolute; z-index: 2; left: 18px; right: 18px; bottom: 18px; padding: 14px 18px; border-radius: 16px; background: rgba(11,11,12,.88); color: #fff; display: flex; justify-content: space-between; align-items: center; gap: 12px; backdrop-filter: blur(10px); }
.name-card strong { display: block; font-weight: 600; letter-spacing: -.01em; }
.name-card span { font-size: 13px; color: rgba(255,255,255,.6); }
.about-text h2 { margin-bottom: 28px; }
.about-text p { font-size: clamp(17px, 1.35vw, 19px); color: var(--ink-2); margin: 0 0 18px; }
.about-text p.muted { color: var(--muted); font-size: 16px; }
.countries { display: flex; flex-wrap: wrap; gap: 8px; margin: 30px 0 34px; }
.countries span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.countries span b { font-size: 16px; font-weight: 400; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.facts div { padding: 22px 0 0; }
.facts strong { display: block; font-size: clamp(28px, 3vw, 40px); letter-spacing: -.04em; font-weight: 600; line-height: 1.1; }
.facts span { font-size: 14px; color: var(--muted); }

/* ---------- Services (bento) ---------- */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(24px, 2.6vw, 36px); position: relative; overflow: hidden;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .3s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card h3 { font-size: clamp(20px, 1.8vw, 26px); letter-spacing: -.03em; line-height: 1.15; margin: 0 0 10px; font-weight: 600; }
.card p { color: var(--muted); margin: 0; font-size: 15px; }
.card .icons { display: flex; gap: 8px; margin-bottom: 28px; flex-wrap: wrap; }
.ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line); flex: none; }
.ico img { width: 22px; height: 22px; }
.ico .lm { font-weight: 700; font-size: 13px; letter-spacing: -.02em; }
.c-span-7 { grid-column: span 7; } .c-span-5 { grid-column: span 5; }
.c-span-4 { grid-column: span 4; } .c-span-6 { grid-column: span 6; } .c-span-8 { grid-column: span 8; }
.card.has-img { padding: 0; display: grid; grid-template-columns: 1fr 1fr; min-height: 360px; }
.card.has-img .card-body { padding: clamp(24px, 2.6vw, 36px); display: flex; flex-direction: column; justify-content: space-between; }
.card.has-img .card-img { position: relative; overflow: hidden; }
.card.has-img .card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.card.has-img:hover .card-img img { transform: scale(1.06); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.chip { font-size: 12.5px; padding: 6px 11px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.card.accent-card { background: #3348D4; color: #fff; border-color: transparent; }
.card.accent-card p { color: rgba(255,255,255,.92); }
.card.accent-card .ico { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.18); }
.card.accent-card .chip { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); color: #fff; }
.card .num { position: absolute; top: clamp(24px, 2.6vw, 36px); right: clamp(24px, 2.6vw, 36px); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.card.accent-card .num { color: rgba(255,255,255,.85); }

/* ---------- Shopify (dark) ---------- */
.dark { background: var(--dark); color: #fff; border-radius: clamp(24px, 3vw, 40px); margin: 0 clamp(8px, 1.2vw, 16px); overflow: hidden; }
.dark .kicker, .dark .section-head p { color: rgba(255,255,255,.55); }
.shopify-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.shopify-visual { position: relative; aspect-ratio: 1 / 1; border-radius: 28px; overflow: hidden; }
.shopify-visual > img { width: 100%; height: 100%; object-fit: cover; }
.shopify-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(11,11,12,.75)); }
.api-card {
  position: absolute; z-index: 2; left: 20px; right: 20px; bottom: 20px; padding: 18px 20px;
  background: rgba(21,21,23,.82); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--dark-line); border-radius: 18px; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12.5px; line-height: 1.7;
  color: rgba(255,255,255,.75);
}
.api-card .bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-family: var(--font); font-size: 12px; color: rgba(255,255,255,.5); }
.api-card .bar img { width: 16px; height: 16px; }
.api-card .k { color: #95BF47; } .api-card .s { color: #9DB1FF; } .api-card .m { color: #FFB86B; }
.floating-badge { position: absolute; z-index: 2; top: 20px; left: 20px; display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; background: #fff; color: var(--ink); border-radius: 14px; font-size: 13px; font-weight: 600; }
.floating-badge img { width: 22px; height: 22px; }
.shopify-list { list-style: none; padding: 0; margin: 36px 0 40px; border-top: 1px solid var(--dark-line); }
.shopify-list li { display: grid; grid-template-columns: 44px 1fr; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--dark-line); align-items: start; }
.shopify-list .ico { background: rgba(255,255,255,.06); border-color: var(--dark-line); }
.shopify-list h3 { margin: 0 0 4px; font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.shopify-list p { margin: 0; color: rgba(255,255,255,.55); font-size: 15px; }

/* ---------- Work ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; }
.filter {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--ink-2); transition: all .25s;
}
.filter img, .filter .lm-sm { width: 16px; height: 16px; }
.filter:hover { border-color: var(--ink); }
.filter.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.filter.active img { filter: brightness(0) invert(1); }
.filter .count { font-size: 12px; color: var(--muted); }
.filter.active .count { color: rgba(255,255,255,.75); }
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 1.8vw, 28px); }
.work-grid.home { grid-template-columns: repeat(2, 1fr); }
.project { cursor: pointer; display: block; text-align: left; width: 100%; animation: fadeUp .6s var(--ease) both; }
.project-media {
  position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line);
}
.work-grid.home .project-media { aspect-ratio: 16 / 11; }
.project-media img.cover { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease), filter .6s; }
.project:hover .project-media img.cover { transform: scale(1.05); }
.project-media .overlay { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.5)); opacity: 0; transition: opacity .5s; }
.project:hover .overlay { opacity: 1; }
.project-media .view {
  position: absolute; right: 16px; bottom: 16px; width: 52px; height: 52px; border-radius: 50%; background: #fff; display: grid; place-items: center;
  transform: scale(.6) rotate(-45deg); opacity: 0; transition: all .5s var(--ease);
}
.project-media .view svg { width: 18px; height: 18px; }
.project:hover .view { transform: scale(1) rotate(0); opacity: 1; }
.project-media .label {
  position: absolute; left: 14px; top: 14px; display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px 6px 7px; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-radius: 999px; font-size: 12.5px; font-weight: 500;
}
.project-media .label img, .project-media .label .lm-sm { width: 16px; height: 16px; }
.project-meta { display: flex; justify-content: space-between; align-items: start; gap: 16px; padding: 18px 4px 0; }
.project-meta h3 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.025em; }
.project-meta p { margin: 4px 0 0; font-size: 14.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stack { display: flex; flex: none; }
.stack span { width: 30px; height: 30px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; margin-left: -8px; }
.stack span:first-child { margin-left: 0; }
.stack img { width: 15px; height: 15px; }
.work-more { display: flex; justify-content: center; margin-top: 56px; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* lettermark fallback for brands not in Simple Icons */
.lm, .lm-sm { display: inline-grid; place-items: center; border-radius: 6px; font-weight: 700; color: #fff; line-height: 1; font-family: var(--font); }
.lm { width: 22px; height: 22px; font-size: 10px; }
.lm-sm { font-size: 8px; border-radius: 4px; }
.stack .lm-sm { width: 15px; height: 15px; }

/* ---------- Stack ---------- */
.stack-groups { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stack-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.stack-group h3 { margin: 0 0 18px; font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 500; }
.stack-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.stack-group li { display: flex; align-items: center; gap: 12px; padding: 8px; margin: 0 -8px; border-radius: 10px; font-weight: 500; font-size: 15px; transition: background .2s; }
.stack-group li:hover { background: var(--bg); }
.stack-group li img, .stack-group li .lm { width: 22px; height: 22px; }

/* ---------- Process ---------- */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.step { padding: 30px 26px 34px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); position: relative; }
.step::before { counter-increment: step; content: "0" counter(step); font-family: var(--serif); font-style: italic; font-size: 54px; line-height: 1; color: var(--accent); display: block; margin-bottom: 40px; }
.step h3 { margin: 0 0 8px; font-size: 21px; letter-spacing: -.025em; font-weight: 600; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- CTA ---------- */
.cta { padding: clamp(80px, 12vw, 150px) 0; text-align: center; position: relative; overflow: hidden; }
.cta-bg { position: absolute; inset: 0; z-index: 0; }
.cta-bg img { width: 100%; height: 100%; object-fit: cover; }
.cta-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,11,12,.82), rgba(11,11,12,.92)); }
.cta .wrap { position: relative; z-index: 1; }
.cta h2 { font-size: clamp(44px, 8vw, 120px); line-height: .95; letter-spacing: -.045em; font-weight: 600; margin: 0 auto 28px; max-width: 12ch; }
.cta p { color: rgba(255,255,255,.6); max-width: 520px; margin: 0 auto 40px; font-size: 18px; }
.cta .email-link { display: inline-block; font-family: var(--serif); font-style: italic; font-size: clamp(26px, 4vw, 54px); letter-spacing: -.01em; border-bottom: 1px solid rgba(255,255,255,.25); padding-bottom: 6px; margin-bottom: 40px; transition: color .3s, border-color .3s; word-break: break-all; }
.cta .email-link:hover { color: #9DB1FF; border-color: #9DB1FF; }
.cta-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.cta .btn-ghost { background: transparent; border-color: rgba(255,255,255,.25); color: #fff; }
.cta .btn-ghost:hover { border-color: #fff; }

/* ---------- Footer ---------- */
footer { padding: 56px 0 40px; }
.footer-top { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.footer-cols { display: flex; gap: clamp(32px, 6vw, 96px); flex-wrap: wrap; }
.footer-cols h5 { margin: 0 0 14px; font-size: 13px; color: var(--muted); font-weight: 500; }
.footer-cols a { display: block; font-size: 15px; padding: 3px 0; transition: color .2s; }
.footer-cols a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; padding-top: 28px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }

/* ---------- Page header (projects page) ---------- */
.page-hero { padding: 170px 0 60px; }
.page-hero h1 { font-size: clamp(48px, 9vw, 140px); line-height: .92; letter-spacing: -.05em; margin: 0 0 28px; font-weight: 600; }
.page-hero p { color: var(--muted); max-width: 560px; font-size: 18px; margin: 0; }
.page-hero-row { display: flex; justify-content: space-between; align-items: end; gap: 32px; flex-wrap: wrap; }
.cms-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.cms-stats div { padding: 14px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.cms-stats img { width: 24px; height: 24px; }
.cms-stats strong { font-size: 22px; letter-spacing: -.03em; line-height: 1; display: block; }
.cms-stats span { font-size: 12px; color: var(--muted); }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; visibility: hidden; }
.modal.open { visibility: visible; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(11,11,12,.55); backdrop-filter: blur(6px); opacity: 0; transition: opacity .4s; }
.modal.open .modal-backdrop { opacity: 1; }
.modal-panel {
  position: relative; width: min(1040px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--surface);
  border-radius: 28px; display: grid; grid-template-columns: 1.15fr 1fr; transform: translateY(30px) scale(.98); opacity: 0;
  transition: transform .5s var(--ease), opacity .4s;
}
.modal.open .modal-panel { transform: none; opacity: 1; }
.modal-img { min-height: 420px; position: relative; background: var(--surface-2); }
.modal-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.modal-body { padding: clamp(28px, 3vw, 44px); }
.modal-body .kicker { margin-bottom: 12px; }
.modal-body h3 { font-size: clamp(28px, 3vw, 40px); letter-spacing: -.04em; line-height: 1.05; margin: 0 0 16px; font-weight: 600; }
.modal-body p { color: var(--ink-2); margin: 0 0 26px; }
.modal-body h5 { font-size: 13px; color: var(--muted); font-weight: 500; margin: 0 0 10px; text-transform: uppercase; letter-spacing: .1em; }
.modal-body ul { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 8px; }
.modal-body li { display: flex; gap: 10px; align-items: center; font-size: 15px; }
.modal-body li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.modal-stack { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 30px; }
.modal-stack span { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-size: 13px; text-transform: capitalize; }
.modal-stack img, .modal-stack .lm-sm { width: 16px; height: 16px; }
.modal-close { position: absolute; top: 14px; right: 14px; z-index: 2; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; box-shadow: var(--shadow); }
.modal-close svg { width: 16px; height: 16px; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; }

img.broken { opacity: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .c-span-7, .c-span-5, .c-span-8, .c-span-4 { grid-column: span 6; }
  .card.has-img { grid-template-columns: 1fr; }
  .card.has-img .card-img { min-height: 220px; }
  .stack-groups, .process { grid-template-columns: repeat(2, 1fr); }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .about-grid, .shopify-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 520px; }
  .modal-panel { grid-template-columns: 1fr; }
  .modal-img { min-height: 240px; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; }
  .c-span-7, .c-span-5, .c-span-8, .c-span-4, .c-span-6 { grid-column: auto; }
  .work-grid, .work-grid.home, .stack-groups, .process { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr 1fr; }
  .hero { padding-top: 110px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(var(--gutter) * -1) 28px; padding: 0 var(--gutter) 4px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .footer-top { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}


/* =========================================================
   Multi-page components (services, blog, plugins, contact)
   ========================================================= */
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; }
.skip:focus { top: 12px; }
.stretched::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.link-arrow { font-weight: 500; border-bottom: 1px solid currentColor; padding-bottom: 2px; transition: color .2s; }
.link-arrow:hover, .ulink:hover { color: var(--accent); }
.ulink { text-decoration: underline; text-underline-offset: 3px; }
.more { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; font-size: 14px; font-weight: 500; }
.more svg { width: 15px; height: 15px; transition: transform .3s var(--ease); }
.card:hover .more svg, .plugin-card:hover .more svg, .post-lead:hover .more svg { transform: translateX(4px); }
.fh { font-size: 13px; color: var(--muted); font-weight: 500; margin: 0 0 14px; letter-spacing: 0; }
.cta { color: #fff; }
.cta .kicker { color: rgba(255,255,255,.55); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* breadcrumbs */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 28px; font-size: 13px; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; opacity: .5; }
.crumbs a:hover { color: var(--ink); }
.crumbs li[aria-current] { color: var(--ink-2); max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* projects as articles */
.project { position: relative; cursor: default; }
.project[hidden] { display: none; }
.project-hit { position: absolute; inset: 0; z-index: 2; border-radius: var(--radius); cursor: pointer; }
.project .visit { position: relative; z-index: 3; display: inline-flex; align-items: center; gap: 6px; margin: 12px 4px 0; font-size: 13px; color: var(--muted); transition: color .2s; }
.project .visit svg { width: 13px; height: 13px; }
.project .visit:hover { color: var(--accent); }
.project-media img.cover, .modal-img img { object-position: top center; }
.modal-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.modal-actions .btn svg { width: 15px; height: 15px; }

/* service cards grid */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.svc-card { display: flex; flex-direction: column; }
.svc-card p { flex: 1; }

/* service hero */
.svc-hero { padding-bottom: clamp(60px, 8vw, 110px); }
.svc-hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.svc-hero h1 { font-size: clamp(40px, 5.6vw, 84px); line-height: .98; letter-spacing: -.045em; margin: 22px 0 24px; }
.svc-hero .icons { display: flex; gap: 8px; }
.lead-answer { font-size: clamp(17px, 1.4vw, 20px); color: var(--ink-2); max-width: 620px; margin: 0 0 32px; }
.svc-hero-img { border-radius: 28px; overflow: hidden; aspect-ratio: 4 / 3.2; background: var(--surface-2); box-shadow: var(--shadow-lg); }
.svc-hero-img img { width: 100%; height: 100%; object-fit: cover; }

/* offers */
.offer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.offer { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.offer h3 { margin: 18px 0 8px; font-size: 19px; letter-spacing: -.02em; font-weight: 600; }
.offer p { margin: 0; color: var(--muted); font-size: 15px; }
.check { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); display: grid; place-items: center; }
.check::after { content: ""; width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg) translate(1px, -1px); }
.svc-prose { max-width: 760px; margin-top: clamp(40px, 5vw, 64px); }
.step h3 { margin: 0 0 8px; font-size: 21px; letter-spacing: -.025em; font-weight: 600; }

/* FAQ */
.faq-wrap { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.faq-list { border-top: 1px solid var(--line); }
.faq { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 24px 0; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { margin: 0; font-size: clamp(17px, 1.4vw, 20px); font-weight: 600; letter-spacing: -.02em; }
.plus { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); position: relative; flex: none; transition: background .3s; }
.plus::before, .plus::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; background: var(--ink); transform: translate(-50%, -50%); }
.plus::after { transform: translate(-50%, -50%) rotate(90deg); transition: transform .3s var(--ease); }
.faq[open] .plus { background: var(--ink); }
.faq[open] .plus::before, .faq[open] .plus::after { background: #fff; }
.faq[open] .plus::after { transform: translate(-50%, -50%) rotate(0); }
.faq-a p { margin: 0 0 24px; color: var(--muted); max-width: 680px; }

/* blog cards */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 28px); }
.post-card { position: relative; }
.post-media { display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 10; background: var(--surface-2); margin-bottom: 18px; }
.post-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.post-card:hover .post-media img, .post-lead:hover .post-media img { transform: scale(1.05); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: 12px; font-weight: 500; }
.post-card h3, .post-card h2 { margin: 0 0 8px; font-size: 21px; line-height: 1.25; letter-spacing: -.025em; font-weight: 600; }
.post-card p { margin: 0; color: var(--muted); font-size: 15px; }
.post-lead { position: relative; display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.post-lead .post-media { margin: 0; }
.post-lead h2 { font-size: clamp(28px, 3.2vw, 44px); line-height: 1.08; letter-spacing: -.04em; margin: 6px 0 14px; font-weight: 600; }
.post-lead p { color: var(--muted); font-size: 17px; margin: 0; }

/* article */
.article-head { padding: 150px 0 40px; }
.narrow { max-width: 900px; }
.article-head h1 { font-size: clamp(36px, 5vw, 68px); line-height: 1.02; letter-spacing: -.045em; margin: 10px 0 18px; font-weight: 600; }
.article-desc { font-size: 19px; color: var(--muted); margin: 0 0 28px; }
.byline { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.byline img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; background: var(--accent-soft); }
.byline span { display: block; color: var(--muted); font-size: 13px; }
.article-hero { margin: 0 0 clamp(40px, 6vw, 72px); border-radius: 28px; overflow: hidden; aspect-ratio: 2 / 1; background: var(--surface-2); }
.article-hero img { width: 100%; height: 100%; object-fit: cover; }
.article-grid { display: grid; grid-template-columns: 260px minmax(0, 720px); gap: clamp(32px, 6vw, 96px); justify-content: center; }
.article-side { position: sticky; top: 100px; align-self: start; display: grid; gap: 28px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 1px solid transparent; font-size: 14px; color: var(--muted); transition: color .2s, border-color .2s; }
.toc a:hover { color: var(--ink); border-color: var(--ink); }
.side-box { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; }
.side-link { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 14px; font-weight: 500; }
.side-link:hover { color: var(--accent); }
.side-link img, .side-link .lm-sm { width: 16px; height: 16px; }

/* prose */
.prose { font-size: 18px; line-height: 1.75; color: var(--ink-2); }
.prose h2 { font-size: clamp(26px, 2.4vw, 32px); line-height: 1.15; letter-spacing: -.03em; color: var(--ink); margin: 2.2em 0 .6em; font-weight: 600; scroll-margin-top: 100px; }
.prose p { margin: 0 0 1.2em; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1.4em; }
.prose li { margin: .4em 0; }
.prose a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.prose code { font-size: .85em; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }
.prose .tldr { background: var(--accent-soft); border-radius: 18px; padding: 22px 24px; color: var(--ink); font-size: 17px; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.6em; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 600; color: var(--ink); }
.author-box { display: flex; gap: 18px; align-items: flex-start; margin-top: 56px; padding: 26px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); font-size: 15px; line-height: 1.6; }
.author-box img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; background: var(--accent-soft); flex: none; }
.author-box p { margin: 0; }
.author-box .fh { margin-bottom: 6px; }

/* plugins */
.plugin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plugin-grid-2 { grid-template-columns: repeat(2, 1fr); }
.plugin-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.plugin-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.plugin-card h3 { margin: 22px 0 8px; font-size: 22px; letter-spacing: -.03em; font-weight: 600; }
.plugin-card p { margin: 0; color: var(--muted); flex: 1; }
.plugin-top { display: flex; justify-content: space-between; align-items: center; }
.plugin-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line); }
.plugin-icon img, .plugin-icon .lm { width: 28px; height: 28px; }
.plugin-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; }
.plugin-foot .more { margin: 0; }
.pill-soon { background: #FFF6E5; border-color: #F5DFB3; color: #8A5A00; }
.pill-live { background: #E8F8EE; border-color: #BFE8CF; color: #146C3A; }
.works { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -12px 0 30px; font-size: 13px; color: var(--muted); }
.chip-ico { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px 6px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }
.chip-ico img, .chip-ico .lm-sm { width: 15px; height: 15px; }

/* contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.contact-grid h1 { font-size: clamp(44px, 6.4vw, 96px); line-height: .95; letter-spacing: -.05em; margin: 0 0 24px; font-weight: 600; }
.contact-email { display: inline-block; margin: 30px 0 36px; font-family: var(--serif); font-style: italic; font-size: clamp(26px, 3vw, 40px); border-bottom: 1px solid var(--line); word-break: break-all; }
.contact-email:hover { color: var(--accent); border-color: var(--accent); }
.contact-points { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.contact-points li { display: grid; grid-template-columns: 140px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.contact-points span { color: var(--muted); }
.contact-form { background: var(--surface); border: 1px solid var(--line); border-radius: 28px; padding: clamp(24px, 3vw, 40px); display: grid; gap: 18px; box-shadow: var(--shadow); }
.contact-form label { display: grid; gap: 8px; font-size: 14px; font-weight: 500; }
.contact-form input, .contact-form select, .contact-form textarea { font: inherit; font-weight: 400; font-size: 15px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; width: 100%; transition: border-color .2s, box-shadow .2s; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form .btn { justify-self: start; }
.form-note { margin: 0; font-size: 13px; color: var(--muted); }

/* footer additions */
.footer-brand p { color: var(--muted); max-width: 340px; margin: 18px 0 14px; font-size: 15px; }
.footer-email { font-weight: 500; border-bottom: 1px solid var(--line); }
.footer-email:hover { color: var(--accent); }
.name-card .flag { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: rgba(255,255,255,.7); }
.portrait .b2 { bottom: 104px; }

@media (max-width: 1100px) {
  .svc-grid, .plugin-grid, .offer-grid, .post-grid { grid-template-columns: repeat(2, 1fr); }
  .article-grid { grid-template-columns: 1fr; }
  .article-side { position: static; order: 2; }
}
@media (max-width: 960px) {
  .svc-hero-grid, .faq-wrap, .post-lead, .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .svc-grid, .plugin-grid, .offer-grid, .post-grid, .field-row { grid-template-columns: 1fr; }
  .contact-points li { grid-template-columns: 1fr; gap: 2px; }
  .article-head { padding-top: 120px; }
  .prose { font-size: 17px; }
}

/* ---------- 404 ---------- */
.nf { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; position: relative; overflow: hidden; }
.nf::before { content: ""; position: absolute; inset: -30% -10% auto; height: 90%; background: radial-gradient(45% 50% at 30% 10%, rgba(79,107,255,.14), transparent 70%); pointer-events: none; }
.nf .wrap { position: relative; }
.nf-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.nf-code { font-size: clamp(110px, 16vw, 230px); line-height: .8; font-weight: 700; letter-spacing: -.07em; margin-bottom: 26px; }
.nf-code span { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); letter-spacing: -.02em; display: inline-block; animation: nfspin 6s var(--ease) infinite; }
@keyframes nfspin { 0%, 70% { transform: rotate(0); } 85% { transform: rotate(-12deg); } 100% { transform: rotate(0); } }
.nf h1 { font-size: clamp(36px, 4.6vw, 64px); line-height: 1; letter-spacing: -.045em; margin: 0 0 18px; font-weight: 600; }
.nf-lead { color: var(--muted); font-size: 18px; max-width: 520px; margin: 0 0 32px; }
.nf-cols { display: grid; gap: 16px; }
.nf-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.nf-link { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 500; transition: color .2s; }
.nf-link > span:not(.lm-sm) { flex: 1; }
.nf-link img, .nf-link .lm-sm { width: 16px; height: 16px; }
.nf-link svg { width: 15px; height: 15px; opacity: .4; transition: transform .3s var(--ease), opacity .3s; }
.nf-link:hover { color: var(--accent); }
.nf-link:hover svg { transform: translateX(4px); opacity: 1; }

/* ---------- HTML sitemap ---------- */
.sm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: clamp(32px, 5vw, 56px); padding-bottom: clamp(60px, 8vw, 110px); }
.sm-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.sm-group h2 { margin: 0 0 14px; font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 500; }
.sm-group ul { list-style: none; margin: 0; padding: 0; }
.sm-group li a { display: block; padding: 7px 0; font-size: 15px; font-weight: 500; border-bottom: 1px solid var(--line); transition: color .2s; }
.sm-group li:last-child a { border-bottom: 0; }
.sm-group li a:hover { color: var(--accent); }

@media (max-width: 1100px) { .sm-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 960px) { .nf-grid { grid-template-columns: 1fr; } .nf { padding-top: 120px; } }
@media (max-width: 640px) { .sm-grid { grid-template-columns: 1fr; } }

/* ---------- Footer: visitor counter + credit ---------- */
.footer-bottom { align-items: center; }
.visits { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }
.visits[hidden] { display: none; }
.visits b { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.credit { display: inline-flex; align-items: center; gap: 8px; }
.credit a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); transition: color .2s; }
.credit a:hover { color: var(--accent); }
.credit .credit-mark { width: 22px; height: 22px; }
.credit a:hover .credit-mark path { animation: draw 1s var(--ease); }

/* =========================================================
   HERO v2: animated headline, floating chips, 3D project wall
   ========================================================= */
.hx { min-height: 100vh; min-height: 100svh; padding: 118px 0 0; display: flex; flex-direction: column; justify-content: flex-start; isolation: isolate; }
.hx::before { display: none; }

/* background */
.hx-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.hx-grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(11,11,12,.13) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 75%);
}
.hx-glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; animation: glow 18s ease-in-out infinite alternate; }
.hx-glow.g1 { width: 46vw; height: 46vw; left: -8vw; top: -18vw; background: radial-gradient(circle, rgba(79,107,255,.45), transparent 65%); }
.hx-glow.g2 { width: 40vw; height: 40vw; right: -10vw; top: 6vw; background: radial-gradient(circle, rgba(168,120,255,.32), transparent 65%); animation-delay: -9s; }
@keyframes glow { to { transform: translate(6vw, 4vw) scale(1.12); } }
.hx-spot {
  position: absolute; inset: 0; opacity: 0; transition: opacity .6s;
  background: radial-gradient(520px circle at var(--sx, 50%) var(--sy, 30%), rgba(79,107,255,.10), transparent 60%);
}
.hx:hover .hx-spot { opacity: 1; }

/* top content */
.hx-top { position: relative; z-index: 2; }
.hx-live { display: inline-flex; align-items: center; gap: 8px; }
.hx-live i { width: 7px; height: 7px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 4px rgba(34,197,94,.18); animation: pulse 2s infinite; }

.hx-in { opacity: 0; transform: translateY(18px); animation: hxIn 1s var(--ease) forwards; animation-delay: calc(var(--i) * 90ms + 150ms); }
@keyframes hxIn { to { opacity: 1; transform: none; } }

.hx-title {
  font-size: clamp(44px, 7.1vw, 118px); line-height: .98; letter-spacing: -.05em; font-weight: 600;
  margin: 24px auto 24px; max-width: none;
}
.hx-title .ln { display: block; }
@media (min-width: 641px) { .hx-title .ln { white-space: nowrap; } }
.hx-title .wm { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .02em .12em; margin-bottom: -.12em; }
.hx-title .w { display: inline-block; transform: translateY(110%); animation: wordUp 1.1s var(--ease) forwards; animation-delay: calc(var(--i) * 85ms + 120ms); }
@keyframes wordUp { to { transform: none; } }
.hx-title .serif { font-size: 1.06em; letter-spacing: -.025em; }

/* rotating word */
.rot-wrap { vertical-align: top; }
.rotator { position: relative; display: inline-block; height: 1.04em; vertical-align: top; transition: width .6s var(--ease); text-align: left; }
.rotator > span {
  position: absolute; left: 0; top: 0; white-space: nowrap; opacity: 0; transform: translateY(70%) rotateX(-40deg);
  transition: transform .75s var(--ease), opacity .5s; color: var(--accent);
  background: linear-gradient(90deg, #4F6BFF, #8E6BFF 60%, #4F6BFF); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.rotator > span.on { position: relative; opacity: 1; transform: none; }
.rotator > span.out { opacity: 0; transform: translateY(-70%) rotateX(40deg); }

.hx .lead { max-width: 700px; }
.btn-glow { position: relative; }
.btn-glow::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; z-index: -1;
  background: linear-gradient(90deg, #4F6BFF, #A878FF, #4F6BFF); background-size: 200% 100%;
  filter: blur(14px); opacity: .45; animation: sheen 4s linear infinite;
}
@keyframes sheen { to { background-position: 200% 0; } }

.hx-proof { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 26px; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.hx-proof strong { color: var(--ink); font-weight: 600; }
.hx-proof .flags { display: inline-flex; }
.hx-proof .flags img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 2px solid var(--bg); margin-left: -8px; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.hx-proof .flags img:first-child { margin-left: 0; }

/* floating chips */
.hx-chips { position: absolute; left: 0; right: 0; top: 0; height: 780px; z-index: 1; pointer-events: none; }
.hx-chip {
  position: absolute; left: var(--x); top: var(--y);
  display: inline-flex; align-items: center; gap: 9px; padding: 9px 15px 9px 10px; border-radius: 999px;
  background: rgba(255,255,255,.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--line); box-shadow: 0 10px 30px -12px rgba(20,30,80,.25);
  font-size: 14px; font-weight: 500; color: var(--ink-2); white-space: nowrap;
  transform: translate(calc(var(--mx, 0) * var(--d) * 22px), calc(var(--my, 0) * var(--d) * 22px));
  transition: transform .9s var(--ease);
  opacity: 0;
  animation: chipIn 1s var(--ease) forwards, bob 7s ease-in-out infinite;
  animation-delay: calc(900ms + var(--d) * 300ms), var(--t);
}
.hx-chip.r { left: auto; right: var(--x); }
.hx-chip img { width: 18px; height: 18px; }
.hx-chip .lm-sm, .hx-chip .lm { width: 18px; height: 18px; }
@keyframes chipIn { from { opacity: 0; scale: .8; } to { opacity: 1; scale: 1; } }
@keyframes bob { 50% { translate: 0 -12px; } }

/* 3D wall */
.hx-wall {
  position: relative; z-index: 0; margin-top: clamp(28px, 5vh, 56px); height: clamp(320px, 50vh, 560px);
  perspective: 1400px; perspective-origin: 50% 0%; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 70%, transparent 100%), linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-composite: source-in; mask-composite: intersect;
          mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 70%, transparent 100%), linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.hx-plane {
  display: grid; gap: 18px; width: 150%; margin-left: -25%;
  transform: rotateX(38deg) rotateZ(-8deg) translateY(-6%); transform-origin: 50% 0%;
  transform-style: preserve-3d;
  animation: planeIn 1.6s var(--ease) both; animation-delay: .5s;
}
@keyframes planeIn { from { opacity: 0; transform: rotateX(55deg) rotateZ(-8deg) translateY(10%); } }
.hx-plane .track { gap: 18px; animation-duration: 80s; }
.hx-plane .track.reverse { animation-duration: 95s; }
.hx-plane .track:nth-child(3) { animation-duration: 70s; }
.hx-wall:hover .track { animation-play-state: paused; }
.hx-plane .shot { width: clamp(260px, 22vw, 360px); border-radius: 16px; box-shadow: 0 24px 50px -24px rgba(15,20,50,.45); }
.hx-plane .shot img { transition: transform .8s var(--ease), filter .4s; }

/* scroll cue */
.hx-scroll { position: absolute; left: 50%; bottom: 22px; z-index: 3; width: 26px; height: 42px; margin-left: -13px; border-radius: 14px; border: 1.5px solid rgba(11,11,12,.25); }
.hx-scroll span { position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--ink); animation: scrollCue 1.8s var(--ease) infinite; }
@keyframes scrollCue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

@media (max-width: 1380px) { .hx-chips { display: none; } }
@media (max-width: 960px) {
  .hx-plane { width: 220%; margin-left: -60%; transform: rotateX(30deg) rotateZ(-6deg); }
  .hx-scroll { display: none; }
}
@media (max-width: 640px) {
  .hx { padding-top: 108px; }
  .hx-title { font-size: clamp(42px, 12.5vw, 64px); }
  .hx-wall { height: 300px; }
  .hx-proof { font-size: 13px; }
  .hx-plane .shot { width: 220px; }
}
@media (prefers-reduced-motion: reduce) {
  .hx-in, .hx-title .w, .hx-chip, .hx-plane { opacity: 1 !important; transform: none !important; }
  .hx-plane { transform: rotateX(30deg) rotateZ(-6deg) !important; }
}

/* =========================================================
   NAV v2: floating island bar, services mega-menu, mobile sheet
   ========================================================= */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 60; padding: 14px var(--gutter) 0; pointer-events: none; }
.nav > * { pointer-events: auto; }
.nav-bar {
  position: relative; z-index: 2; max-width: 1280px; margin: 0 auto; height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 10px 0 14px;
  background: rgba(255,255,255,.66); border: 1px solid rgba(11,11,12,.07); border-radius: 20px;
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 10px 30px -18px rgba(15,20,50,.25);
  transition: height .4s var(--ease), box-shadow .4s, background .4s;
}
.nav.scrolled .nav-bar { height: 58px; background: rgba(255,255,255,.82); box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 14px 40px -18px rgba(15,20,50,.32); }
.nav .logo-mark { width: 36px; height: 36px; }
.nav .logo-text { font-size: 16px; }

/* links + sliding ink */
.nav-links { position: relative; display: flex; align-items: center; gap: 2px; padding: 0; background: none; border: 0; }
.nav-links > a, .nav-dd-btn {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 14px;
  border-radius: 12px; font-size: 14.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap; transition: color .25s;
}
.nav-links > a:hover, .nav-dd-btn:hover, .nav-dd.open .nav-dd-btn { color: var(--ink); }
.nav-links > a.active, .nav-dd-btn.active { color: var(--ink); }
.nav-links > a.active::after, .nav-dd-btn.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 2px; border-radius: 2px; background: var(--accent);
}
.nav-dd-btn.active::after { right: 30px; }
.nav-ink {
  position: absolute; z-index: 0; top: 50%; left: 0; height: 40px; width: 0; margin-top: -20px; border-radius: 12px;
  background: rgba(11,11,12,.055); opacity: 0;
  transition: transform .35s var(--ease), width .35s var(--ease), opacity .25s;
}
.nav-links:hover .nav-ink { opacity: 1; }
.chev { width: 15px; height: 15px; transition: transform .3s var(--ease); opacity: .6; }
.nav-dd.open .chev { transform: rotate(180deg); }

.nav-cta { display: flex; align-items: center; gap: 6px; }
.nav-contact { padding: 0 14px; height: 40px; display: inline-flex; align-items: center; font-size: 14.5px; font-weight: 500; color: var(--ink-2); border-radius: 12px; transition: background .25s, color .25s; }
.nav-contact:hover, .nav-contact.active { background: rgba(11,11,12,.055); color: var(--ink); }
.nav-btn { height: 42px; border-radius: 13px; padding: 0 16px; }
.nav-btn svg { width: 15px; height: 15px; }

/* mega menu */
.mega {
  position: relative; z-index: 1; max-width: 1280px; margin: 10px auto 0;
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.99); transform-origin: 50% 0;
  transition: opacity .25s, transform .35s var(--ease), visibility 0s .35s;
}
.nav.mega-open .mega { opacity: 1; visibility: visible; transform: none; transition: opacity .25s, transform .35s var(--ease), visibility 0s; }
.mega-inner {
  display: grid; grid-template-columns: 1fr 300px; gap: 10px; padding: 10px;
  background: rgba(255,255,255,.92); border: 1px solid rgba(11,11,12,.07); border-radius: 24px;
  backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px);
  box-shadow: 0 40px 80px -30px rgba(15,20,50,.35);
}
.mega-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.mega-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 14px; transition: background .2s; }
.mega-item:hover { background: var(--bg); }
.mega-item strong { display: block; font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); line-height: 1.3; }
.mega-item small { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.mega-ico { width: 38px; height: 38px; flex: none; border-radius: 11px; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line); transition: transform .3s var(--ease), background .2s; }
.mega-ico img, .mega-ico .lm { width: 20px; height: 20px; }
.mega-item:hover .mega-ico { transform: translateY(-2px); background: #fff; }
.mega-side {
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 24px; border-radius: 18px;
  background: var(--dark); color: #fff; position: relative; overflow: hidden;
}
.mega-side::before { content: ""; position: absolute; width: 260px; height: 260px; right: -90px; top: -110px; border-radius: 50%; background: radial-gradient(circle, rgba(79,107,255,.55), transparent 65%); }
.mega-side > * { position: relative; }
.mega-side .kicker { color: rgba(255,255,255,.6); margin: 0; }
.mega-side p { margin: 0 0 6px; font-size: 15px; color: rgba(255,255,255,.75); }
.mega-side .btn-dark { background: #fff; color: var(--ink); }
.mega-side .btn-dark:hover { background: var(--accent); color: #fff; }
.mega-side .link-arrow { color: rgba(255,255,255,.75); font-size: 14px; margin-top: auto; }

/* mobile */
.menu-btn { display: none; width: 44px; height: 44px; border-radius: 13px; background: var(--ink); position: relative; flex: none; }
.menu-btn span { position: absolute; left: 13px; right: 13px; height: 1.6px; background: #fff; border-radius: 2px; transition: transform .35s var(--ease), top .35s var(--ease); }
.menu-btn span:nth-child(1) { top: 17px; } .menu-btn span:nth-child(2) { top: 25px; }
.nav.open .menu-btn span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav.open .menu-btn span:nth-child(2) { top: 21px; transform: rotate(-45deg); }
.m-menu {
  position: fixed; inset: 0; z-index: 1; padding: 100px var(--gutter) 28px; overflow-y: auto;
  background: var(--bg); display: flex; flex-direction: column; gap: 30px;
  opacity: 0; visibility: hidden; transform: translateY(-12px); transition: opacity .3s, transform .45s var(--ease), visibility 0s .45s;
}
.nav.open .m-menu { opacity: 1; visibility: visible; transform: none; transition: opacity .3s, transform .45s var(--ease), visibility 0s; }
.m-main { display: grid; }
.m-big { font-size: clamp(32px, 9vw, 44px); font-weight: 600; letter-spacing: -.04em; line-height: 1.25; padding: 4px 0; border-bottom: 1px solid var(--line); opacity: 0; transform: translateY(14px); }
.nav.open .m-big { animation: hxIn .6s var(--ease) forwards; }
.nav.open .m-big:nth-child(2) { animation-delay: .04s; } .nav.open .m-big:nth-child(3) { animation-delay: .08s; }
.nav.open .m-big:nth-child(4) { animation-delay: .12s; } .nav.open .m-big:nth-child(5) { animation-delay: .16s; }
.nav.open .m-big:nth-child(6) { animation-delay: .2s; }
.m-big.active { color: var(--accent); }
.m-sub .kicker { margin-bottom: 12px; }
.m-services { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; }
.m-services a { display: flex; align-items: center; gap: 9px; padding: 8px 0; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.m-services img, .m-services .lm-sm { width: 16px; height: 16px; flex: none; }
.m-foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.m-foot a:first-child { font-family: var(--serif); font-style: italic; font-size: 24px; border-bottom: 1px solid var(--line); }
body.menu-open { overflow: hidden; }

@media (max-width: 1240px) { .nav .logo-text small { display: none; } }
@media (max-width: 1100px) { .nav-contact { display: none; } .nav-links > a, .nav-dd-btn { padding: 0 11px; } .mega-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 960px) {
  .nav-links, .mega { display: none; }
  .menu-btn { display: block; }
  .nav { padding-top: 10px; }
  .nav-bar { height: 60px; }
}
@media (max-width: 640px) {
  .nav-btn { display: none; }
  .m-services { grid-template-columns: 1fr; }
}

/* ---------- 1,000+ NDA tile (projects grid) ---------- */
.nda-tile { cursor: default; }
.nda-media { background: var(--dark); color: #fff; border-color: transparent; display: flex; align-items: center; justify-content: center; text-align: center; }
.nda-media::before { content: ""; position: absolute; width: 70%; aspect-ratio: 1; left: -15%; top: -35%; border-radius: 50%; background: radial-gradient(circle, rgba(79,107,255,.55), transparent 65%); }
.nda-media::after { content: ""; position: absolute; width: 60%; aspect-ratio: 1; right: -20%; bottom: -40%; border-radius: 50%; background: radial-gradient(circle, rgba(168,120,255,.35), transparent 65%); }
.nda-inner { position: relative; z-index: 1; padding: 24px; display: flex; flex-direction: column; align-items: center; }
.nda-num { font-size: clamp(48px, 5vw, 72px); font-weight: 700; letter-spacing: -.05em; line-height: 1; }
.nda-label { font-family: var(--serif); font-style: italic; font-size: 24px; color: rgba(255,255,255,.8); margin-top: 2px; }
.nda-inner p { margin: 14px 0 18px; max-width: 320px; font-size: 14px; color: rgba(255,255,255,.65); }

/* =========================================================
   MOBILE APP FEEL: tab bar, bottom sheet, swipe carousels
   ========================================================= */
html { -webkit-tap-highlight-color: transparent; }
.tabbar { display: none; }

@media (hover: none) {
  .btn:active, .card:active, .project:active, .post-card:active, .mega-item:active, .filter:active, .tab:active, .offer:active { transform: scale(.97); transition: transform .12s; }
}

@media (max-width: 760px) {
  /* bottom tab bar */
  .tabbar {
    position: fixed; z-index: 3; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom));
    display: grid; grid-template-columns: repeat(5, 1fr); height: 64px; padding: 6px;
    background: rgba(255,255,255,.86); border: 1px solid rgba(11,11,12,.07); border-radius: 22px;
    backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
    box-shadow: 0 18px 40px -16px rgba(15,20,50,.35);
    transition: transform .35s var(--ease), opacity .3s;
  }
  .tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border-radius: 16px; color: var(--muted); font-size: 10.5px; font-weight: 500; letter-spacing: .01em; }
  .tab svg { width: 22px; height: 22px; }
  .tab.on { color: var(--ink); background: rgba(11,11,12,.06); }
  .tab.on svg { stroke-width: 2.1; }
  .nav.open .tabbar { transform: translateY(130%); opacity: 0; pointer-events: none; }
  body { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .nav { padding-top: max(10px, env(safe-area-inset-top)); }
  .nav-bar { height: 56px; border-radius: 18px; }
  .nav .logo-mark { width: 34px; height: 34px; }
  .menu-btn { width: 40px; height: 40px; border-radius: 12px; }
  .menu-btn span { left: 11px; right: 11px; }
  .menu-btn span:nth-child(1) { top: 15px; } .menu-btn span:nth-child(2) { top: 23px; }
  .nav.open .menu-btn span:nth-child(1), .nav.open .menu-btn span:nth-child(2) { top: 19px; }

  /* tighter, app-like section rhythm */
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 28px; gap: 14px; }
  .h2 { font-size: clamp(32px, 9vw, 44px); }
  .kicker { margin-bottom: 12px; }
  .card, .offer, .stack-group, .step, .plugin-card, .sm-group, .nf-box { border-radius: 20px; }

  /* swipeable carousels */
  .bento, .post-grid, .svc-grid, .stack-groups, .process, .offer-grid {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter) 18px; scroll-padding: 0 var(--gutter);
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .bento::-webkit-scrollbar, .post-grid::-webkit-scrollbar, .svc-grid::-webkit-scrollbar,
  .stack-groups::-webkit-scrollbar, .process::-webkit-scrollbar, .offer-grid::-webkit-scrollbar { display: none; }
  .bento > *, .post-grid > *, .svc-grid > *, .stack-groups > *, .process > *, .offer-grid > * {
    flex: 0 0 84%; scroll-snap-align: start; grid-column: auto !important; min-width: 0;
  }
  .process > * { flex-basis: 72%; }
  .bento .card.has-img { min-height: 0; }
  .bento .card.has-img .card-img { min-height: 180px; }
  .reveal.in { transition-delay: 0s !important; }
  .swipe-hint { display: flex; }

  /* project grid: full-width app cards */
  .work-grid, .work-grid.home { gap: 26px; }
  .project-media { border-radius: 20px; }

  /* bottom-sheet modal */
  .modal { place-items: end center; padding: 0; }
  .modal-panel {
    width: 100%; max-height: 90vh; border-radius: 26px 26px 0 0; padding-bottom: env(safe-area-inset-bottom);
    transform: translateY(100%); opacity: 1; transition: transform .45s var(--ease);
  }
  .modal-panel::before { content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: rgba(255,255,255,.85); z-index: 3; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
  .modal.open .modal-panel { transform: none; }
  .modal-img { min-height: 210px; }
  .modal-close { top: 18px; }
  .modal-actions .btn { flex: 1; justify-content: center; }

  /* mobile menu sheet sits above the tab bar area */
  .m-menu { padding-top: calc(86px + env(safe-area-inset-top)); padding-bottom: calc(28px + env(safe-area-inset-bottom)); }

  /* footer: compact */
  footer { padding: 40px 0 24px; }
  .footer-cols { gap: 28px 40px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }

  /* CTA */
  .cta { padding: 72px 0; }
  .cta-actions .btn { flex: 1 1 auto; justify-content: center; }
}

.swipe-hint { display: none; align-items: center; gap: 8px; margin: -14px 0 14px; font-size: 12.5px; color: var(--muted); }
.swipe-hint svg { width: 16px; height: 16px; animation: nudge 1.6s var(--ease) infinite; }
@keyframes nudge { 50% { transform: translateX(5px); } }

/* very small phones */
@media (max-width: 360px) {
  .tab span { font-size: 9.5px; }
  .hx-title { font-size: 38px; }
  .nav .logo-text { font-size: 14px; }
}

/* tablets: 2-column layouts stay comfortable */
@media (min-width: 761px) and (max-width: 1100px) {
  .bento { grid-template-columns: repeat(6, 1fr); }
}
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Hero particles (tech network) ---------- */
.hx-particles { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.4s ease .3s;
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 35%, #000 35%, transparent 80%); mask-image: radial-gradient(ellipse 85% 75% at 50% 35%, #000 35%, transparent 80%); }
.hx-particles.on { opacity: 1; }

/* ---------- My SaaS products ---------- */
.products { padding-top: 0; }
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.product { background: var(--surface); border: 1px solid var(--line); border-radius: 26px; overflow: hidden; display: flex; flex-direction: column; transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.product:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-shot { display: block; position: relative; margin: 12px 12px 0; border-radius: 16px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.product-shot img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; display: block; transition: transform 1s var(--ease); }
.product:hover .product-shot img { transform: scale(1.03); }
.browser { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; background: #fff; border-bottom: 1px solid var(--line); }
.browser i { width: 9px; height: 9px; border-radius: 50%; background: #E5E5E2; }
.browser i:nth-child(1) { background: #FF6159; } .browser i:nth-child(2) { background: #FFBF2F; } .browser i:nth-child(3) { background: #2ACB42; }
.browser b { margin-left: 10px; font-size: 11.5px; font-weight: 500; color: var(--muted); background: var(--bg); padding: 2px 10px; border-radius: 6px; }
.product-body { padding: 24px 26px 28px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; flex: 1; }
.product-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.product-body h3 { margin: 0; font-size: 28px; letter-spacing: -.035em; font-weight: 600; }
.product-tag { margin: 4px 0 6px; font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--ink-2); line-height: 1.3; }
.product-body > p { margin: 0 0 10px; color: var(--muted); font-size: 15px; }
.product-points { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 7px; font-size: 14.5px; }
.product-points li { display: flex; gap: 10px; align-items: flex-start; }
.product-points li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 3px; border-radius: 50%; background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233348D4' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 10px no-repeat; }
.product .works { margin: 0 0 20px; }
.product .btn { margin-top: auto; }
.product .btn svg { width: 14px; height: 14px; }

/* ---------- Chat widget ---------- */
.chat { position: fixed; z-index: 70; right: 20px; bottom: 20px; }
.chat-fab {
  display: flex; align-items: center; gap: 12px; padding: 7px 18px 7px 7px; border-radius: 999px;
  background: var(--ink); color: #fff; box-shadow: 0 18px 40px -14px rgba(15,20,50,.55);
  transition: transform .35s var(--ease), box-shadow .35s;
}
.chat-fab:hover { transform: translateY(-2px); box-shadow: 0 22px 46px -14px rgba(15,20,50,.6); }
.chat-av { position: relative; width: 40px; height: 40px; flex: none; border-radius: 50%; overflow: hidden; background: #DCE1F4; }
.chat-av img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; transform: scale(1.5); transform-origin: 50% 25%; mix-blend-mode: multiply; }
.chat-fab-text { display: flex; flex-direction: column; text-align: left; line-height: 1.2; }
.chat-fab-text strong { font-size: 14px; font-weight: 600; }
.chat-fab-text small { font-size: 11.5px; color: rgba(255,255,255,.7); }
.chat-ic { width: 20px; height: 20px; margin-left: 2px; }
.chat.open .chat-fab { transform: scale(.9); opacity: 0; pointer-events: none; }

.chat-panel {
  position: absolute; right: 0; bottom: 0; width: 370px; max-height: min(600px, calc(100vh - 110px));
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(15,20,50,.45);
  opacity: 0; visibility: hidden; transform: translateY(14px) scale(.97); transform-origin: 100% 100%;
  transition: opacity .25s, transform .4s var(--ease), visibility 0s .4s;
}
.chat.open .chat-panel { opacity: 1; visibility: visible; transform: none; transition: opacity .25s, transform .4s var(--ease), visibility 0s; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: var(--ink); color: #fff; }
.chat-head div { flex: 1; line-height: 1.25; }
.chat-head strong { font-size: 15px; display: block; }
.chat-head small { font-size: 12px; color: rgba(255,255,255,.7); }
.chat-x { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.1); }
.chat-x svg { width: 16px; height: 16px; }
.chat-log { flex: 1; overflow-y: auto; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); min-height: 220px; }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 18px; font-size: 14.5px; line-height: 1.45; animation: hxIn .4s var(--ease) both; opacity: 0; transform: translateY(8px); white-space: pre-wrap; word-wrap: break-word; }
.msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.me { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 6px; }
.msg.ok { background: #E8F8EE; border-color: #BFE8CF; color: #0F5132; }
.msg.err { background: #FFF1F0; border-color: #F5C2C0; color: #842029; }
.msg a { text-decoration: underline; }
.msg.typing { display: inline-flex; gap: 4px; padding: 13px 14px; }
.msg.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: dots 1s infinite; }
.msg.typing i:nth-child(2) { animation-delay: .15s; } .msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 50% { opacity: .25; transform: translateY(-3px); } }
.chat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-chips button { padding: 8px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 500; color: var(--ink-2); transition: border-color .2s, background .2s; }
.chat-chips button:hover { border-color: var(--ink); }
.chat-form { padding: 10px 12px 10px; border-top: 1px solid var(--line); background: #fff; display: grid; gap: 8px; }
.chat-details { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.chat-details[hidden] { display: none; }
.chat-form input, .chat-form textarea { font: inherit; font-size: 14.5px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; width: 100%; min-width: 0; }
.chat-form input:focus, .chat-form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.chat-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.chat-compose { display: flex; gap: 8px; align-items: flex-end; }
.chat-compose textarea { resize: none; max-height: 120px; line-height: 1.4; }
.chat-send { width: 42px; height: 42px; flex: none; border-radius: 13px; background: var(--ink); color: #fff; display: grid; place-items: center; transition: background .2s; }
.chat-send:hover { background: var(--accent); }
.chat-send:disabled { opacity: .5; }
.chat-send svg { width: 18px; height: 18px; }
.chat-note { margin: 0; font-size: 11.5px; color: var(--muted); text-align: center; }

@media (max-width: 960px) { .product-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .chat { right: 14px; bottom: calc(86px + env(safe-area-inset-bottom)); }
  .chat-fab { padding: 6px; }
  .chat-fab-text, .chat-ic { display: none; }
  .chat-av { width: 46px; height: 46px; }
  .chat-fab::after { content: ""; position: absolute; right: 2px; bottom: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v11H9l-5 4z'/%3E%3C/svg%3E") center / 11px no-repeat; border: 2px solid var(--ink); }
  .chat-panel { position: fixed; left: 0; right: 0; bottom: 0; width: auto; max-height: 86vh; border-radius: 24px 24px 0 0; transform: translateY(100%); padding-bottom: env(safe-area-inset-bottom); }
  .chat.open .chat-panel { transform: none; }
  .chat-details { grid-template-columns: 1fr; }
  .nav.open ~ * .chat, body.menu-open .chat { display: none; }
  .product-body { padding: 20px; }
  .product-body h3 { font-size: 24px; }
}
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-note.err { color: #842029; }
.form-done { padding: 30px 6px; text-align: center; }
.form-done h2 { margin: 0 0 10px; font-size: 32px; letter-spacing: -.035em; }
.form-done p { margin: 0; color: var(--muted); }

/* product cards: quieter, editorial */
.product-body { gap: 0; }
.product-kind { font-size: 12.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 8px; }
.product-body h3 { margin: 0 0 10px; }
.product-body > p { margin: 0 0 14px; font-size: 15.5px; color: var(--ink-2); max-width: 52ch; }
.product-body > p.product-stat { margin: -4px 0 18px; padding-left: 12px; border-left: 2px solid var(--ink); font-size: 14px; color: var(--ink); font-weight: 500; }
.product .works { margin: 0 0 22px; }

/* =========================================================
   EDITORIAL SECTION HEADS: index number + label in a side
   column instead of the "eyebrow above heading" pattern
   ========================================================= */
body { counter-reset: sec; }
.kicker { display: none; }
.section-head {
  display: grid; grid-template-columns: minmax(150px, 1fr) 4fr; column-gap: clamp(24px, 4vw, 64px); row-gap: 18px;
  align-items: start; justify-content: stretch; flex-wrap: nowrap;
  padding-top: 22px; border-top: 1px solid var(--line); counter-increment: sec;
}
.section-head > div:first-child { display: contents; }
.section-head .kicker {
  display: block; grid-column: 1; grid-row: 1 / span 2; margin: 0; padding-top: 4px;
  font-size: 13px; text-transform: none; letter-spacing: .01em; color: var(--muted); line-height: 1.4;
}
.section-head .kicker::before {
  content: counter(sec, decimal-leading-zero); display: block; width: auto; height: auto; background: none;
  font-family: var(--serif); font-style: italic; font-size: 30px; line-height: 1; color: var(--ink); margin-bottom: 6px; letter-spacing: 0;
}
.section-head .h2 { grid-column: 2; grid-row: 1; max-width: 17ch; }
.section-head > :not(:first-child) { grid-column: 2; grid-row: 2; max-width: 600px; justify-self: start; }
.section-head > p, .section-head > div > p { margin: 0; }
.dark .section-head, .cta .section-head { border-top-color: var(--dark-line); }

/* keep labels where they carry information (not decorative eyebrows) */
.modal-body .kicker, .m-sub .kicker { display: block; }
.mega-side .kicker { display: block; font-size: 19px; font-weight: 600; letter-spacing: -.02em; text-transform: none; color: #fff; }
.mega-side .kicker::before { display: none; }

/* page heroes: breadcrumb already gives context, give the h1 room */
.page-hero .crumbs ol { margin-bottom: 36px; }

/* comfortable tap targets for small text links */
.link-arrow { display: inline-block; padding: 8px 0; border-bottom: 0; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.footer-email { display: inline-block; padding: 6px 0; }
.credit a { padding: 6px 0; }
.byline a { display: inline-block; padding: 4px 0; }

@media (max-width: 760px) {
  .section-head { grid-template-columns: 1fr; row-gap: 14px; padding-top: 16px; }
  .section-head .kicker { grid-column: 1; grid-row: auto; display: flex; align-items: baseline; gap: 10px; padding: 0; }
  .section-head .kicker::before { display: inline; font-size: 22px; margin: 0; }
  .section-head .h2, .section-head > :not(:first-child) { grid-column: 1; grid-row: auto; }
}

/* fixes: single numbering system; swipe hint visible on phones */
.card .num { display: none; }
@media (max-width: 760px) { .swipe-hint { display: flex; } }

/* SEO & analytics card + 5-column stack */
.c-span-12 { grid-column: span 12; }
.seo-card-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: end; }
.seo-card-grid p { max-width: 560px; }
.seo-card .chips { margin: 0; align-content: end; }
@media (min-width: 1201px) { .stack-groups { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 900px) { .seo-card-grid { grid-template-columns: 1fr; gap: 18px; } }
.contact-form .hp, .chat-form .hp { position: absolute; left: 0; top: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); pointer-events: none; }

/* ---------- Legal pages, footer legal links, cookie consent ---------- */
.legal-prose { max-width: 760px; }
.legal-prose h3 { font-size: 20px; letter-spacing: -.02em; color: var(--ink); margin: 1.6em 0 .4em; font-weight: 600; }
.legal-links { display: inline-flex; gap: 16px; flex-wrap: wrap; }
.legal-links a, .legal-links button { color: inherit; font: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
.legal-links a:hover, .legal-links button:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.consent { position: fixed; z-index: 90; left: 20px; bottom: 20px; max-width: 420px; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.consent[hidden] { display: none; }
.consent p { margin: 0 0 14px; }
.consent strong { color: var(--ink); }
.consent a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.consent-actions { display: flex; gap: 10px; }
.consent-actions .btn { flex: 1; justify-content: center; padding-top: 11px; padding-bottom: 11px; }
@media (max-width: 640px) {
  .consent { left: 16px; right: 16px; bottom: 16px; max-width: none; }
}
