/* ============================================================
 * John Isaacson — v10 enhancement layer (loads after components.css)
 * v7 branding untouched: same tokens, fonts, buttons, nav, footer.
 * Adds: dot-matrix grids · asymmetric hero with John + 3D dot sphere
 *       · art-directed imagery · fade/slide reveals · counters · card tilt
 * Motion = transform/opacity only. Native scrolling only.
 * ============================================================ */

:root {
  --dot: rgba(17, 17, 17, 0.13);
  --dot-soft: rgba(17, 17, 17, 0.075);
  --dot-step: 24px;
}

/* ── Keyframes ── */
@keyframes v10-up { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes v10-rise { from { transform: translateY(18px); } to { transform: none; } }
@keyframes v10-frame { from { transform: scale(0.965); } to { transform: none; } }
@keyframes v10-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes v10-drift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(22px, 22px, 0); } }
@keyframes v10-fade { from { opacity: 0; } to { opacity: 1; } }

/* ── Scroll reveals: upgrade v7 .reveal (transform-only) to fade + slide ──
   Hidden only when v10.js is running and motion is allowed; theme.js adds .visible. */
@media (prefers-reduced-motion: no-preference) {
  .v10-js .reveal:not(.visible) { opacity: 0; }
  .v10-js .reveal.visible { animation: v10-up 0.85s var(--ease-out) backwards; }
  .v10-js .reveal-d1.visible { animation-delay: 0.08s; }
  .v10-js .reveal-d2.visible { animation-delay: 0.16s; }
  .v10-js .reveal-d3.visible { animation-delay: 0.24s; }
  .v10-js .reveal-d4.visible { animation-delay: 0.32s; }
}

/* ── Dot matrix ── */
.dotgrid {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: radial-gradient(circle, var(--dot) 1.15px, transparent 1.7px);
  background-size: var(--dot-step) var(--dot-step);
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 75% 85% at 72% 45%, #000 25%, transparent 78%);
          mask-image: radial-gradient(ellipse 75% 85% at 72% 45%, #000 25%, transparent 78%);
}
.dotgrid__glow {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(230, 0, 0, 0.6) 1.5px, transparent 2.1px);
  background-size: var(--dot-step) var(--dot-step);
  background-position: center top;
  -webkit-mask-image: radial-gradient(170px circle at var(--mx, -999px) var(--my, -999px), #000, transparent 100%);
          mask-image: radial-gradient(170px circle at var(--mx, -999px) var(--my, -999px), #000, transparent 100%);
  opacity: 0; transition: opacity 0.35s ease;
}
.dot-live .dotgrid__glow { opacity: 1; }

/* Alternate sections: quiet dot field, fades out at the edges */
.sec--dots { position: relative; isolation: isolate; }
.sec--dots::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(circle, var(--dot-soft) 1.1px, transparent 1.6px);
  background-size: 22px 22px; background-position: center top;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 70%, transparent);
          mask-image: linear-gradient(180deg, transparent, #000 18%, #000 70%, transparent);
}
#services.sec--dots::before { -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 20%, transparent 80%); mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 20%, transparent 80%); }
#about.sec--dots::before { -webkit-mask-image: radial-gradient(ellipse 45% 70% at 18% 50%, #000 20%, transparent 85%); mask-image: radial-gradient(ellipse 45% 70% at 18% 50%, #000 20%, transparent 85%); }
#results.sec--dots::before { -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 100%, #000 15%, transparent 80%); mask-image: radial-gradient(ellipse 60% 60% at 50% 100%, #000 15%, transparent 80%); }

/* ── Nav: soft shadow once scrolled ── */
.nav { transition: box-shadow 0.25s ease; }
.nav.is-scrolled { box-shadow: 0 10px 30px -22px rgba(0, 0, 0, 0.35); }

/* ================================================================
   HERO — asymmetric: copy left, the framed B&W stage image right,
   living dot matrix behind (canvas, cursor + scroll; CSS dots = fallback)
   ================================================================ */
.hero--v10 { position: relative; overflow: hidden; text-align: left; padding: clamp(40px, 6vw, 88px) 0 clamp(48px, 6vw, 88px); }
.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 4.5vw, 64px); align-items: center; }
.hero__copy { position: relative; z-index: 2; }
.hero--v10 .hero__title { max-width: 15ch; margin: 0 0 22px; font-size: clamp(40px, 4.2vw, 58px); line-height: 1.0; letter-spacing: -0.04em; }
.hero--v10 .lede { max-width: 42ch; margin: 0 0 32px; font-size: clamp(18px, 1.4vw, 20px); }
.hero--v10 .hero__ctas { justify-content: flex-start; }

