:root {
  --desk: #DCE3EC;
  --paper: #F8FAFD;
  --ink: #14202E;
  --muted: #55657A;
  --select: #2F6BFF;
  --dim: rgba(20, 32, 46, .58);
}

* { box-sizing: border-box; margin: 0; }

html, body { height: 100%; }

body {
  background: var(--desk);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
}

/* El recuadro de selección: el resto de la pantalla queda atenuado */
.frame {
  position: relative;
  width: min(640px, 100%);
  padding: clamp(40px, 8vw, 80px) clamp(24px, 6vw, 64px);
  background: var(--paper);
  outline: 2px dashed var(--select);
  outline-offset: 0;
  box-shadow: 0 0 0 100vmax var(--dim);
  animation: marquee .9s ease-out both;
}

h1 {
  font-size: clamp(2rem, 7vw, 3.4rem);
  font-weight: 750;
  letter-spacing: -.03em;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.lead {
  margin-top: 16px;
  font-size: clamp(1rem, 2.6vw, 1.2rem);
  color: var(--muted);
  line-height: 1.5;
  max-width: 34ch;
}

.domain {
  margin-top: 32px;
  font-size: .95rem;
  color: var(--select);
  font-weight: 600;
}

/* Tiradores en las esquinas */
.handle {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #fff;
  border: 2px solid var(--select);
}
.tl { top: -7px; left: -7px; }
.tr { top: -7px; right: -7px; }
.bl { bottom: -7px; left: -7px; }
.br { bottom: -7px; right: -7px; }

/* Etiqueta de dimensiones */
.size {
  position: absolute;
  top: -38px;
  left: 0;
  padding: 4px 8px;
  background: var(--select);
  color: #fff;
  font-size: .8rem;
  font-variant-numeric: tabular-nums;
  border-radius: 4px;
}

/* Único movimiento: el recuadro se "dibuja" al cargar */
@keyframes marquee {
  from { clip-path: inset(0 100% 100% 0); }
  to   { clip-path: inset(-60px -60px -60px -60px); }
}

@media (prefers-reduced-motion: reduce) {
  .frame { animation: none; }
}
