/* croqi's studios, on a dark ground. One row per studio: the result on one half, a short animation of how it is
   made on the other; .feature--flip swaps the sides. Only Flat Studio keeps the before/after slider. */
.studios {
  padding: clamp(96px, 12vh, 140px) var(--edge) clamp(80px, 10vh, 120px);
  background: #141518;
  color: #f2f2ee;
}
.studios-head { max-width: 1120px; margin: 0 auto; text-align: center; }
.studios .eyebrow { margin: 0; color: #8fb3e0; }
.studios h2 { margin: 18px auto 0; max-width: 20ch; font-size: clamp(36px, 4.2vw, 64px); line-height: 1.04; letter-spacing: -0.035em; font-weight: 700; }

/* a row: two equal halves on the same edges as the heading */
.feature {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: clamp(40px, 6vw, 96px);
  max-width: 1120px;
  margin: clamp(72px, 12vh, 128px) auto 0;
}
.feature--flip .feature-visual { order: 2; }
.feature-tool { margin: 0; color: #8fb3e0; }
.feature h3 { margin: 10px 0 0; font-size: clamp(28px, 2.6vw, 38px); line-height: 1.1; letter-spacing: -0.025em; font-weight: 700; }
.feature-how > p:not(.feature-tool) { margin: 14px 0 0; max-width: 44ch; color: #b9bbc1; font-size: 17px; }

/* the result side: every picture sits in the same 4:5 frame and zooms a touch on hover */
.feature-visual > * { position: relative; margin: 0; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 20px; background: #1e2024; }
.tag {
  position: absolute;
  top: 14px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(17, 18, 20, 0.7);
  color: #fff;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  pointer-events: none;
  backdrop-filter: blur(6px);
}
.tag--left { left: 14px; }
.tag--right { right: 14px; }

/* the slider: the "after" picture fills the frame, the "before" lies on top cut at --x (moved smoothly by studios.js) */
.ba { --x: 50%; user-select: none; }
.ba-after,
.ba-before { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-before { clip-path: inset(0 calc(100% - var(--x)) 0 0); }
.ba-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--x);
  width: 2px;
  margin-left: -1px;
  background: #fff;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}
.ba-line::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111214' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 7l-5 5 5 5M15 7l5 5-5 5'/%3E%3C/svg%3E") center / 22px no-repeat;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, -50%);
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.ba:hover .ba-line::after { transform: translate(-50%, -50%) scale(1.08); }
.ba.is-dragging .ba-line::after { transform: translate(-50%, -50%) scale(0.94); }
.ba-range:focus-visible ~ .ba-line::after { outline: 2px solid #8fb3e0; outline-offset: 3px; }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }

/* a result with its input: the input as a small card in the corner */
.pair-out { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.pair:hover .pair-out { transform: scale(1.025); }
.pair-in {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 2;
  width: 32%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 3px solid #fff;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.5);
}
.pair-in--sketch { object-fit: contain; padding: 6px; }

/* a model in the picture: the frame takes the picture's own 2:3, so the whole figure, face to feet, stays in;
   it stands on the row's outer edge */
.feature-visual > .pair--tall { width: 86%; aspect-ratio: 2 / 3; }
.feature--flip .feature-visual > .pair--tall { margin-left: auto; }

/* the demo: a calm sketch of the studio's panel, a cursor working it (studios.js) */
.demo {
  position: relative;
  margin-top: 32px;
  max-width: 440px;
  padding: 18px;
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.7);
}
.demo-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.demo-head b { font-size: 15px; letter-spacing: -0.01em; }
.demo-steps { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; font-family: var(--mono); font-size: 10px; letter-spacing: 0.04em; }
.demo-steps li { padding: 4px 8px; border-radius: 999px; color: var(--muted); background: var(--ground); transition: background 0.3s, color 0.3s; }
.demo-steps li.is-on { background: var(--ink); color: #fff; }
.demo-body { display: grid; gap: 12px; margin-top: 14px; }
.demo-drop {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 10px;
  border: 1.5px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  transition: border-color 0.3s, background 0.3s;
}
.demo-drop.is-over { border-color: var(--brand); background: rgba(0, 61, 116, 0.05); }
.demo-drop.is-full { border-style: solid; background: var(--ground); }
.demo-drop img { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.demo-drop .mono { font-size: 11px; letter-spacing: 0; }
.demo-drop:not(.is-full) img, .demo-drop:not(.is-full) .mono { display: none; }
.demo-drop.is-full .demo-hint { display: none; }
.demo-label { font-weight: 600; font-size: 12px; }
.demo-note { min-height: 44px; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--ground); line-height: 1.4; transition: border-color 0.3s, background 0.3s; }
.demo-note.is-typing { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(0, 61, 116, 0.12); }
.demo-note .placeholder { color: #a3a6ab; }
.demo-chips { display: flex; gap: 6px; margin-top: 6px; }
.demo-chips span { padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; font-weight: 500; transition: background 0.3s, color 0.3s, border-color 0.3s; }
.demo-chips span.is-on { background: var(--brand); border-color: var(--brand); color: #fff; }
.demo-btn {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  height: 40px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  transition: transform 0.15s, filter 0.15s;
}
.demo-btn.is-pressed { transform: scale(0.96); filter: brightness(1.25); }
.demo-btn i { position: absolute; inset: auto 0 0 0; height: 3px; background: #8fb3e0; transform: scaleX(0); transform-origin: 0 50%; }
.demo-btn.is-running i { transform: scaleX(1); transition: transform var(--run, 1.6s) linear; }
.demo-out { display: grid; grid-template-columns: repeat(var(--n, 1), 1fr); gap: 8px; min-height: 0; }
.demo-out img { width: 100%; height: 100%; min-height: 0; object-fit: cover; border-radius: 10px; background: var(--ground); opacity: 0; transform: translateY(8px) scale(0.98); transition: opacity 0.5s, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.demo-out img.is-in { opacity: 1; transform: none; }
.demo-out.is-contain img { object-fit: contain; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
/* the file the cursor carries in, from outside the panel */
.demo-file {
  position: absolute;
  z-index: 3;
  left: 0;
  top: 0;
  width: 54px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.9s cubic-bezier(0.45, 0, 0.25, 1), opacity 0.3s;
}
.demo-cursor {
  position: absolute;
  z-index: 4;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  pointer-events: none;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.3));
  transition: transform 0.8s cubic-bezier(0.45, 0, 0.25, 1);
}

@media (max-width: 860px) {
  .feature { grid-template-columns: 1fr; }
  .feature--flip .feature-visual { order: 0; }
  .demo { max-width: none; }
}

/* the video result carries a play mark; the file the cursor brings in may start outside the section's edge */
.demo-out.is-video { position: relative; }
.demo-out.is-video::after {
  content: "▶  0:05";
  position: absolute;
  left: 50%;
  top: 50%;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(17, 18, 20, 0.75);
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.5s;
}
.demo-out.is-video:has(img.is-in)::after { opacity: 1; }
.studios { overflow-x: clip; }

/* before the result arrives, its place says what will land there */
.demo-out { position: relative; border-radius: 10px; background: var(--ground); }
.demo-out::before {
  content: "SONUÇ";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #a3a6ab;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  transition: opacity 0.3s;
}
.demo-out:has(img.is-in)::before { opacity: 0; }
/* a demo without a result picture ends on a line that says it is done */
.demo-done { margin: 0; height: 14px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; color: var(--brand); opacity: 0; transition: opacity 0.4s; }
.demo-done.is-in { opacity: 1; }

/* Print Studio: the single print sits alone, its neighbours fade in while croqi works, the tile shrinks into the
   repeat, then croqi's real repeat output fades in on top. Tile geometry is in cqw of the frame (1100x1028 frame,
   the repeat's tile is 372px wide at x 171, y 280). */
.feature-visual > .print { container-type: inline-size; aspect-ratio: 1100 / 1028; background: #1f476a; }
.print-tiles,
.print-single,
.print-out { position: absolute; }
.print-tiles {
  inset: 0;
  background: url("/assets/home/studyo/desen-tekil.jpg") repeat;
  background-size: 50.14cqw 93.45cqw;
  background-position: 24.93cqw 0;
  opacity: 0;
  transition: opacity 0.8s ease, background-size 1.7s cubic-bezier(0.65, 0, 0.25, 1), background-position 1.7s cubic-bezier(0.65, 0, 0.25, 1);
}
/* alone, only the tile's one whole motif shows, centred; when croqi starts it slides up into its place in the tile */
.print-single {
  top: 0;
  left: 24.93cqw;
  width: 50.14cqw;
  height: 100%;
  clip-path: inset(0 0 51% 0);
  transform: translateY(25%);
  transition: opacity 0.6s ease 0.7s, transform 0.8s cubic-bezier(0.65, 0, 0.25, 1);
}
.print-out { inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.7s ease; }
.feature[data-phase="run"] .print-tiles,
.feature[data-phase="done"] .print-tiles { opacity: 1; }
.feature[data-phase="run"] .print-single,
.feature[data-phase="done"] .print-single { opacity: 0; transform: none; }
.feature[data-phase="run"] .print-tiles { transition-delay: 0.6s, 0s, 0s; }
.feature[data-phase="done"] .print-tiles { background-size: 33.82cqw 63.03cqw; background-position: 15cqw 24.1cqw; }
.feature[data-phase="done"] .print-out { opacity: 1; transition-delay: 1.6s; }
.print-tag { display: grid; }
.print-tag b { grid-area: 1 / 1; font-weight: 400; transition: opacity 0.4s; }
.print-tag b + b,
.feature[data-phase="done"] .print-tag b:first-child { opacity: 0; }
.feature[data-phase="done"] .print-tag b + b { opacity: 1; transition-delay: 0.9s; }
.feature[data-phase="done"] .print-tag b { transition-delay: 0.9s; }
