/* ==== Scroll progress ==== */
.scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 0;
  background: var(--accent);
  z-index: 60;
  transition: width 0.08s linear;
}

/* ==== Custom cursor ==== */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 100;
  will-change: transform;
  transform: translate3d(-200px,-200px,0);
}
.cursor-dot {
  width: 5px; height: 5px;
  background: var(--ink); border-radius: 50%;
}
.cursor-ring {
  width: 40px; height: 40px;
  border: 1.5px solid var(--ink); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out),
              background 0.35s, border-color 0.35s, opacity 0.2s;
}
.cursor-label {
  font-family: var(--font-mono); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.06em;
  opacity: 0; transition: opacity 0.2s; color: var(--paper); white-space: nowrap;
}
.cursor-ring.is-active { width: 80px; height: 80px; background: var(--ink); border-color: var(--ink); }
.cursor-ring.is-active .cursor-label { opacity: 1; }
.cursor-ring.is-accent { background: var(--accent); border-color: var(--accent); }
.cursor-ring.is-accent .cursor-label { color: var(--ink); }

@media (hover: none), (pointer: coarse) { .cursor-dot, .cursor-ring { display: none; } }

/* ==== Intro mask ==== */
.intro-mask {
  position: fixed; inset: 0;
  background: var(--ink); color: var(--paper);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
}
.intro-mask__inner {
  display: flex; gap: 14px;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(40px,9vw,140px); letter-spacing: -0.03em;
  overflow: hidden;
}
.intro-mask__word { display: inline-block; transform: translateY(110%); opacity: 0; }

/* ==== Service demos ==== */
.service__demo { perspective: 600px; }

/* Cube */
.demo-cube { width: 86px; height: 86px; transform-style: preserve-3d; animation: spinCube 12s linear infinite; }
.demo-cube__face {
  position: absolute; width: 86px; height: 86px;
  border: 1px solid currentColor; background: transparent;
  transition: background 0.5s var(--ease-out), border-color 0.3s;
}
.demo-cube__face--front  { transform: translateZ(43px); }
.demo-cube__face--back   { transform: rotateY(180deg) translateZ(43px); }
.demo-cube__face--right  { transform: rotateY(90deg) translateZ(43px); }
.demo-cube__face--left   { transform: rotateY(-90deg) translateZ(43px); }
.demo-cube__face--top    { transform: rotateX(90deg) translateZ(43px); }
.demo-cube__face--bottom { transform: rotateX(-90deg) translateZ(43px); }

/* Blob */
.demo-blob { width: 110px; height: 110px; color: var(--ink); transition: color 0.5s; }
.demo-blob__body { animation: blobBob 3.5s ease-in-out infinite; transform-origin: 60px 60px; }
.demo-blob__eye { animation: blink 4s ease-in-out infinite; }
.demo-blob__eye--r { animation-delay: 0.25s; }

/* Kinetic */
.demo-kinetic {
  width: 180px; height: 80px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 900; font-size: 48px; letter-spacing: -0.04em;
  position: relative;
}
.demo-kinetic__word { position: absolute; opacity: 0; animation: kineticCycle 4.5s var(--ease-inout) infinite; }
.demo-kinetic__word:nth-child(1) { animation-delay: 0s; }
.demo-kinetic__word:nth-child(2) { animation-delay: 1.5s; color: var(--accent); -webkit-text-stroke: 1px var(--ink); }
.demo-kinetic__word:nth-child(3) { animation-delay: 3s; }

/* Posters */
.demo-posters { position: relative; width: 150px; height: 100px; }
.demo-posters__poster {
  position: absolute; width: 68px; height: 90px;
  border: 1px solid var(--ink);
  display: flex; align-items: flex-end; justify-content: center; padding: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 9px; letter-spacing: 0.05em;
  transition: transform 0.6s var(--ease-out), background 0.4s, color 0.4s;
  background: var(--paper-2);
}
.demo-posters__poster--1 { left: 14px; top: 5px; transform: rotate(-6deg); z-index: 1; }
.demo-posters__poster--2 { left: 40px; top: 3px; background: var(--ink); color: var(--paper); z-index: 2; }
.demo-posters__poster--3 { left: 66px; top: 5px; transform: rotate(6deg); background: var(--accent); color: var(--ink); z-index: 1; }
.service:hover .demo-posters__poster--1 { transform: rotate(-16deg) translateX(-16px); }
.service:hover .demo-posters__poster--3 { transform: rotate(16deg) translateX(16px); }