.dotgrid.is-canvas { background-image: none; -webkit-mask-image: none; mask-image: none; }
.dotgrid.is-canvas .dotgrid__glow { display: none; }
.dotgrid__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.hero__visual { position: relative; margin: 0; perspective: 1400px; }
.hero__frame {
  position: relative; z-index: 1; border-radius: var(--radius-xl); overflow: hidden; background: #0b0b0b;
  box-shadow: 0 50px 90px -46px rgba(0, 0, 0, 0.55), 0 2px 10px rgba(0, 0, 0, 0.06);
  transform: rotateX(var(--trx, 0deg)) rotateY(var(--try, 0deg));
  transition: transform 0.6s var(--ease-out);
}
.hero__frame::after { /* fine inner keyline, like a print mount */
  content: ''; position: absolute; inset: 10px; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: calc(var(--radius-xl) - 8px); pointer-events: none;
}
.hero__frame img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; object-position: 50% 55%; transform: scale(1.08); will-change: transform; }
.hero__cap { margin: 14px 0 0; text-align: left; }
.hero__chip {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 12px;
  background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px;
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.35);
}
.hero__chip--stat { left: -28px; bottom: 64px; flex-direction: column; align-items: flex-start; gap: 2px; }
.hero__chip--stat b { font-weight: 700; font-size: 26px; letter-spacing: -0.03em; line-height: 1; color: var(--ink); }
.hero__chip--stat b::after { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--red); margin-left: 8px; vertical-align: middle; }
.hero__chip--stat span { font-size: 13.5px; color: var(--muted); font-weight: 500; }

@media (prefers-reduced-motion: no-preference) {
  .hero--v10 .hero__title { animation: v10-rise 0.9s var(--ease-out) backwards; }
  .hero--v10 .lede { animation: v10-up 0.9s 0.08s var(--ease-out) backwards; }
  .hero--v10 .hero__ctas { animation: v10-up 0.9s 0.16s var(--ease-out) backwards; }
  .hero__chip--stat { animation: v10-up 0.8s 0.6s var(--ease-out) backwards, v10-float 8s 1.6s ease-in-out infinite; }
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; gap: 28px; }
  .hero--v10 { text-align: center; padding-top: clamp(28px, 6vw, 48px); }
  .hero--v10 .hero__title { max-width: 16ch; margin-left: auto; margin-right: auto; font-size: clamp(34px, 8.6vw, 52px); }
  .hero--v10 .lede { margin-left: auto; margin-right: auto; }
  .hero--v10 .hero__ctas { justify-content: center; }
  .hero__visual { max-width: 640px; margin: 0 auto; width: 100%; }
  .hero__frame { border-radius: var(--radius-lg); }
  .hero__frame::after { inset: 8px; border-radius: calc(var(--radius-lg) - 6px); }
  .hero__frame img { aspect-ratio: 4 / 3; }
  .hero__cap { text-align: center; }
  .hero__chip--stat { left: 12px; bottom: 54px; padding: 10px 12px; }
  .dotgrid { -webkit-mask-image: radial-gradient(ellipse 100% 70% at 50% 70%, #000 25%, transparent 80%); mask-image: radial-gradient(ellipse 100% 70% at 50% 70%, #000 25%, transparent 80%); }
}
@media (max-width: 480px) {
  .hero__chip--stat b { font-size: 21px; }
  .hero__chip--stat span { font-size: 12px; }
}

/* Worked with: v7 .with reset the container's side padding; give the gutter back */
.container.with { padding-left: var(--gutter); padding-right: var(--gutter); padding-top: clamp(8px, 2vw, 16px); }
@media (max-width: 480px) { .with { gap: 8px 18px; } .with .name { font-size: 15.5px; } }

/* B&W grade: every non-stage photo is pulled into the stage image's monochrome look */
.bw { filter: grayscale(1) contrast(1.18) brightness(0.96); }

/* ================================================================
   SERVICES — image-free premium cards: dark dot-matrix plate, big
   number, monochrome icon, light 3D tilt. A B&W photo drops into the
   same plate via ji10_img_if('ji10-svc-*.jpg') once uploaded.
   ================================================================ */
.card { overflow: hidden; }
.card__visual {
  position: relative; display: block; margin: -32px -32px 8px; aspect-ratio: 16 / 7; overflow: hidden;
  background: #0f0f0f; color: #fff; isolation: isolate;
}
.card__visual::before { /* dot matrix */
  content: ''; position: absolute; inset: -12px; z-index: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.2) 1.1px, transparent 1.6px); background-size: 16px 16px;
  -webkit-mask-image: radial-gradient(ellipse 80% 120% at 85% 20%, #000 10%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 120% at 85% 20%, #000 10%, transparent 75%);
  transition: transform 1.2s var(--ease-out);
}
.card__visual::after { /* low red glow */
  content: ''; position: absolute; z-index: 0; width: 60%; aspect-ratio: 1; right: -18%; top: -40%; border-radius: 50%;
  background: radial-gradient(circle, rgba(230, 0, 0, 0.32), transparent 65%);
  opacity: 0.55; transition: opacity 0.5s, transform 0.9s var(--ease-out);
}
.card__visual img { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.15); transition: transform 0.9s var(--ease-out); }
.card__visual.has-img::before { opacity: 0.5; }
.card__num {
  position: absolute; z-index: 1; left: 28px; bottom: 14px; font-weight: 700; font-size: clamp(56px, 6vw, 84px);
  line-height: 0.9; letter-spacing: -0.05em; color: transparent; -webkit-text-stroke: 1.2px rgba(255, 255, 255, 0.55);
  font-variant-numeric: tabular-nums;
}
.card__icon { position: absolute; z-index: 1; right: 24px; top: 22px; width: 40px; height: 40px; color: #fff; opacity: 0.92; }
.card:hover .card__visual::before { transform: translate3d(-8px, 6px, 0); }
.card:hover .card__visual::after { opacity: 1; transform: scale(1.08); }
.card:hover .card__visual img { transform: scale(1.05); }
.card .n { display: inline-flex; align-items: center; gap: 8px; }
.card .n::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.v10-js .card[data-tilt] {
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0px));
  transition: transform 0.35s var(--ease-out), box-shadow 0.25s, border-color 0.25s;
}
.v10-js .card[data-tilt]:hover { --ty: -4px; box-shadow: 0 30px 60px -34px rgba(0, 0, 0, 0.4); }
@media (max-width: 760px) { .card__visual { margin: -26px -24px 6px; } .card__num { left: 22px; } }

