*{box-sizing:border-box}

:root{
  font-family:Arial,Helvetica,sans-serif;
  color:#111;
  background:#f1efe9;
}

html,body{
  margin:0;
  min-height:100%;
}

body{
  min-height:100vh;
  background:
    radial-gradient(circle at 20% 30%, rgba(0,0,0,.018) 0 1px, transparent 1.6px),
    radial-gradient(circle at 78% 62%, rgba(0,0,0,.014) 0 1px, transparent 1.4px),
    linear-gradient(rgba(255,255,255,.12), rgba(255,255,255,.12)),
    #f1efe9;
  background-size:8px 8px,11px 11px,auto,auto;
}

button,input{font:inherit}
button{border-radius:0}
.hidden{display:none!important}

.app{
  width:min(1480px,calc(100% - 48px));
  margin:0 auto;
  padding:24px 0;
}

/* STEP 1 + STEP 2 */

.landing{
  min-height:calc(100vh - 48px);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:22px;
}

.upload-box{
  width:min(900px,86vw);
  aspect-ratio:16/9;
  display:grid;
  place-items:center;
  overflow:hidden;
  border:1px solid rgba(17,17,17,.28);
  background:rgba(255,255,255,.18);
  cursor:pointer;
  transition:background .2s ease,border-color .2s ease;
}

.upload-box:hover,
.upload-box.drag{
  background:rgba(255,255,255,.34);
  border-color:rgba(17,17,17,.52);
}

.upload-copy{text-align:center}

.upload-title{
  font-weight:900;
  font-size:clamp(42px,6vw,92px);
  letter-spacing:-.06em;
  line-height:.9;
}

.upload-subtitle{
  margin-top:16px;
  font-size:14px;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.landing-tagline{
  width:min(900px,86vw);
  text-align:center;
  font-size:16px;
  line-height:1.35;
}



/* STEP 3 */

.editor{
  display:grid;
  grid-template-columns:minmax(0,1.55fr) minmax(360px,.72fr);
  gap:48px;
  align-items:stretch;
}

.image-panel{
  position:relative;
  width:100%;
  aspect-ratio:4/3;
  min-height:0;
  display:grid;
  place-items:center;
  overflow:hidden;
  background:rgba(255,255,255,.16);
  border:2px solid #111;
}

canvas{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}

.change-photo{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  width:100%;
  height:100%;
  border:0;
  background:rgba(17,17,17,0);
  color:transparent;
  font-weight:900;
  font-size:clamp(22px,2.3vw,38px);
  letter-spacing:-.04em;
  cursor:pointer;
  transition:background .16s ease,color .16s ease;
}

.image-panel:hover .change-photo,
.change-photo:focus-visible{
  background:rgba(17,17,17,.42);
  color:#f1efe9;
}

.change-photo:focus-visible{
  outline:3px solid #111;
  outline-offset:-6px;
}

.controls{
  min-height:100%;
  display:flex;
  flex-direction:column;
  gap:28px;
  padding-top:2px;
}

.control-group{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.control-label{
  font-weight:900;
  font-size:clamp(34px,3.6vw,64px);
  letter-spacing:-.07em;
  line-height:.82;
}

input[type="range"]{
  -webkit-appearance:none;
  appearance:none;
  width:100%;
  height:28px;
  background:transparent;
  cursor:pointer;
}

input[type="range"]::-webkit-slider-runnable-track{
  height:10px;
  background:#121212;
  border-radius:999px;
}

input[type="range"]::-moz-range-track{
  height:10px;
  background:#121212;
  border-radius:999px;
}

input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance:none;
  appearance:none;
  width:34px;
  height:34px;
  border-radius:50%;
  background:#f1efe9;
  border:5px solid #121212;
  margin-top:-12px;
}

input[type="range"]::-moz-range-thumb{
  width:34px;
  height:34px;
  border-radius:50%;
  background:#f1efe9;
  border:5px solid #121212;
}

.actions{
  display:grid;
  gap:12px;
  margin-top:auto;
}

.action-primary,
.action-secondary{
  width:100%;
  border:2px solid #111;
  padding:18px 20px 16px;
  font-weight:900;
  font-size:22px;
  letter-spacing:-.03em;
  cursor:pointer;
}

.action-primary{
  background:#111;
  color:#f1efe9;
}

.action-primary:disabled{
  opacity:.24;
  cursor:default;
}

.action-secondary{
  background:transparent;
  color:#111;
}

@media(max-width:980px){
  .app{
    width:min(100% - 24px,1480px);
    padding:16px 0;
  }

  .editor{
    grid-template-columns:1fr;
    gap:26px;
  }

  .image-panel{
    aspect-ratio:4/3;
  }

  .controls{
    gap:28px;
  }

  .control-label{
    font-size:clamp(34px,9vw,62px);
  }

  .landing{
    min-height:calc(100vh - 32px);
  }

  .actions{
    margin-top:8px;
  }
}