/* Illustration */
.demo-illo { width: 130px; height: 130px; color: currentColor; }
.demo-illo__path { stroke-dasharray: 200; animation: drawLine 4s var(--ease-inout) infinite; }
.demo-illo__dot { animation: dotMove 4s var(--ease-inout) infinite; }

/* Browser */
.demo-browser {
  width: 170px; height: 110px;
  background: var(--paper); border: 1px solid var(--ink);
  display: flex; flex-direction: column; overflow: hidden;
  transition: border-color 0.4s;
}
.demo-browser__bar {
  display: flex; gap: 4px; padding: 6px 8px;
  border-bottom: 1px solid var(--rule-strong);
  background: var(--paper-2);
  transition: background 0.4s;
}
.demo-browser__bar span { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); transition: background 0.4s; }
.demo-browser__viewport { flex: 1; overflow: hidden; }
.demo-browser__scroll {
  display: flex; flex-direction: column; gap: 6px; padding: 8px;
  animation: scrollUp 5.5s linear infinite;
}
.demo-browser__row { height: 8px; background: var(--rule-strong); border-radius: 1px; transition: background 0.4s; }
.demo-browser__row--lg { height: 16px; background: var(--ink); }
.demo-browser__row--md { height: 12px; width: 70%; }

/* Branding marks */
.demo-brand { width: 200px; height: 80px; position: relative; display: flex; align-items: center; justify-content: center; }
.demo-brand__mark {
  position: absolute;
  font-family: var(--font-display); font-weight: 700; font-size: 30px; letter-spacing: -0.02em;
  opacity: 0; animation: brandCycle 8s linear infinite;
}
.demo-brand__mark--1 { animation-delay: 0s; }
.demo-brand__mark--2 { animation-delay: 2s; }
.demo-brand__mark--3 { animation-delay: 4s; font-family: var(--font-mono); font-size: 20px; }
.demo-brand__mark--4 { animation-delay: 6s; letter-spacing: 0.1em; }

/* Video / Film */
.demo-film {
  width: 180px; height: 100px;
  display: flex; align-items: center; justify-content: center;
  position: relative; background: var(--ink); border-radius: 3px; overflow: hidden;
  transition: background 0.5s;
}
.service:hover .demo-film { background: rgba(245,242,236,0.08); }
.demo-film__strip {
  display: flex; gap: 6px; height: 100%; align-items: center; padding: 0 10px;
  animation: filmRoll 2s linear infinite;
}
.demo-film__strip span {
  flex-shrink: 0; width: 28px; height: 36px;
  background: rgba(245,242,236,0.12); border: 1px solid rgba(245,242,236,0.25); border-radius: 1px;
}
.demo-film__play {
  position: absolute;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1.5px solid rgba(245,242,236,0.8);
  display: flex; align-items: center; justify-content: center;
  color: var(--paper);
  background: rgba(200,255,0,0);
  transition: background 0.35s, transform 0.35s var(--ease-out);
}
.service:hover .demo-film__play { background: var(--accent); color: var(--ink); transform: scale(1.12); }

/* Product Photography */
.demo-photo {
  width: 140px; height: 110px; position: relative;
  display: flex; align-items: flex-end; justify-content: center;
}
.demo-photo__bg {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, var(--paper-2) 0%, rgba(200,255,0,0.06) 100%);
  border-radius: 4px;
  transition: background 0.5s;
}
.service:hover .demo-photo__bg { background: linear-gradient(160deg, rgba(245,242,236,0.1) 0%, rgba(200,255,0,0.15) 100%); }
.demo-photo__obj {
  position: relative; z-index: 2;
  width: 48px; height: 64px;
  background: var(--ink); border-radius: 4px 4px 2px 2px;
  transition: background 0.4s, transform 0.6s var(--ease-out);
}
.service:hover .demo-photo__obj { background: var(--paper); transform: translateY(-6px); }
.demo-photo__shadow {
  position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
  width: 40px; height: 6px;
  background: rgba(10,10,10,0.15);
  border-radius: 50%; filter: blur(4px);
  z-index: 1;
  transition: opacity 0.4s;
}
.demo-photo__light {
  position: absolute; top: 10px; right: 14px; z-index: 2;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--accent); opacity: 0.7;
  box-shadow: 0 0 16px 6px rgba(200,255,0,0.4);
  animation: lightPulse 2.5s ease-in-out infinite;
}