/* ================================================================
   VIDEOS — one lead thumbnail + three rows
   ================================================================ */
.chanrow__mark { width: 64px; height: 64px; border-radius: 50%; background: #111; display: grid; place-items: center; box-shadow: 0 0 0 4px #fff, 0 0 0 5px var(--line-2); }
.chanrow__mark .play-mark { width: 30px; height: 22px; }
.vids--feature { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); grid-template-rows: repeat(3, auto); gap: 18px 28px; text-align: left; align-items: start; }
.vids--feature .vid--lead { grid-row: 1 / span 3; gap: 16px; }
.vids--feature .vid--lead h4 { font-size: clamp(20px, 1.9vw, 26px); letter-spacing: -0.02em; line-height: 1.2; }
.vids--feature .vid:not(.vid--lead) { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr); align-items: center; gap: 16px; }
.vids--feature .vid:not(.vid--lead) h4 { font-size: 16.5px; }
.vid__txt { display: grid; gap: 6px; align-content: start; }
.th__play {
  position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%;
  background: var(--red); display: grid; place-items: center; color: #fff;
  opacity: 0; transform: scale(0.8); transition: opacity 0.25s, transform 0.35s var(--ease-out);
  box-shadow: 0 10px 30px -10px rgba(230, 0, 0, 0.6);
}
.th__play svg { width: 22px; height: 22px; fill: currentColor; margin-left: 3px; }
.vid:hover .th__play, .vid--lead .th__play { opacity: 1; transform: none; }
.vid--lead .th__play { width: 72px; height: 72px; margin: -36px 0 0 -36px; }
.vid--lead:hover .th__play { transform: scale(1.08); }
.vids--feature .vid:not(.vid--lead) .th__play { width: 40px; height: 40px; margin: -20px 0 0 -20px; }
.vids--feature .vid:not(.vid--lead) .th__play svg { width: 16px; height: 16px; }
.vid .th img { transition: transform 0.8s var(--ease-out); }
.vid:hover .th img { transform: scale(1.04); }
@media (max-width: 900px) {
  .vids--feature { grid-template-columns: 1fr; grid-template-rows: none; }
  .vids--feature .vid--lead { grid-row: auto; }
}
@media (max-width: 480px) {
  .vids--feature .vid:not(.vid--lead) { grid-template-columns: 42% 1fr; gap: 12px; }
  .vids--feature .vid:not(.vid--lead) h4 { font-size: 15px; }
}