/* Social Media */
.demo-social { display: flex; align-items: center; justify-content: center; }
.demo-social__grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 3px;
  width: 90px; height: 90px;
}
.demo-social__cell {
  background: var(--paper-2); border-radius: 1px;
  transition: background 0.4s, transform 0.4s var(--ease-out);
}
.demo-social__cell--dark { background: var(--ink); }
.demo-social__cell--accent { background: var(--accent); }
.service:hover .demo-social__cell { transform: scale(0.88); }
.service:hover .demo-social__cell:nth-child(odd) { transform: scale(0.92) rotate(3deg); }
.service:hover .demo-social__cell--dark { background: var(--paper); }

/* ==== Form elements ==== */
.field { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.field label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); }
.field .req { color: var(--accent); }
.field input[type="text"],
.field input[type="email"],
.field textarea {
  width: 100%; padding: 14px 0;
  background: transparent; border: 0;
  border-bottom: 1px solid var(--rule-strong);
  font-size: 17px; font-family: var(--font-display);
  letter-spacing: -0.01em;
  transition: border-color var(--t-fast);
}
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--ink); }
.field input::placeholder, .field textarea::placeholder { color: var(--mute); }
.field textarea { resize: vertical; min-height: 130px; }
.field.is-invalid input, .field.is-invalid textarea { border-bottom-color: #C84A1F; }
.field .err-msg { color: #C84A1F; font-size: 12px; font-family: var(--font-mono); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 14px; border: 1px solid var(--rule-strong); border-radius: 100px;
  font-size: 13px; font-weight: 500;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.chip:hover { border-color: var(--ink); }
.chip.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.radios { display: flex; flex-wrap: wrap; gap: 8px; }
.radio { cursor: pointer; }
.radio input { position: absolute; opacity: 0; pointer-events: none; }
.radio span {
  display: inline-block; padding: 8px 14px; border: 1px solid var(--rule-strong); border-radius: 100px;
  font-size: 13px; font-weight: 500;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.radio:hover span { border-color: var(--ink); }
.radio input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.contact__submit {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 18px 28px; background: var(--ink); color: var(--paper);
  border-radius: 100px; font-size: 15px; font-weight: 500; margin-top: 12px;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.contact__submit:hover { background: var(--accent); color: var(--ink); }
.form-error { color: #C84A1F; font-size: 12px; margin-top: 12px; font-family: var(--font-mono); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ==== Lightbox ==== */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(10,10,10,0.94); color: var(--paper);
  z-index: 120; opacity: 0; pointer-events: none;
  display: flex; align-items: center; justify-content: center; padding: 4vw;
  transition: opacity 0.5s var(--ease-out);
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox__close {
  position: absolute; top: 24px; right: 24px;
  width: 48px; height: 48px; border: 1px solid rgba(245,242,236,0.25); border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: var(--paper);
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.lightbox__close:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.lightbox__inner {
  max-width: 1200px; width: 100%;
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 40px; align-items: center;
}
.lightbox__media { aspect-ratio: 4/3; overflow: hidden; }
.lightbox__media img { width: 100%; height: 100%; object-fit: cover; }
.lightbox__meta { display: flex; flex-direction: column; gap: 14px; }
.lightbox__meta h3 { font-size: clamp(26px,3vw,44px); color: var(--paper); }
.lightbox__meta p { color: rgba(245,242,236,0.65); }
.lightbox__meta .mono { color: var(--accent); }
@media (max-width: 700px) {
  .lightbox__inner { grid-template-columns: 1fr; gap: 20px; }
}