/* ================================================================
   ABOUT — framed studio portrait with a graded mic detail inset
   ================================================================ */
.about__img { position: relative; }
.about__img .about__inset {
  position: absolute; right: -7%; bottom: -6%; width: 42%; aspect-ratio: 1; object-fit: cover; object-position: 60% 40%;
  border-radius: 18px; border: 6px solid #fff; box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.45);
}
.stat b { font-variant-numeric: tabular-nums; }
@media (max-width: 820px) { .about__img .about__inset { right: -3%; } .about__img { margin-bottom: 24px; } }

/* ================================================================
   PROCESS — dotted connector between steps
   ================================================================ */
.steps { position: relative; }
@media (min-width: 901px) {
  .steps::before {
    content: ''; position: absolute; top: 21px; left: 12.5%; right: 12.5%; height: 3px; z-index: 0;
    background-image: radial-gradient(circle, var(--line-2) 1.3px, transparent 1.6px); background-size: 10px 3px;
  }
}
.step .n { position: relative; z-index: 1; box-shadow: 0 0 0 8px var(--bg); transition: background 0.25s, transform 0.35s var(--ease-out); }
.step:hover .n { background: var(--red); transform: scale(1.08); }
.sec__head--accent { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.accent-thumb.bw { filter: grayscale(1) contrast(1.1) brightness(1.3); }
.accent-thumb { width: 220px; aspect-ratio: 21 / 9; object-fit: cover; border-radius: 12px; box-shadow: 0 16px 34px -20px rgba(0, 0, 0, 0.5); }

/* ================================================================
   RESULTS — row hover
   ================================================================ */
.res { transition: background 0.25s; }
.res .r { transition: color 0.25s; }
.res:hover .r { color: var(--red); }

/* ================================================================
   BLOG + CTA
   ================================================================ */
/* Post images are channel-style grabs: graded B&W at rest so the page stays one monochrome look; colour returns on hover */
.post-card .th img { filter: grayscale(1) contrast(1.08); transition: transform 0.8s var(--ease-out), filter 0.5s ease; }
.post-card:hover .th img { transform: scale(1.04); filter: none; }

.cta__panel { position: relative; overflow: hidden; isolation: isolate; }
.cta__panel > *:not(.cta__dots):not(.cta__photo) { position: relative; z-index: 1; }
.cta__photo {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; background-size: cover; background-position: 30% 50%;
  filter: grayscale(1) contrast(1.2) brightness(0.9); opacity: 0.38;
  -webkit-mask-image: linear-gradient(90deg, #000, rgba(0,0,0,0.35) 45%, transparent 75%);
          mask-image: linear-gradient(90deg, #000, rgba(0,0,0,0.35) 45%, transparent 75%);
}
.cta__dots {
  position: absolute; inset: -44px; z-index: 0; pointer-events: none;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.16) 1.2px, transparent 1.7px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, transparent 30%, #000 85%);
          mask-image: radial-gradient(ellipse 70% 80% at 50% 50%, transparent 30%, #000 85%);
}
.cta__panel::after {
  content: ''; position: absolute; z-index: 0; width: 420px; height: 420px; right: -140px; top: -180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(230, 0, 0, 0.35), transparent 65%); pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) { .cta__dots { animation: v10-drift 14s linear infinite; } }

/* ================================================================
   SERVICE PAGES + BLOG HEAD — same dot matrix, CSS only
   ================================================================ */
.sp-hero, .blog__hero { position: relative; overflow: hidden; }
.sp-hero .sp-hero__glow, .blog__hero::before {
  content: ''; display: block; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(circle, var(--dot) 1.15px, transparent 1.7px);
  background-size: var(--dot-step) var(--dot-step); background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 60% 75% at 50% 35%, #000 10%, transparent 75%);
          mask-image: radial-gradient(ellipse 60% 75% at 50% 35%, #000 10%, transparent 75%);
}
.sp-hero__inner, .blog__hero-inner { position: relative; z-index: 1; }
.sp-included, .sp-features { position: relative; isolation: isolate; }
.sp-features::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(circle, var(--dot-soft) 1.1px, transparent 1.6px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 20%, transparent 80%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 0%, #000 20%, transparent 80%);
}
.sp-pain, .detail-feat { transition: transform 0.35s var(--ease-out), box-shadow 0.25s; }
.sp-pain:hover, .detail-feat:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
